dma/dpaa2: set the vfa bit for rbp with vf

Message ID 20230326090647.74537-1-alvaro.karsz@solid-run.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series dma/dpaa2: set the vfa bit for rbp with vf |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Alvaro Karsz March 26, 2023, 9:06 a.m. UTC
  Set the VFA (Virtual Function Active) bit in
struct qdma_sdd -> rbpcmd_simple in order to use the route-by-port
functionality with PCIe virtual functions.

At the moment, a user wanting to enable route-by-port will call
rte_dpaa2_qdma_vchan_rbp_enable with a rte_dpaa2_qdma_rbp struct.

The struct includes the PCIe Physical and Virtual functions among other
things, which are then copied to qdma_sdd -> rbpcmd_simple, but the vfa
bit is never touched (the bit does exists in rbpcmd_simple),
so route-by-port with virtual functions won't work..

In order to fix this, a vfa bit is added to struct rte_dpaa2_qdma_rbp,
then is copied to qdma_sdd -> rbpcmd_simple.

Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")
Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>
---
 drivers/dma/dpaa2/dpaa2_qdma.c         | 2 ++
 drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
  

Comments

Alvaro Karsz April 9, 2023, 12:10 p.m. UTC | #1
Hi,
Any comments on the patch?

Thanks
  
Gagandeep Singh April 10, 2023, 7:21 a.m. UTC | #2
++Jun

> -----Original Message-----
> From: Alvaro Karsz <alvaro.karsz@solid-run.com>
> Sent: Sunday, April 9, 2023 5:40 PM
> To: Gagandeep Singh <G.Singh@nxp.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>
> Cc: dev@dpdk.org; David Marchand <david.marchand@redhat.com>
> Subject: Re: [PATCH] dma/dpaa2: set the vfa bit for rbp with vf
> 
> Hi,
> Any comments on the patch?
> 
> Thanks
  
Jun Yang April 12, 2023, 12:28 p.m. UTC | #3
Hi,
This patch fixed the issue of qdma route by port for PCIe VF.
"vfa" bit determines if "vfid" is valid or not.
Route by port is a kind of qdam transfer used for PCIe EP to access host by PCIe address and PCIe function. Another kind of transfer to access host is by PCIe address + PCIe outbound address.

-----Original Message-----
From: Gagandeep Singh <G.Singh@nxp.com> 
Sent: 2023年4月10日 15:22
To: Alvaro Karsz <alvaro.karsz@solid-run.com>; Hemant Agrawal <hemant.agrawal@nxp.com>; Jun Yang <jun.yang@nxp.com>
Cc: dev@dpdk.org; David Marchand <david.marchand@redhat.com>
Subject: RE: [PATCH] dma/dpaa2: set the vfa bit for rbp with vf

++Jun

> -----Original Message-----
> From: Alvaro Karsz <alvaro.karsz@solid-run.com>
> Sent: Sunday, April 9, 2023 5:40 PM
> To: Gagandeep Singh <G.Singh@nxp.com>; Hemant Agrawal 
> <hemant.agrawal@nxp.com>
> Cc: dev@dpdk.org; David Marchand <david.marchand@redhat.com>
> Subject: Re: [PATCH] dma/dpaa2: set the vfa bit for rbp with vf
> 
> Hi,
> Any comments on the patch?
> 
> Thanks
  
Alvaro Karsz April 16, 2023, 9:17 a.m. UTC | #4
> Hi,
> This patch fixed the issue of qdma route by port for PCIe VF.
> "vfa" bit determines if "vfid" is valid or not.
> Route by port is a kind of qdam transfer used for PCIe EP to access host by PCIe address and PCIe function. Another kind of transfer to access host is by PCIe address + PCIe outbound address.

Thanks for the confirmation!
Maybe you can now accept/merge the patch?

Thanks
  
Hemant Agrawal April 16, 2023, 9:18 a.m. UTC | #5
> -----Original Message-----
> From: Alvaro Karsz <alvaro.karsz@solid-run.com>
> Sent: Sunday, April 16, 2023 2:47 PM
> To: Jun Yang <jun.yang@nxp.com>; Gagandeep Singh <G.Singh@nxp.com>;
> Hemant Agrawal <hemant.agrawal@nxp.com>
> Cc: dev@dpdk.org; David Marchand <david.marchand@redhat.com>
> Subject: Re: [PATCH] dma/dpaa2: set the vfa bit for rbp with vf
> Importance: High
> 
> > Hi,
> > This patch fixed the issue of qdma route by port for PCIe VF.
> > "vfa" bit determines if "vfid" is valid or not.
> > Route by port is a kind of qdam transfer used for PCIe EP to access host by
> PCIe address and PCIe function. Another kind of transfer to access host is by
> PCIe address + PCIe outbound address.
> 
> Thanks for the confirmation!
> Maybe you can now accept/merge the patch?
> 
> Thanks
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
  
Alvaro Karsz May 22, 2023, 4:45 p.m. UTC | #6
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Thank you.
Do I need to do anything else for this patch to be merged?
  
Thomas Monjalon June 12, 2023, 8:46 p.m. UTC | #7
> > > Hi,
> > > This patch fixed the issue of qdma route by port for PCIe VF.
> > > "vfa" bit determines if "vfid" is valid or not.
> > > Route by port is a kind of qdam transfer used for PCIe EP to access host by
> > PCIe address and PCIe function. Another kind of transfer to access host is by
> > PCIe address + PCIe outbound address.
> > 
> > Thanks for the confirmation!
> > Maybe you can now accept/merge the patch?
> > 
> > Thanks
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Applied, thanks.
  

Patch

diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index d5a5f08ecc..8968bb853b 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -117,6 +117,7 @@  dpaa2_qdma_populate_fle(struct qbman_fle *fle,
 		/* source */
 		sdd->read_cmd.portid = rbp->sportid;
 		sdd->rbpcmd_simple.pfid = rbp->spfid;
+		sdd->rbpcmd_simple.vfa = rbp->vfa;
 		sdd->rbpcmd_simple.vfid = rbp->svfid;
 
 		if (rbp->srbp) {
@@ -129,6 +130,7 @@  dpaa2_qdma_populate_fle(struct qbman_fle *fle,
 		/* destination */
 		sdd->write_cmd.portid = rbp->dportid;
 		sdd->rbpcmd_simple.pfid = rbp->dpfid;
+		sdd->rbpcmd_simple.vfa = rbp->vfa;
 		sdd->rbpcmd_simple.vfid = rbp->dvfid;
 
 		if (rbp->drbp) {
diff --git a/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h b/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h
index dc8acb4aec..5a8da46d12 100644
--- a/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h
+++ b/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h
@@ -44,7 +44,9 @@  struct rte_dpaa2_qdma_rbp {
 	uint32_t svfid:6;
 	/* using route by port for source */
 	uint32_t srbp:1;
-	uint32_t rsv:4;
+	/* Virtual Function Active */
+	uint32_t vfa:1;
+	uint32_t rsv:3;
 };
 
 /** Determines a QDMA job */