Lines Matching refs:fs
327 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_ipv4_rule_set() argument
337 switch (fs->flow_type & ~FLOW_EXT) { in bcm_sf2_cfp_ipv4_rule_set()
340 v4_spec = &fs->h_u.tcp_ip4_spec; in bcm_sf2_cfp_ipv4_rule_set()
341 v4_m_spec = &fs->m_u.tcp_ip4_spec; in bcm_sf2_cfp_ipv4_rule_set()
345 v4_spec = &fs->h_u.udp_ip4_spec; in bcm_sf2_cfp_ipv4_rule_set()
346 v4_m_spec = &fs->m_u.udp_ip4_spec; in bcm_sf2_cfp_ipv4_rule_set()
352 ip_frag = be32_to_cpu(fs->m_ext.data[0]); in bcm_sf2_cfp_ipv4_rule_set()
355 if (fs->location == RX_CLS_LOC_ANY) in bcm_sf2_cfp_ipv4_rule_set()
359 rule_index = fs->location; in bcm_sf2_cfp_ipv4_rule_set()
440 fs->location = rule_index; in bcm_sf2_cfp_ipv4_rule_set()
521 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_ipv6_rule_set() argument
531 switch (fs->flow_type & ~FLOW_EXT) { in bcm_sf2_cfp_ipv6_rule_set()
534 v6_spec = &fs->h_u.tcp_ip6_spec; in bcm_sf2_cfp_ipv6_rule_set()
535 v6_m_spec = &fs->m_u.tcp_ip6_spec; in bcm_sf2_cfp_ipv6_rule_set()
539 v6_spec = &fs->h_u.udp_ip6_spec; in bcm_sf2_cfp_ipv6_rule_set()
540 v6_m_spec = &fs->m_u.udp_ip6_spec; in bcm_sf2_cfp_ipv6_rule_set()
546 ip_frag = be32_to_cpu(fs->m_ext.data[0]); in bcm_sf2_cfp_ipv6_rule_set()
567 if (fs->location == RX_CLS_LOC_ANY) in bcm_sf2_cfp_ipv6_rule_set()
571 rule_index[1] = fs->location; in bcm_sf2_cfp_ipv6_rule_set()
722 fs->location = rule_index[1]; in bcm_sf2_cfp_ipv6_rule_set()
732 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_rule_set() argument
736 __u64 ring_cookie = fs->ring_cookie; in bcm_sf2_cfp_rule_set()
741 if ((fs->flow_type & FLOW_EXT) && (fs->m_ext.vlan_etype || in bcm_sf2_cfp_rule_set()
742 fs->m_ext.data[1])) in bcm_sf2_cfp_rule_set()
745 if (fs->location != RX_CLS_LOC_ANY && in bcm_sf2_cfp_rule_set()
746 test_bit(fs->location, priv->cfp.used)) in bcm_sf2_cfp_rule_set()
749 if (fs->location != RX_CLS_LOC_ANY && in bcm_sf2_cfp_rule_set()
750 fs->location > bcm_sf2_cfp_rule_size(priv)) in bcm_sf2_cfp_rule_set()
778 switch (fs->flow_type & ~FLOW_EXT) { in bcm_sf2_cfp_rule_set()
782 queue_num, fs); in bcm_sf2_cfp_rule_set()
787 queue_num, fs); in bcm_sf2_cfp_rule_set()
939 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_ipv4_rule_get() argument
949 fs->flow_type = TCP_V4_FLOW; in bcm_sf2_cfp_ipv4_rule_get()
950 v4_spec = &fs->h_u.tcp_ip4_spec; in bcm_sf2_cfp_ipv4_rule_get()
951 v4_m_spec = &fs->m_u.tcp_ip4_spec; in bcm_sf2_cfp_ipv4_rule_get()
954 fs->flow_type = UDP_V4_FLOW; in bcm_sf2_cfp_ipv4_rule_get()
955 v4_spec = &fs->h_u.udp_ip4_spec; in bcm_sf2_cfp_ipv4_rule_get()
956 v4_m_spec = &fs->m_u.udp_ip4_spec; in bcm_sf2_cfp_ipv4_rule_get()
962 fs->m_ext.data[0] = cpu_to_be32((reg >> IP_FRAG_SHIFT) & 1); in bcm_sf2_cfp_ipv4_rule_get()
1054 struct ethtool_rx_flow_spec *fs, in bcm_sf2_cfp_ipv6_rule_get() argument
1064 v6_spec = &fs->h_u.tcp_ip6_spec; in bcm_sf2_cfp_ipv6_rule_get()
1065 v6_m_spec = &fs->m_u.tcp_ip6_spec; in bcm_sf2_cfp_ipv6_rule_get()
1096 fs->flow_type = TCP_V6_FLOW; in bcm_sf2_cfp_ipv6_rule_get()
1099 fs->flow_type = UDP_V6_FLOW; in bcm_sf2_cfp_ipv6_rule_get()
1121 bcm_sf2_cfp_rule_addr_set(priv, nfc->fs.location); in bcm_sf2_cfp_rule_get()
1134 nfc->fs.ring_cookie = fls((reg >> DST_MAP_IB_SHIFT) & in bcm_sf2_cfp_rule_get()
1138 if (nfc->fs.ring_cookie >= 6) in bcm_sf2_cfp_rule_get()
1139 nfc->fs.ring_cookie++; in bcm_sf2_cfp_rule_get()
1140 nfc->fs.ring_cookie *= SF2_NUM_EGRESS_QUEUES; in bcm_sf2_cfp_rule_get()
1144 nfc->fs.ring_cookie += queue_num; in bcm_sf2_cfp_rule_get()
1155 ret = bcm_sf2_cfp_ipv4_rule_get(priv, port, &nfc->fs); in bcm_sf2_cfp_rule_get()
1157 ret = bcm_sf2_cfp_ipv6_rule_get(priv, port, &nfc->fs, in bcm_sf2_cfp_rule_get()
1169 bcm_sf2_invert_masks(&nfc->fs); in bcm_sf2_cfp_rule_get()
1250 ret = bcm_sf2_cfp_rule_set(ds, port, &nfc->fs); in bcm_sf2_set_rxnfc()
1254 ret = bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location); in bcm_sf2_set_rxnfc()
1273 bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location); in bcm_sf2_set_rxnfc()