Skip to content

Commit 91cd94b

Browse files
Alexander DuyckJeff Kirsher
authored andcommitted
ixgbe: add basic support for setting and getting nfc controls
This change adds basic support for the obtaining of RSS ring counts. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent c04f6ca commit 91cd94b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

drivers/net/ixgbe/ixgbe_ethtool.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,6 +2336,24 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)
23362336
return 0;
23372337
}
23382338

2339+
static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
2340+
void *rule_locs)
2341+
{
2342+
struct ixgbe_adapter *adapter = netdev_priv(dev);
2343+
int ret = -EOPNOTSUPP;
2344+
2345+
switch (cmd->cmd) {
2346+
case ETHTOOL_GRXRINGS:
2347+
cmd->data = adapter->num_rx_queues;
2348+
ret = 0;
2349+
break;
2350+
default:
2351+
break;
2352+
}
2353+
2354+
return ret;
2355+
}
2356+
23392357
static const struct ethtool_ops ixgbe_ethtool_ops = {
23402358
.get_settings = ixgbe_get_settings,
23412359
.set_settings = ixgbe_set_settings,
@@ -2371,6 +2389,7 @@ static const struct ethtool_ops ixgbe_ethtool_ops = {
23712389
.set_coalesce = ixgbe_set_coalesce,
23722390
.get_flags = ethtool_op_get_flags,
23732391
.set_flags = ixgbe_set_flags,
2392+
.get_rxnfc = ixgbe_get_rxnfc,
23742393
};
23752394

23762395
void ixgbe_set_ethtool_ops(struct net_device *netdev)

0 commit comments

Comments
 (0)