From nobody Thu Oct 31 16:01:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XfTJK2yG6z5bwms; Thu, 31 Oct 2024 16:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XfTJK15skz4TGp; Thu, 31 Oct 2024 16:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730390497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1NP0woE+/+XEz3jmToCbxPvu59KPfs3qUQwlp3Ggx0=; b=e3cgKmlMiN0kZMVZz/B26P0bV29jQUlWJC93bVn6vz6sAXCgJz8p2t+6g2ixIRV8oHMgEz X8AUY/FlMMfqhzMbo6cUzmgMC4fTXpylbCes2O+XedL6FGGfQ4VYWTTVXoKiPZi9OwbYRM EYZ8tDjkmRm8Wg1vBXrnJOfRsIZ4M4NJqvGiB8V8QqsZUSAli3t0Qg6r8aycfRyvzo4gVa khOBRKd47+mBtT6LzAHGh1BZBAw7fSrN+zLxvON35giVE5PCfxC7pGyXCvQJqY16LHv14E 5vq6HfHkwmMA1RCNRUm8e2VnWSfIrgUkhLFG/QZ7YeROfUqmdxNeYTrfTlEGUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730390497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1NP0woE+/+XEz3jmToCbxPvu59KPfs3qUQwlp3Ggx0=; b=huTC4nlVKkIFSDY7WVpEhbFv/uyIKQOMVSKo7V4hO89XD0oGk/QpPZbxMu/IFhI6dcgV3h zhWD6BBiAHkhv8A5edkoaZNJCNtY0vsPZ502Q2KPILjiv5hxKK8W5ybhrbWTwIml120UJR iI81/qlndGf9GKxrpfcvqUimnP9QjIjJmS+I0FXLLOm90vcwlzMbxemJVtdw5mMr7kj2EU /CaVyl/289XzzQitrHoKh7yCdhN/dk56m0Mjp8C5jrZlGrjlB2hA9u3AVcr9on2c6sD7q+ fv1PicYh6CmEssHeKejVNSnroWNj3snof4qIQGx06kMzg0Ms6FcdyFTD5zfMWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730390497; a=rsa-sha256; cv=none; b=hMhTrfHNhqHMpS2WlLm/E1+zy+nYvMGAtaTlmA9UAxkujF2YW0+Lbd0ybt5ckmb9kvwwJT Prc8nY3p/M/mtyFjxAAE0931Zd1hxnM9RnKn8y4uxvNaVjXbbhdIZDbk1o6S1GB4GDIX9c gnJu8W6dpFlZVUV1pf1z7EmLaL1IhzJKx4etYk2VU42+QoeXUYKc/E5cGcl9ulQnwH3j9I oQQPskzQx7LrsVDOM25cYjZuDd2l7CjujeJ6czz5+T/etyfj5aQyAaYYOWiWkwugUYVJXQ qL9Ko98IX3PFNB1pmUW2FU8YorUq1VDe+RFTduzaqYEunlUrqytVF6JsXVe+EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XfTJK0Qd3zjVq; Thu, 31 Oct 2024 16:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49VG1aWA072985; Thu, 31 Oct 2024 16:01:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VG1ahP072975; Thu, 31 Oct 2024 16:01:36 GMT (envelope-from git) Date: Thu, 31 Oct 2024 16:01:36 GMT Message-Id: <202410311601.49VG1ahP072975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Osama Abboud Subject: git: 8b43095ad8cd - stable/14 - ena: Clear NS_MOREFRAG flag for last netmap slot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b43095ad8cdddfd0cdb11bb6e14aea60e607b5d Auto-Submitted: auto-generated The branch stable/14 has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=8b43095ad8cdddfd0cdb11bb6e14aea60e607b5d commit 8b43095ad8cdddfd0cdb11bb6e14aea60e607b5d Author: Osama Abboud AuthorDate: 2024-08-07 06:24:21 +0000 Commit: Osama Abboud CommitDate: 2024-10-31 14:54:11 +0000 ena: Clear NS_MOREFRAG flag for last netmap slot When processing packets within the rx-flow ena_netmap_rx_load_desc doesn't know the number of descriptors, so it sets NS_MOREFRAG to all the slots to indicate that there are more fragments for this packet. The code calls ena_netmap_rx_load_desc() for every descriptor in this packet to map the relevant buffer into the netmap shared memory. After ena_netmap_rx_load_desc() calls, we need to unset the NS_MOREFRAG for the last fragment to indicate that this is the last fragment, so we explicitly turn off NS_MOREFRAG flag. Current code overrides all other flags and sets NS_BUF_CHANGED. This patch unsets the relevant flag only. Approved by: cperciva (mentor) Sponsored by: Amazon, Inc. (cherry picked from commit 2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4) --- sys/dev/ena/ena_netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index eef8021b8569..8a220373ec3f 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -964,7 +964,7 @@ ena_netmap_rx_frame(struct ena_netmap_ctx *ctx) * It just set flag NS_MOREFRAG to all slots, then here flag of * last slot is cleared. */ - ctx->slots[nm_prev(ctx->nm_i, ctx->lim)].flags = NS_BUF_CHANGED; + ctx->slots[nm_prev(ctx->nm_i, ctx->lim)].flags &= ~NS_MOREFRAG; if (rc != 0) { goto rx_clear_desc;