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 0F46545FF6; Sun, 5 Jan 2025 23:07:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2F6F40395; Sun, 5 Jan 2025 23:06:59 +0100 (CET) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 0F3C9402B4 for ; Thu, 2 Jan 2025 22:42:23 +0100 (CET) Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-2ef87d24c2dso13220362a91.1 for ; Thu, 02 Jan 2025 13:42:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735854142; x=1736458942; darn=dpdk.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=aOZWjujGZsA61y6/PAuVARX81uDUiqN3Nw5MG65vX/4=; b=WIRAq9dFs2KslpK5N6xSqIL9bHo3ZX7cb1Jn3XSDPlvQqMKN+7d0FBP2bPEUNC7+8X s8QHR+96ZXjbGO+1YtLTbLGCKyMdTWU14a1GZ9z56s6VR7jIcTL05TNoMDhtvANlSTf6 LMaslq5yjFbWG1x7pNm2TKcw6f2o+wvLnpt/LDE7d5jfghXsX6NAxh4dNtfGlfUvNR9/ 8vT2j+GCa8nedfRroQtienCl+zTm9KkLdz14GqXwssdD40jazJcy10Knd1zs3t8kR/+r qkYbZ0DZ3IBu00Rx8Dz/C5nglkx1wuDDxj7MgrSl930niTaenxGQk0lMZ60jO4xw/VM+ LJ7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735854142; x=1736458942; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=aOZWjujGZsA61y6/PAuVARX81uDUiqN3Nw5MG65vX/4=; b=o1bB29DvphA7yUqtCUy6wpHO96vSaCEBOsv6kBgfS3Pirn88N17rufzHbDjbuUODdQ UVjqjduLPk2WtC40C9Zy1tCpJPJQUsXP68wq/pEOKx3ecLhYPho9wPpIM2O5Xam1JXrB PvPBftqZWr5QdzUXAlCKhsENfRgdhMhD/4QhT/6lJOIT7m8klw4CalF5iuzvBOylE1oS LKIKUY7O0o6M5yqPMb/R5JwfIa8jd7itZg0t6B9ZVbEBbot1sukFfT1MSnbs4EfvzDx5 jl6W5WvU1kzCxbdojofG2GcLAzhp77I2trgXPS8Yy/hEanvLOZXpfUTO9yWriYd9qYHn g0yA== X-Gm-Message-State: AOJu0YyGN7AVw6kUt8DA/o5JTliyWqnmqXSV81Emu7dp8/Cp8/Aub2d0 fxMO7pKjkpGfoYU2yusIpci8wv6qcREH+zBrexbMIoogTImmQ3cgN5OAYQMk00Y4bL2ToR2cp+o 282+3MFSOc80pIpb4+Nj1ExlZYkP4VX2J X-Gm-Gg: ASbGnct9ePHja4upHB8b1gztOjClyYZBTECMguA8QneiWvOsuhjv8SZflqOIJqdXcIR CbZxF0sl+mDp3xh1kQgaUKIMA2qPfGFLrOaYUMQ== X-Google-Smtp-Source: AGHT+IGqa+aVjW3EkJ4OOHEwlsXBhmWcb9O8YMeRwjozqX4BRm1IixY5xezTsLR5WpahR+QX/O45rA77mEasUVAgxAA= X-Received: by 2002:a17:90b:534b:b0:2ee:ab29:1a65 with SMTP id 98e67ed59e1d1-2f452dfaee6mr66969683a91.4.1735854141550; Thu, 02 Jan 2025 13:42:21 -0800 (PST) MIME-Version: 1.0 From: Mike Bly Date: Thu, 2 Jan 2025 13:42:10 -0800 Message-ID: Subject: memif jumbo fixes To: dev@dpdk.org Content-Type: multipart/alternative; boundary="0000000000007d39fd062ac0090a" X-Mailman-Approved-At: Sun, 05 Jan 2025 23:06:53 +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 --0000000000007d39fd062ac0090a Content-Type: text/plain; charset="UTF-8" Please review/accept the following fixes for drivers/net/memif. This is in regards to https://bugs.dpdk.org/show_bug.cgi?id=1609. RX and TX fixes to correct linking/handling of multiple memif buffers for jumbo frames (>2KB) in mixed traffic scenarios. >From fa1f5ab578bb06aa22b356b8ce5cfbdb52dd4a48 Mon Sep 17 00:00:00 2001 From: Mike Bly Date: Thu, 2 Jan 2025 13:00:57 -0800 Subject: [PATCH 1/2] Moving where dst_off is set in memif_rx function Fixes: aa17df86089 ("net/memif: add a Rx fast path") --- 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 1eb41bb471..29fd890ed1 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 >From eb1770036ce829e193953af9994d8ae16e75272b Mon Sep 17 00:00:00 2001 From: Mike Bly Date: Thu, 2 Jan 2025 13:20:23 -0800 Subject: [PATCH 2/2] Added missing initialization of memif flags field per memif buffer Fixes: 09c7e63a71f ("net/memif: introduce memory interface PMD") --- drivers/net/memif/rte_eth_memif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 29fd890ed1..57216d7096 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -709,6 +709,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) next_in_chain1: d0 = &ring->desc[slot & mask]; cp_len = rte_pktmbuf_data_len(mbuf); + d0->flags = 0; rte_memcpy((uint8_t *)memif_get_buffer(proc_private, d0), rte_pktmbuf_mtod(mbuf, void *), cp_len); @@ -744,6 +745,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) dst_off = 0; dst_len = (type == MEMIF_RING_C2S) ? pmd->run.pkt_buffer_size : d0->length; + d0->flags = 0; next_in_chain2: src_off = 0; -- 2.43.5 -Mike --0000000000007d39fd062ac0090a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Please review/accept the following fixes for drivers/net/m= emif. This is in regards to=C2=A0https://bugs.dpdk.org/show_bug.cgi?id=3D1609.

