From nobody Thu Oct 31 16:00:10 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 4XfTGg3TYpz5bwjZ; Thu, 31 Oct 2024 16:00:11 +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 4XfTGg0cCjz4PLF; Thu, 31 Oct 2024 16:00:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730390411; 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=D9Mh9r/IrK5RfZF4+Qe54bWHuDMpaGRqwFQ2AqUlRhs=; b=sxLwtpjXiZ05r+twvniJ8euJn/kDcJC50LyrDXb0i0vwxrgzw8eTdFhxysv0XHtR/PDws+ 9N8DcmAY2rcF0RyYN3vRvF+EPEz8Kowz2ksiVtOGJ270qA9AtNe5cmz1hLuq01HmGoaV1K 6ILOgJpbvx4YxTC8UTvadRHQkxHY2y4cgh38FajGpQzZV8pLmI4IXW6sctJJUD4UaXFmZk g94fok+gKxbTh9uSxCFh9xw2R7iolEBPvc4k6l47GzmDlHxPByvN/mQ/Z0QDAU/o1MyG9p suu6xnP6tft0p4BKvJnLbd1bEwg3uML1Iv10tz+ApKcD20lwUl4CQX+DPzJb4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730390411; 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=D9Mh9r/IrK5RfZF4+Qe54bWHuDMpaGRqwFQ2AqUlRhs=; b=evS46n8FstfXCrfxBmxn+OjDnwMNAo1e1CeT2ZHpkIII3y+yNW+SWIkmc2eheoFwg3crF5 UdYCzi2dcXsk5pnRFjQx0Mxeut+7oepBhHYex8qOaymzZQE3KeS121+tClWbgAN9qqlZQx hZ46ucvg2XOw+9vL6GEog8ogbPbH1E6G6TywxQQ9oM1NDa083dwGtP+ftBS1/KzyCMKncO K+8qH18miYIAuo5Yz/a41viIDZayVYhZcw/DVGrQLGLCoIwEU41t6LeffEx8kgO67AOP2j FeO0cj/sbIIge7VjNzOAwtK++6uBsnXMM1dmg4BLRTouvSEqkFFF477KZLm0sA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730390411; a=rsa-sha256; cv=none; b=Qy/1FJP7khHrKE7eq7QHyaEj7s6DZ0wQuZ8dZepEwoo5rMnEo+/ySAiY213cZs7CG016Kt weYOLVpQMD/Wy6jWGQkXtbRAtOzm2gyJGpSjLJjJZF4p2DJWuKwZETwMd55nUEMrNKfqHU sDYixUpIR1hMqH2xFPvxGn6PqrUJtFdcxcMaR05d6W6ICdla+AB6r+xUb+q477/WMZIDFU HtFhUUdrp6jr50sf1EPrOjZs2E683cHY++MSmKUnv9dksiDp/jGPmGQPO1hfl4FH1Pgni/ PKygRIgA3t3llwmau8VDqPT8UXDTJpPH5zemhzQcf8e7JJf6fVlz/8mlz6s0Jw== 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 4XfTGg0DDSzjV8; Thu, 31 Oct 2024 16:00:11 +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 49VG0AIx062821; Thu, 31 Oct 2024 16:00:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VG0AfR062810; Thu, 31 Oct 2024 16:00:10 GMT (envelope-from git) Date: Thu, 31 Oct 2024 16:00:10 GMT Message-Id: <202410311600.49VG0AfR062810@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: 444a69c1951c - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 444a69c1951c277b14191ff33b7d67e834300967 Auto-Submitted: auto-generated The branch stable/13 has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=444a69c1951c277b14191ff33b7d67e834300967 commit 444a69c1951c277b14191ff33b7d67e834300967 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:21 +0000 Commit: Osama Abboud CommitDate: 2024-10-31 14:55:20 +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 910b447b12c6..41eb8abab39d 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;