dma/dpaa2: set the vfa bit for rbp with vf
PATCH 1/1 dma/dpaa2: set the vfa bit for rbp with vf
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.
--- drivers/dma/dpaa2/dpaa2_qdma.c | 2 ++ drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/dma/dpaa2/dpaa2_qdma.c +2 -0
@@ -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) {
drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h +3 -1
@@ -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 */
Signature · 1 line
2.34.1
Hi,
Any comments on the patch?
Thanks
++Jun
Quoted 12 lines
-----Original Message-----
From: Alvaro Karsz <[email protected]>
Sent: Sunday, April 9, 2023 5:40 PM
To: Gagandeep Singh <[email protected]>; Hemant Agrawal <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: Re: [PATCH] dma/dpaa2: set the vfa bit for rbp with vfHi,
Any comments on the patch?Thanks
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 <[email protected]>
Sent: 2023年4月10日 15:22
To: Alvaro Karsz <[email protected]>; Hemant Agrawal <[email protected]>; Jun Yang <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: RE: [PATCH] dma/dpaa2: set the vfa bit for rbp with vf
++Jun
Quoted 12 lines
-----Original Message-----
From: Alvaro Karsz <[email protected]>
Sent: Sunday, April 9, 2023 5:40 PM
To: Gagandeep Singh <[email protected]>; Hemant Agrawal <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: Re: [PATCH] dma/dpaa2: set the vfa bit for rbp with vfHi,
Any comments on the patch?Thanks
Quoted 4 lines
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
Acked-byQuoted 15 lines
-----Original Message-----
From: Alvaro Karsz <[email protected]>
Sent: Sunday, April 16, 2023 2:47 PM
To: Jun Yang <[email protected]>; Gagandeep Singh <[email protected]>; Hemant Agrawal <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>
Subject: Re: [PATCH] dma/dpaa2: set the vfa bit for rbp with vf
Importance: HighQuoted 4 lines
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
Quoted 7 lines
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
Quoted 1 line
Acked-by Hemant Agrawal <[email protected]>
Thank you.
Do I need to do anything else for this patch to be merged?
Thomas Monjalon
AppliedQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
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
Quoted 8 lines
Quoted 7 lines
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 <[email protected]>
Applied, thanks.