[PATCH v2] vmxnet3: Enable GRO support.

Subsystems: networking drivers, the rest, vmware vmxnet3 ethernet driver

STALE5517d

3 messages, 3 authors, 2011-06-28 · open the first message on its own page

[PATCH v2] vmxnet3: Enable GRO support.

From: Jesse Gross <hidden>
Date: 2011-06-25 00:24:43

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 <redacted>
CC: Scott Goldman <redacted>
CC: VMware PV-Drivers <redacted>
Signed-off-by: Jesse Gross <redacted>
---
This applies on top of my previous vmxnet3 patch
"vmxnet3: Convert to new vlan model."

v2: Only use GRO when LRO is not active as suggested by Scott Goldman.
---
 drivers/net/vmxnet3/vmxnet3_drv.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index c84b1dd..2c14736 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;
 		}
-- 
1.7.4.1

RE: [PATCH v2] vmxnet3: Enable GRO support.

From: Scott Goldman <hidden>
Date: 2011-06-25 01:43:27

Thanks again.
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 <redacted>
CC: Scott Goldman <redacted>
CC: VMware PV-Drivers <redacted>
Signed-off-by: Jesse Gross <redacted>
Signed-off-by: Scott J. Goldman <redacted>

Re: [PATCH v2] vmxnet3: Enable GRO support.

From: David Miller <davem@davemloft.net>
Date: 2011-06-28 05:09:24

From: Jesse Gross <redacted>
Date: Fri, 24 Jun 2011 17:24:35 -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 <redacted>
CC: Scott Goldman <redacted>
CC: VMware PV-Drivers <redacted>
Signed-off-by: Jesse Gross <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help