Re: [net-next,v27,4/8] eea: create/destroy rx,tx queues for netdevice open and stop
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-02-28 23:55:37
This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible. For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html --- eea: create/destroy rx,tx queues for netdevice open and stop This commit adds the netdevice open and stop implementation for the Alibaba Elastic Ethernet Adapter (EEA) driver, including queue creation, IRQ handling, and NAPI polling infrastructure.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/alibaba/eea/Makefile b/drivers/net/ethernet/alibaba/eea/Makefile index 91f318e8e046..fa34a005fa01 100644 --- a/drivers/net/ethernet/alibaba/eea/Makefile +++ b/drivers/net/ethernet/alibaba/eea/Makefile
[ ... ]
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/alibaba/eea/eea_net.c b/drivers/net/ethernet/alibaba/eea/eea_net.c index 31cb9ca5b408..2ebf0053d05e 100644 --- a/drivers/net/ethernet/alibaba/eea/eea_net.c +++ b/drivers/net/ethernet/alibaba/eea/eea_net.c
[ ... ]
quoted hunk ↗ jump to hunk
@@ -116,6 +563,9 @@ static int eea_netdev_init_features(struct net_device *netdev, } static const struct net_device_ops eea_netdev = { + .ndo_open = eea_netdev_open, + .ndo_stop = eea_netdev_stop, + .ndo_start_xmit = eea_tx_xmit, .ndo_validate_addr = eth_validate_addr, .ndo_features_check = passthru_features_check, };
[ ... ]
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/alibaba/eea/eea_tx.c b/drivers/net/ethernet/alibaba/eea/eea_tx.c new file mode 100644 index 000000000000..259f57674d9f --- /dev/null +++ b/drivers/net/ethernet/alibaba/eea/eea_tx.c@@ -0,0 +1,103 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Driver for Alibaba Elastic Ethernet Adapter. + * + * Copyright (C) 2025 Alibaba Inc. + */ + +#include <net/netdev_queues.h> + +#include "eea_net.h" +#include "eea_pci.h" +#include "eea_ring.h"
[ ... ]
+netdev_tx_t eea_tx_xmit(struct sk_buff *skb, struct net_device *netdev)
+{
+ /* Empty function; will be implemented in a subsequent commit. */
+ return NETDEV_TX_OK;
+}Does this stub leak the skb? The function is registered as ndo_start_xmit in the net_device_ops structure, and when ndo_start_xmit returns NETDEV_TX_OK, the network stack assumes the driver has taken ownership of the skb and will not free it. Since this stub neither transmits nor frees the skb, every packet sent through the interface will leak memory. The device can be opened via eea_netdev_open (which is also added in this commit), making this code path reachable. Would it be better to call dev_kfree_skb(skb) before returning NETDEV_TX_OK to prevent the leak until the full implementation is added? -- pw-bot: cr