aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorKY Srinivasan <kys@microsoft.com>2015-03-29 21:08:42 -0700
committerDavid S. Miller <davem@davemloft.net>2015-03-31 14:12:36 -0400
commitb08cc79155fc26d0d112b1470d1ece5034651a4b (patch)
treef1d9c3316edd991b7c08ae73099d0bd53e0c4b54 /drivers/net/hyperv/hyperv_net.h
parenthv_netvsc: Cleanup the test for freeing skb when we use sendbuf mechanism (diff)
downloadlinux-dev-b08cc79155fc26d0d112b1470d1ece5034651a4b.tar.xz
linux-dev-b08cc79155fc26d0d112b1470d1ece5034651a4b.zip
hv_netvsc: Eliminate memory allocation in the packet send path
The network protocol used to communicate with the host is the remote ndis (rndis) protocol. We need to decorate each outgoing packet with a rndis header and additional rndis state (rndis per-packet state). To manage this state, we currently allocate memory in the transmit path. Eliminate this allocation by requesting additional head room in the skb. Signed-off-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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 384f057d6570..309adee6e791 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -128,6 +128,7 @@ struct ndis_tcp_ip_checksum_info;
struct hv_netvsc_packet {
/* Bookkeeping stuff */
u32 status;
+ bool part_of_skb;
struct hv_device *device;
bool is_data_pkt;
@@ -150,7 +151,7 @@ struct hv_netvsc_packet {
/* Points to the send/receive buffer where the ethernet frame is */
void *data;
u32 page_buf_cnt;
- struct hv_page_buffer page_buf[0];
+ struct hv_page_buffer *page_buf;
};
struct netvsc_device_info {