* [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration
@ 2019-01-22 8:11 Wei Zhao
2019-01-22 9:31 ` Zhao1, Wei
2019-01-22 12:48 ` Zhang, Qi Z
0 siblings, 2 replies; 5+ messages in thread
From: Wei Zhao @ 2019-01-22 8:11 UTC (permalink / raw)
To: dev; +Cc: stable, qi.z.zhang, yuan.peng, Wei Zhao
There 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 <wei.zhao1@intel.com>
---
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 7ce5d02..c49c872 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,
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration
2019-01-22 8:11 [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration Wei Zhao
@ 2019-01-22 9:31 ` Zhao1, Wei
2019-01-22 12:48 ` Zhang, Qi Z
1 sibling, 0 replies; 5+ messages in thread
From: Zhao1, Wei @ 2019-01-22 9:31 UTC (permalink / raw)
To: dev; +Cc: stable, Zhang, Qi Z, Peng, Yuan
Tested-by: Peng Yuan < yuan.peng@intel.com@intel.com>
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.
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Tuesday, January 22, 2019 4:11 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Peng, Yuan
> <yuan.peng@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH] 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.
>
> Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
> 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 7ce5d02..c49c872 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,
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration
2019-01-22 8:11 [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration Wei Zhao
2019-01-22 9:31 ` Zhao1, Wei
@ 2019-01-22 12:48 ` Zhang, Qi Z
2019-01-22 16:33 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
1 sibling, 1 reply; 5+ messages in thread
From: Zhang, Qi Z @ 2019-01-22 12:48 UTC (permalink / raw)
To: Zhao1, Wei, dev; +Cc: stable, Peng, Yuan
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Tuesday, January 22, 2019 4:11 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Peng, Yuan
> <yuan.peng@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> 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
>
> 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.
>
> Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel with above change.
Thanks
Qi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/i40e: fix queue region error in priority configuration
2019-01-22 12:48 ` Zhang, Qi Z
@ 2019-01-22 16:33 ` Ferruh Yigit
2019-01-23 1:56 ` Zhang, Qi Z
0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2019-01-22 16:33 UTC (permalink / raw)
To: Zhang, Qi Z, Zhao1, Wei, dev; +Cc: stable, Peng, Yuan
On 1/22/2019 12:48 PM, Zhang, Qi Z wrote:
>
>
>> -----Original Message-----
>> From: Zhao1, Wei
>> Sent: Tuesday, January 22, 2019 4:11 PM
>> To: dev@dpdk.org
>> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Peng, Yuan
>> <yuan.peng@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
>> 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
>
>
>>
>> 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.
"
>>
>> Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")
>> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
>
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
>
> Applied to dpdk-next-net-intel with above change.
>
> Thanks
> Qi
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/i40e: fix queue region error in priority configuration
2019-01-22 16:33 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2019-01-23 1:56 ` Zhang, Qi Z
0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2019-01-23 1:56 UTC (permalink / raw)
To: Yigit, Ferruh, Zhao1, Wei, dev; +Cc: stable, Peng, Yuan
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, January 23, 2019 12:34 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>;
> dev@dpdk.org
> Cc: stable@dpdk.org; Peng, Yuan <yuan.peng@intel.com>
> Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix queue region error in priority
> configuration
>
> On 1/22/2019 12:48 PM, Zhang, Qi Z wrote:
> >
> >
> >> -----Original Message-----
> >> From: Zhao1, Wei
> >> Sent: Tuesday, January 22, 2019 4:11 PM
> >> To: dev@dpdk.org
> >> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Peng, Yuan
> >> <yuan.peng@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> >> 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
> >
> >
> >>
> >> 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.
> "
Looks good to me
Thanks
Qi
>
> >>
> >> Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")
> >> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> >
> > Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> >
> > Applied to dpdk-next-net-intel with above change.
> >
> > Thanks
> > Qi
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-23 1:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 8:11 [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration Wei Zhao
2019-01-22 9:31 ` Zhao1, Wei
2019-01-22 12:48 ` Zhang, Qi Z
2019-01-22 16:33 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-01-23 1:56 ` Zhang, Qi Z
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).