Home
last modified time | relevance | path

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

12345

/openbmc/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 …]
/openbmc/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 …]
/openbmc/linux/drivers/net/ethernet/microchip/sparx5/
H A Dsparx5_dcb.c26 [SPARX5_DCB_APPTRUST_DSCP] = "dscp",
28 [SPARX5_DCB_APPTRUST_DSCP_PCP] = "dscp pcp"
59 /* Dscp checks */ in sparx5_dcb_app_validate()
146 u16 dscp; in sparx5_dcb_app_update() local
149 dscp_map = &qos.dscp.map; in sparx5_dcb_app_update()
157 /* Get dscp ingress mapping */ in sparx5_dcb_app_update()
180 /* Get dscp rewrite mapping */ in sparx5_dcb_app_update()
189 * classified DSCP, for each classified DP level. Rewrite of in sparx5_dcb_app_update()
190 * DSCP is only enabled, if we have active mappings. in sparx5_dcb_app_update()
193 dscp = fls64(dscp_rewr_map.map[i]) - 1; in sparx5_dcb_app_update()
[all …]
H A Dsparx5_port.c1157 sparx5_port_qos_dscp_set(port, &qos->dscp); in sparx5_port_qos_set()
1263 u16 dscp; in sparx5_port_qos_dscp_rewr_set() local
1266 /* On egress, rewrite DSCP value to either classified DSCP or frame in sparx5_port_qos_dscp_rewr_set()
1267 * DSCP. If enabled; classified DSCP, if disabled; frame DSCP. in sparx5_port_qos_dscp_rewr_set()
1276 /* On ingress, map each classified QoS class and DP to classified DSCP in sparx5_port_qos_dscp_rewr_set()
1280 dscp = qos->map.map[i]; in sparx5_port_qos_dscp_rewr_set()
1281 spx5_rmw(ANA_CL_QOS_MAP_CFG_DSCP_REWR_VAL_SET(dscp), in sparx5_port_qos_dscp_rewr_set()
1293 u8 *dscp = qos->map.map; in sparx5_port_qos_dscp_set() local
1296 /* Enable/disable dscp and dp for qos classification. in sparx5_port_qos_dscp_set()
1297 * Disable rewrite of dscp values for now. in sparx5_port_qos_dscp_set()
[all …]
/openbmc/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",
/openbmc/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 Dinet_ecn.h120 static inline void ipv4_copy_dscp(unsigned int dscp, struct iphdr *inner) in ipv4_copy_dscp() argument
122 dscp &= ~INET_ECN_MASK; in ipv4_copy_dscp()
123 ipv4_change_dsfield(inner, INET_ECN_MASK, dscp); in ipv4_copy_dscp()
166 static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner) in ipv6_copy_dscp() argument
168 dscp &= ~INET_ECN_MASK; in ipv6_copy_dscp()
169 ipv6_change_dsfield(inner, INET_ECN_MASK, dscp); in ipv6_copy_dscp()
/openbmc/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 …]
H A Dlan966x_port.c427 /* Enable/disable dscp for qos classification. */ in lan966x_port_qos_dscp_set()
432 /* Map each dscp value to priority and dp */ in lan966x_port_qos_dscp_set()
440 /* Set per-dscp trust */ in lan966x_port_qos_dscp_set()
506 u16 dscp; in lan966x_port_qos_dscp_rewr_set() local
519 /* Map each classified Qos class and DP to classified DSCP value */ in lan966x_port_qos_dscp_rewr_set()
521 dscp = qos->map[i]; in lan966x_port_qos_dscp_rewr_set()
523 lan_rmw(ANA_DSCP_REWR_CFG_DSCP_QOS_REWR_VAL_SET(dscp), in lan966x_port_qos_dscp_rewr_set()
541 lan966x_port_qos_dscp_set(port, &qos->dscp); in lan966x_port_qos_set()
/openbmc/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))" \
/openbmc/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 …]
/openbmc/linux/include/uapi/linux/netfilter/
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
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
/openbmc/linux/tools/testing/selftests/netfilter/
H A Dnft_flowtable.sh199 ip dscp cs3 counter name ip4dscp3 accept
200 ip dscp 0 counter name ip4dscp0 accept
295 echo "FAIL: dscp counters do not match, expected dscp3 == 0, dscp0 > 0, but got $pc4,$pc4z" 1>&2
302 echo "FAIL: dscp counters do not match, expected dscp3 and dscp0 > 0 but got $pc4,$pc4z" 1>&2
309 echo "FAIL: dscp counters do not match, expected dscp3 > 0, dscp0 == 0 but got $pc4,$pc4z" 1>&2
316 echo "FAIL: dscp counters do not match, expected dscp3 > 0, dscp0 == 0 but got $pc4,$pc4z" 1>&2
322 echo "FAIL: Unknown DSCP check" 1>&2
328 echo "PASS: $what: dscp packet counters match"
410 ip dscp set cs3
427 ip dscp set cs3
[all …]
/openbmc/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" \
/openbmc/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 …]
/openbmc/linux/net/sched/
H A Dact_ctinfo.c34 u8 dscp, newdscp; in tcf_ctinfo_dscp_set() local
41 dscp = ipv4_get_dsfield(ip_hdr(skb)) & ~INET_ECN_MASK; in tcf_ctinfo_dscp_set()
42 if (dscp != newdscp) { in tcf_ctinfo_dscp_set()
54 dscp = ipv6_get_dsfield(ipv6_hdr(skb)) & ~INET_ECN_MASK; in tcf_ctinfo_dscp_set()
55 if (dscp != newdscp) { in tcf_ctinfo_dscp_set()
197 "dscp mask must be 6 contiguous bits"); in tcf_ctinfo_init()
206 "dscp statemask must not overlap dscp mask"); in tcf_ctinfo_init()
/openbmc/linux/net/ipv4/
H A Dfib_rules.c39 dscp_t dscp; member
53 if (r->dst_len || r->src_len || r->dscp) in fib4_rule_matchall()
189 if (r->dscp && r->dscp != inet_dsfield_to_dscp(fl4->flowi4_tos)) in fib4_rule_match()
234 /* IPv4 currently doesn't handle high order DSCP bits correctly */ in fib4_rule_configure()
239 rule4->dscp = inet_dsfield_to_dscp(frh->tos); in fib4_rule_configure()
323 if (frh->tos && inet_dscp_to_dsfield(rule4->dscp) != frh->tos) in fib4_rule_compare()
347 frh->tos = inet_dscp_to_dsfield(rule4->dscp); in fib4_rule_fill()
/openbmc/linux/drivers/net/ethernet/ti/
H A Dcpsw_priv.h204 #define RX_DSCP_PRI_MAP0 0x30 /* Rx DSCP Priority to Rx Packet Mapping */
205 #define RX_DSCP_PRI_MAP1 0x34 /* Rx DSCP Priority to Rx Packet Mapping */
206 #define RX_DSCP_PRI_MAP2 0x38 /* Rx DSCP Priority to Rx Packet Mapping */
207 #define RX_DSCP_PRI_MAP3 0x3c /* Rx DSCP Priority to Rx Packet Mapping */
208 #define RX_DSCP_PRI_MAP4 0x40 /* Rx DSCP Priority to Rx Packet Mapping */
209 #define RX_DSCP_PRI_MAP5 0x44 /* Rx DSCP Priority to Rx Packet Mapping */
210 #define RX_DSCP_PRI_MAP6 0x48 /* Rx DSCP Priority to Rx Packet Mapping */
211 #define RX_DSCP_PRI_MAP7 0x4c /* Rx DSCP Priority to Rx Packet Mapping */
217 #define DSCP_PRI_EN BIT(16) /* DSCP Priority Enable */
/openbmc/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()
/openbmc/linux/net/ipv6/
H A Dfib6_rules.c29 dscp_t dscp; member
36 if (r->dst.plen || r->src.plen || r->dscp) in fib6_rule_matchall()
331 if (r->dscp && r->dscp != ip6_dscp(fl6->flowlabel)) in fib6_rule_match()
362 rule6->dscp = inet_dsfield_to_dscp(frh->tos); in fib6_rule_configure()
416 if (frh->tos && inet_dscp_to_dsfield(rule6->dscp) != frh->tos) in fib6_rule_compare()
437 frh->tos = inet_dscp_to_dsfield(rule6->dscp); in fib6_rule_fill()
/openbmc/linux/drivers/net/ethernet/netronome/nfp/abm/
H A Dmain.h44 * @num_prios: number of supported DSCP priorities
45 * @num_bands: number of supported DSCP priority bands
54 * @dscp_mask: mask FW will apply on DSCP field
201 * @dscp_map: list of DSCP to band mappings
/openbmc/linux/drivers/net/wireless/ath/ath11k/
H A Dhal_tx.c14 /* dscp_tid_map - Default DSCP-TID mapping
16 * DSCP TID
102 /* Configure each DSCP-TID mapping in three bits there by configure in ath11k_hal_tx_set_dscp_tid_map()

12345