Article View: linux.kernel.netdev
Article #18926Re: [PATCH net-next v1] net/mlx5e: TX, Do not open a multi-packet WQE for a single packet
From: Xuanqiang Luo
Date: Thu, 19 Nov 2026 03:05
Date: Thu, 19 Nov 2026 03:05
41 lines
9834 bytes
9834 bytes
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
Technical Details
Message-ID:
<f5d63d01-8805-4445-990b-24cd7b495796@linux.dev>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366699-linux-kernel-netdev=dewy.ruReferences:
<20261117085036.3138779-1-xuanqiang.luo@linux.dev> <773ac747-b58b-45eb-8072-8f048da3c54f@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366699-linux-kernel-netdev=dewy.ru From: xuanqiang.luo@linux.dev (Xuanqiang Luo) Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <f5d63d01-8805-4445-990b-24cd7b495796@linux.dev> References: <20261117085036.3138779-1-xuanqiang.luo@linux.dev> <773ac747-b58b-45eb-8072-8f048da3c54f@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2773566"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:44z3nUg5oVbltNd+ULPFDEZWV8g= sha256:bQvEwyp59s98G/wVCk7CQcFv/6vtPJ++oo2yhdnJ7C4= sha1:MMcTzOazQqzib78qW8LQiYHJS2E= sha256:WG5UxtXv8L1ROe3/kr67pBiqdM0n64wSPE5dW/e1slE= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 7BBEF1154C6; Thu, 19 Nov 2026 06:06:22 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I9PTMsKJAMlr; Thu, 19 Nov 2026 06:06:18 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366699-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id BE4261154B5; Thu, 19 Nov 2026 06:06:09 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 6E1EF326740; Thu, 19 Nov 2026 03:06:06 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795057565; b=24zaiEBZ1cRGvYURD8C0ZPC1Ab03Lb9uKWKWul4xhCrxtadV+GZffTS4H1V6t9oVdM4l UWEPyckExEvgumZAlvO3V8H7nZMYpaT8mfu1widGfOcn0Uv55ujtIDe4Qp3dyqhJsVs/R KB+SMUoLJDH6zrEQaP6WbU5AnA+tSHG/Os5hRM1nfAapHOIfjPwx/cCfRXnANc1bPERNC 1sBp8f9ZMOWW+HC7oCmV0sPjPf/hIIghzxqzmSjcjwULHGuAQnQeYwB1bOO87cth0ANLj u4roy/zrT2f3FyQ5Z572/NqTTiLrg0hohtXcyUeljj08qEOqz2CZClYQlLS5heEw14g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795057565; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=1nQ8YaDGbdbSQt97QgB7GPkOItZkKsKE3rzuGdpJu68=; b=GWC2WzNpTXcmEunF9+XhkLjUUejcZf6mHSPfz3hHN4RoaLU2rWg9Ij8g8Zl83w9BzNWt KSyPhV++r3RMvFKvOA09amab6n9taYwNRiXFbpbjuposlVdB8jFWTCFvqoiwflRznDXwg I/dZu/o671WtH5Qloz+c/RisG+LmFatUP2YP6pR9LB0t0gNQ9D4HtL3UoZlgv2Qqs8xoq +t6LewDnAZeD9bwzDvZaujgFFG9xVGoKF8b4f/DS8bvxeyulgxiGCXJVZlQuthLWEb3mK FH2fJWQVvPINyzgGc+o//+Ld5h6ciEfmWhdPw/eQui4blITztC2lEdVw6+QglJQ/khA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b="aj/17xhI"; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C55F460A2604; Thu, 19 Nov 2026 03:06:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=aj/17xhI X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.127 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795057564; b=SR+0mhSFUdsr2OLwJPBv3wSx2xIrQ2Z0zXzNmDvPyH2qUqwr1+Jzul4ATqTYMsSVqpdW 3Ln6ALcrBUG/UOEokWbxmERM9FInupMqLPkAmb711aVuzU5RZzY6D8ew23skT2+XaC2Cj wDvgKQd6ZNFLGJ16XV/ft29ElE4Qn0Fq3ZPysP4HaPxz9TDxfBjZ8cAuMCDWjI//sGb5S wLmP56SCOv9bsWndgFNBH6ze16C0A4XOKfCTklYjMVt3MBfjQLda3qAba5gS/f9QiZY6B nEwVI9VOHhs4I08DI9fwHfY5FWlNXGVnkxcgiIQRqmfYAoIkCzNNf1qV4joYbo2kxOg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795057564; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=1nQ8YaDGbdbSQt97QgB7GPkOItZkKsKE3rzuGdpJu68=; b=QOEcVU0LUvwtthjX+/fvJyvZxFIuM5DftTni+IKl7x4de7IRZ0MPyLzbH6Cjr9fT+9At SFM4s8Yv9Phd57TArwjdk82r6U0XK40OcB/z7npYAEbRHbSdyDxefdxwne0LxcXnXIe6f 6ldU3vYwrxaq8rPTEFbjqXWilyyFMin2hFckNe2p2UCen7Ayl5Zgt4UoQo0saYXWtYhkV VUzmJ2zOdNTU0caQDn/9gpZh9Qj6v4mzucZvEXL9vhL2uSQ/i0kKAsxCAu3v/h3qwrY+c zT7OuCNSD9jUUS1yhSW4knI3SAhRafskmFYKd+FSPak+7FINQdAkSSFtfVBS5zv/zjg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b="aj/17xhI"; arc=none smtp.remote-ip=91.218.175.127 X-Received: from mta0.migadu.com (out-127.mta0.migadu.com [91.218.175.127]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58D7B606A333 for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 03:06:03 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 58D7B606A333 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=Ysl+OVqX7d+ztep9qyZyfXqOyAiRMAJ0DrG8uvKUQMk=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795057561; v=1; x=1795662361; b=aj/17xhIXphCEjqilT+2cb1FVryRHUM/0lHNhL9SjhGoP4XWnq6luQ47Z9W5AhPIhthQIhGz I9BOXHw7O9F0u0oTzTeZr9pr+lh0UHb9CmptH5iJvhClOMivrkR7+FZoVo3n3joNisiRnsH4qWF 1fy/3glAaG1+cwoCdFNhH/IQ= X-Envelope-To: netdev@vger.kernel.org X-Received: by smtp.migadu.com with ESMTPS id 3b965933bbe9266c; Thu, 19 Nov 2026 03:06:00 +0000 X-Mizu-Trace-ID: 3b965933bbe9266c X-Migadu-Flow: FLOW_OUT X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-User-Agent: Mozilla Thunderbird X-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 X-In-Reply-To: <773ac747-b58b-45eb-8072-8f048da3c54f@nvidia.com>