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 B0A57431A0 for ; Thu, 19 Oct 2023 02:01:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AAA1140EE2; Thu, 19 Oct 2023 02:01:17 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id 287004029E for ; Thu, 19 Oct 2023 02:01:16 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40572aeb673so68395155e9.0 for ; Wed, 18 Oct 2023 17:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697673676; x=1698278476; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x7FVu76h47vBFcTMQ6nq3CmYsbMas9emilR40ypNCtA=; b=X5TVkABivmbBs+H9kTtGJVj/PP5oYFT9V3/QzYW59LJ617fDrRfCE6Yig4UVFlNgCD A75vs5V3y3lWR+xRXh/wfEI1p0lZrTtQoYS6ADgM1Vge/EMd5wxl7zMaJW92BTu2oxk4 uYUNRl69SSyY6b6/R/Y5z1fxKyTT0AlSyjaSonJEvm95s+TweoMm6847p+UcEfAiixCy ccX8nIiAkq6+Y2If3eOsnlUCadbLWZP7v47PsAdgKJ4GdOHmng68LyzcUwWYcOu2mvAQ pkSEdpof+yMrO0rrF/QQj2sIiMnpCkHZ2xWo7wQyx0utHe2k1KRE+tokk/kOPPGgCvi5 4fKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697673676; x=1698278476; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x7FVu76h47vBFcTMQ6nq3CmYsbMas9emilR40ypNCtA=; b=B5BJeR4dZBk2G/JKj+/cSojNzpUzl5FKaPEVbyScbCzxUuMp0xTRP0TbzcnLBtM9Of iYz4YZ9SelgxeztHlWh8zMHbt6hzNlAimJYAwKTS3qluSUKnqEGCeq3RV1Fz7zn81ual Y61eQnQVt9U0dFAEoZBJCN6VVPQ/BIALcpl5C+s3ZiJ0DCPoQQBu3hFwVc5p1z0SYpUO p5G1g7Xu383bzykHnVMAr55fHc4+qnKP1tkiCQrIzjzl7ZmzQVAdJ0YusxepNm0+XEvg 9TP2gxLGTj/jWzioFLJwXT1OdOsZ34PPvQ2HkjW72dmT+5hGToGa60Lkj3bQLyq/kt4x IOjQ== X-Gm-Message-State: AOJu0Yy+V43pgarVLPQgsH0AzR9zgNtfszklnvMoI0+4WGuV/s3SBXra PpqV2yu27FhSyBtoK3NiiYujDpc5Hd3xTQ== X-Google-Smtp-Source: AGHT+IFL6hC5Q4xKYg1XFJuH/FLttxM8urrsw2G0ke8XGhBM6M9wD2hHM++VkArch56GhecqEai6Xg== X-Received: by 2002:a05:600c:13c3:b0:406:6964:7e96 with SMTP id e3-20020a05600c13c300b0040669647e96mr571046wmg.13.1697673675832; Wed, 18 Oct 2023 17:01:15 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id m4-20020a05600c4f4400b004068def185asm2978158wmq.28.2023.10.18.17.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 17:01:15 -0700 (PDT) From: luca.boccassi@gmail.com To: David Marchand Cc: Qi Zhang , dpdk stable Subject: patch 'net/iavf: fix TSO with big segments' has been queued to stable release 20.11.10 Date: Thu, 19 Oct 2023 00:59:23 +0100 Message-Id: <20231018235930.3144-34-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018235930.3144-1-luca.boccassi@gmail.com> References: <20231018235930.3144-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/21/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/dc9a211b46bc452b1f1dda47bc7648529bc30879 Thanks. Luca Boccassi --- >From dc9a211b46bc452b1f1dda47bc7648529bc30879 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 27 Sep 2023 11:41:46 +0200 Subject: [PATCH] net/iavf: fix TSO with big segments [ upstream commit 8a1a5327ba71a19d8a6e1b9ceb5563b4af2c2029 ] Packets to be segmented with TSO are usually larger than MTU. Plus, a single segment for the whole packet may be used: in OVS case, an external rte_malloc'd buffer is used for packets received from vhost-user ports. Before this fix, TSO packets were dropped by net/iavf with the following message: 2023-09-18T14:08:52.739Z|00610|dpdk(pmd-c31/id:11)|ERR|iavf_prep_pkts(): INVALID mbuf: bad data_len=[2962] Remove the check on data_len. Fixes: 19ee91c6bd9a ("net/iavf: check illegal packet sizes") Signed-off-by: David Marchand Acked-by: Qi Zhang --- drivers/net/iavf/iavf_rxtx.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 66a81197fd..fb6694f4cd 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2347,15 +2347,12 @@ end_of_tx: /* TX prep functions */ uint16_t -iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, +iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) { int i, ret; uint64_t ol_flags; struct rte_mbuf *m; - struct iavf_tx_queue *txq = tx_queue; - struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id]; - uint16_t max_frame_size = dev->data->mtu + IAVF_ETH_OVERHEAD; for (i = 0; i < nb_pkts; i++) { m = tx_pkts[i]; @@ -2379,9 +2376,7 @@ iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, return i; } - /* check the data_len in mbuf */ - if (m->data_len < IAVF_TX_MIN_PKT_LEN || - m->data_len > max_frame_size) { + if (m->pkt_len < IAVF_TX_MIN_PKT_LEN) { rte_errno = EINVAL; return i; } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-19 00:28:57.956544264 +0100 +++ 0034-net-iavf-fix-TSO-with-big-segments.patch 2023-10-19 00:28:56.297806636 +0100 @@ -1 +1 @@ -From 8a1a5327ba71a19d8a6e1b9ceb5563b4af2c2029 Mon Sep 17 00:00:00 2001 +From dc9a211b46bc452b1f1dda47bc7648529bc30879 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8a1a5327ba71a19d8a6e1b9ceb5563b4af2c2029 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -24,2 +25,2 @@ - drivers/net/iavf/iavf_rxtx.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) + drivers/net/iavf/iavf_rxtx.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) @@ -28 +29 @@ -index 21a06b8351..c6ef6af1d8 100644 +index 66a81197fd..fb6694f4cd 100644 @@ -31 +32,10 @@ -@@ -3636,7 +3636,6 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -2347,15 +2347,12 @@ end_of_tx: + + /* TX prep functions */ + uint16_t +-iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, ++iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, + uint16_t nb_pkts) + { + int i, ret; + uint64_t ol_flags; @@ -33,2 +43,2 @@ - struct iavf_tx_queue *txq = tx_queue; - struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id]; +- struct iavf_tx_queue *txq = tx_queue; +- struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id]; @@ -36,2 +45,0 @@ - struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); - struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); @@ -39 +47,3 @@ -@@ -3665,9 +3664,7 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, + for (i = 0; i < nb_pkts; i++) { + m = tx_pkts[i]; +@@ -2379,9 +2376,7 @@ iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,