From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F6BF606A322 for ; Wed, 2 Dec 2026 03:47:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=lIRIzYe1; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=blP58afX DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To:From: Subject:Message-ID:References:Mime-Version:In-Reply-To:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=Nhj1WuxYJJIl0At927W9H7Q7aAxopPD+OXU1CrTMaQE=; b=lIRIzYe1uU8nzI9h+FZCAaEbtv /AqCBQh0KIp+Me/2LvhphAT07gyWUBYBL+pV3J+v3zRNXHfn/DkpZI+5y8FrS2e8/3JmAdz9mtJ3G ZWmucW/tFgEs1Tz5n5ITLphQHBFqbs46cj/zoJ6qceeg8MeFisLUkjvrTCpSvtNY3BSW1KXfAIMum BO7cqXX7avvz/N3Cu+N2fRli01WtRCW35gOZ0gFt3UsA7Yu1VfPr+UohKk8yGuGMjzZfl0AYsy6YL 9o1sCYWP9SuPTKD0Gda1FyQk3mheZehZN/BaRQZNIJVfUQ98Inm/m9/SJ1X5jvliFZ1u2X4AwUspJ WTCktJHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYbJG-0000000A7iK-3UC7; Wed, 02 Dec 2026 03:47:10 +0000 Received: from mail-qk1-x745.google.com ([2607:f8b0:4864:20::745]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYbJE-0000000A7hx-3DsS for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2026 03:47:10 +0000 Received: by mail-qk1-x745.google.com with SMTP id af79cd13be357-9495dd0f07eso2155219885a.0 for ; Tue, 01 Dec 2026 19:47:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796183226; x=1796788026; darn=lists.infradead.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Nhj1WuxYJJIl0At927W9H7Q7aAxopPD+OXU1CrTMaQE=; b=blP58afXRKLBzKb1PQtB+uJs+k1c4UWohfQ4thwmULs1IPJ++vytr89YkUNBjyRzwt bi6Sw8pTrQAOjKFtZznHMNGJCd0FZgOoLAtEP6dVoXdSmo7S1DLCEOJbmg7kObCuuS0v q85u33/fPk+OiY1sZQIdqRj+4Ixo/wgwCdOQS7qDj9TDYEAzhKtlacrmYjTch4JsA86R bXjnEvE8VriTmXvnlsqY9k56IR+3v1M9AdM+C7j+YPPZUCfiwCRUWV6DEFwu2mG8uyO0 di3McVBWP6GuqGmg9y92rkZs1Py2K9t7pAicPwaBeVoghrkq+xXxnSsEWheMIwqRQuW6 1DxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796183226; x=1796788026; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Nhj1WuxYJJIl0At927W9H7Q7aAxopPD+OXU1CrTMaQE=; b=KC2BLc+eZUEzsWYbRqvkjM464R/xxwZ9N8zOG9xe/ar+fRn816bl80glHpUIhYB6hk F+4sPoYGj9rSgteB5vWdHqfcECgLocY/SN/BnPHykc0itWjRq851VIozn5dNhtxuBxcd l3iBEYGP6UzydalRygaArZH51VQ2i9RtbIpi6Zrxy43nS31c2s6gphxELD/CmGrBNthz qLJ8I1/0Ka6raKB1Oy8XZrDQi5IzI83qFJjiF6IfBtqcAnKFIYEyACYeB3atLvx4VyMg KiHRrV4UvubtC3VtT81cmQeJa2TgrCSfoOtVWOplAoZFZsFl2WAdGwi1yWSnmvrkX6Zc +CLA== X-Forwarded-Encrypted: i=1; AL+hErGp8w3kjp/EsB7Q7JT5uzrVCUQoQzBeI4EIb1xyN5t2x7QGBFxqr71A0c9Nn1Fox6dy6d/8Yg728Em5F7Mw1FN0@lists.infradead.org X-Gm-Message-State: APuU4Z9c7QaunUPTqLCYwTncw8+ZlbNvYCW8ALtMU/xJFucbqqJtblGP zTtKndt1WuxN6l7rDtvf56cSX3lIr8BSYEPqqpeG7J8Yq60c6IPFeT1GxuBHXsEOm9hTDX3CErP 5bHKmDTdRjA== X-Received: from qkak6-n2.prod.google.com ([2002:a05:620a:a0c6:20b0:949:a156:1b57]) (user=willemb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:620a:439e:b0:949:6982:3f07 with SMTP id af79cd13be357-949ba9ca6b7mr7372055585a.32.1796183226330; Tue, 01 Dec 2026 19:47:06 -0800 (PST) Date: Tue, 01 Dec 2026 22:47:05 -0500 In-Reply-To: <20261125-stmmac-rx-mb-v13-0-0f6bac53e8d5@oss.qualcomm.com> X-Archived-By: Mime-Version: 1.0 References: <20261125-stmmac-rx-mb-v13-0-0f6bac53e8d5@oss.qualcomm.com> Message-ID: Subject: Re: [PATCH net-next v13 0/5] net: stmmac: introduce XDP rx multi-buff support From: willemb@google.com To: Lorenzo Bianconi , Maxime Chevallier , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Jose Abreu , Ong Boon Leong , Simon Horman , Andrii Nakryiko , Eduard Zingerman , Kumar Kartikeya Dwivedi , Martin KaFai Lau , Song Liu , Yonghong Song , Jiri Olsa , Emil Tsalapatis , Ihor Solodrai , Matthew Gerlach , Boon Khai Ng Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org, Peilin He , Lorenzo Bianconi , Nicolai Buchwitz Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261201_194708_855747_A7C926BC X-CRM114-Status: GOOD ( 23.64 ) X-Spam-Score: -9.5 (---------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-18.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Lorenzo Bianconi wrote: > Rework stmmac_rx() to build the xdp_buff from all the descriptors that > make > up a frame, so the XDP program runs on the whole (possibly fragmented) > packet instead of the first buffer only. Fix possible rx_q state leaks > when closing/opening the interface. > --- > Changes in v13: > - Drop __xdp_build_skb_from_buff() utility routine. > - Cherry-pick patch 1/5 and 2/5 to remove sw vlan stripping. > - Drop NETDEV_XDP_ACT_RX_SG XDP feature. > - Link to v12: > https://lore.kernel.org/r/20261121-stmmac-rx-mb-v12-0-3ae2f3bce174@oss.qualcomm.com > Changes in v12: > - Rebase on top of net-next main branch. > - Link to v11: > https://lore.kernel.org/r/20261117-stmmac-rx-mb-v11-0-9fa5c34ef245@oss.qualcomm.com > Changes in v11: > - Fix kernel-doc for __xdp_build_skb_from_buff(). > - Add sanity checks for xdp_buff_shrink_tail(). > - Link to v10: > https://lore.kernel.org/r/20261112-stmmac-rx-mb-v10-0-d3d04b65c6bc@oss.qualcomm.com > Changes in v10: > - Introduce __xdp_return_buff(), xdp_buff_shrink_tail() and > __xdp_build_skb_from_buff() helpers. > - Link to v9: > https://lore.kernel.org/r/20261106-stmmac-rx-mb-v9-1-c099c923664b@oss.qualcomm.com > Changes in v9: > - Rebase on top of net-next main branch. > - Link to v8: > https://lore.kernel.org/r/20261018-stmmac-rx-mb-v8-0-5f58c0b25849@oss.qualcomm.com > Changes in v8: > - Add patch 'net: stmmac: fix VLAN tag stripping on non-linear RX > frames' to fix sw rx vlan parsing. > - Rebase on top of net-next main branch. > - Link to v7: > https://lore.kernel.org/r/20261014-stmmac-rx-mb-v7-0-5d2d70f052cd@oss.qualcomm.com > Changes in v7: > - Take into account the case where buf2_len is not 0 for the single > descriptor case if the interface is running in xdp mode. > - Report rx_not_ls bit if the packet is splitted over multiple > descriptors for dwmac100 and dwmac1000 cores. > - Link to v6: > https://lore.kernel.org/r/20261012-stmmac-rx-mb-v6-0-2225050915c1@oss.qualcomm.com > Changes in v6: > - Drop patch 'net: stmmac: allow non-linear xdp_buff in XDP mode' since > it requires some XDP fixes. > - Introduce patch 'net: stmmac: drop split frames on AF_XDP zero-copy > RX' to always drop XDP multi-buff frames for AF_XDP mode since it not > yet supported there. > - Introduce patch 'net: stmmac: drop multi-buffer frames in XDP mode' to > fix pending bugs due to missing XDP multi-buffer support before patch > 'net: stmmac: rework stmmac_rx to support XDP rx multi-buff' > - Link to v5: > https://lore.kernel.org/r/20261009-stmmac-rx-mb-v5-0-c38fa4eaa138@oss.qualcomm.com > Changes in v5: > - Fix possible read after bound issue in patch 1/3. > - Do not allow parsing non-linear XDP buffers if the program loaded does > not support frags. > - Add patch 3/3 to remove MTU constraint for XDP prog. > - Link to v4: > https://lore.kernel.org/r/20261006-stmmac-rx-mb-v4-0-efa4ca974e3d@oss.qualcomm.com > Changes in v4: > - Reset in_progress flag when the packet is fully consumed. > - Advetise NETDEV_XDP_ACT_RX_SG capability. > - Link to v3: > https://lore.kernel.org/r/20261004-stmmac-rx-mb-v3-0-50fa171af9ec@oss.qualcomm.com > Changes in v3: > - Return secondary page in case of error. > - Introduce stmmac_xdp_shrink_tail() to remove the ethernet FCS. > - Add patch 'net: stmmac: take ownership of saved RX state at poll > entry' from James. > - Link to v2: > https://lore.kernel.org/r/20260921-stmmac-rx-mb-v2-1-6e826e1ff306@oss.qualcomm.com > Changes in v2: > - Rely on xdp_buff_add_frag() to create xdp fragments > - Fix bugs in rx_q state recording > - Fix the corner case where we receive more than MAX_SKB_FRAGS fragments > - Cosmetics > - Link to v1: > https://lore.kernel.org/r/20260918-stmmac-rx-mb-v1-1-0b4517d404af@oss.qualcomm.com > --- > Lorenzo Bianconi (4): > net: stmmac: remove software VLAN tag stripping > net: xdp: add xdp_buff_shrink_tail() helper > net: xdp: add __xdp_return_buff() helper > net: stmmac: rework stmmac_rx to support XDP rx multi-buff > Maxime Chevallier (1): > net: stmmac: selftests: Prevent RXC from being disabled in LPI > drivers/net/ethernet/stmicro/stmmac/stmmac.h | 15 +- > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 319 > +++++++++------------ > .../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 + > include/net/xdp.h | 10 +- > net/core/filter.c | 80 +----- > net/core/xdp.c | 98 ++++++- > 6 files changed, 261 insertions(+), 263 deletions(-) > --- > base-commit: 4cd558c2f1de7f1800f7d9065303ca5833cbad56 > change-id: 20260918-stmmac-rx-mb-16469a2714ea > Best regards, > -- > Lorenzo Bianconi Please rebase v13 on current net-next (conflicts in drivers/net/ethernet/stmicro/stmmac/stmmac_main.c) pw-bot: cr