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 DC0EA45804 for ; Fri, 23 Aug 2024 18:23:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D745D43394; Fri, 23 Aug 2024 18:23:07 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 78CEB4338E for ; Fri, 23 Aug 2024 18:23:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724430185; 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=pub9FLj4rkOVVr2OYF7jrTgQuD4/hlHFYWpHjKCLe7E=; b=Wi7bKryzkXM5ct+3W0/ZWecBgNuJkxZR2gKoh8jGbCKYZTZJ0VjP2lJE4aL16lGTrHNdd8 YOuqgf2JT1HzoGe33cvuo9kUlxLqMKIeRNuHxl+I/W8zXlJ2Wn4bT9JlLqfJBlaQyfpaZb oWwKFSAicIZVBnKGbfwd8mcAjXYO85s= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-5-W6YGcHY3P36Tu3c-dbYfSw-1; Fri, 23 Aug 2024 12:23:01 -0400 X-MC-Unique: W6YGcHY3P36Tu3c-dbYfSw-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EA61A1955BF2; Fri, 23 Aug 2024 16:23:00 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.193.224]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B219D1956053; Fri, 23 Aug 2024 16:22:59 +0000 (UTC) From: Kevin Traynor To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/txgbe: fix flow filters in VT mode' has been queued to stable release 21.11.8 Date: Fri, 23 Aug 2024 17:18:43 +0100 Message-ID: <20240823161929.1004778-95-ktraynor@redhat.com> In-Reply-To: <20240823161929.1004778-1-ktraynor@redhat.com> References: <20240823161929.1004778-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/28/24. 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/0cf458e3ef2a6bb442f5357d3cf3ede98aa384a5 Thanks. Kevin --- >From 0cf458e3ef2a6bb442f5357d3cf3ede98aa384a5 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Tue, 18 Jun 2024 15:11:33 +0800 Subject: [PATCH] net/txgbe: fix flow filters in VT mode [ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ] In virtualization mode, target pool should be determined for the filters. For ether type filter, virtualization mode must be enabled to filter broadcast/multicast packets due to hardware limitations. Fixes: f8e2cfc7702b ("net/txgbe: support ethertype filter add and delete") Fixes: 77a72b4d9dc0 ("net/txgbe: support ntuple filter add and delete") Fixes: 983a4ef2265b ("net/txgbe: support syn filter add and delete") Fixes: 08d61139be0a ("net/txgbe: support flow director filter add and delete") Fixes: 9fdfed08a5e3 ("net/txgbe: restore RSS filter") Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethdev.c | 24 +++++++++++++++++++++--- drivers/net/txgbe/txgbe_fdir.c | 3 +++ drivers/net/txgbe/txgbe_rxtx.c | 8 +++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index bd587b4f71..170bea9dd0 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -3821,4 +3821,5 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, uint32_t syn_info; uint32_t synqf; + uint16_t queue; if (filter->queue >= TXGBE_MAX_RX_QUEUE_NUM) @@ -3830,5 +3831,9 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, if (syn_info & TXGBE_SYNCLS_ENA) return -EINVAL; - synqf = (uint32_t)TXGBE_SYNCLS_QPID(filter->queue); + if (RTE_ETH_DEV_SRIOV(dev).active) + queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue; + else + queue = filter->queue; + synqf = (uint32_t)TXGBE_SYNCLS_QPID(queue); synqf |= TXGBE_SYNCLS_ENA; @@ -3899,5 +3904,8 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev, wr32(hw, TXGBE_5TFCTL0(i), ftqf); - l34timir |= TXGBE_5TFCTL1_QP(filter->queue); + if (RTE_ETH_DEV_SRIOV(dev).active) + l34timir |= TXGBE_5TFCTL1_QP(RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue); + else + l34timir |= TXGBE_5TFCTL1_QP(filter->queue); wr32(hw, TXGBE_5TFCTL1(i), l34timir); } @@ -4183,5 +4191,15 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, etqf = TXGBE_ETFLT_ENA; etqf |= TXGBE_ETFLT_ETID(filter->ether_type); - etqs |= TXGBE_ETCLS_QPID(filter->queue); + if (RTE_ETH_DEV_SRIOV(dev).active) { + int pool, queue; + + pool = RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx; + queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue; + etqf |= TXGBE_ETFLT_POOLENA; + etqf |= TXGBE_ETFLT_POOL(pool); + etqs |= TXGBE_ETCLS_QPID(queue); + } else { + etqs |= TXGBE_ETCLS_QPID(filter->queue); + } etqs |= TXGBE_ETCLS_QENA; diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c index e303d87176..c1c2580d8a 100644 --- a/drivers/net/txgbe/txgbe_fdir.c +++ b/drivers/net/txgbe/txgbe_fdir.c @@ -847,4 +847,7 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev, } + if (RTE_ETH_DEV_SRIOV(dev).active) + queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + queue; + node = txgbe_fdir_filter_lookup(info, &rule->input); if (node) { diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index a1f26ae3f9..e2a32b1322 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -5080,4 +5080,5 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, uint16_t i; uint16_t j; + uint16_t queue; struct rte_eth_rss_conf rss_conf = { .rss_key = conf->conf.key_len ? @@ -5112,5 +5113,10 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, if (j == conf->conf.queue_num) j = 0; - reta = (reta >> 8) | LS32(conf->conf.queue[j], 24, 0xFF); + if (RTE_ETH_DEV_SRIOV(dev).active) + queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + + conf->conf.queue[j]; + else + queue = conf->conf.queue[j]; + reta = (reta >> 8) | LS32(queue, 24, 0xFF); if ((i & 3) == 3) wr32at(hw, TXGBE_REG_RSSTBL, i >> 2, reta); -- 2.46.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-23 17:18:12.519657705 +0100 +++ 0095-net-txgbe-fix-flow-filters-in-VT-mode.patch 2024-08-23 17:18:09.805430402 +0100 @@ -1 +1 @@ -From af8c90f424ff704578971fb07f5005d4615c9f3e Mon Sep 17 00:00:00 2001 +From 0cf458e3ef2a6bb442f5357d3cf3ede98aa384a5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 6d11412616..fa68a5d2ca 100644 +index bd587b4f71..170bea9dd0 100644 @@ -28 +29 @@ -@@ -4012,4 +4012,5 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, +@@ -3821,4 +3821,5 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, @@ -34 +35 @@ -@@ -4021,5 +4022,9 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, +@@ -3830,5 +3831,9 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, @@ -45 +46 @@ -@@ -4090,5 +4095,8 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev, +@@ -3899,5 +3904,8 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev, @@ -55 +56 @@ -@@ -4374,5 +4382,15 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, +@@ -4183,5 +4191,15 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, @@ -73 +74 @@ -index a198b6781b..f627ab681d 100644 +index e303d87176..c1c2580d8a 100644 @@ -76 +77 @@ -@@ -845,4 +845,7 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev, +@@ -847,4 +847,7 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev, @@ -85 +86 @@ -index 7731ad8491..35f80d73ac 100644 +index a1f26ae3f9..e2a32b1322 100644 @@ -88 +89 @@ -@@ -5161,4 +5161,5 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, +@@ -5080,4 +5080,5 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, @@ -94 +95 @@ -@@ -5193,5 +5194,10 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, +@@ -5112,5 +5113,10 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,