On 2/16/2023 12:30 AM, Mingxia Liu wrote:
> Add RSS support.
> 
> Signed-off-by: Mingxia Liu <mingxia....@intel.com>

<...>

>  static int
>  cpfl_dev_configure(struct rte_eth_dev *dev)
>  {
>       struct idpf_vport *vport = dev->data->dev_private;
>       struct rte_eth_conf *conf = &dev->data->dev_conf;
> +     struct idpf_adapter *adapter = vport->adapter;
> +     int ret;
>  
>       if (conf->link_speeds & RTE_ETH_LINK_SPEED_FIXED) {
>               PMD_INIT_LOG(ERR, "Setting link speed is not supported");
> @@ -205,6 +245,17 @@ cpfl_dev_configure(struct rte_eth_dev *dev)
>               return -ENOTSUP;
>       }
>  
> +     if (adapter->caps.rss_caps != 0 && dev->data->nb_rx_queues != 0) {
> +             ret = cpfl_init_rss(vport);
> +             if (ret != 0) {
> +                     PMD_INIT_LOG(ERR, "Failed to init rss");
> +                     return ret;
> +             }
> +     } else {
> +             PMD_INIT_LOG(ERR, "RSS is not supported.");
> +             return -1;
> +     }


Shouldn't driver take into account 'conf->rxmode->mq_mode' and
'conf->rx_adv_conf->rss_conf->*' ?

Reply via email to