From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id F2871A3 for ; Fri, 8 Mar 2019 18:49:47 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2019 19:49:43 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x28HloBN002625; Fri, 8 Mar 2019 19:49:41 +0200 From: Yongseok Koh To: Wei Zhao Cc: Yuan Peng , Qi Zhang , dpdk stable Date: Fri, 8 Mar 2019 09:47:45 -0800 Message-Id: <20190308174749.30771-67-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190308174749.30771-1-yskoh@mellanox.com> References: <20190308174749.30771-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/i40e: fix queue region DCB configure' has been queued to LTS release 17.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 17:49:48 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 03/13/19. So please shout if anyone has objection. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From b73f7f6dc2412ebb74e4b2c4787c8aee36b45711 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Tue, 22 Jan 2019 16:11:03 +0800 Subject: [PATCH] net/i40e: fix queue region DCB configure [ upstream commit 991a2e812fcfdba6d47b77462e06859262def583 ] DCB is not necessary to be configured if no user priority of queue region is requested. Unexpected configuration of DCB will cause unexpected behavior, like FDIR does not work on those queues, but could cause more issues. Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush") Signed-off-by: Wei Zhao Tested-by: Yuan Peng Acked-by: Qi Zhang --- drivers/net/i40e/rte_pmd_i40e.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c index 5771645c0..c75a0afbc 100644 --- a/drivers/net/i40e/rte_pmd_i40e.c +++ b/drivers/net/i40e/rte_pmd_i40e.c @@ -2795,13 +2795,23 @@ i40e_queue_region_dcb_configure(struct i40e_hw *hw, struct i40e_dcbx_config *old_cfg = &hw->local_dcbx_config; int32_t ret = -EINVAL; uint16_t i, j, prio_index, region_index; - uint8_t tc_map, tc_bw, bw_lf; + uint8_t tc_map, tc_bw, bw_lf, dcb_flag = 0; if (!info->queue_region_number) { PMD_DRV_LOG(ERR, "No queue region been set before"); return ret; } + for (i = 0; i < info->queue_region_number; i++) { + if (info->region[i].user_priority_num) { + dcb_flag = 1; + break; + } + } + + if (dcb_flag == 0) + return 0; + dcb_cfg = &dcb_cfg_local; memset(dcb_cfg, 0, sizeof(struct i40e_dcbx_config)); -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-03-08 09:46:43.468874582 -0800 +++ 0067-net-i40e-fix-queue-region-DCB-configure.patch 2019-03-08 09:46:40.379404000 -0800 @@ -1,8 +1,10 @@ -From 991a2e812fcfdba6d47b77462e06859262def583 Mon Sep 17 00:00:00 2001 +From b73f7f6dc2412ebb74e4b2c4787c8aee36b45711 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Tue, 22 Jan 2019 16:11:03 +0800 Subject: [PATCH] net/i40e: fix queue region DCB configure +[ upstream commit 991a2e812fcfdba6d47b77462e06859262def583 ] + DCB is not necessary to be configured if no user priority of queue region is requested. @@ -10,7 +12,6 @@ FDIR does not work on those queues, but could cause more issues. Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush") -Cc: stable@dpdk.org Signed-off-by: Wei Zhao Tested-by: Yuan Peng @@ -20,10 +21,10 @@ 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c -index 7ce5d02fa..c49c872b6 100644 +index 5771645c0..c75a0afbc 100644 --- a/drivers/net/i40e/rte_pmd_i40e.c +++ b/drivers/net/i40e/rte_pmd_i40e.c -@@ -2818,13 +2818,23 @@ i40e_queue_region_dcb_configure(struct i40e_hw *hw, +@@ -2795,13 +2795,23 @@ i40e_queue_region_dcb_configure(struct i40e_hw *hw, struct i40e_dcbx_config *old_cfg = &hw->local_dcbx_config; int32_t ret = -EINVAL; uint16_t i, j, prio_index, region_index;