> -----Original Message-----
> From: Di, ChenxuX <chenxux...@intel.com>
> Sent: Tuesday, April 14, 2020 2:37 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.x...@intel.com>; Di, ChenxuX <chenxux...@intel.com>
> Subject: [PATCH v8] net/i40e: enable advanced RSS
> 
> This patch supports:
> 
> - symmetric hash configuration
> - Input set configuration
> 
> Signed-off-by: Chenxu Di <chenxux...@intel.com>
> ---
>  doc/guides/nics/i40e.rst               |  35 ++
>  doc/guides/rel_notes/release_20_05.rst |   7 +
>  drivers/net/i40e/i40e_ethdev.c         | 509 ++++++++++++++++++++++---
>  drivers/net/i40e/i40e_ethdev.h         |  22 +-
>  drivers/net/i40e/i40e_flow.c           | 199 ++++++++--
>  5 files changed, 683 insertions(+), 89 deletions(-)
> 
> diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index
> d6e578eda..1f8fca285 100644
> --- a/doc/guides/nics/i40e.rst
> +++ b/doc/guides/nics/i40e.rst
> @@ -569,6 +569,41 @@ details please refer
> to :doc:`../testpmd_app_ug/index`.


> +
> +/* Enable RSS according to the configuration */ static int
> +i40e_rss_enable_hash(struct i40e_pf *pf,
> +             struct i40e_rte_flow_rss_conf *conf,
> +             struct rte_eth_rss_conf *rss_conf)

I think one parameter for RSS configuration is enough, why need two parameters 
here?

Beilei

> +{
> +     struct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;
> +
> +     if (!(rss_conf->rss_hf & pf->adapter->flow_types_mask))
> +             return -ENOTSUP;
> +
> +     /* Configure hash input set */
> +     if (i40e_rss_conf_hash_inset(pf, rss_conf->rss_hf))
>               return -EINVAL;
> +
> +     if (rss_conf->rss_key == NULL || rss_conf->rss_key_len <
> +         (I40E_PFQF_HKEY_MAX_INDEX + 1) * sizeof(uint32_t)) {
> +             /* Random default keys */
> +             static uint32_t rss_key_default[] = {0x6b793944,
> +                     0x23504cb5, 0x5bea75b6, 0x309f4f12, 0x3dc0a2b8,
> +                     0x024ddcdf, 0x339b8ca0, 0x4c4af64a, 0x34fac605,
> +                     0x55d85839, 0x3a58997d, 0x2ec938e1, 0x66031581};
> +
> +             rss_conf->rss_key = (uint8_t *)rss_key_default;
> +             rss_conf->rss_key_len = (I40E_PFQF_HKEY_MAX_INDEX + 1) *
> +                             sizeof(uint32_t);
> +             PMD_DRV_LOG(INFO,
> +                     "No valid RSS key config for i40e, using default\n");
>       }
> 
> +     rss_conf->rss_hf |= rss_info->conf.types;
> +     i40e_hw_rss_hash_set(pf, rss_conf);
> +
> +     if (conf->conf.func ==
> RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ)
> +             i40e_rss_config_hash_function(pf, conf);
> +
> +     i40e_rss_mark_invalid_rule(pf, conf);
> +
> +     return 0;
> +}
> +

Reply via email to