diff options
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r-- | drivers/net/hyperv/hyperv_net.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index dd4544085db3..5fa98f599b3d 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h | |||
@@ -162,6 +162,7 @@ struct netvsc_device_info { | |||
162 | bool link_state; /* 0 - link up, 1 - link down */ | 162 | bool link_state; /* 0 - link up, 1 - link down */ |
163 | int ring_size; | 163 | int ring_size; |
164 | u32 max_num_vrss_chns; | 164 | u32 max_num_vrss_chns; |
165 | u32 num_chn; | ||
165 | }; | 166 | }; |
166 | 167 | ||
167 | enum rndis_device_state { | 168 | enum rndis_device_state { |
@@ -541,6 +542,29 @@ union nvsp_2_message_uber { | |||
541 | struct nvsp_2_free_rxbuf free_rxbuf; | 542 | struct nvsp_2_free_rxbuf free_rxbuf; |
542 | } __packed; | 543 | } __packed; |
543 | 544 | ||
545 | struct nvsp_4_send_vf_association { | ||
546 | /* 1: allocated, serial number is valid. 0: not allocated */ | ||
547 | u32 allocated; | ||
548 | |||
549 | /* Serial number of the VF to team with */ | ||
550 | u32 serial; | ||
551 | } __packed; | ||
552 | |||
553 | enum nvsp_vm_datapath { | ||
554 | NVSP_DATAPATH_SYNTHETIC = 0, | ||
555 | NVSP_DATAPATH_VF, | ||
556 | NVSP_DATAPATH_MAX | ||
557 | }; | ||
558 | |||
559 | struct nvsp_4_sw_datapath { | ||
560 | u32 active_datapath; /* active data path in VM */ | ||
561 | } __packed; | ||
562 | |||
563 | union nvsp_4_message_uber { | ||
564 | struct nvsp_4_send_vf_association vf_assoc; | ||
565 | struct nvsp_4_sw_datapath active_dp; | ||
566 | } __packed; | ||
567 | |||
544 | enum nvsp_subchannel_operation { | 568 | enum nvsp_subchannel_operation { |
545 | NVSP_SUBCHANNEL_NONE = 0, | 569 | NVSP_SUBCHANNEL_NONE = 0, |
546 | NVSP_SUBCHANNEL_ALLOCATE, | 570 | NVSP_SUBCHANNEL_ALLOCATE, |
@@ -578,6 +602,7 @@ union nvsp_all_messages { | |||
578 | union nvsp_message_init_uber init_msg; | 602 | union nvsp_message_init_uber init_msg; |
579 | union nvsp_1_message_uber v1_msg; | 603 | union nvsp_1_message_uber v1_msg; |
580 | union nvsp_2_message_uber v2_msg; | 604 | union nvsp_2_message_uber v2_msg; |
605 | union nvsp_4_message_uber v4_msg; | ||
581 | union nvsp_5_message_uber v5_msg; | 606 | union nvsp_5_message_uber v5_msg; |
582 | } __packed; | 607 | } __packed; |
583 | 608 | ||
@@ -589,6 +614,7 @@ struct nvsp_message { | |||
589 | 614 | ||
590 | 615 | ||
591 | #define NETVSC_MTU 65536 | 616 | #define NETVSC_MTU 65536 |
617 | #define NETVSC_MTU_MIN 68 | ||
592 | 618 | ||
593 | #define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */ | 619 | #define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */ |
594 | #define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY (1024*1024*15) /* 15MB */ | 620 | #define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY (1024*1024*15) /* 15MB */ |
@@ -670,6 +696,8 @@ struct netvsc_device { | |||
670 | u32 send_table[VRSS_SEND_TAB_SIZE]; | 696 | u32 send_table[VRSS_SEND_TAB_SIZE]; |
671 | u32 max_chn; | 697 | u32 max_chn; |
672 | u32 num_chn; | 698 | u32 num_chn; |
699 | spinlock_t sc_lock; /* Protects num_sc_offered variable */ | ||
700 | u32 num_sc_offered; | ||
673 | atomic_t queue_sends[NR_CPUS]; | 701 | atomic_t queue_sends[NR_CPUS]; |
674 | 702 | ||
675 | /* Holds rndis device info */ | 703 | /* Holds rndis device info */ |
@@ -688,6 +716,11 @@ struct netvsc_device { | |||
688 | 716 | ||
689 | /* The net device context */ | 717 | /* The net device context */ |
690 | struct net_device_context *nd_ctx; | 718 | struct net_device_context *nd_ctx; |
719 | |||
720 | /* 1: allocated, serial number is valid. 0: not allocated */ | ||
721 | u32 vf_alloc; | ||
722 | /* Serial number of the VF to team with */ | ||
723 | u32 vf_serial; | ||
691 | }; | 724 | }; |
692 | 725 | ||
693 | /* NdisInitialize message */ | 726 | /* NdisInitialize message */ |