mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xuanqiang Luo <xuanqiang.luo@linux.dev>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: saeedm@nvidia.com, leon@kernel.org, mbloch@nvidia.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Xuanqiang Luo <luoxuanqiang@kylinos.cn>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v1] net/mlx5e: TX, Do not open a multi-packet WQE for a single packet
Date: Thu, 19 Nov 2026 12:05:48 +0900	[thread overview]
Message-ID: <f5d63d01-8805-4445-990b-24cd7b495796@linux.dev> (raw)
In-Reply-To: <773ac747-b58b-45eb-8072-8f048da3c54f@nvidia.com>

On 2026/11/18 at 20:14 Tariq Toukan wrote:
> 
> 
> On 17/11/2026 10:50, Xuanqiang Luo wrote:
>> From: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
>>
> 
> [...]
> 
>> @@ -678,11 +679,13 @@ netdev_tx_t mlx5e_xmit(struct sk_buff *skb, 
>> struct net_device *dev)
>>       mlx5e_sq_xmit_prepare(sq, skb, &accel, &attr);
>>       if (test_bit(MLX5E_SQ_STATE_MPWQE, &sq->state)) {
>> -        if (mlx5e_tx_skb_supports_mpwqe(skb, &attr)) {
>> +        /* An MPWQE for a lone packet saves nothing, use a regular 
>> WQE. */
>> +        if (mlx5e_tx_skb_supports_mpwqe(skb, &attr) &&
>> +            (xmit_more || mlx5e_tx_mpwqe_session_is_active(sq))) {
> 
> I'd swap the two conditions:
> 
>      if ((xmit_more || mlx5e_tx_mpwqe_session_is_active(sq)) &&
>          mlx5e_tx_skb_supports_mpwqe(skb, &attr)) {
> 
> A lone packet, which is the case you optimize, then skips the skb 
> checks, and it reads in the natural order: is there a batch to join, and 
> can this skb join it.
> 

Makes sense, thanks for the suggestion. I will swap the conditions in v2.

> Also, it's be nice if you could test for traffic that goes through the 
> stack, for example UDP_RR / TCP_RR and a UDP stream with netperf, in 
> addition to pktgen.

I will run the tests again with the new code, including the ones you
mentioned.

Thanks!
Xuanqiang

      reply	other threads:[~2026-11-19  3:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  8:50 Xuanqiang Luo
2026-11-18 11:14 ` Tariq Toukan
2026-11-19  3:05   ` Xuanqiang Luo [this message]

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=f5d63d01-8805-4445-990b-24cd7b495796@linux.dev \
    --to=xuanqiang.luo@linux.dev \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=luoxuanqiang@kylinos.cn \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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

all inboxes | Powered by JetHome®