From: "Michael S. Tsirkin" <mst@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev <netdev@vger.kernel.org>, Rick Jones <rick.jones2@hp.com>,
David Miller <davem@davemloft.net>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH net-next] virtio_net: add gro capability
Date: Mon, 3 Aug 2015 16:37:19 +0300 [thread overview]
Message-ID: <20150803162529-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1438359917.2748.18.camel@edumazet-glaptop2.roam.corp.google.com>
On Fri, Jul 31, 2015 at 06:25:17PM +0200, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> Straightforward patch to add GRO processing to virtio_net.
>
> napi_complete_done() usage allows more aggressive aggregation,
> opted-in by setting /sys/class/net/xxx/gro_flush_timeout
>
> Tested:
>
> Setting /sys/class/net/xxx/gro_flush_timeout to 1000 nsec,
> Rick Jones reported following results.
>
> One VM of each on a pair of OpenStack compute nodes with E5-2650Lv3 CPUs
> and Intel 82599ES-based NICs. So, two "before" and two "after" VMs.
> The OpenStack compute nodes were running OpenStack Kilo, with VxLAN
> encapsulation being used through OVS so no GRO coming-up the host
> stack. The compute nodes themselves were running a 3.14-based kernel.
>
> Single-stream netperf, CPU utilizations and thus service demands are
> based on intra-guest reported CPU.
>
> Throughput Mbit/s, bigger is better
> Min Median Average Max
> 4.2.0-rc3+ 1364 1686 1678 1938
> 4.2.0-rc3+flush1k 1824 2269 2275 2647
>
> Send Service Demand, smaller is better
> Min Median Average Max
> 4.2.0-rc3+ 0.236 0.558 0.524 0.802
> 4.2.0-rc3+flush1k 0.176 0.503 0.471 0.738
>
> Receive Service Demand, smaller is better.
> Min Median Average Max
> 4.2.0-rc3+ 1.906 2.188 2.191 2.531
> 4.2.0-rc3+flush1k 0.448 0.529 0.533 0.692
>
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Tested-by: Rick Jones <rick.jones2@hp.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
Ideally this needs to also be tested on non-vxlan configs with gro in
host, to make sure this doesn't cause regressions.
But I don't see why it should: GRO overhead is pretty small if packets
don't need to be combined.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> drivers/net/virtio_net.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 7fbca37a1adf..66f08f622dc6 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -518,7 +518,7 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
>
> skb_mark_napi_id(skb, &rq->napi);
>
> - netif_receive_skb(skb);
> + napi_gro_receive(&rq->napi, skb);
> return;
>
> frame_err:
> @@ -756,7 +756,7 @@ static int virtnet_poll(struct napi_struct *napi, int budget)
> /* Out of packets? */
> if (received < budget) {
> r = virtqueue_enable_cb_prepare(rq->vq);
> - napi_complete(napi);
> + napi_complete_done(napi, received);
> if (unlikely(virtqueue_poll(rq->vq, r)) &&
> napi_schedule_prep(napi)) {
> virtqueue_disable_cb(rq->vq);
>
next prev parent reply other threads:[~2015-08-03 13:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 16:25 [PATCH net-next] virtio_net: add gro capability Eric Dumazet
2015-07-31 23:57 ` David Miller
2015-08-02 8:48 ` Michael S. Tsirkin
2015-08-03 13:37 ` Michael S. Tsirkin [this message]
2015-08-03 16:22 ` Rick Jones
2015-08-03 21:23 ` 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=20150803162529-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.com \
--cc=virtualization@lists.linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).