diff options
author | KY Srinivasan | 2015-03-30 06:08:42 +0200 |
---|---|---|
committer | David S. Miller | 2015-03-31 20:12:36 +0200 |
commit | b08cc79155fc26d0d112b1470d1ece5034651a4b (patch) | |
tree | f1d9c3316edd991b7c08ae73099d0bd53e0c4b54 /drivers/net/hyperv/rndis_filter.c | |
parent | hv_netvsc: Cleanup the test for freeing skb when we use sendbuf mechanism (diff) | |
download | kernel-qcow2-linux-b08cc79155fc26d0d112b1470d1ece5034651a4b.tar.gz kernel-qcow2-linux-b08cc79155fc26d0d112b1470d1ece5034651a4b.tar.xz kernel-qcow2-linux-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/rndis_filter.c')
-rw-r--r-- | drivers/net/hyperv/rndis_filter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index fdfab1feccfc..a1604376aee1 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -210,6 +210,7 @@ static int rndis_filter_send_request(struct rndis_device *dev, { int ret; struct hv_netvsc_packet *packet; + struct hv_page_buffer page_buf[2]; /* Setup the packet to send it */ packet = &req->pkt; @@ -217,6 +218,7 @@ static int rndis_filter_send_request(struct rndis_device *dev, packet->is_data_pkt = false; packet->total_data_buflen = req->request_msg.msg_len; packet->page_buf_cnt = 1; + packet->page_buf = page_buf; packet->page_buf[0].pfn = virt_to_phys(&req->request_msg) >> PAGE_SHIFT; |