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 4A87743345 for ; Thu, 16 Nov 2023 14:24:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8014840EA5; Thu, 16 Nov 2023 14:24:57 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1B94A40DF5 for ; Thu, 16 Nov 2023 14:24:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700141095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dBgBx5vwRggu6RVLZCojZN7Cs3PIazrmpgS5zyFt9QE=; b=f3JBWMTq1LSymAbQrGbrvsbE83VwYNTXdquvKUd1UZhFb8QrbluP424hYW6tT61SUWpxAz hzj+I6QfXi9hRY2mlPX72/+jMP+RP1ojxGCC5Bc2bXHsEmjJ8jFL+4lIhC1Yce+A17OP9S GYcvcU2urQ6NX5m6POf9Z9K52YPh9A4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-466-eRKEY8_yP6qwYndjINwVnQ-1; Thu, 16 Nov 2023 08:24:52 -0500 X-MC-Unique: eRKEY8_yP6qwYndjINwVnQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 336823C0FC89; Thu, 16 Nov 2023 13:24:52 +0000 (UTC) Received: from rh.Home (unknown [10.39.194.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B03B2166B27; Thu, 16 Nov 2023 13:24:51 +0000 (UTC) From: Kevin Traynor To: Qi Zhang Cc: Qiming Yang , dpdk stable Subject: patch 'net/iavf: fix Tx preparation' has been queued to stable release 21.11.6 Date: Thu, 16 Nov 2023 13:23:22 +0000 Message-ID: <20231116132348.557257-40-ktraynor@redhat.com> In-Reply-To: <20231116132348.557257-1-ktraynor@redhat.com> References: <20231116132348.557257-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.6 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/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/93bbc6d23d9a8bea0602459a794c58a6648bfb8e Thanks. Kevin --- >From 93bbc6d23d9a8bea0602459a794c58a6648bfb8e 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 | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 2214ba9545..c7aa730a21 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1149,4 +1149,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) .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, }; diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index b2789c1a48..c932b7859e 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2805,5 +2805,6 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, } } 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; -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-16 13:21:53.515502965 +0000 +++ 0040-net-iavf-fix-Tx-preparation.patch 2023-11-16 13:21:52.499946518 +0000 @@ -1 +1 @@ -From 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e Mon Sep 17 00:00:00 2001 +From 93bbc6d23d9a8bea0602459a794c58a6648bfb8e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0f536bae86b30e82ba95c279f1d6f9095d7f5b6e ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 98cc5c8ea8..0c6ab4ac5a 100644 +index 2214ba9545..c7aa730a21 100644 @@ -23 +24 @@ -@@ -1208,4 +1208,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -1149,4 +1149,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -31 +32 @@ -index 610912f635..45f638c1d2 100644 +index b2789c1a48..c932b7859e 100644 @@ -34 +35 @@ -@@ -3657,5 +3657,6 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -2805,5 +2805,6 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,