From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 52FE946018; Wed, 8 Jan 2025 09:23:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F41740150; Wed, 8 Jan 2025 09:23:40 +0100 (CET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id 053024014F; Tue, 7 Jan 2025 19:22:24 +0100 (CET) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2ee397a82f6so23627490a91.2; Tue, 07 Jan 2025 10:22:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736274144; x=1736878944; darn=dpdk.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=scU8cXRZMuMlS5EsZsG8Agav1V/jD8+aoDCIT4Bk2ps=; b=Rj05QesMZBMvNi/VI2ReOa21J8/kj5u2jcUzGN6Xfeqhg/ZZv0j2soCqlJGMtRXkL6 DNywghIBbqRvBA87svC1XOhHN4dl37voPtrUUD6rMvj/HW0M8cTD1Fx2WS39/hdYZnbC UTg9D1EUM46q2CT4TIAbOj7KnUM+TEssqd+bhYdxkcNoomH6FeLWRvY/zJ0p5fl2gYGH SlcQCat51WDbtowrlcW58ll5zBszLAt+yY6SCW+KF4em0gIleo1wBPmoIMEOEYf72OsC q7/3Mm/esnlRjeH6qRXdW+nk+tqB6GfaFeqBLKzucsXTKG0K6oiD+XCrV591zJCHqMl6 o22g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736274144; x=1736878944; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=scU8cXRZMuMlS5EsZsG8Agav1V/jD8+aoDCIT4Bk2ps=; b=jWeQTM3jkEIlyA3MSlhJfpzYGcQ/0XEK6/d0Jxf9kM2PVxCSq19FM1BEYUZ0rjpiex 3jhYwnxp0WbOpyjyYiCH0lkwe78/dHmGFEqqFGUpFcW7CJE4oaRfR8+2ZLdxVModQ8vg ofzO4vrtrusSeCLFCFaR/6JrFc4rr5RwwgaSSVXhgnv/ipZK3l2w+rqat8mnqgvo+F2S 16n7MbL3C7uVlVsZWdWNRGV8D66W/NsUUDYYX08b1bxMeCu5ARwx2AS/JXVIf5HvCB9e KxOlSwryIOhUczZlI/j4JseHa0IYsPDB0RKxUH4YUMCR4BYcwuEmRFmwwGF1eZRMPoS0 gnEQ== X-Gm-Message-State: AOJu0Yz4EdPvSAvRwSo8eBWQHXAEctBc60l+w3OOgtepgl3oEIVo6YAi DsOB0NykKjc1rI/oLIbLuAlNI2A8jYD+x4H0eAuCFzakULg06BV7N3Ovy9GWKZjPO1aD84ExCam XIoaNXRLwqA4cEHo/WCRx1D64f2ku+l36ZOU= X-Gm-Gg: ASbGncu4gPvaqS1JMCCety7pbS0K1OYZbVDZFOtdYQ0liHOh2ysQ9S3n+UnLCT3EK88 pwsaKB+aimrzCYl2k88+EtHTaEb2rpYZ7jnB1aw== X-Google-Smtp-Source: AGHT+IHqK9Z4cjYL/bnHv2Lgq0dyLWAvguHukpKq9VRaUpJxuH6MCUScRcezvyO3v+cOLnjCziv3K9qiqVhGaY07H0Y= X-Received: by 2002:a17:90b:51c2:b0:2ee:9e06:7db0 with SMTP id 98e67ed59e1d1-2f452e1d3f9mr89890556a91.11.1736274142290; Tue, 07 Jan 2025 10:22:22 -0800 (PST) MIME-Version: 1.0 From: Mike Bly Date: Tue, 7 Jan 2025 10:22:10 -0800 X-Gm-Features: AbW1kva40nVwhfnFAbc6bkhlFwjJQilcxmIiU1Z41S1lb3xM0eSQnQwEZd3o62w Message-ID: Subject: [PATCH v2] net/memif: Fix memif-rx buffer linking To: dev@dpdk.org Cc: stable@dpdk.org, jgrajcia@cisco.com Content-Type: multipart/alternative; boundary="0000000000007be9a4062b21d3e4" X-Mailman-Approved-At: Wed, 08 Jan 2025 09:23:38 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --0000000000007be9a4062b21d3e4 Content-Type: text/plain; charset="UTF-8" Moving where dst_off is set in memif-rx function. It should be initialized for each new dpdk-mbuf, not each memif-buffer. Bugzilla ID: 1609 Fixes: aa17df860891 ("net/memif: add a Rx fast path") Cc: stable@dpdk.org Cc: Jakub Grajciar Signed-off-by: Mike Bly --- drivers/net/memif/rte_eth_memif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index c0bf1e3bbf..bef1606550 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -414,13 +414,12 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) goto no_free_bufs; mbuf = mbuf_head; mbuf->port = mq->in_port; - + dst_off = 0; next_slot2: s0 = cur_slot & mask; d0 = &ring->desc[s0]; src_len = d0->length; - dst_off = 0; src_off = 0; do { -- 2.43.5 --0000000000007be9a4062b21d3e4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Moving where dst_off is set in memif-rx function. It shoul= d be
initialized for each new dpdk-mbuf, not each memif-buffer.
Bugzi= lla ID: 1609
Fixes: aa17df860891 ("net/memif: add a Rx fast path&qu= ot;)
Cc: stable@dpdk.org
Cc: J= akub Grajciar <jgrajcia@cisco.com<= /a>>

Signed-off-by: Mike Bly <
bly454@gmail.com>
---
=C2=A0drivers/net/memif/rte_eth_memi= f.c | 3 +--
=C2=A01 file changed, 1 insertion(+), 2 deletions(-)

= diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_= memif.c
index c0bf1e3bbf..bef1606550 100644
--- a/drivers/net/memif/r= te_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -414,13 +41= 4,12 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)=
=C2=A0 goto no_free_bufs;
=C2=A0 mbuf =3D mbuf_head;
=C2=A0 = mbuf->port =3D mq->in_port;
-
+ dst_off =3D 0;
=C2=A0nex= t_slot2:
=C2=A0 s0 =3D cur_slot & mask;
=C2=A0 d0 =3D &ri= ng->desc[s0];
=C2=A0
=C2=A0 src_len =3D d0->length;
- ds= t_off =3D 0;
=C2=A0 src_off =3D 0;
=C2=A0
=C2=A0 do {
-- 2.43.5
--0000000000007be9a4062b21d3e4--