From: Jesse Gross <jesse@nicira.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Shreyas Bhatewara <sbhatewara@vmware.com>,
Scott Goldman <scottjg@vmware.com>,
VMware PV-Drivers <pv-drivers@vmware.com>
Subject: [PATCH v2] vmxnet3: Enable GRO support.
Date: Fri, 24 Jun 2011 17:24:35 -0700 [thread overview]
Message-ID: <1308961475-25055-1-git-send-email-jesse@nicira.com> (raw)
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>
---
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
next reply other threads:[~2011-06-25 0:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-25 0:24 Jesse Gross [this message]
2011-06-25 1:43 ` [PATCH v2] vmxnet3: Enable GRO support Scott Goldman
2011-06-28 5:09 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1308961475-25055-1-git-send-email-jesse@nicira.com \
--to=jesse@nicira.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=sbhatewara@vmware.com \
--cc=scottjg@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox