* [Patch net-next v2] net: mana: Record doorbell physical address in PF mode
@ 2025-06-13 17:46 longli
2025-06-16 15:32 ` Shradha Gupta
2025-06-16 22:23 ` Jakub Kicinski
0 siblings, 2 replies; 4+ messages in thread
From: longli @ 2025-06-13 17:46 UTC (permalink / raw)
To: K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Shradha Gupta, Simon Horman, Konstantin Taranov,
Souradeep Chakrabarti, Erick Archer, linux-hyperv, netdev,
linux-kernel, linux-rdma
Cc: Long Li
From: Long Li <longli@microsoft.com>
MANA supports RDMA in PF mode. The driver should record the doorbell
physical address when in PF mode.
The doorbell physical address is used by the RDMA driver to map
doorbell pages of the device to user-mode applications through RDMA
verbs interface. In the past, they have been mapped to user-mode while
the device is in VF mode. With the support for PF mode implemented,
also expose those pages in PF mode.
Signed-off-by: Long Li <longli@microsoft.com>
---
Changes
v2: add more details in commit message on how the doorbell physical address is used
drivers/net/ethernet/microsoft/mana/gdma_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index 3504507477c6..52cf7112762c 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -31,6 +31,9 @@ static void mana_gd_init_pf_regs(struct pci_dev *pdev)
gc->db_page_base = gc->bar0_va +
mana_gd_r64(gc, GDMA_PF_REG_DB_PAGE_OFF);
+ gc->phys_db_page_base = gc->bar0_pa +
+ mana_gd_r64(gc, GDMA_PF_REG_DB_PAGE_OFF);
+
sriov_base_off = mana_gd_r64(gc, GDMA_SRIOV_REG_CFG_BASE_OFF);
sriov_base_va = gc->bar0_va + sriov_base_off;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Patch net-next v2] net: mana: Record doorbell physical address in PF mode
2025-06-13 17:46 [Patch net-next v2] net: mana: Record doorbell physical address in PF mode longli
@ 2025-06-16 15:32 ` Shradha Gupta
2025-06-16 22:23 ` Jakub Kicinski
1 sibling, 0 replies; 4+ messages in thread
From: Shradha Gupta @ 2025-06-16 15:32 UTC (permalink / raw)
To: longli
Cc: K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Konstantin Taranov, Souradeep Chakrabarti,
Erick Archer, linux-hyperv, netdev, linux-kernel, linux-rdma
On Fri, Jun 13, 2025 at 10:46:05AM -0700, longli@linuxonhyperv.com wrote:
> From: Long Li <longli@microsoft.com>
>
> MANA supports RDMA in PF mode. The driver should record the doorbell
> physical address when in PF mode.
>
> The doorbell physical address is used by the RDMA driver to map
> doorbell pages of the device to user-mode applications through RDMA
> verbs interface. In the past, they have been mapped to user-mode while
> the device is in VF mode. With the support for PF mode implemented,
> also expose those pages in PF mode.
>
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
> Changes
> v2: add more details in commit message on how the doorbell physical address is used
>
> drivers/net/ethernet/microsoft/mana/gdma_main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
> index 3504507477c6..52cf7112762c 100644
> --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
> +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
> @@ -31,6 +31,9 @@ static void mana_gd_init_pf_regs(struct pci_dev *pdev)
> gc->db_page_base = gc->bar0_va +
> mana_gd_r64(gc, GDMA_PF_REG_DB_PAGE_OFF);
>
> + gc->phys_db_page_base = gc->bar0_pa +
> + mana_gd_r64(gc, GDMA_PF_REG_DB_PAGE_OFF);
> +
> sriov_base_off = mana_gd_r64(gc, GDMA_SRIOV_REG_CFG_BASE_OFF);
>
> sriov_base_va = gc->bar0_va + sriov_base_off;
> --
> 2.25.1
Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch net-next v2] net: mana: Record doorbell physical address in PF mode
2025-06-13 17:46 [Patch net-next v2] net: mana: Record doorbell physical address in PF mode longli
2025-06-16 15:32 ` Shradha Gupta
@ 2025-06-16 22:23 ` Jakub Kicinski
2025-06-18 1:36 ` [EXTERNAL] " Long Li
1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2025-06-16 22:23 UTC (permalink / raw)
To: longli
Cc: longli, K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
David S. Miller, Eric Dumazet, Paolo Abeni, Shradha Gupta,
Simon Horman, Konstantin Taranov, Souradeep Chakrabarti,
Erick Archer, linux-hyperv, netdev, linux-kernel, linux-rdma
On Fri, 13 Jun 2025 10:46:05 -0700 longli@linuxonhyperv.com wrote:
> MANA supports RDMA in PF mode. The driver should record the doorbell
> physical address when in PF mode.
>
> The doorbell physical address is used by the RDMA driver to map
> doorbell pages of the device to user-mode applications through RDMA
> verbs interface. In the past, they have been mapped to user-mode while
> the device is in VF mode. With the support for PF mode implemented,
> also expose those pages in PF mode.
It'd be good to indicate if the PF mode support is implemented as in
ready to be posted to the list, or implemented as in already in the
tree? If it's in tree then please quote the commit. If upcoming please
rephrase.
This commit msg is much better, thank you, but to a person handling
backports it will still not be immediately clear whether this is prep
work for a new code path, or a bug fix.
--
pw-bot: cr
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [EXTERNAL] Re: [Patch net-next v2] net: mana: Record doorbell physical address in PF mode
2025-06-16 22:23 ` Jakub Kicinski
@ 2025-06-18 1:36 ` Long Li
0 siblings, 0 replies; 4+ messages in thread
From: Long Li @ 2025-06-18 1:36 UTC (permalink / raw)
To: Jakub Kicinski, longli@linuxonhyperv.com
Cc: KY Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
David S. Miller, Eric Dumazet, Paolo Abeni, Shradha Gupta,
Simon Horman, Konstantin Taranov, Souradeep Chakrabarti,
Erick Archer, linux-hyperv@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rdma@vger.kernel.org
> Subject: Re: [Patch net-next v2] net: mana: Record doorbell physical
> address in PF mode
>
> On Fri, 13 Jun 2025 10:46:05 -0700 longli@linuxonhyperv.com wrote:
> > MANA supports RDMA in PF mode. The driver should record the doorbell
> > physical address when in PF mode.
> >
> > The doorbell physical address is used by the RDMA driver to map
> > doorbell pages of the device to user-mode applications through RDMA
> > verbs interface. In the past, they have been mapped to user-mode while
> > the device is in VF mode. With the support for PF mode implemented,
> > also expose those pages in PF mode.
>
> It'd be good to indicate if the PF mode support is implemented as in ready to be
> posted to the list, or implemented as in already in the tree? If it's in tree then
> please quote the commit. If upcoming please rephrase.
>
> This commit msg is much better, thank you, but to a person handling backports it
> will still not be immediately clear whether this is prep work for a new code path,
> or a bug fix.
> --
> pw-bot: cr
Thank you. I'm sending v3.
Long
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-18 1:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 17:46 [Patch net-next v2] net: mana: Record doorbell physical address in PF mode longli
2025-06-16 15:32 ` Shradha Gupta
2025-06-16 22:23 ` Jakub Kicinski
2025-06-18 1:36 ` [EXTERNAL] " Long Li
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).