From: Yuval Mintz <Yuval.Mintz@cavium.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: Yuval Mintz <Yuval.Mintz@cavium.com>
Subject: [PATCH net-next 10/10] qed: Cache alignemnt padding to match host
Date: Sun, 28 May 2017 18:02:00 +0300 [thread overview]
Message-ID: <1495983720-10853-11-git-send-email-Yuval.Mintz@cavium.com> (raw)
In-Reply-To: <1495983720-10853-1-git-send-email-Yuval.Mintz@cavium.com>
Improve PCI performance by adjusting padding sizes to match those of the
host machine's cacheline.
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
drivers/net/ethernet/qlogic/qed/qed_dev.c | 15 +++++++++++++--
drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 1 +
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 072d950..d73e3c2 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -1227,6 +1227,10 @@ static void qed_init_cache_line_size(struct qed_hwfn *p_hwfn,
L1_CACHE_BYTES, wr_mbs);
STORE_RT_REG(p_hwfn, PGLUE_REG_B_CACHE_LINE_SIZE_RT_OFFSET, val);
+ if (val > 0) {
+ STORE_RT_REG(p_hwfn, PSWRQ2_REG_DRAM_ALIGN_WR_RT_OFFSET, val);
+ STORE_RT_REG(p_hwfn, PSWRQ2_REG_DRAM_ALIGN_RD_RT_OFFSET, val);
+ }
}
static int qed_hw_init_common(struct qed_hwfn *p_hwfn,
@@ -1433,8 +1437,15 @@ enum QED_ROCE_EDPM_MODE {
static int qed_hw_init_port(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt, int hw_mode)
{
- return qed_init_run(p_hwfn, p_ptt, PHASE_PORT,
- p_hwfn->port_id, hw_mode);
+ int rc = 0;
+
+ rc = qed_init_run(p_hwfn, p_ptt, PHASE_PORT, p_hwfn->port_id, hw_mode);
+ if (rc)
+ return rc;
+
+ qed_wr(p_hwfn, p_ptt, PGLUE_B_REG_MASTER_WRITE_PAD_ENABLE, 0);
+
+ return 0;
}
static int qed_hw_init_pf(struct qed_hwfn *p_hwfn,
diff --git a/drivers/net/ethernet/qlogic/qed/qed_reg_addr.h b/drivers/net/ethernet/qlogic/qed/qed_reg_addr.h
index 6abf918..67172d7 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_reg_addr.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_reg_addr.h
@@ -1559,6 +1559,7 @@
#define PGLUE_B_REG_PGL_ADDR_EC_F0_K2 0x2aaf9cUL
#define PGLUE_B_REG_PGL_ADDR_F0_F0_K2 0x2aafa0UL
#define PGLUE_B_REG_PGL_ADDR_F4_F0_K2 0x2aafa4UL
+#define PGLUE_B_REG_MASTER_WRITE_PAD_ENABLE 0x2aae30UL
#define NIG_REG_TSGEN_FREECNT_UPDATE_K2 0x509008UL
#define CNIG_REG_NIG_PORT0_CONF_K2 0x218200UL
--
1.9.3
prev parent reply other threads:[~2017-05-28 15:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 15:01 [PATCH net-next 00/10] qed: DCBx and Attentions series Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 01/10] qed: Add missing static/local dcbx info Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 02/10] qed: Correct DCBx update scheme Yuval Mintz
2017-05-28 15:58 ` kbuild test robot
2017-05-28 15:01 ` [PATCH net-next 03/10] qed: Don't inherit RoCE DCBx for V2 Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 04/10] qed: QL41xxx VF MSI-x table Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 05/10] qed: Support dynamic s-tag change Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 06/10] qed: Get rid of the attention-arrays Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 07/10] qed: Diffrentiate adapter-specific attentions Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 08/10] qed: Print multi-bit attentions properly Yuval Mintz
2017-05-28 15:01 ` [PATCH net-next 09/10] qed: Mask parities after occurance Yuval Mintz
2017-05-28 15:02 ` Yuval Mintz [this message]
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=1495983720-10853-11-git-send-email-Yuval.Mintz@cavium.com \
--to=yuval.mintz@cavium.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