From: Yuval Mintz <Yuval.Mintz@qlogic.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <Ariel.Elior@qlogic.com>,
Dmitry Kravkov <Dmitry.Kravkov@qlogic.com>,
Yuval Mintz <Yuval.Mintz@qlogic.com>
Subject: [PATCH net-next 2/3] bnx2x: enlarge minimal alignemnt of data offset
Date: Thu, 26 Jun 2014 14:31:05 +0300 [thread overview]
Message-ID: <1403782266-25362-3-git-send-email-Yuval.Mintz@qlogic.com> (raw)
In-Reply-To: <1403782266-25362-1-git-send-email-Yuval.Mintz@qlogic.com>
From: Dmitry Kravkov <Dmitry.Kravkov@qlogic.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].
Signed-off-by: Dmitry Kravkov <Dmitry.Kravkov@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index faf262a..ce8f869 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -1508,8 +1508,10 @@ struct bnx2x {
/* TCP with Timestamp Option (32) + IPv6 (40) */
#define ETH_MAX_TPA_HEADER_SIZE 72
- /* 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
*
--
1.8.3.1
next prev parent reply other threads:[~2014-06-26 11:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 11:31 [PATCH net-next 0/3] bnx2x: Enhancement patch series Yuval Mintz
2014-06-26 11:31 ` [PATCH net-next 1/3] bnx2x: VF can report link speed Yuval Mintz
2014-06-26 11:31 ` Yuval Mintz [this message]
2014-06-26 18:47 ` [PATCH net-next 2/3] bnx2x: enlarge minimal alignemnt of data offset Eric Dumazet
2014-06-26 11:31 ` [PATCH net-next 3/3] bnx2x: Fail probe of VFs using an old incompatible driver Yuval Mintz
2014-07-01 22:52 ` [PATCH net-next 0/3] bnx2x: Enhancement patch series 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=1403782266-25362-3-git-send-email-Yuval.Mintz@qlogic.com \
--to=yuval.mintz@qlogic.com \
--cc=Ariel.Elior@qlogic.com \
--cc=Dmitry.Kravkov@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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).