[dpdk-dev] [PATCH v3] net/i40e: fix flow RSS configuration error
Zhang, Qi Z
qi.z.zhang at intel.com
Mon Mar 26 05:31:27 CEST 2018
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Monday, March 26, 2018 9:12 AM
> To: dev at dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang at intel.com>; Zhao1, Wei <wei.zhao1 at intel.com>
> Subject: [PATCH v3] net/i40e: fix flow RSS configuration error
>
> I40e need a protection for rss rule flow configuration after one rule is set for a
> port.
>
> Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")
> Signed-off-by: Wei Zhao <wei.zhao1 at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
> Tested-by: Peng Yuan <yuan.peng at intel.com>
> ---
> Changes in v2:
>
> change fixes version number.
>
> Changes in v3:
>
> change ret default number.
> ---
> drivers/net/i40e/i40e_flow.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index
> 16c47cf..69d1ba5 100644
> --- a/drivers/net/i40e/i40e_flow.c
> +++ b/drivers/net/i40e/i40e_flow.c
> @@ -4385,14 +4385,15 @@ i40e_config_rss_filter_set(struct rte_eth_dev
> *dev, {
> struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
> struct i40e_hw *hw =
> I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> + int ret;
>
> if (conf->queue_region_conf) {
> - i40e_flush_queue_region_all_conf(dev, hw, pf, 1);
> + ret = i40e_flush_queue_region_all_conf(dev, hw, pf, 1);
> conf->queue_region_conf = 0;
> } else {
> - i40e_config_rss_filter(pf, conf, 1);
> + ret = i40e_config_rss_filter(pf, conf, 1);
> }
> - return 0;
> + return ret;
> }
>
> static int
> @@ -4545,6 +4546,8 @@ i40e_flow_create(struct rte_eth_dev *dev,
> case RTE_ETH_FILTER_HASH:
> ret = i40e_config_rss_filter_set(dev,
> &cons_filter.rss_conf);
> + if (ret)
> + goto free_flow;
> flow->rule = &pf->rss_info;
> break;
> default:
> --
> 2.7.5
More information about the dev
mailing list