summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
diff options
context:
space:
mode:
authorHuazhong Tan <tanhuazhong@huawei.com>2020-03-18 11:57:07 +0800
committerDavid S. Miller <davem@davemloft.net>2020-03-21 20:22:25 -0700
commitbb5790b71bad6c14c8952e9c111aef84889e78ec (patch)
tree83a2d2d5c69524147329fa84c2138c53d137fb50 /drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
parentd3410018468562f43a58690c4d9e154e96bccf95 (diff)
net: hns3: refactor mailbox response scheme between PF and VF
Currently, PF responds to VF depending on what mailbox it is handling, it is a bit inflexible. The correct way is, PF should check the mbx_need_resp field to decide whether gives response to VF. Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h b/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
index b622d9331a2c..948e67ef30fd 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
@@ -88,6 +88,12 @@ struct hclgevf_mbx_resp_status {
u8 additional_info[HCLGE_MBX_MAX_RESP_DATA_SIZE];
};
+struct hclge_respond_to_vf_msg {
+ int status;
+ u8 data[HCLGE_MBX_MAX_RESP_DATA_SIZE];
+ u16 len;
+};
+
struct hclge_vf_to_pf_msg {
u8 code;
union {
@@ -127,7 +133,7 @@ struct hclge_mbx_vf_to_pf_cmd {
struct hclge_vf_to_pf_msg msg;
};
-#define HCLGE_MBX_NEED_RESP_BIT BIT(0)
+#define HCLGE_MBX_NEED_RESP_B 0
struct hclge_mbx_pf_to_vf_cmd {
u8 dest_vfid;