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 D42CE455AD for ; Mon, 15 Jul 2024 17:30:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF53B40BA0; Mon, 15 Jul 2024 17:30:26 +0200 (CEST) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mails.dpdk.org (Postfix) with ESMTP id 8615A40A71 for ; Mon, 15 Jul 2024 17:30:25 +0200 (CEST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4266fd395eeso30364355e9.3 for ; Mon, 15 Jul 2024 08:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057425; x=1721662225; 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=KA/09ObOXDDmtb9qnwlsad6WIIlXlm4FxDHENHjNNIc=; b=ZC07wWT6a7N3nHtcOe7ONGLSm5eyDI6C3sl2oGym9fLrS3hYgb+lBMQtZrTQlHuYM+ vvkhuO1BltFK6u36gw9tX9g9FBO3ir7BERdji0Es1JuWgnQEzEc3KZ6jYWG6Brz7t3Gt bWlbtRQ2tzHPPlY6f+1CGAMplu9xyRUcZJNDCPqrUQ8Y7P3aNir2woGsB8V3Ye4UlFDN ooK636ls7IzTCQ/YdFUhDHISDVn1Eb/Rl9hrdETRFVVXcDuoCq5+yxuN7vq0gwKC9iSX b1WuZo0Oc4XpWhYoLpBhEoksMRfJRR4ygGQECOEgBgu0fPI/ElUo4Fsj37k/fteh3ei3 8CeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057425; x=1721662225; 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=KA/09ObOXDDmtb9qnwlsad6WIIlXlm4FxDHENHjNNIc=; b=vTfk1qAO4Bjsixs48GCsQu/6UsuT7KM8IuRuCxkpvsloisdnkrMxKup5ujjaqXBcGp 7OOdGmDJZ9b81zME1M4Akg2iz3Pcon/kNp3mWyjw3pC2pUTPFV6v5deGdAohVd92IoNw dOb82hzG5pVTvrWPrTXq+/tSik43G3LoW2Bl0ijuqtJlEwEQPrmY0HqJuzgyognJPS9e e9pmHtsy1NV/L5G3g/pqBaXe3JY2crUhijgAduPir7uyK8hjObp8WiNAYHvxFEZVDgof 9cYfmKLkyYQzfWJPLip1FIHu/1qtgIZb7Rl62jXS+Frb6drLuCcfUYZRnOfAFai596bD HEYg== X-Gm-Message-State: AOJu0YxXP01/ax6aebKJIA42gCB3wTH4y3/xF2Iq7GTk1L4B73y0Fwrj 0tYSbT0gDzS54/kah7cKJCm27W5nXweleGk/kxn/iHl5dNkYpg0Ay86aXas/XrM= X-Google-Smtp-Source: AGHT+IGHyIr3vEMkVUupOzphFN06ihEC8au3yf7GZkjVm2NMzwtErK2uPKz2+U5M4LsNj3l7yNk8Wg== X-Received: by 2002:a05:600c:3b25:b0:427:9a8f:9717 with SMTP id 5b1f17b1804b1-427b8826de7mr185005e9.0.1721057424975; Mon, 15 Jul 2024 08:30:24 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f276b14sm126550235e9.23.2024.07.15.08.30.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:30:24 -0700 (PDT) From: luca.boccassi@gmail.com To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/txgbe: fix flow filters in VT mode' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:39 +0100 Message-Id: <20240715152704.2229503-61-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-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 22.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 07/17/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/500f540c7c667139c62853ec1b23e8fcbddc07b4 Thanks. Luca Boccassi --- >From 500f540c7c667139c62853ec1b23e8fcbddc07b4 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 001f8c6473..30a2d6495a 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -3914,6 +3914,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, struct txgbe_filter_info *filter_info = TXGBE_DEV_FILTER(dev); uint32_t syn_info; uint32_t synqf; + uint16_t queue; if (filter->queue >= TXGBE_MAX_RX_QUEUE_NUM) return -EINVAL; @@ -3923,7 +3924,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, if (add) { 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; if (filter->hig_pri) @@ -3992,7 +3997,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev, wr32(hw, TXGBE_5TFPORT(i), sdpqf); 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); } @@ -4276,7 +4284,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, if (add) { 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; ethertype_filter.ethertype = filter->ether_type; diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c index a198b6781b..f627ab681d 100644 --- a/drivers/net/txgbe/txgbe_fdir.c +++ b/drivers/net/txgbe/txgbe_fdir.c @@ -844,6 +844,9 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev, return -EINVAL; } + 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) { if (!update) { diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 7c4c448d88..910d232ab0 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, uint32_t reta; uint16_t i; uint16_t j; + uint16_t queue; struct rte_eth_rss_conf rss_conf = { .rss_key = conf->conf.key_len ? (void *)(uintptr_t)conf->conf.key : NULL, @@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, for (i = 0, j = 0; i < RTE_ETH_RSS_RETA_SIZE_128; i++, j++) { 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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:37.664337877 +0100 +++ 0061-net-txgbe-fix-flow-filters-in-VT-mode.patch 2024-07-15 16:19:34.656208342 +0100 @@ -1 +1 @@ -From af8c90f424ff704578971fb07f5005d4615c9f3e Mon Sep 17 00:00:00 2001 +From 500f540c7c667139c62853ec1b23e8fcbddc07b4 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 001f8c6473..30a2d6495a 100644 @@ -28 +29 @@ -@@ -4011,6 +4011,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, +@@ -3914,6 +3914,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, @@ -36 +37 @@ -@@ -4020,7 +4021,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, +@@ -3923,7 +3924,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, @@ -49 +50 @@ -@@ -4089,7 +4094,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev, +@@ -3992,7 +3997,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev, @@ -61 +62 @@ -@@ -4373,7 +4381,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, +@@ -4276,7 +4284,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, @@ -95 +96 @@ -index 7731ad8491..35f80d73ac 100644 +index 7c4c448d88..910d232ab0 100644 @@ -98 +99 @@ -@@ -5160,6 +5160,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, +@@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, @@ -106 +107 @@ -@@ -5192,7 +5193,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, +@@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,