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 D9272432DA for ; Wed, 8 Nov 2023 20:27:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D43D140EE5; Wed, 8 Nov 2023 20:27:31 +0100 (CET) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mails.dpdk.org (Postfix) with ESMTP id B00E940395 for ; Wed, 8 Nov 2023 20:27:30 +0100 (CET) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4083f613275so53867555e9.2 for ; Wed, 08 Nov 2023 11:27:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699471650; x=1700076450; 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=NGRtMtXqZfk/acDT3CAUk0zUEeXNOSoDeQKK+TheoRM=; b=E2wEhRt5+3h+UiyyE7uOUE4v0if/h44d0/Ekz4x3H9dZ7BnIv++zpEUabEew1GujQW QdO5NMSwdpGurrxDhKWBKn/iHvkhg8m23WHM4yDFhX/Ay7DPXUti874omdPLyuZnO8tY 1+XW+adLPIbCyNNYLGFOJKxTfhzVzefj7pG5PpLxnKP95vacUo5w8gRCVN2Q4+lAQBJj WREfdEjZStPgMMCImYslywKd3RconuEHx84YCfXv6TbLAdY6ZDuOJmCS0nUXEjnY3urM Ecdo2Vbiv32juku/VjD0W3R1IySH5eD0C9nlGkfEQ+bMAiJVDFycOQB/zXYPOkDRknIf oQ2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699471650; x=1700076450; 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=NGRtMtXqZfk/acDT3CAUk0zUEeXNOSoDeQKK+TheoRM=; b=aAkn+PutORIMPq1mc6uybFPPbhxl3rQDBcP4mp6nBtHTPfFNhFuHHDEvTsMCXp4YK+ PbIlbKi6AaLJYOUFrHAKDBpA6b/JbYDfi6SeNdKClqH5NHSIxhT6olExYpaWw1W+fnw8 zda/I9zDhxpUgA0YdGQnqOH7UU6Vr5+XM9I0Y9GUqPPd6G2v90yIPp+Zv7cdUzG1ugG6 qxJQQNN8zPrjm++IDxU6uaBcpjf7JppH56dbM07lcWKemC4zFBHQkAX8JY6fiOjPRtgj GZwuOIX2G1CO9DolvkN2gsJ9XdNWZ8OZ2eQVAGkiJahft8P8ulK64OHX4c0N2Y95jdqB on1w== X-Gm-Message-State: AOJu0Yy7rbb6J1NXQM/FO0F69pC8rfEWQW5hd4mj1PY46ZSo/FNIN56c /hlGzmmt764EwGgYygipHPM= X-Google-Smtp-Source: AGHT+IG8gUq0cSOC8zinPB+w1geGUSF/E+hMZAhdhmosGnWTeBJaF2rUTiAEUprjp3ovcEpuPdVGpA== X-Received: by 2002:a05:600c:1f0e:b0:3fd:2e89:31bd with SMTP id bd14-20020a05600c1f0e00b003fd2e8931bdmr2473732wmb.14.1699471650304; Wed, 08 Nov 2023 11:27:30 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id a11-20020a05600c348b00b0040813e14b49sm20792978wmq.30.2023.11.08.11.27.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 11:27:29 -0800 (PST) From: luca.boccassi@gmail.com To: Qi Zhang Cc: Qiming Yang , dpdk stable Subject: patch 'net/iavf: fix Tx preparation' has been queued to stable release 20.11.10 Date: Wed, 8 Nov 2023 19:25:34 +0000 Message-Id: <20231108192535.922238-36-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108192535.922238-1-luca.boccassi@gmail.com> References: <20231018235930.3144-41-luca.boccassi@gmail.com> <20231108192535.922238-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 11/10/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/f2d782858db14fc7867179c79a73274ac4dc101e Thanks. Luca Boccassi --- >From f2d782858db14fc7867179c79a73274ac4dc101e Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Thu, 2 Nov 2023 08:05:04 -0400 Subject: [PATCH] net/iavf: fix Tx preparation [ upstream commit 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e ] 1. check nb_segs > Tx ring size for TSO case. 2. report nb_mtu_seg_max and nb_seg_max in dev_info. Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx") Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/iavf/iavf_ethdev.c | 2 ++ drivers/net/iavf/iavf_rxtx.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index b6ace7e005..643c73a488 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -843,6 +843,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) .nb_max = IAVF_MAX_RING_DESC, .nb_min = IAVF_MIN_RING_DESC, .nb_align = IAVF_ALIGN_RING_DESC, + .nb_mtu_seg_max = IAVF_TX_MAX_MTU_SEG, + .nb_seg_max = IAVF_MAX_RING_DESC, }; return 0; diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index fb6694f4cd..7daaa0dbc2 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2347,12 +2347,12 @@ end_of_tx: /* TX prep functions */ uint16_t -iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, - uint16_t nb_pkts) +iavf_prep_pkts(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; for (i = 0; i < nb_pkts; i++) { m = tx_pkts[i]; @@ -2365,7 +2365,8 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, return i; } } else if ((m->tso_segsz < IAVF_MIN_TSO_MSS) || - (m->tso_segsz > IAVF_MAX_TSO_MSS)) { + (m->tso_segsz > IAVF_MAX_TSO_MSS) || + (m->nb_segs > txq->nb_tx_desc)) { /* MSS outside the range are considered malicious */ rte_errno = EINVAL; return i; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-08 19:23:53.666746255 +0000 +++ 0036-net-iavf-fix-Tx-preparation.patch 2023-11-08 19:23:51.833397534 +0000 @@ -1 +1 @@ -From 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e Mon Sep 17 00:00:00 2001 +From f2d782858db14fc7867179c79a73274ac4dc101e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -16,2 +17,2 @@ - drivers/net/iavf/iavf_rxtx.c | 3 ++- - 2 files changed, 4 insertions(+), 1 deletion(-) + drivers/net/iavf/iavf_rxtx.c | 7 ++++--- + 2 files changed, 6 insertions(+), 3 deletions(-) @@ -20 +21 @@ -index 98cc5c8ea8..0c6ab4ac5a 100644 +index b6ace7e005..643c73a488 100644 @@ -23 +24 @@ -@@ -1207,6 +1207,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -843,6 +843,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -31 +32 @@ - dev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PASSIVE; + return 0; @@ -33 +34 @@ -index 610912f635..45f638c1d2 100644 +index fb6694f4cd..7daaa0dbc2 100644 @@ -36 +37,16 @@ -@@ -3656,7 +3656,8 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -2347,12 +2347,12 @@ end_of_tx: + + /* TX prep functions */ + uint16_t +-iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +- uint16_t nb_pkts) ++iavf_prep_pkts(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; + + for (i = 0; i < nb_pkts; i++) { + m = tx_pkts[i]; +@@ -2365,7 +2365,8 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,