net: hns3: create common cmdq resource allocate/free/query APIs
authorJie Wang <wangjie125@huawei.com>
Fri, 31 Dec 2021 10:22:37 +0000 (18:22 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Dec 2021 14:25:46 +0000 (14:25 +0000)
commitda77aef9cc58ed820097b3d905e9fa474d42dbd4
tree307e7c69ee58f1d5eb5d080f724982765f5a686e
parent076bb537577f6eae1714613f02a74621c0c1922a
net: hns3: create common cmdq resource allocate/free/query APIs

The PF and VF cmdq module resource allocate/free/query APIs are almost the
same espect the suffixes of API names. These same implementations bring
double development and bugfix work.

This patch creates common cmdq resource allocate/free/query APIs called by
PF and VF cmdq init/uninit APIs. The next patch will use the new unified
APIs to replace init/uninit APIs.

Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.h