public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: xuanzhuo@linux.alibaba.com
Cc: Jakub Kicinski <kuba@kernel.org>,
	guwen@linux.alibaba.com, andrew+netdev@lunn.ch,
	hkallweit1@gmail.com, edumazet@google.com,
	lulie@linux.alibaba.com, andrew@lunn.ch,
	vadim.fedorenko@linux.dev, lorenzo@kernel.org, pabeni@redhat.com,
	lukas.bulwahn@redhat.com, dust.li@linux.alibaba.com,
	netdev@vger.kernel.org, dong100@mucse.com, davem@davemloft.net
Subject: Re: [net-next,v27,4/8] eea: create/destroy rx,tx queues for netdevice open and stop
Date: Sat, 28 Feb 2026 15:55:31 -0800	[thread overview]
Message-ID: <20260228235531.30134-1-kuba@kernel.org> (raw)
In-Reply-To: <20260227015546.47336-5-xuanzhuo@linux.alibaba.com>

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.

> 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

[ ... ]

> 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

[ ... ]

> @@ -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,
>  };

[ ... ]

> 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

  reply	other threads:[~2026-02-28 23:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27  1:55 [PATCH net-next v27 0/8] eea: Add basic driver framework for Alibaba Elastic Ethernet Adaptor Xuan Zhuo
2026-02-27  1:55 ` [PATCH net-next v27 1/8] eea: introduce PCI framework Xuan Zhuo
2026-02-27  1:55 ` [PATCH net-next v27 2/8] eea: introduce ring and descriptor structures Xuan Zhuo
2026-02-27  1:55 ` [PATCH net-next v27 3/8] eea: probe the netdevice and create adminq Xuan Zhuo
2026-02-27  1:55 ` [PATCH net-next v27 4/8] eea: create/destroy rx,tx queues for netdevice open and stop Xuan Zhuo
2026-02-28 23:55   ` Jakub Kicinski [this message]
2026-02-27  1:55 ` [PATCH net-next v27 5/8] eea: implement packet receive logic Xuan Zhuo
2026-02-28 23:55   ` [net-next,v27,5/8] " Jakub Kicinski
2026-02-27  1:55 ` [PATCH net-next v27 6/8] eea: implement packet transmit logic Xuan Zhuo
2026-02-27  1:55 ` [PATCH net-next v27 7/8] eea: introduce ethtool support Xuan Zhuo
2026-02-27  1:55 ` [PATCH net-next v27 8/8] eea: introduce callback for ndo_get_stats64 Xuan Zhuo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260228235531.30134-1-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dong100@mucse.com \
    --cc=dust.li@linux.alibaba.com \
    --cc=edumazet@google.com \
    --cc=guwen@linux.alibaba.com \
    --cc=hkallweit1@gmail.com \
    --cc=lorenzo@kernel.org \
    --cc=lukas.bulwahn@redhat.com \
    --cc=lulie@linux.alibaba.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vadim.fedorenko@linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox