Lines Matching refs:nfc
490 struct ethtool_rxnfc *nfc) in otx2_get_rss_hash_opts() argument
499 nfc->data = RXH_IP_SRC | RXH_IP_DST; in otx2_get_rss_hash_opts()
501 nfc->data |= RXH_VLAN; in otx2_get_rss_hash_opts()
503 switch (nfc->flow_type) { in otx2_get_rss_hash_opts()
507 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
512 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
517 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
522 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
540 struct ethtool_rxnfc *nfc) in otx2_set_rss_hash_opts() argument
553 if (!(nfc->data & RXH_IP_SRC) || !(nfc->data & RXH_IP_DST)) in otx2_set_rss_hash_opts()
556 if (nfc->data & RXH_VLAN) in otx2_set_rss_hash_opts()
561 switch (nfc->flow_type) { in otx2_set_rss_hash_opts()
567 switch (nfc->data & rxh_l4) { in otx2_set_rss_hash_opts()
580 switch (nfc->data & rxh_l4) { in otx2_set_rss_hash_opts()
593 switch (nfc->data & rxh_l4) { in otx2_set_rss_hash_opts()
606 switch (nfc->data & rxh_l4) { in otx2_set_rss_hash_opts()
648 struct ethtool_rxnfc *nfc, u32 *rules) in otx2_get_rxnfc() argument
654 switch (nfc->cmd) { in otx2_get_rxnfc()
656 nfc->data = pfvf->hw.rx_queues; in otx2_get_rxnfc()
661 nfc->rule_cnt = pfvf->flow_cfg->nr_flows; in otx2_get_rxnfc()
667 ret = otx2_get_flow(pfvf, nfc, nfc->fs.location); in otx2_get_rxnfc()
671 ret = otx2_get_all_flows(pfvf, nfc, rules); in otx2_get_rxnfc()
674 return otx2_get_rss_hash_opts(pfvf, nfc); in otx2_get_rxnfc()
681 static int otx2_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *nfc) in otx2_set_rxnfc() argument
687 switch (nfc->cmd) { in otx2_set_rxnfc()
689 ret = otx2_set_rss_hash_opts(pfvf, nfc); in otx2_set_rxnfc()
693 ret = otx2_add_flow(pfvf, nfc); in otx2_set_rxnfc()
697 ret = otx2_remove_flow(pfvf, nfc->fs.location); in otx2_set_rxnfc()