diff options
author | Sameeh Jubran <sameehj@amazon.com> | 2019-12-10 15:12:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-12 17:14:01 -0800 |
commit | 548c4940b9f1f527f81509468dd60b61418880b6 (patch) | |
tree | 2bdbe410494935cc6be9b5b72ca2eaaf939cda7b /drivers/net/ethernet/amazon/ena/ena_ethtool.c | |
parent | 838c93dc5449e5d6378bae117b0a65a122cf7361 (diff) |
net: ena: Implement XDP_TX action
This commit implements the XDP_TX action in the ena driver. We allocate
separate tx queues for the XDP_TX. We currently allow xdp only when
there is enough queues to allocate for xdp.
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amazon/ena/ena_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/amazon/ena/ena_ethtool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c index a3250dcf7d53..745fffd422aa 100644 --- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c +++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c @@ -744,7 +744,9 @@ static int ena_set_channels(struct net_device *netdev, struct ena_adapter *adapter = netdev_priv(netdev); u32 count = channels->combined_count; /* The check for max value is already done in ethtool */ - if (count < ENA_MIN_NUM_IO_QUEUES) + if (count < ENA_MIN_NUM_IO_QUEUES || + (ena_xdp_present(adapter) && + !ena_xdp_legal_queue_count(adapter, channels->combined_count))) return -EINVAL; return ena_update_queue_count(adapter, count); |