All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Wen Gu <guwen@linux.alibaba.com>,
	Philo Lu <lulie@linux.alibaba.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Dong Yibo <dong100@mucse.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@redhat.com>,
	Dust Li <dust.li@linux.alibaba.com>
Subject: Re: [PATCH net-next v21 4/6] eea: create/destroy rx,tx queues for netdevice open and stop
Date: Wed, 21 Jan 2026 17:06:58 -0800	[thread overview]
Message-ID: <20260121170658.371e0e63@kernel.org> (raw)
In-Reply-To: <20260121082413.130681-5-xuanzhuo@linux.alibaba.com>

On Wed, 21 Jan 2026 16:24:11 +0800 Xuan Zhuo wrote:
> +	napi_consume_skb(meta->skb, in_napi);

Please see cd18e8ac030e646. I was hoping AI code review would flag 
the issue in this patch with that kdoc in place but doesn't look like 
it worked :( Oh well, guessing machines..

> +netdev_tx_t eea_tx_xmit(struct sk_buff *skb, struct net_device *netdev)
> +{
> +	const struct skb_shared_info *shinfo = skb_shinfo(skb);
> +	struct eea_net *enet = netdev_priv(netdev);
> +	int qnum = skb_get_queue_mapping(skb);
> +	struct eea_net_tx *tx = &enet->tx[qnum];
> +	struct netdev_queue *txq;
> +	int err, n;
> +
> +	txq = netdev_get_tx_queue(netdev, qnum);
> +
> +	n = shinfo->nr_frags + 1;
> +
> +	if (!netif_txq_maybe_stop(txq, tx->ering->num_free, n, n)) {
> +		/* maybe the previous skbs was xmitted without kick. */
> +		eea_tx_kick(tx);
> +		return NETDEV_TX_BUSY;
> +	}
> +
> +	skb_tx_timestamp(skb);
> +
> +	err = eea_tx_post_skb(tx, skb);
> +	if (unlikely(err))
> +		dev_kfree_skb_any(skb);

You should try to stop the queue after submitting the skb if another
worst case packet won't fit on the ring. NETDEV_TX_BUSY is expensive
and bad for AQM.

> +	if (!netdev_xmit_more() || netif_xmit_stopped(txq))
> +		eea_tx_kick(tx);
> +
> +	return NETDEV_TX_OK;
> +}
-- 
pw-bot: cr

  reply	other threads:[~2026-01-22  1:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21  8:24 [PATCH net-next v21 0/6] eea: Add basic driver framework for Alibaba Elastic Ethernet Adaptor Xuan Zhuo
2026-01-21  8:24 ` [PATCH net-next v21 1/6] eea: introduce PCI framework Xuan Zhuo
2026-01-21  8:24 ` [PATCH net-next v21 2/6] eea: introduce ring and descriptor structures Xuan Zhuo
2026-01-21  8:24 ` [PATCH net-next v21 3/6] eea: probe the netdevice and create adminq Xuan Zhuo
2026-01-21  8:24 ` [PATCH net-next v21 4/6] eea: create/destroy rx,tx queues for netdevice open and stop Xuan Zhuo
2026-01-22  1:06   ` Jakub Kicinski [this message]
2026-01-21  8:24 ` [PATCH net-next v21 5/6] eea: introduce ethtool support Xuan Zhuo
2026-01-21  8:24 ` [PATCH net-next v21 6/6] 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=20260121170658.371e0e63@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.