Lines Matching full:fs

24 	struct ethtool_rx_flow_spec fs;  member
349 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_ipv4_rule_set() argument
364 switch (fs->flow_type & ~FLOW_EXT) { in bcm_sf2_cfp_ipv4_rule_set()
375 ip_frag = !!(be32_to_cpu(fs->h_ext.data[0]) & 1); in bcm_sf2_cfp_ipv4_rule_set()
378 if (fs->flow_type & FLOW_EXT) { in bcm_sf2_cfp_ipv4_rule_set()
379 vlan_tci = fs->h_ext.vlan_tci; in bcm_sf2_cfp_ipv4_rule_set()
380 vlan_m_tci = fs->m_ext.vlan_tci; in bcm_sf2_cfp_ipv4_rule_set()
384 if (fs->location == RX_CLS_LOC_ANY) in bcm_sf2_cfp_ipv4_rule_set()
388 rule_index = fs->location; in bcm_sf2_cfp_ipv4_rule_set()
393 input.fs = fs; in bcm_sf2_cfp_ipv4_rule_set()
473 fs->location = rule_index; in bcm_sf2_cfp_ipv4_rule_set()
573 if (rule->port == port && rule->fs.location == location) in bcm_sf2_cfp_rule_find()
581 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_rule_cmp() argument
595 if (rule->fs.flow_type != fs->flow_type || in bcm_sf2_cfp_rule_cmp()
596 rule->fs.ring_cookie != fs->ring_cookie || in bcm_sf2_cfp_rule_cmp()
597 rule->fs.h_ext.data[0] != fs->h_ext.data[0]) in bcm_sf2_cfp_rule_cmp()
600 switch (fs->flow_type & ~FLOW_EXT) { in bcm_sf2_cfp_rule_cmp()
613 ret = memcmp(&rule->fs.h_u, &fs->h_u, fs_size); in bcm_sf2_cfp_rule_cmp()
614 ret |= memcmp(&rule->fs.m_u, &fs->m_u, fs_size); in bcm_sf2_cfp_rule_cmp()
616 if (rule->fs.flow_type & FLOW_EXT) { in bcm_sf2_cfp_rule_cmp()
617 ret |= rule->fs.h_ext.vlan_tci != fs->h_ext.vlan_tci; in bcm_sf2_cfp_rule_cmp()
618 ret |= rule->fs.m_ext.vlan_tci != fs->m_ext.vlan_tci; in bcm_sf2_cfp_rule_cmp()
630 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_ipv6_rule_set() argument
644 switch (fs->flow_type & ~FLOW_EXT) { in bcm_sf2_cfp_ipv6_rule_set()
655 ip_frag = !!(be32_to_cpu(fs->h_ext.data[0]) & 1); in bcm_sf2_cfp_ipv6_rule_set()
658 if (fs->flow_type & FLOW_EXT) { in bcm_sf2_cfp_ipv6_rule_set()
659 vlan_tci = fs->h_ext.vlan_tci; in bcm_sf2_cfp_ipv6_rule_set()
660 vlan_m_tci = fs->m_ext.vlan_tci; in bcm_sf2_cfp_ipv6_rule_set()
674 * available bit. We return the second half as fs->location because in bcm_sf2_cfp_ipv6_rule_set()
682 if (fs->location == RX_CLS_LOC_ANY) in bcm_sf2_cfp_ipv6_rule_set()
686 rule_index[1] = fs->location; in bcm_sf2_cfp_ipv6_rule_set()
702 input.fs = fs; in bcm_sf2_cfp_ipv6_rule_set()
835 fs->location = rule_index[1]; in bcm_sf2_cfp_ipv6_rule_set()
847 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_rule_insert() argument
851 __u64 ring_cookie = fs->ring_cookie; in bcm_sf2_cfp_rule_insert()
881 if (fs->flow_type & FLOW_EXT) { in bcm_sf2_cfp_rule_insert()
883 if ((be16_to_cpu(fs->m_ext.vlan_tci) & VLAN_VID_MASK) != in bcm_sf2_cfp_rule_insert()
887 vid = be16_to_cpu(fs->h_ext.vlan_tci) & VLAN_VID_MASK; in bcm_sf2_cfp_rule_insert()
890 if (cpu_to_be32(fs->h_ext.data[1]) & 1) in bcm_sf2_cfp_rule_insert()
910 switch (fs->flow_type & ~FLOW_EXT) { in bcm_sf2_cfp_rule_insert()
914 queue_num, fs); in bcm_sf2_cfp_rule_insert()
919 queue_num, fs); in bcm_sf2_cfp_rule_insert()
930 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_rule_set() argument
937 if (fs->flow_type & FLOW_MAC_EXT) in bcm_sf2_cfp_rule_set()
940 if (fs->location != RX_CLS_LOC_ANY && in bcm_sf2_cfp_rule_set()
941 fs->location > bcm_sf2_cfp_rule_size(priv)) in bcm_sf2_cfp_rule_set()
944 if ((fs->flow_type & FLOW_EXT) && in bcm_sf2_cfp_rule_set()
949 if (fs->location != RX_CLS_LOC_ANY && in bcm_sf2_cfp_rule_set()
950 test_bit(fs->location, priv->cfp.used)) in bcm_sf2_cfp_rule_set()
953 ret = bcm_sf2_cfp_rule_cmp(priv, port, fs); in bcm_sf2_cfp_rule_set()
961 ret = bcm_sf2_cfp_rule_insert(ds, port, fs); in bcm_sf2_cfp_rule_set()
968 memcpy(&rule->fs, fs, sizeof(*fs)); in bcm_sf2_cfp_rule_set()
1073 rule = bcm_sf2_cfp_rule_find(priv, port, nfc->fs.location); in bcm_sf2_cfp_rule_get()
1077 memcpy(&nfc->fs, &rule->fs, sizeof(rule->fs)); in bcm_sf2_cfp_rule_get()
1079 bcm_sf2_invert_masks(&nfc->fs); in bcm_sf2_cfp_rule_get()
1160 ret = bcm_sf2_cfp_rule_set(ds, port, &nfc->fs); in bcm_sf2_set_rxnfc()
1164 ret = bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location); in bcm_sf2_set_rxnfc()
1183 bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location); in bcm_sf2_set_rxnfc()
1225 bcm_sf2_cfp_rule_del(priv, rule->port, rule->fs.location); in bcm_sf2_cfp_exit()
1248 rule->fs.location); in bcm_sf2_cfp_resume()
1254 ret = bcm_sf2_cfp_rule_insert(ds, rule->port, &rule->fs); in bcm_sf2_cfp_resume()