Skip to content

Commit 548c494

Browse files
Sameeh Jubrandavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 838c93d commit 548c494

File tree

3 files changed

+701
-186
lines changed

3 files changed

+701
-186
lines changed

drivers/net/ethernet/amazon/ena/ena_ethtool.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,9 @@ static int ena_set_channels(struct net_device *netdev,
744744
struct ena_adapter *adapter = netdev_priv(netdev);
745745
u32 count = channels->combined_count;
746746
/* The check for max value is already done in ethtool */
747-
if (count < ENA_MIN_NUM_IO_QUEUES)
747+
if (count < ENA_MIN_NUM_IO_QUEUES ||
748+
(ena_xdp_present(adapter) &&
749+
!ena_xdp_legal_queue_count(adapter, channels->combined_count)))
748750
return -EINVAL;
749751

750752
return ena_update_queue_count(adapter, count);

0 commit comments

Comments
 (0)