Lines Matching refs:fsp
963 struct ethtool_rx_flow_spec *fsp = &cmd->fs; in igc_ethtool_get_nfc_rule() local
970 rule = igc_get_nfc_rule(adapter, fsp->location); in igc_ethtool_get_nfc_rule()
974 fsp->flow_type = ETHER_FLOW; in igc_ethtool_get_nfc_rule()
975 fsp->ring_cookie = rule->action; in igc_ethtool_get_nfc_rule()
978 fsp->h_u.ether_spec.h_proto = htons(rule->filter.etype); in igc_ethtool_get_nfc_rule()
979 fsp->m_u.ether_spec.h_proto = ETHER_TYPE_FULL_MASK; in igc_ethtool_get_nfc_rule()
983 fsp->flow_type |= FLOW_EXT; in igc_ethtool_get_nfc_rule()
984 fsp->h_ext.vlan_etype = htons(rule->filter.vlan_etype); in igc_ethtool_get_nfc_rule()
985 fsp->m_ext.vlan_etype = ETHER_TYPE_FULL_MASK; in igc_ethtool_get_nfc_rule()
989 fsp->flow_type |= FLOW_EXT; in igc_ethtool_get_nfc_rule()
990 fsp->h_ext.vlan_tci = htons(rule->filter.vlan_tci); in igc_ethtool_get_nfc_rule()
991 fsp->m_ext.vlan_tci = htons(rule->filter.vlan_tci_mask); in igc_ethtool_get_nfc_rule()
995 ether_addr_copy(fsp->h_u.ether_spec.h_dest, in igc_ethtool_get_nfc_rule()
997 eth_broadcast_addr(fsp->m_u.ether_spec.h_dest); in igc_ethtool_get_nfc_rule()
1001 ether_addr_copy(fsp->h_u.ether_spec.h_source, in igc_ethtool_get_nfc_rule()
1003 eth_broadcast_addr(fsp->m_u.ether_spec.h_source); in igc_ethtool_get_nfc_rule()
1007 fsp->flow_type |= FLOW_EXT; in igc_ethtool_get_nfc_rule()
1008 memcpy(fsp->h_ext.data, rule->filter.user_data, sizeof(fsp->h_ext.data)); in igc_ethtool_get_nfc_rule()
1009 memcpy(fsp->m_ext.data, rule->filter.user_mask, sizeof(fsp->m_ext.data)); in igc_ethtool_get_nfc_rule()
1217 const struct ethtool_rx_flow_spec *fsp) in igc_ethtool_init_nfc_rule() argument
1221 rule->action = fsp->ring_cookie; in igc_ethtool_init_nfc_rule()
1222 rule->location = fsp->location; in igc_ethtool_init_nfc_rule()
1224 if ((fsp->flow_type & FLOW_EXT) && fsp->m_ext.vlan_tci) { in igc_ethtool_init_nfc_rule()
1225 rule->filter.vlan_tci = ntohs(fsp->h_ext.vlan_tci); in igc_ethtool_init_nfc_rule()
1226 rule->filter.vlan_tci_mask = ntohs(fsp->m_ext.vlan_tci); in igc_ethtool_init_nfc_rule()
1230 if (fsp->m_u.ether_spec.h_proto == ETHER_TYPE_FULL_MASK) { in igc_ethtool_init_nfc_rule()
1231 rule->filter.etype = ntohs(fsp->h_u.ether_spec.h_proto); in igc_ethtool_init_nfc_rule()
1238 if (is_broadcast_ether_addr(fsp->m_u.ether_spec.h_source)) { in igc_ethtool_init_nfc_rule()
1241 fsp->h_u.ether_spec.h_source); in igc_ethtool_init_nfc_rule()
1244 if (is_broadcast_ether_addr(fsp->m_u.ether_spec.h_dest)) { in igc_ethtool_init_nfc_rule()
1247 fsp->h_u.ether_spec.h_dest); in igc_ethtool_init_nfc_rule()
1251 if ((fsp->flow_type & FLOW_EXT) && fsp->h_ext.vlan_etype) { in igc_ethtool_init_nfc_rule()
1252 rule->filter.vlan_etype = ntohs(fsp->h_ext.vlan_etype); in igc_ethtool_init_nfc_rule()
1257 if ((fsp->flow_type & FLOW_EXT) && in igc_ethtool_init_nfc_rule()
1258 (fsp->h_ext.data[0] || fsp->h_ext.data[1])) { in igc_ethtool_init_nfc_rule()
1260 memcpy(rule->filter.user_data, fsp->h_ext.data, sizeof(fsp->h_ext.data)); in igc_ethtool_init_nfc_rule()
1261 memcpy(rule->filter.user_mask, fsp->m_ext.data, sizeof(fsp->m_ext.data)); in igc_ethtool_init_nfc_rule()
1326 struct ethtool_rx_flow_spec *fsp = in igc_ethtool_add_nfc_rule() local
1336 if ((fsp->flow_type & ~FLOW_EXT) != ETHER_FLOW) { in igc_ethtool_add_nfc_rule()
1341 if (fsp->ring_cookie >= adapter->num_rx_queues) { in igc_ethtool_add_nfc_rule()
1350 if ((fsp->flow_type & FLOW_EXT) && in igc_ethtool_add_nfc_rule()
1351 fsp->m_ext.vlan_tci && in igc_ethtool_add_nfc_rule()
1352 fsp->m_ext.vlan_tci != htons(VLAN_PRIO_MASK) && in igc_ethtool_add_nfc_rule()
1353 fsp->m_ext.vlan_tci != VLAN_TCI_FULL_MASK) { in igc_ethtool_add_nfc_rule()
1359 if ((fsp->flow_type & FLOW_EXT) && in igc_ethtool_add_nfc_rule()
1360 fsp->m_ext.vlan_etype && in igc_ethtool_add_nfc_rule()
1361 fsp->m_ext.vlan_etype != ETHER_TYPE_FULL_MASK) { in igc_ethtool_add_nfc_rule()
1366 if (fsp->location >= IGC_MAX_RXNFC_RULES) { in igc_ethtool_add_nfc_rule()
1375 igc_ethtool_init_nfc_rule(rule, fsp); in igc_ethtool_add_nfc_rule()
1383 old_rule = igc_get_nfc_rule(adapter, fsp->location); in igc_ethtool_add_nfc_rule()
1403 struct ethtool_rx_flow_spec *fsp = in igc_ethtool_del_nfc_rule() local
1409 rule = igc_get_nfc_rule(adapter, fsp->location); in igc_ethtool_del_nfc_rule()