[dpdk-dev,v8,09/25] driver: Remove driver register callbacks for crypto/net

Message ID 1472219823-29486-10-git-send-email-shreyansh.jain@nxp.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Shreyansh Jain Aug. 26, 2016, 1:56 p.m. UTC
  Now that all pdev are pci drivers, we don't need to register crypto and ethdev
drivers through a dedicated channel.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 lib/librte_cryptodev/rte_cryptodev.c           | 22 -------------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 30 --------------------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  1 -
 lib/librte_ether/rte_ethdev.c                  | 22 -------------------
 lib/librte_ether/rte_ethdev.h                  | 12 -----------
 5 files changed, 87 deletions(-)
  

Comments

Ferruh Yigit Aug. 29, 2016, 5:20 p.m. UTC | #1
On 8/26/2016 2:56 PM, Shreyansh Jain wrote:
> Now that all pdev are pci drivers, we don't need to register crypto and ethdev
> drivers through a dedicated channel.
> 
> Signed-off-by: David Marchand <david.marchand@6wind.com>
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>

...

> -void rte_eth_driver_register(struct eth_driver *eth_drv);

Function needs to be removed from .map file

> -
> -/**
>   * Convert a numerical speed in Mbps to a bitmap flag that can be used in
>   * the bitmap link_speeds of the struct rte_eth_conf
>   *
>
  
Shreyansh Jain Aug. 30, 2016, 4:36 a.m. UTC | #2
Hi Ferruh,

On Monday 29 August 2016 10:50 PM, Ferruh Yigit wrote:
> On 8/26/2016 2:56 PM, Shreyansh Jain wrote:
>> Now that all pdev are pci drivers, we don't need to register crypto and ethdev
>> drivers through a dedicated channel.
>>
>> Signed-off-by: David Marchand <david.marchand@6wind.com>
>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>
> ....
>
>> -void rte_eth_driver_register(struct eth_driver *eth_drv);
>
> Function needs to be removed from .map file

Actually here I was a little confused.
This is part of DPDK_2.2 - an old release. Would removing from an old 
release break compatibility for any system using the new release but 
still adhering to older APIs?
Also, there is the case of this comment [1] from Neil Horman (and 
counter argument [2]) about not removing 
'rte_cryptodev_pmd_driver_register' from map file because there was no 
deprecation notice.

Overall situation is that I have maintained the previous patch of 
'rte_cryptodev_pmd_driver_register' removal but refrained from removing 
new symbol - waiting for a little more clarification.

Is it OK to remove a symbol from an older release without a deprecation 
notice? Or, should a deprecation notice follow this patch?

[1] http://dpdk.org/ml/archives/dev/2016-June/042439.html
[2] http://dpdk.org/ml/archives/dev/2016-June/042444.html

>
>> -
>> -/**
>>   * Convert a numerical speed in Mbps to a bitmap flag that can be used in
>>   * the bitmap link_speeds of the struct rte_eth_conf
>>   *
>>
>
>

-
Shreyansh
  
Shreyansh Jain Sept. 8, 2016, 5:46 a.m. UTC | #3
On Monday 29 August 2016 10:50 PM, Ferruh Yigit wrote:
> On 8/26/2016 2:56 PM, Shreyansh Jain wrote:
>> Now that all pdev are pci drivers, we don't need to register crypto and ethdev
>> drivers through a dedicated channel.
>>
>> Signed-off-by: David Marchand <david.marchand@6wind.com>
>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>
> ....
>
>> -void rte_eth_driver_register(struct eth_driver *eth_drv);
>
> Function needs to be removed from .map file
>
>> -
>> -/**
>>   * Convert a numerical speed in Mbps to a bitmap flag that can be used in
>>   * the bitmap link_speeds of the struct rte_eth_conf
>>   *
>>
>
>

Removed in v9 [1].

[1] http://dpdk.org/ml/archives/dev/2016-September/046265.html

-
Shreyansh
  

Patch

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index b1e82b6..2a3b649 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -533,28 +533,6 @@  rte_cryptodev_pci_remove(struct rte_pci_device *pci_dev)
 	return 0;
 }
 
-int
-rte_cryptodev_pmd_driver_register(struct rte_cryptodev_driver *cryptodrv,
-		enum pmd_type type)
-{
-	/* Call crypto device initialization directly if device is virtual */
-	if (type == PMD_VDEV)
-		return rte_cryptodev_pci_probe((struct rte_pci_driver *)cryptodrv,
-				NULL);
-
-	/*
-	 * Register PCI driver for physical device intialisation during
-	 * PCI probing
-	 */
-	cryptodrv->pci_drv.devinit = rte_cryptodev_pci_probe;
-	cryptodrv->pci_drv.devuninit = rte_cryptodev_pci_remove;
-
-	rte_eal_pci_register(&cryptodrv->pci_drv);
-
-	return 0;
-}
-
-
 uint16_t
 rte_cryptodev_queue_pair_count(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 3fb7c7c..99fd69e 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -491,36 +491,6 @@  rte_cryptodev_pmd_virtual_dev_init(const char *name, size_t dev_private_size,
 extern int
 rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
 
-
-/**
- * Register a Crypto [Poll Mode] driver.
- *
- * Function invoked by the initialization function of a Crypto driver
- * to simultaneously register itself as Crypto Poll Mode Driver and to either:
- *
- *	a - register itself as PCI driver if the crypto device is a physical
- *		device, by invoking the rte_eal_pci_register() function to
- *		register the *pci_drv* structure embedded in the *crypto_drv*
- *		structure, after having stored the address of the
- *		rte_cryptodev_init() function in the *devinit* field of the
- *		*pci_drv* structure.
- *
- *		During the PCI probing phase, the rte_cryptodev_init()
- *		function is invoked for each PCI [device] matching the
- *		embedded PCI identifiers provided by the driver.
- *
- *	b, complete the initialization sequence if the device is a virtual
- *		device by calling the rte_cryptodev_init() directly passing a
- *		NULL parameter for the rte_pci_device structure.
- *
- *   @param crypto_drv	crypto_driver structure associated with the crypto
- *					driver.
- *   @param type		pmd type
- */
-extern int
-rte_cryptodev_pmd_driver_register(struct rte_cryptodev_driver *crypto_drv,
-		enum pmd_type type);
-
 /**
  * Executes all the user application registered callbacks for the specific
  * device.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 1fc0d57..9627ac4 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -14,7 +14,6 @@  DPDK_16.04 {
 	rte_cryptodev_info_get;
 	rte_cryptodev_pmd_allocate;
 	rte_cryptodev_pmd_callback_process;
-	rte_cryptodev_pmd_driver_register;
 	rte_cryptodev_pmd_release_device;
 	rte_cryptodev_pmd_virtual_dev_init;
 	rte_cryptodev_sym_session_create;
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 8825219..3bccf20 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -340,28 +340,6 @@  rte_eth_dev_pci_remove(struct rte_pci_device *pci_dev)
 	return 0;
 }
 
-/**
- * Register an Ethernet [Poll Mode] driver.
- *
- * Function invoked by the initialization function of an Ethernet driver
- * to simultaneously register itself as a PCI driver and as an Ethernet
- * Poll Mode Driver.
- * Invokes the rte_eal_pci_register() function to register the *pci_drv*
- * structure embedded in the *eth_drv* structure, after having stored the
- * address of the rte_eth_dev_init() function in the *devinit* field of
- * the *pci_drv* structure.
- * During the PCI probing phase, the rte_eth_dev_init() function is
- * invoked for each PCI [Ethernet device] matching the embedded PCI
- * identifiers provided by the driver.
- */
-void
-rte_eth_driver_register(struct eth_driver *eth_drv)
-{
-	eth_drv->pci_drv.devinit = rte_eth_dev_pci_probe;
-	eth_drv->pci_drv.devuninit = rte_eth_dev_pci_remove;
-	rte_eal_pci_register(&eth_drv->pci_drv);
-}
-
 int
 rte_eth_dev_is_valid_port(uint8_t port_id)
 {
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 37d78bf..b005c1b 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1871,18 +1871,6 @@  struct eth_driver {
 };
 
 /**
- * @internal
- * A function invoked by the initialization function of an Ethernet driver
- * to simultaneously register itself as a PCI driver and as an Ethernet
- * Poll Mode Driver (PMD).
- *
- * @param eth_drv
- *   The pointer to the *eth_driver* structure associated with
- *   the Ethernet driver.
- */
-void rte_eth_driver_register(struct eth_driver *eth_drv);
-
-/**
  * Convert a numerical speed in Mbps to a bitmap flag that can be used in
  * the bitmap link_speeds of the struct rte_eth_conf
  *