Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Michal Kalderon <mkalderon@marvell.com>
To: Jason Gunthorpe <jgg@nvidia.com>,
Ariel Elior <aelior@marvell.com>,
"David S. Miller" <davem@davemloft.net>,
Doug Ledford <dledford@redhat.com>,
GR-everest-linux-l2 <GR-everest-linux-l2@marvell.com>,
Jakub Kicinski <kuba@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [EXT] [PATCH v2 16/17] RDMA/qedr: Remove fbo and zbva from the MR
Date: Sun, 6 Sep 2020 08:01:39 +0000 [thread overview]
Message-ID: <MN2PR18MB31825797F7D24C63406F92D0A12B0@MN2PR18MB3182.namprd18.prod.outlook.com> (raw)
In-Reply-To: <16-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com>
> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Saturday, September 5, 2020 1:42 AM
> zbva is always false, so fbo is never read.
>
> A 'zero-based-virtual-address' is simply IOVA == 0, and the driver already
> supports this.
>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
> drivers/infiniband/hw/qedr/verbs.c | 4 ----
> drivers/net/ethernet/qlogic/qed/qed_rdma.c | 12 ++----------
> include/linux/qed/qed_rdma_if.h | 2 --
> 3 files changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/infiniband/hw/qedr/verbs.c
> b/drivers/infiniband/hw/qedr/verbs.c
> index 278b48443aedba..cca69b4ed354ea 100644
> --- a/drivers/infiniband/hw/qedr/verbs.c
> +++ b/drivers/infiniband/hw/qedr/verbs.c
> @@ -2878,10 +2878,8 @@ struct ib_mr *qedr_reg_user_mr(struct ib_pd
> *ibpd, u64 start, u64 len,
> mr->hw_mr.pbl_two_level = mr->info.pbl_info.two_layered;
> mr->hw_mr.pbl_page_size_log = ilog2(mr->info.pbl_info.pbl_size);
> mr->hw_mr.page_size_log = PAGE_SHIFT;
> - mr->hw_mr.fbo = ib_umem_offset(mr->umem);
> mr->hw_mr.length = len;
> mr->hw_mr.vaddr = usr_addr;
> - mr->hw_mr.zbva = false;
> mr->hw_mr.phy_mr = false;
> mr->hw_mr.dma_mr = false;
>
> @@ -2974,10 +2972,8 @@ static struct qedr_mr *__qedr_alloc_mr(struct
> ib_pd *ibpd,
> mr->hw_mr.pbl_ptr = 0;
> mr->hw_mr.pbl_two_level = mr->info.pbl_info.two_layered;
> mr->hw_mr.pbl_page_size_log = ilog2(mr->info.pbl_info.pbl_size);
> - mr->hw_mr.fbo = 0;
> mr->hw_mr.length = 0;
> mr->hw_mr.vaddr = 0;
> - mr->hw_mr.zbva = false;
> mr->hw_mr.phy_mr = true;
> mr->hw_mr.dma_mr = false;
>
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.c
> b/drivers/net/ethernet/qlogic/qed/qed_rdma.c
> index a4bcde522cdf9d..baa4c36608ea91 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_rdma.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.c
> @@ -1520,7 +1520,7 @@ qed_rdma_register_tid(void *rdma_cxt,
> params->pbl_two_level);
>
> SET_FIELD(flags,
> RDMA_REGISTER_TID_RAMROD_DATA_ZERO_BASED,
> - params->zbva);
> + false);
>
> SET_FIELD(flags, RDMA_REGISTER_TID_RAMROD_DATA_PHY_MR,
> params->phy_mr);
>
> @@ -1582,15 +1582,7 @@ qed_rdma_register_tid(void *rdma_cxt,
> p_ramrod->pd = cpu_to_le16(params->pd);
> p_ramrod->length_hi = (u8)(params->length >> 32);
> p_ramrod->length_lo = DMA_LO_LE(params->length);
> - if (params->zbva) {
> - /* Lower 32 bits of the registered MR address.
> - * In case of zero based MR, will hold FBO
> - */
> - p_ramrod->va.hi = 0;
> - p_ramrod->va.lo = cpu_to_le32(params->fbo);
> - } else {
> - DMA_REGPAIR_LE(p_ramrod->va, params->vaddr);
> - }
> + DMA_REGPAIR_LE(p_ramrod->va, params->vaddr);
> DMA_REGPAIR_LE(p_ramrod->pbl_base, params->pbl_ptr);
>
> /* DIF */
> diff --git a/include/linux/qed/qed_rdma_if.h
> b/include/linux/qed/qed_rdma_if.h index f464d85e88a410..aeb242cefebfa8
> 100644
> --- a/include/linux/qed/qed_rdma_if.h
> +++ b/include/linux/qed/qed_rdma_if.h
> @@ -242,10 +242,8 @@ struct qed_rdma_register_tid_in_params {
> bool pbl_two_level;
> u8 pbl_page_size_log;
> u8 page_size_log;
> - u32 fbo;
> u64 length;
> u64 vaddr;
> - bool zbva;
> bool phy_mr;
> bool dma_mr;
>
> --
> 2.28.0
Thanks,
Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
next prev parent reply other threads:[~2020-09-06 8:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 22:41 [PATCH v2 00/17] RDMA: Improve use of umem in DMA drivers Jason Gunthorpe
2020-09-04 22:41 ` [PATCH v2 16/17] RDMA/qedr: Remove fbo and zbva from the MR Jason Gunthorpe
2020-09-06 8:01 ` Michal Kalderon [this message]
2020-09-09 18:38 ` [PATCH v2 00/17] RDMA: Improve use of umem in DMA drivers Jason Gunthorpe
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=MN2PR18MB31825797F7D24C63406F92D0A12B0@MN2PR18MB3182.namprd18.prod.outlook.com \
--to=mkalderon@marvell.com \
--cc=GR-everest-linux-l2@marvell.com \
--cc=aelior@marvell.com \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--subject='RE: [EXT] [PATCH v2 16/17] RDMA/qedr: Remove fbo and zbva from the MR' \
/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
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).