From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796039888; b=CEqH3qyhGKy55p4EALHIS3i0raQQnmWLDfgbpBCul86ElUZwouC9ZWFMu5dXNfROwJ/6 3A3aicape5gvpovFbcrhhuZqHC89KMtd2PhpUJUI6YZtoYJh6DvFGTeNoS+fcxUh3jXgf tvpUWwpkjZVR1Qidsmx3cGX1fPGNCgXYX3sv9AkRAun0rndJJeBcSzbExJLFCDaLhXRTl SsjBq+Jx2DppF0VYRFBZMMtOaVh7O15komKKkgZ6VFfWRIsnC8NuuYwiXB87Hvm0zlAzc +1A2f5NEXgSkJfGEIa86M7hlZHO+dmcexYuyCnA0jJ0ymoKuJPnCs8861/zW1q5T6Cg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796039888; h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References: Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=YOTBarLJXs6OqJiPEFGsJVGvFiGvOf115rh0mcUxoJk=; b=W3a4L2TBcyXMoblW9HPlKagNDonFAeMCt4mp5zDP7xBjq4V7dQ58KNWGe8yzTFPZFwKA pScgTVnnEcne3mIFRrmPPTLnKYHQLgGa8HbbjLZJqkvqrnM5dZH3dwPOTKqvSPm9jDf29 Su4Y2YzTEgIcDz8qdorm5YhgCRsH/fUBhv4phr08q5tetODGyMW3zFezTSjyDRrQcVilw cVq4H4iVhoKdzIS78S9C59pQgtcjsqJSY0IK2Y7OFCXGWqbBgPixBVj1wA1W+siLk0LFz j+2olIDYE9lJ37E2NbuNQ9Q+1URWqK5kLrcaUFkQ18n2c7yqC64EPFGHsQw8sOnjNag== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gEePQfYQ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AE2C606A31C; Mon, 30 Nov 2026 11:58:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gEePQfYQ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52B361F00898; Mon, 30 Nov 2026 11:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796039888; bh=YOTBarLJXs6OqJiPEFGsJVGvFiGvOf115rh0mcUxoJk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=gEePQfYQKVM9h0jkgj7FK7RL2gRQdp51V9h6HRAV6Atmy3Gw6E7DHSz0rRxvqifR7 ynWBV8HhrpNCzLPKQN1O8x7v8WDK5BHweQ1P6W/cE4P5SJ1F0LaIETIrONIDoPFuZe HZLhRT0aoUXvwu4v60XSLKa1x4YEL8hd2R4x4GyhEaxDTYnfmHEWiZialg3US66ZtU gIzCRpl1GIhc+QT8Or8ud1GtUh/QJlsZIvR0/MaBwKrbYqts1EREq1JCHDrVcQsEM1 ykPXXgu/DtWw9qRYKdK4uzHEkP5E24+B92MUhaSvbyCFBmtnAr+ZAL4GmO6enYr4NB y7GKJ5Km6OpqQ== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: netdev-bot+sashiko@kernel.org Cc: magnus.karlsson@intel.com, maciej.fijalkowski@intel.com, aleksander.lobakin@intel.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, willemb@google.com, andrii@kernel.org, eddyz87@gmail.com, memxor@gmail.com, shuah@kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, horms@kernel.org, sdf@fomichev.me, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org, emil@etsalapatis.com, ihor.solodrai@linux.dev, anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, larysa.zaremba@intel.com, tushar.vyavahare@intel.com, kerneljasonxing@gmail.com, bastien.curutchet@bootlin.com, colin.i.king@gmail.com, intel-wired-lan@lists.osuosl.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH net 1/3] libeth: xsk: Count each XDP_TX buffer on its own In-Reply-To: <179587888871.3135.18266598324203799547@kernel.org> References: <20261127142131.3527737-2-bjorn@kernel.org> <179587888871.3135.18266598324203799547@kernel.org> Date: Mon, 30 Nov 2026 12:58:05 +0100 Message-ID: <87cxrm1qgi.fsf@all.your.base.are.belong.to.us> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable netdev-bot+sashiko@kernel.org writes: > [Severity: Low] > The enum doc is updated here. Should the struct libeth_sqe kernel-doc in > the same file be updated as well? It still describes per-frame values: Will fix. > [Severity: High] > Does this decrement move the in-flight count the right way once idpf > applies it? [...] > Should libeth accumulate a positive count here (cp->xdp_tx++, and > cp->xdp_tx +=3D sqe->nr_frags above)? Or should idpf add cp.xdp_tx > instead of subtracting it? Correct, but it is older than this patch. Since 26ce8eb0bb7d ("libeth: xdp: add XDPSQE completion helpers") libeth counts completed buffers down from zero and idpf subtracts the result, so xdp_tx only grows. This patch keeps that convention. It is not related to the shared info, so that's a separate series. > [Severity: Low] > This isn't a bug introduced by this patch, but the kernel-doc for > struct libeth_cq_pp in include/net/libeth/tx.h says: > > * @xdp_tx: number of XDP-not-XSk frames processed > > __libeth_xdp_complete_tx() actually counts buffers, and that includes > XSk XDP_TX buffers. The old code already counted LIBETH_SQE_XSK_TX > here. Could the wording be fixed while this code is being changed? Ya, but with the separate fix above. > [Severity: High] > This is a pre-existing issue and was not introduced by this patch. It > is in the same XSk XDP_TX path: does libeth_xsk_tx_queue_bulk() in this > file handle a flush failure in the middle of a frame correctly? [...] > This goes back to b3ad8450b4dc, and 90e5d84086d9 only covered the > success exit. Would it help to free the popped frag (or put it back) on > this error path, and handle the head's frags flag consistently? This one is real too. It only happens when the XDP queue has no free descriptor at all, and then the popped frag leaks, the frags after it stay on the pool's list, and the head keeps its frags flag. It is not related to the shared info, so separate fix on its own instead of growing this series. Bj=C3=B6rn