[v2] crypto/ccp: bug fixes for ccp device probe flow

Message ID 20230306125837.94671-1-sunilprakashrao.uttarwar@amd.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series [v2] crypto/ccp: bug fixes for ccp device probe flow |

Checks

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

Commit Message

Sunil Uttarwar March 6, 2023, 12:58 p.m. UTC
  - Rebasing patch([v1] crypto/ccp: bug fixes for ccp device probe flow)

Signed-off-by: Sunil Uttarwar <sunilprakashrao.uttarwar@amd.com>
---
 drivers/crypto/ccp/rte_ccp_pmd.c | 8 --------
 1 file changed, 8 deletions(-)
  

Comments

Akhil Goyal March 11, 2023, 6:47 p.m. UTC | #1
> Subject: [EXT] [PATCH v2] crypto/ccp: bug fixes for ccp device probe flow
> - Rebasing patch([v1] crypto/ccp: bug fixes for ccp device probe flow)

Please write a meaningful patch title and description
Also add fixes tag.
Add Cc stable@dpdk.org so that fix can be backported.

> 
> Signed-off-by: Sunil Uttarwar <sunilprakashrao.uttarwar@amd.com>
> ---
>  drivers/crypto/ccp/rte_ccp_pmd.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c
> b/drivers/crypto/ccp/rte_ccp_pmd.c
> index a5271d7227..5d1a4445de 100644
> --- a/drivers/crypto/ccp/rte_ccp_pmd.c
> +++ b/drivers/crypto/ccp/rte_ccp_pmd.c
> @@ -19,7 +19,6 @@
>  /**
>   * Global static parameter used to find if CCP device is already initialized.
>   */
> -static unsigned int ccp_pmd_init_done;
>  uint8_t ccp_cryptodev_driver_id;
>  uint8_t cryptodev_cnt;
> 
> @@ -192,8 +191,6 @@ cryptodev_ccp_remove(struct rte_pci_device *pci_dev)
>  	if (dev == NULL)
>  		return -ENODEV;
> 
> -	ccp_pmd_init_done = 0;
> -
>  	RTE_LOG(INFO, PMD, "Closing ccp device %s on numa socket %u\n",
>  			name, rte_socket_id());
> 
> @@ -278,10 +275,6 @@ cryptodev_ccp_probe(struct rte_pci_driver *pci_drv
> __rte_unused,
>  		.auth_opt = CCP_PMD_AUTH_OPT_CCP,
>  	};
> 
> -	if (ccp_pmd_init_done) {
> -		RTE_LOG(INFO, PMD, "CCP PMD already initialized\n");
> -		return -EFAULT;
> -	}
>  	rte_pci_device_name(&pci_dev->addr, name, sizeof(name));
>  	if (name[0] == '\0')
>  		return -EINVAL;
> @@ -300,7 +293,6 @@ cryptodev_ccp_probe(struct rte_pci_driver *pci_drv
> __rte_unused,
>  	rc = cryptodev_ccp_create(name, pci_dev, &init_params, pci_drv);
>  	if (rc)
>  		return rc;
> -	ccp_pmd_init_done = 1;
>  	return 0;
>  }
> 
> --
> 2.25.1
  
Akhil Goyal March 14, 2023, 10:49 a.m. UTC | #2
> Subject: RE: [EXT] [PATCH v2] crypto/ccp: bug fixes for ccp device probe flow
> 
> > Subject: [EXT] [PATCH v2] crypto/ccp: bug fixes for ccp device probe flow
> > - Rebasing patch([v1] crypto/ccp: bug fixes for ccp device probe flow)
> 
> Please write a meaningful patch title and description
> Also add fixes tag.
> Add Cc stable@dpdk.org so that fix can be backported.

Can you send the next version, need to close tree for RC3
  

Patch

diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index a5271d7227..5d1a4445de 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -19,7 +19,6 @@ 
 /**
  * Global static parameter used to find if CCP device is already initialized.
  */
-static unsigned int ccp_pmd_init_done;
 uint8_t ccp_cryptodev_driver_id;
 uint8_t cryptodev_cnt;
 
@@ -192,8 +191,6 @@  cryptodev_ccp_remove(struct rte_pci_device *pci_dev)
 	if (dev == NULL)
 		return -ENODEV;
 
-	ccp_pmd_init_done = 0;
-
 	RTE_LOG(INFO, PMD, "Closing ccp device %s on numa socket %u\n",
 			name, rte_socket_id());
 
@@ -278,10 +275,6 @@  cryptodev_ccp_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		.auth_opt = CCP_PMD_AUTH_OPT_CCP,
 	};
 
-	if (ccp_pmd_init_done) {
-		RTE_LOG(INFO, PMD, "CCP PMD already initialized\n");
-		return -EFAULT;
-	}
 	rte_pci_device_name(&pci_dev->addr, name, sizeof(name));
 	if (name[0] == '\0')
 		return -EINVAL;
@@ -300,7 +293,6 @@  cryptodev_ccp_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	rc = cryptodev_ccp_create(name, pci_dev, &init_params, pci_drv);
 	if (rc)
 		return rc;
-	ccp_pmd_init_done = 1;
 	return 0;
 }