vmxnet3: Enable GRO support.
authorJesse Gross <[email protected]>
Fri, 24 Jun 2011 14:24:35 +0000 (14:24 +0000)
committerDavid S. Miller <[email protected]>
Tue, 28 Jun 2011 05:08:38 +0000 (22:08 -0700)
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 <[email protected]>
CC: Scott Goldman <[email protected]>
CC: VMware PV-Drivers <[email protected]>
Signed-off-by: Jesse Gross <[email protected]>
Signed-off-by: Scott J. Goldman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/vmxnet3/vmxnet3_drv.c

index c84b1dd02a788579edc163799667f9c26c1530c6..2c1473686abe58f573615863da67483bcffff5c8 100644 (file)
@@ -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;
                }