[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1403808469.28643.3.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 26 Jun 2014 11:47:49 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Yuval Mintz <Yuval.Mintz@...gic.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
Ariel.Elior@...gic.com, Dmitry Kravkov <Dmitry.Kravkov@...gic.com>
Subject: Re: [PATCH net-next 2/3] bnx2x: enlarge minimal alignemnt of data
offset
On Thu, 2014-06-26 at 14:31 +0300, Yuval Mintz wrote:
> From: Dmitry Kravkov <Dmitry.Kravkov@...gic.com>
>
> This improves the performance of driver on machine with L1_CACHE_SHIFT of at
> most 32 bytes [HW was planned for 64-byte aligned fastpath data].
>
>
> - /* Max supported alignment is 256 (8 shift) */
> -#define BNX2X_RX_ALIGN_SHIFT min(8, L1_CACHE_SHIFT)
> + /* Max supported alignment is 256 (8 shift)
> + * minimal alignment shift 6 is optimal for 57xxx HW performance
> + */
> +#define BNX2X_RX_ALIGN_SHIFT max(6, min(8, L1_CACHE_SHIFT))
>
> /* FW uses 2 Cache lines Alignment for start packet and size
> *
I would personally use clamp(L1_CACHE_SHIFT, 6, 8)
But thats probably a matter of taste...
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists