From nobody Tue Oct 15 17:43:16 2024 X-Original-To: dev-commits-src-main@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 4XShK10NlTz5Ylcc; Tue, 15 Oct 2024 17:43:17 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShK05PK7z4ZMH; Tue, 15 Oct 2024 17:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014196; 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=gKnqjSTbIrkTCYdERujRH5BMn3xCsCu8ewEPD69gsbI=; b=wr3qF4dJZkNcBBdmd0DdSyHLMMlVKUK9831zhzGWfmi9YQ0psRE/i17JDpxgz+g4SWSeQO nPGMC6wIKKhR9fcQVezjdK7UTcRjWGbCpANZpAXIpmC9z3u1ikWEWNQLO4LNRFvzQ6C8FF Eze3BPMxNw/ER3x4xjUhQCZejWDBy0WdjmX/6BqkpY7XM0zKEU5q+HwSq8HmulSO6WAHdf wHqYIW97ptxpl8QmiqEhZAymwPDhn7po2N7D7wx/1anbEe90u8t3esHPjP0ub7C8zQzhZd 966EYmGskkbrTFdR5p46vvQZg32wmK4OiyTMFloEMAp/ws68uXEL+l5IKj91Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014196; 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=gKnqjSTbIrkTCYdERujRH5BMn3xCsCu8ewEPD69gsbI=; b=CDzUfj9QgkJBFuu4vIgfhXkr3lTro8q3z9nHI+o2jfwsPhUGAzEhG9Fazp69XGGmAnXvRF +k3lU3eT8dXlddTkh7uEr/8UzRVVGvvddoNzlUpw+GCm/qY+tc+gYO+wrpKRPrZkOa3bLq 6+rMEn9gJ4zYV7enVUeH0a6/EkgtheUdffrJj/6ie9Matp9QROMSU+w3Eyg75vknayll0J 0hojCW28FSui12M3QR0RQH7KoWtVcQdPx+cfujDpvFv/WY1tc5Y6d5pNoGsfGTqt9NYKSq D/WxDEMPA47Jb43H20HlXR7v4pTqR1pD0vbxSfP8BXeWsspD89+3eWdSzFHj9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014196; a=rsa-sha256; cv=none; b=lRVYyXpcHDGs2n6lWgzf5FAgm/9tYiJjhCEk6UO4LNC30TkgZ1MnSX2AFuTbBLVTGt53jh t/NF/wWOHRTR5MFTTfcJmQUxJLIl8A3qbfBRhnVFo7GoF6jBPID+lofkMihYZq14arCDHY p7X5ABSMJL26gOSaBIdt8dVsXyGVbppopKjYbJBgawTpbA/LzE4F16ageL7AgErUGqzqjf 03KY8+9fVVZRATgQALfwsNu0g9P4K4QFm126rbBdTJC3FmqSSPxzZSurZ2cCTWR3qrv86E AcMHWm7TpNMmfT3fk1muAECv2/bxVCTjiOopSXXsijt6639Wg+32V4ORh7bqbQ== 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 4XShK04yhpzXdD; Tue, 15 Oct 2024 17:43:16 +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 49FHhGUR062551; Tue, 15 Oct 2024 17:43:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhG8U062548; Tue, 15 Oct 2024 17:43:16 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:16 GMT Message-Id: <202410151743.49FHhG8U062548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: 2f17afd19a35 - main - ena: Clear NS_MOREFRAG flag for last netmap slot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4 Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4 commit 2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:21 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +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) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- 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;