Skip to content

Commit

Permalink
net: ena: Implement XDP_TX action
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sameeh Jubran authored and davem330 committed Dec 13, 2019
1 parent 838c93d commit 548c494
Show file tree
Hide file tree
Showing 3 changed files with 701 additions and 186 deletions.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/amazon/ena/ena_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 548c494

Please sign in to comment.