[PATCH v2 5/6] net/hns3: refactor send mailbox function

Ferruh Yigit ferruh.yigit at amd.com
Fri Nov 10 17:23:40 CET 2023


On 11/10/2023 6:13 AM, Jie Hai wrote:
> From: Dengdui Huang <huangdengdui at huawei.com>
> 
> The 'hns3_send_mbx_msg' function has following problem:
> 1. the name is vague, missing caller indication.
> 2. too many input parameters because the filling messages
>    are placed in commands the send command.
> 
> Therefore, a common interface is encapsulated to fill in
> the mailbox message before sending it.
> 
> Fixes: 463e748964f5 ("net/hns3: support mailbox")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
> Signed-off-by: Jie Hai <haijie1 at huawei.com>

<...>

> @@ -635,8 +642,8 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw)
>  	rte_atomic_store_explicit(&vf->pf_push_lsc_cap, HNS3_PF_PUSH_LSC_CAP_UNKNOWN,
>  			 rte_memory_order_release);
>  
> -	(void)hns3_send_mbx_msg(hw, HNS3_MBX_GET_LINK_STATUS, 0, NULL, 0, false,
> -				NULL, 0);
> +	hns3vf_mbx_setup(&req, HNS3_MBX_GET_LINK_STATUS, 0);
> +	(void)hns3vf_mbx_send(hw, &req, false, NULL, 0);
>  

'req' is not declared in this function scope but used.



More information about the dev mailing list