* [dpdk-dev] [PATCH] net/i40e: fix RSS key pointer initialization error
@ 2018-11-15 8:57 Wei Zhao
2018-11-15 9:54 ` Zhao1, Wei
0 siblings, 1 reply; 3+ messages in thread
From: Wei Zhao @ 2018-11-15 8:57 UTC (permalink / raw)
To: dev; +Cc: qi.z.zhang, yuan.peng, Wei Zhao
The assignment should be done after initialization,
or it will be zero.
Fixes: 264b23e3d2c1 ("net/i40e: add parameter check for RSS flow init")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 790ecc3..a96d407 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12554,8 +12554,6 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf *out,
return -EINVAL;
if (!in->key && in->key_len)
return -EINVAL;
- if (in->key)
- out->conf.key = memcpy(out->key, in->key, in->key_len);
out->conf = (struct rte_flow_action_rss){
.func = in->func,
.level = in->level,
@@ -12565,6 +12563,8 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf *out,
.queue = memcpy(out->queue, in->queue,
sizeof(*in->queue) * in->queue_num),
};
+ if (in->key)
+ out->conf.key = memcpy(out->key, in->key, in->key_len);
return 0;
}
--
2.7.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix RSS key pointer initialization error
2018-11-15 8:57 [dpdk-dev] [PATCH] net/i40e: fix RSS key pointer initialization error Wei Zhao
@ 2018-11-15 9:54 ` Zhao1, Wei
2018-11-15 18:07 ` Zhang, Qi Z
0 siblings, 1 reply; 3+ messages in thread
From: Zhao1, Wei @ 2018-11-15 9:54 UTC (permalink / raw)
To: dev; +Cc: Zhang, Qi Z, Peng, Yuan
Send on behalf of Peng, Yuan <yuan.peng@intel.com>
tested-by: Peng, Yuan <yuan.peng@intel.com>
- Tested Branch: master
- Tested Commit: 3e42b6ce06a1901b1ab631df4484ec8f548091c6
- OS: 4.5.5-300.fc24.x86_64
- GCC: gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)
- CPU: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
- NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] (rev 01)
Intel Corporation Ethernet Controller X710 for 10GbE SFP+ [8086:1572] (rev 01)
- Default x86_64-native-linuxapp-gcc configuration
- Prerequisites:
- Total 1 cases, 1 passed, 0 failed
- Case:
./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1
./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 - -i --nb-cores=8 --rxq=4 --txq=4 --port-topology=chained
testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp end key 67108863 / end
Flow rule #0 created
testpmd> flow flush 0
testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp end / end
Flow rule #0 created
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Thursday, November 15, 2018 4:57 PM
> To: dev@dpdk.org
> Cc: 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 RSS key pointer initialization error
>
> The assignment should be done after initialization, or it will be zero.
>
> Fixes: 264b23e3d2c1 ("net/i40e: add parameter check for RSS flow init")
>
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
> drivers/net/i40e/i40e_ethdev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 790ecc3..a96d407 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -12554,8 +12554,6 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf
> *out,
> return -EINVAL;
> if (!in->key && in->key_len)
> return -EINVAL;
> - if (in->key)
> - out->conf.key = memcpy(out->key, in->key, in->key_len);
> out->conf = (struct rte_flow_action_rss){
> .func = in->func,
> .level = in->level,
> @@ -12565,6 +12563,8 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf
> *out,
> .queue = memcpy(out->queue, in->queue,
> sizeof(*in->queue) * in->queue_num),
> };
> + if (in->key)
> + out->conf.key = memcpy(out->key, in->key, in->key_len);
> return 0;
> }
>
> --
> 2.7.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix RSS key pointer initialization error
2018-11-15 9:54 ` Zhao1, Wei
@ 2018-11-15 18:07 ` Zhang, Qi Z
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2018-11-15 18:07 UTC (permalink / raw)
To: Zhao1, Wei, dev; +Cc: Peng, Yuan
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Thursday, November 15, 2018 1:55 AM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Peng, Yuan <yuan.peng@intel.com>
> Subject: RE: [PATCH] net/i40e: fix RSS key pointer initialization error
>
> Send on behalf of Peng, Yuan <yuan.peng@intel.com>
>
> tested-by: Peng, Yuan <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
>
> - Tested Branch: master
> - Tested Commit: 3e42b6ce06a1901b1ab631df4484ec8f548091c6
> - OS: 4.5.5-300.fc24.x86_64
> - GCC: gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)
> - CPU: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
> - NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection
> [8086:10fb] (rev 01)
> Intel Corporation Ethernet Controller X710 for 10GbE SFP+ [8086:1572]
> (rev 01)
> - Default x86_64-native-linuxapp-gcc configuration
> - Prerequisites:
> - Total 1 cases, 1 passed, 0 failed
>
> - Case:
> ./usertools/dpdk-devbind.py -b igb_uio 05:00.0
> 05:00.1 ./x86_64-native-linuxapp-gcc/app/testpmd -c 1ffff -n 4 - -i
> --nb-cores=8 --rxq=4 --txq=4 --port-topology=chained
> testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp
> testpmd> end key 67108863 / end
> Flow rule #0 created
> testpmd> flow flush 0
> testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp
> testpmd> end / end
> Flow rule #0 created
>
>
>
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Thursday, November 15, 2018 4:57 PM
> > To: dev@dpdk.org
> > Cc: 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 RSS key pointer initialization error
> >
> > The assignment should be done after initialization, or it will be zero.
> >
> > Fixes: 264b23e3d2c1 ("net/i40e: add parameter check for RSS flow
> > init")
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > ---
> > drivers/net/i40e/i40e_ethdev.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > b/drivers/net/i40e/i40e_ethdev.c index 790ecc3..a96d407 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -12554,8 +12554,6 @@ i40e_rss_conf_init(struct
> > i40e_rte_flow_rss_conf *out,
> > return -EINVAL;
> > if (!in->key && in->key_len)
> > return -EINVAL;
> > - if (in->key)
> > - out->conf.key = memcpy(out->key, in->key, in->key_len);
> > out->conf = (struct rte_flow_action_rss){
> > .func = in->func,
> > .level = in->level,
> > @@ -12565,6 +12563,8 @@ i40e_rss_conf_init(struct
> > i40e_rte_flow_rss_conf *out,
> > .queue = memcpy(out->queue, in->queue,
> > sizeof(*in->queue) * in->queue_num),
> > };
> > + if (in->key)
> > + out->conf.key = memcpy(out->key, in->key, in->key_len);
> > return 0;
> > }
> >
> > --
> > 2.7.5
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-15 18:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 8:57 [dpdk-dev] [PATCH] net/i40e: fix RSS key pointer initialization error Wei Zhao
2018-11-15 9:54 ` Zhao1, Wei
2018-11-15 18:07 ` 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).