Lines Matching refs:rxnfc
720 struct ethtool_rxnfc *rxnfc, u32 *rule_locs) in dpaa2_eth_get_rxnfc() argument
726 switch (rxnfc->cmd) { in dpaa2_eth_get_rxnfc()
732 rxnfc->data = priv->rx_hash_fields; in dpaa2_eth_get_rxnfc()
735 rxnfc->data = dpaa2_eth_queue_count(priv); in dpaa2_eth_get_rxnfc()
738 rxnfc->rule_cnt = 0; in dpaa2_eth_get_rxnfc()
739 rxnfc->rule_cnt = dpaa2_eth_num_cls_rules(priv); in dpaa2_eth_get_rxnfc()
740 rxnfc->data = max_rules; in dpaa2_eth_get_rxnfc()
743 if (rxnfc->fs.location >= max_rules) in dpaa2_eth_get_rxnfc()
745 rxnfc->fs.location = array_index_nospec(rxnfc->fs.location, in dpaa2_eth_get_rxnfc()
747 if (!priv->cls_rules[rxnfc->fs.location].in_use) in dpaa2_eth_get_rxnfc()
749 rxnfc->fs = priv->cls_rules[rxnfc->fs.location].fs; in dpaa2_eth_get_rxnfc()
755 if (j == rxnfc->rule_cnt) in dpaa2_eth_get_rxnfc()
759 rxnfc->rule_cnt = j; in dpaa2_eth_get_rxnfc()
760 rxnfc->data = max_rules; in dpaa2_eth_get_rxnfc()
770 struct ethtool_rxnfc *rxnfc) in dpaa2_eth_set_rxnfc() argument
774 switch (rxnfc->cmd) { in dpaa2_eth_set_rxnfc()
776 if ((rxnfc->data & DPAA2_RXH_SUPPORTED) != rxnfc->data) in dpaa2_eth_set_rxnfc()
778 err = dpaa2_eth_set_hash(net_dev, rxnfc->data); in dpaa2_eth_set_rxnfc()
781 err = dpaa2_eth_update_cls_rule(net_dev, &rxnfc->fs, rxnfc->fs.location); in dpaa2_eth_set_rxnfc()
784 err = dpaa2_eth_update_cls_rule(net_dev, NULL, rxnfc->fs.location); in dpaa2_eth_set_rxnfc()