Lines Matching refs:fsp

9 aq_rule_is_approve(struct ethtool_rx_flow_spec *fsp)
11 if (fsp->flow_type & FLOW_MAC_EXT)
14 switch (fsp->flow_type & ~FLOW_EXT) {
26 switch (fsp->h_u.usr_ip4_spec.proto) {
36 switch (fsp->h_u.usr_ip6_spec.l4_proto) {
68 struct ethtool_rx_flow_spec *fsp)
76 if (rule->aq_fsp.location == fsp->location)
78 if (aq_match_filter(&rule->aq_fsp, fsp)) {
90 struct ethtool_rx_flow_spec *fsp)
95 if (fsp->location < AQ_RX_FIRST_LOC_FL3L4 ||
96 fsp->location > last_location) {
113 fsp->location != AQ_RX_FIRST_LOC_FL3L4 + 4 &&
114 fsp->location != AQ_RX_FIRST_LOC_FL3L4) {
127 struct ethtool_rx_flow_spec *fsp)
132 if (fsp->location < AQ_RX_FIRST_LOC_FETHERT ||
133 fsp->location > last_location) {
141 if (be16_to_cpu(fsp->m_ext.vlan_tci) == VLAN_PRIO_MASK &&
142 fsp->m_u.ether_spec.h_proto == 0U) {
154 struct ethtool_rx_flow_spec *fsp)
158 if (fsp->location < AQ_RX_FIRST_LOC_FVLANID ||
159 fsp->location > AQ_RX_LAST_LOC_FVLANID) {
168 (!test_bit(be16_to_cpu(fsp->h_ext.vlan_tci) & VLAN_VID_MASK,
175 if (fsp->ring_cookie > cfg->num_rss_queues * cfg->tcs) {
186 struct ethtool_rx_flow_spec *fsp)
191 if (fsp->flow_type & FLOW_EXT) {
192 if (be16_to_cpu(fsp->m_ext.vlan_tci) == VLAN_VID_MASK) {
193 err = aq_check_approve_fvlan(aq_nic, rx_fltrs, fsp);
194 } else if (be16_to_cpu(fsp->m_ext.vlan_tci) == VLAN_PRIO_MASK) {
195 err = aq_check_approve_fl2(aq_nic, rx_fltrs, fsp);
199 be16_to_cpu(fsp->m_ext.vlan_tci));
203 switch (fsp->flow_type & ~FLOW_EXT) {
205 err = aq_check_approve_fl2(aq_nic, rx_fltrs, fsp);
213 err = aq_check_approve_fl3l4(aq_nic, rx_fltrs, fsp);
221 err = aq_check_approve_fl3l4(aq_nic, rx_fltrs, fsp);
235 struct ethtool_rx_flow_spec *fsp)
244 } else if (!aq_rule_is_approve(fsp)) {
248 } else if ((fsp->flow_type & ~FLOW_EXT) != ETHER_FLOW &&
249 (fsp->h_u.tcp_ip4_spec.tos ||
250 fsp->h_u.tcp_ip6_spec.tclass)) {
254 } else if (fsp->flow_type & FLOW_MAC_EXT) {
265 struct ethtool_rx_flow_spec *fsp)
272 } else if (fsp->location > AQ_RX_MAX_RXNFC_LOC) {
275 fsp->location);
277 } else if (aq_check_filter(aq_nic, fsp)) {
279 } else if (fsp->ring_cookie != RX_CLS_FLOW_DISC) {
280 if (fsp->ring_cookie >= cfg->num_rss_queues * cfg->tcs) {
294 struct ethtool_rx_flow_spec *fsp)
298 if (aq_rule_is_not_correct(aq_nic, fsp))
300 else if (aq_rule_is_not_support(aq_nic, fsp))
302 else if (aq_rule_already_exists(aq_nic, fsp))
312 const struct ethtool_rx_flow_spec *fsp = &aq_rx_fltr->aq_fsp;
316 data->location = fsp->location - AQ_RX_FIRST_LOC_FETHERT;
318 if (fsp->ring_cookie != RX_CLS_FLOW_DISC)
319 data->queue = fsp->ring_cookie;
323 data->ethertype = be16_to_cpu(fsp->h_u.ether_spec.h_proto);
324 data->user_priority_en = be16_to_cpu(fsp->m_ext.vlan_tci)
326 data->user_priority = (be16_to_cpu(fsp->h_ext.vlan_tci)
405 const struct ethtool_rx_flow_spec *fsp = &aq_rx_fltr->aq_fsp;
406 int location = fsp->location - AQ_RX_FIRST_LOC_FVLANID;
417 (be16_to_cpu(fsp->h_ext.vlan_tci) & VLAN_VID_MASK)) {
423 aq_vlans[location].vlan_id = be16_to_cpu(fsp->h_ext.vlan_tci)
425 aq_vlans[location].queue = fsp->ring_cookie & 0x1FU;
474 const struct ethtool_rx_flow_spec *fsp = &aq_rx_fltr->aq_fsp;
479 data->location = HW_ATL_GET_REG_LOCATION_FL3L4(fsp->location);
493 switch (fsp->flow_type) {
514 ntohl(fsp->h_u.tcp_ip4_spec.ip4src);
516 ntohl(fsp->h_u.tcp_ip4_spec.ip4dst);
524 ntohl(fsp->h_u.tcp_ip6_spec.ip6dst[i]);
526 ntohl(fsp->h_u.tcp_ip6_spec.ip6src[i]);
530 if (fsp->flow_type != IP_USER_FLOW &&
531 fsp->flow_type != IPV6_USER_FLOW) {
534 ntohs(fsp->h_u.tcp_ip4_spec.pdst);
536 ntohs(fsp->h_u.tcp_ip4_spec.psrc);
539 ntohs(fsp->h_u.tcp_ip6_spec.pdst);
541 ntohs(fsp->h_u.tcp_ip6_spec.psrc);
552 if (fsp->ring_cookie != RX_CLS_FLOW_DISC) {
554 data->cmd |= fsp->ring_cookie << HW_ATL_RX_QUEUE_FL3L4_SHIFT;
682 struct ethtool_rx_flow_spec *fsp =
687 err = aq_check_rule(aq_nic, fsp);
697 memcpy(&aq_rx_fltr->aq_fsp, fsp, sizeof(*fsp));
699 err = aq_update_table_filters(aq_nic, aq_rx_fltr, fsp->location, NULL);
743 struct ethtool_rx_flow_spec *fsp =
750 if (fsp->location <= rule->aq_fsp.location)
753 if (unlikely(!rule || fsp->location != rule->aq_fsp.location))
756 memcpy(fsp, &rule->aq_fsp, sizeof(*fsp));