]>
Commit | Line | Data |
---|---|---|
a7b0967d MT |
1 | From e0f6906eb7e5b395370da9499189d13b59020382 Mon Sep 17 00:00:00 2001 |
2 | From: KY Srinivasan <kys@microsoft.com> | |
3 | Date: Wed, 9 Apr 2014 15:00:45 -0700 | |
4 | Subject: [PATCH 12/25] Drivers: net: hyperv: Allocate memory for all possible | |
5 | per-pecket information | |
6 | ||
7 | An outgoing packet can potentially need per-packet information for | |
8 | all the offloads and VLAN tagging. Fix this issue. | |
9 | ||
10 | Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> | |
11 | Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> | |
12 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
13 | --- | |
14 | drivers/net/hyperv/netvsc_drv.c | 4 +++- | |
15 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
16 | ||
17 | diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c | |
18 | index 5baa1fa7e692..c76c85176644 100644 | |
19 | --- a/drivers/net/hyperv/netvsc_drv.c | |
20 | +++ b/drivers/net/hyperv/netvsc_drv.c | |
21 | @@ -320,7 +320,9 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) | |
22 | packet = kzalloc(sizeof(struct hv_netvsc_packet) + | |
23 | (num_data_pgs * sizeof(struct hv_page_buffer)) + | |
24 | sizeof(struct rndis_message) + | |
25 | - NDIS_VLAN_PPI_SIZE, GFP_ATOMIC); | |
26 | + NDIS_VLAN_PPI_SIZE + | |
27 | + NDIS_CSUM_PPI_SIZE + | |
28 | + NDIS_LSO_PPI_SIZE, GFP_ATOMIC); | |
29 | if (!packet) { | |
30 | /* out of memory, drop packet */ | |
31 | netdev_err(net, "unable to allocate hv_netvsc_packet\n"); | |
32 | -- | |
33 | 2.4.3 | |
34 |