Lines Matching refs: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()
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()
889 if (be32_to_cpu(fs->h_ext.data[1]) & 1) in bcm_sf2_cfp_rule_insert()
907 switch (fs->flow_type & ~FLOW_EXT) { in bcm_sf2_cfp_rule_insert()
911 queue_num, fs); in bcm_sf2_cfp_rule_insert()
916 queue_num, fs); in bcm_sf2_cfp_rule_insert()
927 struct ethtool_rx_flow_spec *fs) in bcm_sf2_cfp_rule_set() argument
934 if (fs->flow_type & FLOW_MAC_EXT) in bcm_sf2_cfp_rule_set()
937 if (fs->location != RX_CLS_LOC_ANY && in bcm_sf2_cfp_rule_set()
938 fs->location > bcm_sf2_cfp_rule_size(priv)) in bcm_sf2_cfp_rule_set()
941 if ((fs->flow_type & FLOW_EXT) && in bcm_sf2_cfp_rule_set()
945 if (fs->location != RX_CLS_LOC_ANY && in bcm_sf2_cfp_rule_set()
946 test_bit(fs->location, priv->cfp.used)) in bcm_sf2_cfp_rule_set()
949 ret = bcm_sf2_cfp_rule_cmp(priv, port, fs); in bcm_sf2_cfp_rule_set()
957 ret = bcm_sf2_cfp_rule_insert(ds, port, fs); in bcm_sf2_cfp_rule_set()
964 memcpy(&rule->fs, fs, sizeof(*fs)); in bcm_sf2_cfp_rule_set()
1069 rule = bcm_sf2_cfp_rule_find(priv, port, nfc->fs.location); in bcm_sf2_cfp_rule_get()
1073 memcpy(&nfc->fs, &rule->fs, sizeof(rule->fs)); in bcm_sf2_cfp_rule_get()
1075 bcm_sf2_invert_masks(&nfc->fs); in bcm_sf2_cfp_rule_get()
1156 ret = bcm_sf2_cfp_rule_set(ds, port, &nfc->fs); in bcm_sf2_set_rxnfc()
1160 ret = bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location); in bcm_sf2_set_rxnfc()
1179 bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location); in bcm_sf2_set_rxnfc()
1221 bcm_sf2_cfp_rule_del(priv, rule->port, rule->fs.location); in bcm_sf2_cfp_exit()
1244 rule->fs.location); in bcm_sf2_cfp_resume()
1250 ret = bcm_sf2_cfp_rule_insert(ds, rule->port, &rule->fs); in bcm_sf2_cfp_resume()