aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2014-04-21 17:54:43 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-23 14:48:39 -0400
commit4baab26129e0540746744232022110dbe9e011e7 (patch)
tree191b15d289faf1ba4cdaf6005156cbe87a920901 /drivers/net/hyperv/hyperv_net.h
parentfd0d192be6e814495aec91f357b5801afc3b6262 (diff)
hyperv: Remove recv_pkt_list and lock
Removed recv_pkt_list and lock, and updated related code, so that the locking overhead is reduced especially when multiple channels are in use. The recv_pkt_list isn't actually necessary because the packets are processed sequentially in each channel. It has been replaced by a local variable, and the related lock for this list is also removed. The is_data_pkt field is not used in receive path, so its assignment is cleaned up. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r--drivers/net/hyperv/hyperv_net.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 57eb3f906d64..a1af0f7711e2 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -119,27 +119,14 @@ struct ndis_recv_scale_param { /* NDIS_RECEIVE_SCALE_PARAMETERS */
119}; 119};
120 120
121/* Fwd declaration */ 121/* Fwd declaration */
122struct hv_netvsc_packet;
123struct ndis_tcp_ip_checksum_info; 122struct ndis_tcp_ip_checksum_info;
124 123
125/* Represent the xfer page packet which contains 1 or more netvsc packet */
126struct xferpage_packet {
127 struct list_head list_ent;
128 u32 status;
129
130 /* # of netvsc packets this xfer packet contains */
131 u32 count;
132
133 struct vmbus_channel *channel;
134};
135
136/* 124/*
137 * Represent netvsc packet which contains 1 RNDIS and 1 ethernet frame 125 * Represent netvsc packet which contains 1 RNDIS and 1 ethernet frame
138 * within the RNDIS 126 * within the RNDIS
139 */ 127 */
140struct hv_netvsc_packet { 128struct hv_netvsc_packet {
141 /* Bookkeeping stuff */ 129 /* Bookkeeping stuff */
142 struct list_head list_ent;
143 u32 status; 130 u32 status;
144 131
145 struct hv_device *device; 132 struct hv_device *device;
@@ -149,19 +136,8 @@ struct hv_netvsc_packet {
149 u16 q_idx; 136 u16 q_idx;
150 struct vmbus_channel *channel; 137 struct vmbus_channel *channel;
151 138
152 /*
153 * Valid only for receives when we break a xfer page packet
154 * into multiple netvsc packets
155 */
156 struct xferpage_packet *xfer_page_pkt;
157
158 union { 139 union {
159 struct { 140 struct {
160 u64 recv_completion_tid;
161 void *recv_completion_ctx;
162 void (*recv_completion)(void *context);
163 } recv;
164 struct {
165 u64 send_completion_tid; 141 u64 send_completion_tid;
166 void *send_completion_ctx; 142 void *send_completion_ctx;
167 void (*send_completion)(void *context); 143 void (*send_completion)(void *context);
@@ -613,9 +589,6 @@ struct nvsp_message {
613 589
614#define NETVSC_RECEIVE_BUFFER_ID 0xcafe 590#define NETVSC_RECEIVE_BUFFER_ID 0xcafe
615 591
616/* Preallocated receive packets */
617#define NETVSC_RECEIVE_PACKETLIST_COUNT 256
618
619#define NETVSC_PACKET_SIZE 2048 592#define NETVSC_PACKET_SIZE 2048
620 593
621#define VRSS_SEND_TAB_SIZE 16 594#define VRSS_SEND_TAB_SIZE 16
@@ -630,12 +603,6 @@ struct netvsc_device {
630 wait_queue_head_t wait_drain; 603 wait_queue_head_t wait_drain;
631 bool start_remove; 604 bool start_remove;
632 bool destroy; 605 bool destroy;
633 /*
634 * List of free preallocated hv_netvsc_packet to represent receive
635 * packet
636 */
637 struct list_head recv_pkt_list;
638 spinlock_t recv_pkt_list_lock;
639 606
640 /* Receive buffer allocated by us but manages by NetVSP */ 607 /* Receive buffer allocated by us but manages by NetVSP */
641 void *recv_buf; 608 void *recv_buf;