From: Eric Dumazet <eric.dumazet@gmail.com>
To: Or Gerlitz <or.gerlitz@gmail.com>
Cc: Shlomo Pongartz <shlomop@mellanox.com>,
Rick Jones <rick.jones2@hp.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Tom Herbert <therbert@google.com>
Subject: Re: GRO aggregation
Date: Thu, 13 Sep 2012 14:34:31 +0200 [thread overview]
Message-ID: <1347539671.13103.1542.camel@edumazet-glaptop> (raw)
In-Reply-To: <1347537926.13103.1530.camel@edumazet-glaptop>
On Thu, 2012-09-13 at 14:05 +0200, Eric Dumazet wrote:
> But there is no real difference in throughput.
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
> index 6c4f935..435c35e 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
> +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
> @@ -96,8 +96,8 @@
> /* Receive fragment sizes; we use at most 4 fragments (for 9600 byte MTU
> * and 4K allocations) */
> enum {
> - FRAG_SZ0 = 512 - NET_IP_ALIGN,
> - FRAG_SZ1 = 1024,
> + FRAG_SZ0 = 1536 - NET_IP_ALIGN,
> + FRAG_SZ1 = 2048,
> FRAG_SZ2 = 4096,
> FRAG_SZ3 = MLX4_EN_ALLOC_SIZE
> };
>
Oh well, adding one prefetch() is giving ~10% more throughput.
I guess this mlx4 driver needs some care.
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 5aba5ec..547eec8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -38,6 +38,7 @@
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/vmalloc.h>
+#include <linux/prefetch.h>
#include "mlx4_en.h"
@@ -617,7 +618,8 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
!((dev->features & NETIF_F_LOOPBACK) ||
priv->validate_loopback))
goto next;
-
+ /* avoid cache miss in tcp_gro_receive() */
+ prefetch((char *)ethh + 64);
/*
* Packet is OK - process it.
*/
next prev parent reply other threads:[~2012-09-13 12:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 13:45 GRO aggregation Shlomo Pongartz
2012-09-11 18:20 ` Marcelo Ricardo Leitner
2012-09-11 18:41 ` Shlomo Pongratz
2012-09-11 18:48 ` Marcelo Ricardo Leitner
2012-09-11 18:51 ` Shlomo Pongratz
2012-09-11 18:33 ` Eric Dumazet
2012-09-11 18:49 ` Shlomo Pongratz
2012-09-11 19:01 ` Eric Dumazet
2012-09-11 19:24 ` Shlomo Pongratz
2012-09-11 19:35 ` David Miller
2012-09-11 19:35 ` Eric Dumazet
2012-09-12 9:23 ` Shlomo Pongartz
2012-09-12 9:33 ` Eric Dumazet
2012-09-12 14:41 ` Shlomo Pongartz
2012-09-12 16:23 ` Rick Jones
2012-09-12 16:34 ` Shlomo Pongartz
2012-09-12 16:52 ` Rick Jones
2012-09-13 6:36 ` Shlomo Pongartz
2012-09-13 8:11 ` Eric Dumazet
2012-09-13 9:59 ` Or Gerlitz
2012-09-13 12:05 ` Eric Dumazet
2012-09-13 12:34 ` Eric Dumazet [this message]
2012-09-13 12:47 ` Or Gerlitz
2012-09-13 13:22 ` Eric Dumazet
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=1347539671.13103.1542.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=or.gerlitz@gmail.com \
--cc=rick.jones2@hp.com \
--cc=shlomop@mellanox.com \
--cc=therbert@google.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