Home
last modified time | relevance | path

Searched full:dscp (Results 1 – 25 of 115) sorted by relevance

12345

/linux/tools/testing/selftests/drivers/net/microchip/
H A Dksz9477_qos.sh125 local dscp=$5;
145 elif [ "${apptrust_order}" == "dscp" ]; then
146 echo "Apptrust order is DSCP."
153 elif [ "${apptrust_order}" == "pcp dscp" ]; then
154 echo "Apptrust order is PCP DSCP."
174 # independently of the DSCP or PCP global mapping. On the egress path,
175 # the high priority status is assigned based on the DSCP or PCP global
215 -B ${H2_IPV4} -t icmp unreach,code=1,dscp=${dscp}"
218 -B ${H2_IPV6} -t icmp6 type=1,code=0,dscp=${dscp}"
384 local order_variants=("pcp dscp" "dscp" "pcp")
[all …]
/linux/drivers/net/dsa/microchip/
H A Dksz_dcb.c6 #include <net/dscp.h>
68 * The priority sources, including Tail Tag, ACL, VLAN PCP and DSCP are ordered
73 * 1. Tail Tag - Highest priority, overrides ACL, VLAN PCP, and DSCP priorities.
74 * 2. ACL - Overrides VLAN PCP and DSCP priorities.
75 * 3. VLAN PCP - Overrides DSCP priority.
76 * 4. DSCP - Lowest priority, does not override any other priority source.
91 "empty", "dscp", "pcp", "dscp pcp"
109 * ksz_get_dscp_prio_reg - Retrieves the DSCP-to-priority-mapping register
112 * @per_reg: Pointer to the number of DSCP values per register
115 * This function retrieves the DSCP to priority mapping register, the number of
[all …]
H A Dksz_dcb.h13 int ksz_port_get_dscp_prio(struct dsa_switch *ds, int port, u8 dscp);
14 int ksz_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio);
15 int ksz_port_del_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio);
/linux/drivers/net/wireless/ath/ath12k/
H A Dhal_tx.c14 /* dscp_tid_map - Default DSCP-TID mapping
16 * DSCP TID
27 static inline u8 dscp2tid(u8 dscp) in dscp2tid() argument
29 return dscp >> 3; in dscp2tid()
73 u8 hw_map_val[HAL_DSCP_TID_TBL_SIZE], dscp, tid; in ath12k_hal_tx_set_dscp_tid_map() local
87 /* Configure each DSCP-TID mapping in three bits there by configure in ath12k_hal_tx_set_dscp_tid_map()
90 for (i = 0, dscp = 0; i < HAL_DSCP_TID_TBL_SIZE; i += 3) { in ath12k_hal_tx_set_dscp_tid_map()
91 tid = dscp2tid(dscp); in ath12k_hal_tx_set_dscp_tid_map()
93 dscp++; in ath12k_hal_tx_set_dscp_tid_map()
95 tid = dscp2tid(dscp); in ath12k_hal_tx_set_dscp_tid_map()
[all …]
/linux/tools/testing/selftests/drivers/net/mlxsw/
H A Dqos_dscp_router.sh4 # Test for DSCP prioritization in the router.
7 # their DSCP (which in this test uses only values 0..7) intact as they are
9 # with the same DSCP as the requests, and likewise pass through the switch
13 # according to the table in reprioritize(). Thus, say, DSCP 7 maps to priority
14 # 4, which on egress maps back to DSCP 4. The response packet then gets
15 # reprioritized to 6, getting DSCP 6 on egress.
105 dcb app add dev $swp1 dscp-prio 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
106 dcb app add dev $swp2 dscp-prio 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
111 dcb app del dev $swp2 dscp-prio 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
112 dcb app del dev $swp1 dscp-prio 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
[all …]
H A Dqos_dscp_bridge.sh4 # Test for DSCP prioritization and rewrite. Packets ingress $swp1 with a DSCP
6 # the DSCP value is updated to match the map at that interface. The updated DSCP
9 # ICMP responses are produced with the same DSCP tag that arrived at $h2. They
10 # go through prioritization at $swp2 and DSCP retagging at $swp1. The tag is
23 # | | dcb dscp-prio 10:0...17:7 dcb dscp-prio 20:0...27:7 | |
75 dcb app add dev $swp1 dscp-prio 10:0 11:1 12:2 13:3 14:4 15:5 16:6 17:7
76 dcb app add dev $swp2 dscp-prio 20:0 21:1 22:2 23:3 24:4 25:5 26:6 27:7
81 dcb app del dev $swp2 dscp-prio 20:0 21:1 22:2 23:3 24:4 25:5 26:6 27:7
82 dcb app del dev $swp1 dscp-prio 10:0 11:1 12:2 13:3 14:4 15:5 16:6 17:7
160 check_err $? "DSCP $key: Expected to capture $expect packets, got $delta."
[all …]
/linux/tools/testing/selftests/net/
H A Dfib_rule_tests.sh296 fib_check_iproute_support "dscp" "tos"
298 match="dscp 0x3f"
302 "$getnomatch" "dscp redirect to table" \
303 "dscp no redirect to table"
305 match="dscp 0x3f"
309 "$getnomatch" "iif dscp redirect to table" \
310 "iif dscp no redirect to table"
313 ip rule help 2>&1 | grep -q "DSCP\[/MASK\]"
315 match="dscp 0x0f/0x0f"
321 "$getnomatch" "dscp masked redirect to table" \
[all …]
/linux/net/netfilter/
H A Dxt_DSCP.c2 /* x_tables module for setting the IPv4/IPv6 DSCP field, Version 1.8
7 * See RFC2474 for a description of the DSCP field within the IP Header.
20 MODULE_DESCRIPTION("Xtables: DSCP/TOS field modification");
33 u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT; in dscp_tg() local
35 if (dscp != dinfo->dscp) { in dscp_tg()
40 dinfo->dscp << XT_DSCP_SHIFT); in dscp_tg()
50 u_int8_t dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> XT_DSCP_SHIFT; in dscp_tg6() local
52 if (dscp != dinfo->dscp) { in dscp_tg6()
57 dinfo->dscp << XT_DSCP_SHIFT); in dscp_tg6()
66 if (info->dscp > XT_DSCP_MAX) in dscp_tg_check()
[all …]
H A Dxt_dscp.c2 /* IP tables module for matching the value of the IPv4/IPv6 DSCP field
17 MODULE_DESCRIPTION("Xtables: DSCP/TOS field match");
28 u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT; in dscp_mt() local
30 return (dscp == info->dscp) ^ !!info->invert; in dscp_mt()
37 u_int8_t dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> XT_DSCP_SHIFT; in dscp_mt6() local
39 return (dscp == info->dscp) ^ !!info->invert; in dscp_mt6()
46 if (info->dscp > XT_DSCP_MAX) in dscp_mt_check()
66 .name = "dscp",
74 .name = "dscp",
/linux/include/net/
H A Dinet_dscp.h3 * inet_dscp.h: helpers for handling differentiated services codepoints (DSCP)
5 * DSCP is defined in RFC 2474:
9 * | DSCP | CU |
12 * DSCP: differentiated services codepoint
15 * The whole DSCP + CU bits form the DS field.
27 /* Special type for storing DSCP values.
30 * Using dscp_t allows to strictly separate DSCP and ECN bits, thus avoiding
34 * Note: to get the real DSCP value contained in a dscp_t variable one would
47 static inline __u8 inet_dscp_to_dsfield(dscp_t dscp) in inet_dscp_to_dsfield() argument
49 return (__force __u8)dscp; in inet_dscp_to_dsfield()
H A Ddscp.h8 * DSCP Pools and Codepoint Space Division:
12 * packet headers. This field can carry one of 64 distinct DSCP (Differentiated
15 * a specific registration procedure for assigning DSCP values:
19 * This pool includes DSCP values ending in '0' (binary), allocated via
22 * well-known DSCP values such as CS0-CS7, AFxx, EF, and VOICE-ADMIT.
26 * Reserved for DSCP values ending in '11' (binary), this pool is designated
35 * a secondary standardization resource should Pool 1 become exhausted. DSCP
40 * https://www.iana.org/assignments/dscp-registry/dscp-registry.xhtml
43 /* Pool 1: Standardized DSCP values as per [RFC8126] */
H A Dieee8021q.h36 #define SIMPLE_IETF_DSCP_TO_IEEE8021Q_TT(dscp) ((dscp >> 3) & 0x7) argument
40 int ietf_dscp_to_ieee8021q_tt(u8 dscp);
45 static inline int ietf_dscp_to_ieee8021q_tt(u8 dscp) in ietf_dscp_to_ieee8021q_tt() argument
H A Droute.h187 __be32 saddr, dscp_t dscp, in ip_route_output() argument
192 .flowi4_tos = inet_dscp_to_dsfield(dscp), in ip_route_output()
218 dscp_t dscp, struct net_device *dev,
222 dscp_t dscp, struct net_device *dev);
225 dscp_t dscp, struct net_device *dev,
229 ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, dscp_t dscp, in ip_route_input() argument
235 reason = ip_route_input_noref(skb, dst, src, dscp, devin); in ip_route_input()
/linux/net/ipv4/
H A Dfib_rules.c39 dscp_t dscp; member
41 u8 dscp_full:1; /* DSCP or TOS selector */
55 if (r->dst_len || r->src_len || r->dscp) in fib4_rule_matchall()
191 /* When DSCP selector is used we need to match on the entire DSCP field in fib4_rule_match()
193 * to mask the upper three DSCP bits prior to matching to maintain in fib4_rule_match()
197 (r->dscp ^ inet_dsfield_to_dscp(fl4->flowi4_tos)) & r->dscp_mask) in fib4_rule_match()
199 else if (!r->dscp_full && r->dscp && in fib4_rule_match()
200 !fib_dscp_masked_match(r->dscp, fl4)) in fib4_rule_match()
234 if (rule4->dscp) { in fib4_nl2rule_dscp()
235 NL_SET_ERR_MSG(extack, "Cannot specify both TOS and DSCP"); in fib4_nl2rule_dscp()
[all …]
/linux/net/core/
H A Dieee8021q_helpers.c7 #include <net/dscp.h>
159 * ietf_dscp_to_ieee8021q_tt - Map IETF DSCP to IEEE 802.1Q Traffic Type
160 * @dscp: IETF DSCP value
162 * This function maps an IETF DSCP value to an IEEE 802.1Q Traffic Type (TT).
163 * Since there is no corresponding mapping between DSCP and IEEE 802.1Q Traffic
165 * the mapping between DSCP and 802.11 User Priority (UP) values.
167 * Return: IEEE 802.1Q Traffic Type corresponding to the given DSCP value
169 int ietf_dscp_to_ieee8021q_tt(u8 dscp) in ietf_dscp_to_ieee8021q_tt() argument
171 switch (dscp) { in ietf_dscp_to_ieee8021q_tt()
199 * between DSCP and 802.11 User Priority (UP) values. The mapping in ietf_dscp_to_ieee8021q_tt()
[all …]
/linux/net/ipv6/
H A Dfib6_rules.c31 dscp_t dscp; member
33 u8 dscp_full:1; /* DSCP or TOS selector */
40 if (r->dst.plen || r->src.plen || r->dscp || r->flowlabel_mask) in fib6_rule_matchall()
335 if ((r->dscp ^ ip6_dscp(fl6->flowlabel)) & r->dscp_mask) in fib6_rule_match()
358 if (rule6->dscp) { in fib6_nl2rule_dscp()
359 NL_SET_ERR_MSG(extack, "Cannot specify both TOS and DSCP"); in fib6_nl2rule_dscp()
363 rule6->dscp = inet_dsfield_to_dscp(nla_get_u8(nla) << 2); in fib6_nl2rule_dscp()
378 "Cannot specify DSCP mask without DSCP value"); in fib6_nl2rule_dscp_mask()
383 if (rule6->dscp & ~dscp_mask) { in fib6_nl2rule_dscp_mask()
384 NL_SET_ERR_MSG_ATTR(extack, nla, "Invalid DSCP mask"); in fib6_nl2rule_dscp_mask()
[all …]
/linux/drivers/net/ethernet/microchip/lan966x/
H A Dlan966x_dcb.c20 [LAN966X_DCB_APPTRUST_DSCP] = "dscp",
22 [LAN966X_DCB_APPTRUST_DSCP_PCP] = "dscp pcp"
64 /* Get dscp ingress mapping */ in lan966x_dcb_app_update()
65 for (int i = 0; i < ARRAY_SIZE(qos.dscp.map); i++) { in lan966x_dcb_app_update()
68 qos.dscp.map[i] = dcb_getapp(dev, &app_itr); in lan966x_dcb_app_update()
86 /* Get dscp rewrite mapping */ in lan966x_dcb_app_update()
104 /* Enable use of dscp for queue classification */ in lan966x_dcb_app_update()
106 qos.dscp.enable = true; in lan966x_dcb_app_update()
115 /* DSCP mapping is global for all ports, so set and delete app entries are
153 /* Dscp checks */ in lan966x_dcb_app_validate()
[all …]
/linux/tools/testing/selftests/net/forwarding/
H A Dpedit_dsfield.sh131 # TOS 125: DSCP 31, ECN 1. Used for testing that the relevant part is
191 local dscp
193 for dscp in 0 1 2 3 32 61 62 63; do
195 "ip dsfield set $((dscp << 2)) retain 0xfc" \
196 ip "ip_tos $(((dscp << 2) | 1))" \
236 do_test_pedit_dsfield_common "$locus" "set DSCP + set ECN" \
271 local dscp
273 for dscp in 0 1 2 3 32 61 62 63; do
275 "ip6 traffic_class set $((dscp << 2)) retain 0xfc" \
276 ipv6 "ip_tos $(((dscp << 2) | 1))" \
/linux/drivers/net/ethernet/intel/ice/
H A Dice_dcb_nl.c89 /* in DSCP mode up->tc mapping cannot change */ in ice_dcbnl_setets()
185 /* DSCP configuration is not DCBx negotiated */ in ice_dcbnl_setdcbx()
741 /* ONLY DSCP APP TLVs have operational significance */ in ice_dcbnl_setapp()
747 netdev_err(netdev, "can't do DSCP QoS when FW DCB agent active\n"); in ice_dcbnl_setapp()
758 netdev_err(netdev, "DSCP value 0x%04X out of range\n", in ice_dcbnl_setapp()
786 netdev_err(netdev, "DSCP value 0x%04X already user mapped\n", in ice_dcbnl_setapp()
799 /* If port is not in DSCP mode, need to set */ in ice_dcbnl_setapp()
803 /* set DSCP mode */ in ice_dcbnl_setapp()
807 netdev_err(netdev, "Failed to set DSCP PFC mode %d\n", in ice_dcbnl_setapp()
811 netdev_info(netdev, "Switched QoS to L3 DSCP mode\n"); in ice_dcbnl_setapp()
[all …]
/linux/tools/testing/selftests/net/netfilter/
H A Dnft_flowtable.sh193 ip dscp cs3 counter name ip4dscp3 accept
194 ip dscp 0 counter name ip4dscp0 accept
283 echo "FAIL: dscp counters do not match, expected dscp3 == 0, dscp0 > 0, but got $pc4,$pc4z" 1>&2
290 echo "FAIL: dscp counters do not match, expected dscp3 and dscp0 > 0 but got $pc4,$pc4z" 1>&2
297 echo "FAIL: dscp counters do not match, expected dscp3 > 0, dscp0 == 0 but got $pc4,$pc4z" 1>&2
304 echo "FAIL: dscp counters do not match, expected dscp3 > 0, dscp0 == 0 but got $pc4,$pc4z" 1>&2
310 echo "FAIL: Unknown DSCP check" 1>&2
316 echo "PASS: $what: dscp packet counters match"
386 ip dscp set cs3
403 ip dscp set cs3
[all …]
/linux/net/6lowpan/
H A Diphc.c513 /* get the dscp values from iphc tf format and set it to ipv6hdr */
516 /* DSCP is at place after ECN */ in lowpan_iphc_tf_set_dscp()
517 u8 dscp = tf[0] & 0x3f; in lowpan_iphc_tf_set_dscp() local
520 hdr->priority |= ((dscp & 0x3c) >> 2); in lowpan_iphc_tf_set_dscp()
522 hdr->flow_lbl[0] |= ((dscp & 0x03) << 6); in lowpan_iphc_tf_set_dscp()
535 * higher nibbles are part of DSCP + ECN. in lowpan_iphc_tf_set_lbl()
553 /* ECN + DSCP + 4-bit Pad + Flow Label (4 bytes) */ in lowpan_iphc_tf_decompress()
560 * |ECN| DSCP | rsv | Flow Label | in lowpan_iphc_tf_decompress()
568 /* ECN + 2-bit Pad + Flow Label (3 bytes), DSCP is elided. */ in lowpan_iphc_tf_decompress()
582 /* ECN + DSCP (1 byte), Flow Label is elided. */ in lowpan_iphc_tf_decompress()
[all …]
/linux/include/uapi/linux/netfilter/
H A Dxt_dscp.h2 /* x_tables module for matching the IPv4/IPv6 DSCP field
7 * See RFC2474 for a description of the DSCP field within the IP Header.
22 __u8 dscp; member
H A Dxt_DSCP.h2 /* x_tables module for setting the IPv4/IPv6 DSCP field
8 * See RFC2474 for a description of the DSCP field within the IP Header.
19 __u8 dscp; member
/linux/tools/testing/selftests/drivers/net/ocelot/
H A Dbasic_qos.sh227 dcb app add dev ${swp1} dscp-prio CS4:4
228 run_test "Trusted DSCP QoS classification" ${h1} 4 ${tos}
229 dcb app del dev ${swp1} dscp-prio CS4:4
232 run_test "Untrusted DSCP QoS classification follows VLAN PCP" \
236 run_test "Untrusted DSCP QoS classification follows port default" \
/linux/drivers/net/ethernet/netronome/nfp/nic/
H A Ddcb.c162 /* We only refresh dscp in dscp trust mode. */ in update_dscp_maxrate()
399 static int nfp_nic_set_dscp2prio(struct nfp_net *nn, u8 dscp, u8 prio) in nfp_nic_set_dscp2prio() argument
416 NFP_DCB_DATA_OFF_DSCP2IDX + dscp); in nfp_nic_set_dscp2prio()
425 dcb->dscp2prio[dscp] = prio; in nfp_nic_set_dscp2prio()
493 /* Set fw dscp mapping to 0 */ in nfp_nic_dcbnl_ieee_delapp()
503 /* Decrease dscp counter */ in nfp_nic_dcbnl_ieee_delapp()
506 /* If no dscp mapping is configured, trust pcp */ in nfp_nic_dcbnl_ieee_delapp()

12345