net/i40e: fix queue region error in priority configuration
PATCH 1/1 net/i40e: fix queue region error in priority configuration
There is no need to set vlan priority realted resigsters when there is no configuration about that in queue region.
--- drivers/net/i40e/rte_pmd_i40e.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/net/i40e/rte_pmd_i40e.c +11 -1
@@ -2818,13 +2818,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 ));
Signature · 1 line
2.7.5
applied the patch [https://patches.dpdk.org/patch/49990/] to dpdk 19.02-rc3
commit 84a1d4a873634f53cc6e3555dc78ca611bbc3458
verified with fortville 4*10g NIC
driver: i40e
version: 2.7.11
firmware-version: 6.01 0x80003205 1.1691.0./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1
./x86_64-native-linuxapp-gcc/app/testpmd -c 1ff -n 4 - -i --rxq=8 --txq=8 --nb-cores=2 --nb-ports=2 --pkt-filter-mode=perfect
port config all rss all
set verbose 1
port config 0 pctype mapping update 15 28
port config 0 pctype mapping update 17 30
set port 0 queue-region region_id 0 queue_start_index 2 queue_num 4
set port 0 queue-region region_id 1 queue_start_index 6 queue_num 1
set port 0 queue-region region_id 0 flowtype 15
set port 0 queue-region region_id 1 flowtype 17
set port 0 queue-region flush on
port config all rss 28
port config all rss 30
start
Input packet: sendp([Ether(type=0x8863,dst='ff:ff:ff:ff:ff:ff')/PPPoED()],iface="enp131s0f3",count=100) testpmd showed:
testpmd> show port stats all
######################## NIC statistics for port 0 ########################
RX-packets: 100 RX-missed: 0 RX-bytes: 6000
RX-errors: 0
RX-nombuf: 0
TX-packets: 0 TX-errors: 0 TX-bytes: 0
Throughput (since last show)
Rx-pps: 0
Tx-pps: 0
############################################################################
######################## NIC statistics for port 1 ########################
RX-packets: 0 RX-missed: 0 RX-bytes: 0
RX-errors: 0
RX-nombuf: 0
TX-packets: 100 TX-errors: 0 TX-bytes: 6000
Throughput (since last show)
Rx-pps: 0
Tx-pps: 0
############################################################################
the issue is not reproduced.
Quoted 49 lines
-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, January 22, 2019 4:11 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Peng, Yuan <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/i40e: fix queue region error in priority configurationThere is no need to set vlan priority realted resigsters when there is no configuration about that in queue region.
Fixes 7cbecc2f7424 ("net/i40e: support queue region set and flush")Signed-off-by Wei Zhao <[email protected]>--- drivers/net/i40e/rte_pmd_i40e.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/net/i40e/rte_pmd_i40e.cindex 7ce5d02..c49c872 100644drivers/net/i40e/rte_pmd_i40e.c +11
-2@@ -2818,13 +2818,23 @@ i40e_queue_region_dcb_configure(structi40e_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.7.5
Quoted 9 lines
-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, January 22, 2019 4:11 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Peng, Yuan <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/i40e: fix queue region error in priority configuration
Change title to below since it's all about if we need to call i40e_set_dcb_config
fix queue region dcb configure
Quoted 3 lines
There is no need to set vlan priority realted resigsters when there is no configuration about that in queue region.
Reword to
DCB is not necessary to be configured if no user priority of queue region is requested.
Quoted 3 lines
Fixes 7cbecc2f7424 ("net/i40e: support queue region set and flush")Signed-off-by Wei Zhao <[email protected]>
Applied to dpdk-next-net-intel with above change.
Thanks
Qi
Quoted 16 lines · Qi Z
Quoted 9 lines
-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, January 22, 2019 4:11 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Peng, Yuan <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/i40e: fix queue region error in priority configurationChange title to below since it's all about if we need to call
i40e_set_dcb_configfix queue region dcb configure
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
There is no need to set vlan priority realted resigsters when there is no configuration about that in queue region.
Reword to
DCB is not necessary to be configured if no user priority of queue region is requested.
Extended description with provided information as below, please comment if change required for this update.
"
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.
"
Quoted 11 lines
Quoted 3 lines
Fixes 7cbecc2f7424 ("net/i40e: support queue region set and flush")Signed-off-by Wei Zhao <[email protected]>Acked-by Qi Zhang <[email protected]>Applied to dpdk-next-net-intel with above change.
Thanks
Qi
Quoted 41 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Wednesday, January 23, 2019 12:34 AM
To: Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Cc: [email protected]; Peng, Yuan <[email protected]>
Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix queue region error in priority configurationQuoted 18 lines · Qi Z
Quoted 10 lines
-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, January 22, 2019 4:11 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Peng, Yuan <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/i40e: fix queue region error in priority configurationChange title to below since it's all about if we need to call
i40e_set_dcb_configfix queue region dcb configure
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
There is no need to set vlan priority realted resigsters when there is no configuration about that in queue region.
Reword to
DCB is not necessary to be configured if no user priority of queue region is
requested.
Extended description with provided information as below, please comment if change required for this update.
Quoted 7 lines
"
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.
"
Looks good to me
Thanks
Qi
Quoted 13 lines
Quoted 13 lines
Quoted 5 lines
Fixes 7cbecc2f7424 ("net/i40e: support queue region set and flush")Signed-off-by Wei Zhao <[email protected]>Acked-by Qi Zhang <[email protected]>Applied to dpdk-next-net-intel with above change.
Thanks
Qi