hv_netvsc: Add NetVSP v6 into version negotiation
Subsystems (3)
PATCH 1/1 hv_netvsc: Add NetVSP v6 into version negotiation
From: Haiyang Zhang <[email protected]>
This patch adds the NetVSP v6 message structures, and includes this version into NetVSC/NetVSP version negotiation process.
Signed-off-by Haiyang Zhang <[email protected]>
--- drivers/net/hyperv/hyperv_net.h | 33 +++++++++++++++++++++++++++++++++ drivers/net/hyperv/netvsc.c | 3 ++- 2 files changed, 35 insertions(+), 1 deletion(-)
drivers/net/hyperv/hyperv_net.h +33 -0
@@ -237,6 +237,7 @@ void netvsc_switch_datapath(struct net_device *nv_dev, bool vf);#define NVSP_PROTOCOL_VERSION_2 0x30002#define NVSP_PROTOCOL_VERSION_4 0x40000#define NVSP_PROTOCOL_VERSION_5 0x50000 +#define NVSP_PROTOCOL_VERSION_6 0x60000enum {NVSP_MSG_TYPE_NONE =0 ,
@@ -308,6 +309,11 @@ enum {NVSP_MSG5_TYPE_SEND_INDIRECTION_TABLE ,NVSP_MSG5_MAX =NVSP_MSG5_TYPE_SEND_INDIRECTION_TABLE , + +/* Version 6 messages */ +NVSP_MSG6_TYPE_PD_API , + +NVSP_MSG6_MAX =NVSP_MSG6_TYPE_PD_API }; enum {
@@ -619,12 +625,39 @@ union nvsp_5_message_uber {struct nvsp_5_send_indirect_table send_table; } __packed; +enum nvsp6_pd_api_op { +PD_API_OP_NOTIFY_VSP =0 , +PD_API_OP_CONFIG , +PD_API_OP_MAX +}; + +struct nvsp_6_pd_api_req { +u32 op; +u64 mmio_pa;/* MMIO Physical Address */ +u32 mmio_len; +u32 num_subchn;/* Number of PD subchannels */ +} __packed; + +struct nvsp_6_pd_api_comp { +u32 op; +u32 status; +u32 num_subchn;/* Number of PD subchannels */ +u8 is_supported;/* Is supported by VSP */ +u8 is_enabled;/* Is enabled by VSP */ +} __packed; + +union nvsp_6_message_uber { +struct nvsp_6_pd_api_req pd_req; +struct nvsp_6_pd_api_comp pd_comp; +} __packed; +union nvsp_all_messages {union nvsp_message_init_uber init_msg;union nvsp_1_message_uber v1_msg;union nvsp_2_message_uber v2_msg;union nvsp_4_message_uber v4_msg;union nvsp_5_message_uber v5_msg; +union nvsp_6_message_uber v6_msg; } __packed;/* ALL Messages */
drivers/net/hyperv/netvsc.c +2 -1
@@ -509,7 +509,8 @@ static int netvsc_connect_vsp(struct hv_device *device,struct net_device *ndev =hv_get_drvdata (device);static const u32 ver_list[] = {NVSP_PROTOCOL_VERSION_1 ,NVSP_PROTOCOL_VERSION_2 , -NVSP_PROTOCOL_VERSION_4 ,NVSP_PROTOCOL_VERSION_5 +NVSP_PROTOCOL_VERSION_4 ,NVSP_PROTOCOL_VERSION_5 , +NVSP_PROTOCOL_VERSION_6 };struct nvsp_message *init_packet;int ndis_version, i, ret;
Signature · 6 lines
2.15.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
David Miller
maintainerFrom: Haiyang Zhang <[email protected]>
Date: Thu, 5 Apr 2018 11:42:22 -0700
Quoted 6 lines
From: Haiyang Zhang <[email protected]>
This patch adds the NetVSP v6 message structures, and includes this version into NetVSC/NetVSP version negotiation process.
Signed-off-by Haiyang Zhang <[email protected]>
The net-next tree is closed, please resubmit this when the net-next tree reopens.
Thank you.
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel