ethdev: fix shallow copy of flow API RSS action
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Thu, 19 Apr 2018 10:07:44 +0000 (12:07 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 14:54:56 +0000 (15:54 +0100)
commit972bf3610611264182782281b08dae9e4d39a327
tree2431dbaf68ac8c2c1b17b2ddd36b3aaf1abfaad0
parent5225e84b70c0bb76b926da1aa193e54d43f102fe
ethdev: fix shallow copy of flow API RSS action

The rss_conf field is defined as a pointer to struct rte_eth_rss_conf.

Even assuming it is permanently allocated and a pointer copy is safe,
pointed data may change and not reflect an applied flow rule anymore.

This patch aligns with testpmd by making a deep copy instead.

Fixes: 18da437b5f63 ("ethdev: add flow rule copy function")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_ether/rte_flow.c