[dpdk-dev] [PATCH 21/22] net/hns3: add multiple process support for hns3 PMD driver

Ferruh Yigit ferruh.yigit at intel.com
Fri Aug 30 17:14:53 CEST 2019


On 8/23/2019 2:47 PM, Wei Hu (Xavier) wrote:
> This patch adds multiple process support for hns3 PMD driver.
> Multi-process support selection queue by configuring RSS or
> flow director. The primary process supports various management
> ops, and the secondary process only supports queries ops.
> The primary process notifies the secondary processes to start
> or stop tranceiver.
> 
> Signed-off-by: Chunsong Feng <fengchunsong at huawei.com>
> Signed-off-by: Min Wang (Jushui) <wangmin3 at huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
> Signed-off-by: Hao Chen <chenhao164 at huawei.com>
> Signed-off-by: Huisong Li <lihuisong at huawei.com>

<...>

> @@ -1556,6 +1559,25 @@ static const struct eth_dev_ops hns3vf_eth_dev_ops = {
>  	.dev_supported_ptypes_get = hns3_dev_supported_ptypes_get,
>  };
>  
> +static const struct eth_dev_ops hns3vf_eth_dev_secondary_ops = {
> +	.stats_get          = hns3_stats_get,
> +	.stats_reset        = hns3_stats_reset,
> +	.xstats_get         = hns3_dev_xstats_get,
> +	.xstats_get_names   = hns3_dev_xstats_get_names,
> +	.xstats_reset	    = hns3_dev_xstats_reset,
> +	.xstats_get_by_id   = hns3_dev_xstats_get_by_id,
> +	.xstats_get_names_by_id = hns3_dev_xstats_get_names_by_id,
> +	.dev_infos_get      = hns3vf_dev_infos_get,
> +	.link_update        = hns3vf_dev_link_update,
> +	.rss_hash_update    = hns3_dev_rss_hash_update,
> +	.rss_hash_conf_get  = hns3_dev_rss_hash_conf_get,
> +	.reta_update        = hns3_dev_rss_reta_update,
> +	.reta_query         = hns3_dev_rss_reta_query,
> +	.filter_ctrl        = hns3_dev_filter_ctrl,
> +	.get_reg            = hns3_get_regs,
> +	.dev_supported_ptypes_get = hns3_dev_supported_ptypes_get,
> +};
> +

There shouldn't need to define separate dev_ops for the secondary processes,
what is the difference of this one used for primary process, why not use that one?

<...>

> +/*
> + * Initialize by secondary process.
> + */
> +void hns3_mp_init_secondary(void)
> +{
> +	rte_mp_action_register(HNS3_MP_NAME, mp_secondary_handle);

What is this handler for? Most of the case the MP communication is done in eal
level and nothing need to be done in the driver level.


More information about the dev mailing list