[V2] crypto/octeontx: enable unbinding for the OCTEON TX crypto engines

Message ID 15217f0aa7b041c895dd1a956e703bb48df6c453.1568356742.git.thierry.herbelot@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [V2] crypto/octeontx: enable unbinding for the OCTEON TX crypto engines |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/iol-dpdk_compile success Compile Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/mellanox-Performance success Performance Testing PASS

Commit Message

Thierry Herbelot Sept. 13, 2019, 6:40 a.m. UTC
  Like for Ethernet ports, the OCTEON TX crypto engines must first be unbound
from their kernel module, then rebound to vfio-pci, before being usable
in DPDK.

As this capability is detected at runtime by dpdk-pmdinfo, add the info
in the PMD registering directives.

Then an external script can be used for bind and unbind.

Fixes: bfe2ae495ee268 ('crypto/octeontx: add PMD skeleton')
Cc: stable@dpdk.org
Cc: anoobj@marvell.com

V2: only "vfio-pci" is needed by this PMD

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
 drivers/crypto/octeontx/otx_cryptodev.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Anoob Joseph Sept. 13, 2019, 6:58 a.m. UTC | #1
Version history has to be after ---. 

@Akhil, can you make this change when you submit?

Acked-by: Anoob Joseph <anoobj@marvell.com>

> -----Original Message-----
> From: Thierry Herbelot <thierry.herbelot@6wind.com>
> Sent: Friday, September 13, 2019 12:10 PM
> To: dev@dpdk.org
> Cc: Thomas Monjalon <thomas@monjalon.net>; stable@dpdk.org; Anoob
> Joseph <anoobj@marvell.com>
> Subject: [EXT] [PATCH V2] crypto/octeontx: enable unbinding for the OCTEON
> TX crypto engines
> 
> External Email
> 
> ----------------------------------------------------------------------
> Like for Ethernet ports, the OCTEON TX crypto engines must first be unbound
> from their kernel module, then rebound to vfio-pci, before being usable in DPDK.
> 
> As this capability is detected at runtime by dpdk-pmdinfo, add the info in the
> PMD registering directives.
> 
> Then an external script can be used for bind and unbind.
> 
> Fixes: bfe2ae495ee268 ('crypto/octeontx: add PMD skeleton')
> Cc: stable@dpdk.org
> Cc: anoobj@marvell.com
> 
> V2: only "vfio-pci" is needed by this PMD
> 
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
> ---
>  drivers/crypto/octeontx/otx_cryptodev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/crypto/octeontx/otx_cryptodev.c
> b/drivers/crypto/octeontx/otx_cryptodev.c
> index fc64a5f3041f..8df4b710c874 100644
> --- a/drivers/crypto/octeontx/otx_cryptodev.c
> +++ b/drivers/crypto/octeontx/otx_cryptodev.c
> @@ -118,6 +118,7 @@ static struct cryptodev_driver otx_cryptodev_drv;
> 
>  RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_OCTEONTX_PMD,
> otx_cryptodev_pmd);
> RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD,
> pci_id_cpt_table);
> +RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX_PMD,
> "vfio-pci");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv,
> otx_cryptodev_pmd.driver,
>  		otx_cryptodev_driver_id);
> 
> --
> 2.20.1
  
Akhil Goyal Sept. 19, 2019, 3:14 p.m. UTC | #2
> 
> Version history has to be after ---.
> 
> @Akhil, can you make this change when you submit?
Done.
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>
> 
Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index fc64a5f3041f..8df4b710c874 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -118,6 +118,7 @@  static struct cryptodev_driver otx_cryptodev_drv;
 
 RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_OCTEONTX_PMD, otx_cryptodev_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table);
+RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv, otx_cryptodev_pmd.driver,
 		otx_cryptodev_driver_id);