summaryrefslogtreecommitdiff
path: root/drivers/net/vmxnet3/vmxnet3_drv.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2011-06-24 18:24:35 +0400
committerDavid S. Miller <davem@davemloft.net>2011-06-28 09:08:38 +0400
commit213ade8ca8c854435d99e4d2927655b2ae4191e9 (patch)
tree6f786eae981a501053e6d16954b033fe17b5438d /drivers/net/vmxnet3/vmxnet3_drv.c
parent95cab7386bef62f8c7535d4726573ce230778e7b (diff)
downloadlinux-213ade8ca8c854435d99e4d2927655b2ae4191e9.tar.xz
vmxnet3: Enable GRO support.
When receiving packets from another guest on the same hypervisor, it's generally possible to receive large packets because no segmentation is necessary and these packets are handled by LRO. However, when doing routing or bridging we must disable LRO and lose this benefit. In these cases GRO can still be used and it is very effective because the packets which are segmented in the hypervisor are received very close together and can easily be merged. CC: Shreyas Bhatewara <sbhatewara@vmware.com> CC: Scott Goldman <scottjg@vmware.com> CC: VMware PV-Drivers <pv-drivers@vmware.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Scott J. Goldman <scottjg@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index c84b1dd02a78..2c1473686abe 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1234,7 +1234,10 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
if (unlikely(rcd->ts))
__vlan_hwaccel_put_tag(skb, rcd->tci);
- netif_receive_skb(skb);
+ if (adapter->netdev->features & NETIF_F_LRO)
+ netif_receive_skb(skb);
+ else
+ napi_gro_receive(&rq->napi, skb);
ctx->skb = NULL;
}