Lines Matching refs:nfc
570 struct ethtool_rxnfc *nfc) in otx2_get_rss_hash_opts() argument
579 nfc->data = RXH_IP_SRC | RXH_IP_DST; in otx2_get_rss_hash_opts()
581 nfc->data |= RXH_VLAN; in otx2_get_rss_hash_opts()
583 switch (nfc->flow_type) { in otx2_get_rss_hash_opts()
587 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
592 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
597 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
602 nfc->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in otx2_get_rss_hash_opts()
620 struct ethtool_rxnfc *nfc) in otx2_set_rss_hash_opts() argument
633 if (!(nfc->data & RXH_IP_SRC) || !(nfc->data & RXH_IP_DST)) in otx2_set_rss_hash_opts()
636 if (nfc->data & RXH_VLAN) in otx2_set_rss_hash_opts()
641 switch (nfc->flow_type) { in otx2_set_rss_hash_opts()
647 switch (nfc->data & rxh_l4) { in otx2_set_rss_hash_opts()
660 switch (nfc->data & rxh_l4) { in otx2_set_rss_hash_opts()
673 switch (nfc->data & rxh_l4) { in otx2_set_rss_hash_opts()
686 switch (nfc->data & rxh_l4) { in otx2_set_rss_hash_opts()
728 struct ethtool_rxnfc *nfc, u32 *rules) in otx2_get_rxnfc() argument
734 switch (nfc->cmd) { in otx2_get_rxnfc()
736 nfc->data = pfvf->hw.rx_queues; in otx2_get_rxnfc()
741 nfc->rule_cnt = pfvf->flow_cfg->nr_flows; in otx2_get_rxnfc()
747 ret = otx2_get_flow(pfvf, nfc, nfc->fs.location); in otx2_get_rxnfc()
751 ret = otx2_get_all_flows(pfvf, nfc, rules); in otx2_get_rxnfc()
754 return otx2_get_rss_hash_opts(pfvf, nfc); in otx2_get_rxnfc()
761 static int otx2_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *nfc) in otx2_set_rxnfc() argument
768 switch (nfc->cmd) { in otx2_set_rxnfc()
770 ret = otx2_set_rss_hash_opts(pfvf, nfc); in otx2_set_rxnfc()
774 ret = otx2_add_flow(pfvf, nfc); in otx2_set_rxnfc()
778 ret = otx2_remove_flow(pfvf, nfc->fs.location); in otx2_set_rxnfc()