summaryrefslogtreecommitdiff
path: root/drivers/net/i40e
diff options
context:
space:
mode:
authorWei Zhao <wei.zhao1@intel.com>2018-11-15 16:57:20 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-11-15 23:32:46 +0100
commit2e00f9e70ea230365107875d66ea1d62e0af87c5 (patch)
treea2e3adab3d26e8d824fc0c560a899f582a777c23 /drivers/net/i40e
parent73247f1ced303c16987bb366d38a2d8a0fc40db4 (diff)
downloaddpdk-next-eventdev-2e00f9e70ea230365107875d66ea1d62e0af87c5.zip
dpdk-next-eventdev-2e00f9e70ea230365107875d66ea1d62e0af87c5.tar.gz
dpdk-next-eventdev-2e00f9e70ea230365107875d66ea1d62e0af87c5.tar.xz
net/i40e: fix RSS key initialization
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> Tested-by: Yuan Peng <yuan.peng@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Diffstat (limited to 'drivers/net/i40e')
-rw-r--r--drivers/net/i40e/i40e_ethdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 3628d7f..7030eb1 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12583,8 +12583,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,
@@ -12594,6 +12592,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;
}