RX and TX fixes to correct linking/handling of multiple memif buff= ers for jumbo frames (>2KB) in mixed traffic scenarios.
From fa1f5ab578bb06aa22b356b8ce5cfbdb52dd4a48 Mon Sep 17 00:00:= 00 2001
From: Mike Bly <bly454@gm= ail.com>
Date: Thu, 2 Jan 2025 13:00:57 -0800
Subject: [PATCH = 1/2] Moving where dst_off is set in memif_rx function Fixes:
=C2=A0aa17d= f86089 ("net/memif: add a Rx fast path")

---
=C2=A0driv= ers/net/memif/rte_eth_memif.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 1eb41bb471..29fd890ed1 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)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto no_= free_bufs;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 mbuf =3D mbuf_head;
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mbuf->port =3D = mq->in_port;
-
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 dst_off =3D 0;
=C2=A0next_slot2:
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 s0 =3D cur_slot & mask;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 d0 =3D &ring->desc[s0]= ;
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 src_len =3D d0->length;
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 dst_off =3D 0;<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 src_off =3D 0;
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 do {
--
2.43.5<= br>

From eb1770036ce829e193953af9994d8ae16e75272b Mon Sep 17 00:00:0= 0 2001
From: Mike Bly <bly454@gma= il.com>
Date: Thu, 2 Jan 2025 13:20:23 -0800
Subject: [PATCH 2= /2] Added missing initialization of memif flags field per
=C2=A0memif bu= ffer Fixes: =C2=A009c7e63a71f ("net/memif: introduce memory interface<= br>=C2=A0PMD")

---
=C2=A0drivers/net/memif/rte_eth_memif.c |= 2 ++
=C2=A01 file changed, 2 insertions(+)

diff --git a/drivers/= net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 29fd= 890ed1..57216d7096 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++= b/drivers/net/memif/rte_eth_memif.c
@@ -709,6 +709,7 @@ eth_memif_tx(vo= id *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
=C2=A0next_in_chain= 1:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 d0 =3D &ring->desc[slot & mask];
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cp_l= en =3D rte_pktmbuf_data_len(mbuf);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 d0->flags =3D 0;
=C2=A0
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 rte_memcpy((uint8_t *)memif_get_buffer(proc_private, d0),
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 rte_pktmbuf_mtod(mbuf, void *), cp_len);=
@@ -744,6 +745,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, u= int16_t nb_pkts)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 dst_off =3D 0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 dst_len =3D (type = =3D=3D MEMIF_RING_C2S) ?
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmd->= run.pkt_buffer_size : d0->length;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 d0->flags =3D 0;
=C2=A0=
=C2=A0next_in_chain2:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 src_off =3D 0;
--
2.43.5
<= br>
-Mike
--0000000000007d39fd062ac0090a--