Skip to content

Commit 355979d

Browse files
committed
Merge branch 'Introduce-XDP-to-ena'
Sameeh Jubran says: ==================== Introduce XDP to ena This patchset includes 3 patches: * XDP_DROP implementation * XDP_TX implementation * A fix for an issue which might occur due to the XDP_TX patch. I see fit to place it as a standalone patch for clarity. Difference from v2: * Fixed the usage of rx headroom (XDP_PACKET_HEADROOM) * Aligned the page_offset of the packet when passing it to the stack * Switched to using xdp_frame in xdp xmit queue * Dropped the print for unsupported commands * Cosmetic changes Difference from RFC v1 (XDP_DROP patch): * Initialized xdp.rxq pointer * Updated max_mtu on attachment of xdp and removed the check from ena_change_mtu() * Moved the xdp execution from ena_rx_skb() to ena_clean_rx_irq() * Moved xdp buff (struct xdp_buff) from rx_ring to the local stack * Started using netlink's extack mechanism to deliver error messages to the user ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents aabf23d + 913b0bf commit 355979d

3 files changed

Lines changed: 889 additions & 148 deletions

File tree

‎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)