[dpdk-dev,1/3] rte_ring: remove deprecated functions

Message ID 1434086314-14371-2-git-send-email-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Headers

Commit Message

Stephen Hemminger June 12, 2015, 5:18 a.m. UTC
  From: Stephen Hemminger <shemming@brocade.com>

These were deprecated in 2.0 so remove them from 2.1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ring/rte_eth_ring.c           | 55 -------------------------------
 drivers/net/ring/rte_eth_ring_version.map |  2 --
 2 files changed, 57 deletions(-)
  

Comments

Panu Matilainen June 12, 2015, 5:46 a.m. UTC | #1
On 06/12/2015 08:18 AM, Stephen Hemminger wrote:
> From: Stephen Hemminger <shemming@brocade.com>
>
> These were deprecated in 2.0 so remove them from 2.1
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>   drivers/net/ring/rte_eth_ring.c           | 55 -------------------------------
>   drivers/net/ring/rte_eth_ring_version.map |  2 --
>   2 files changed, 57 deletions(-)
>
[...]
> diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map
> index 8ad107d..0875e25 100644
> --- a/drivers/net/ring/rte_eth_ring_version.map
> +++ b/drivers/net/ring/rte_eth_ring_version.map
> @@ -2,8 +2,6 @@ DPDK_2.0 {
>   	global:
>
>   	rte_eth_from_rings;
> -	rte_eth_ring_pair_attach;
> -	rte_eth_ring_pair_create;
>
>   	local: *;
>   };

Removing symbols is an ABI break so it additionally requires a soname 
bump for this library.

In addition, simply due to being the first library to do so, it'll also 
then break the combined shared library as is currently is. Mind you, 
this is not an objection at all, the need to change to a linker script 
approach has always been a matter of time.

	- Panu -
  
Bruce Richardson June 12, 2015, 2 p.m. UTC | #2
On Fri, Jun 12, 2015 at 08:46:55AM +0300, Panu Matilainen wrote:
> On 06/12/2015 08:18 AM, Stephen Hemminger wrote:
> >From: Stephen Hemminger <shemming@brocade.com>
> >
> >These were deprecated in 2.0 so remove them from 2.1
> >
> >Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >---
> >  drivers/net/ring/rte_eth_ring.c           | 55 -------------------------------
> >  drivers/net/ring/rte_eth_ring_version.map |  2 --
> >  2 files changed, 57 deletions(-)
> >
> [...]
> >diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map
> >index 8ad107d..0875e25 100644
> >--- a/drivers/net/ring/rte_eth_ring_version.map
> >+++ b/drivers/net/ring/rte_eth_ring_version.map
> >@@ -2,8 +2,6 @@ DPDK_2.0 {
> >  	global:
> >
> >  	rte_eth_from_rings;
> >-	rte_eth_ring_pair_attach;
> >-	rte_eth_ring_pair_create;
> >
> >  	local: *;
> >  };
> 
> Removing symbols is an ABI break so it additionally requires a soname bump
> for this library.
> 
> In addition, simply due to being the first library to do so, it'll also then
> break the combined shared library as is currently is. Mind you, this is not
> an objection at all, the need to change to a linker script approach has
> always been a matter of time.
> 
> 	- Panu -
> 
Also, patch title should be prefixed with "ring pmd" or "drivers/net/ring" rather
than rte_ring, since this is a patch for the ring pmd, not the rte_ring library.

/Bruce
  
Thomas Monjalon June 12, 2015, 2:15 p.m. UTC | #3
2015-06-12 15:00, Bruce Richardson:
> On Fri, Jun 12, 2015 at 08:46:55AM +0300, Panu Matilainen wrote:
> > On 06/12/2015 08:18 AM, Stephen Hemminger wrote:
> Also, patch title should be prefixed with "ring pmd" or "drivers/net/ring" rather
> than rte_ring, since this is a patch for the ring pmd, not the rte_ring library.

Previously, there was no difference, it was only "ring".
Prefixes don't include full path nor "pmd".
Is it really important to make a difference in the commit title between ring lib
and ring pmd?
  
Bruce Richardson June 12, 2015, 2:22 p.m. UTC | #4
On Fri, Jun 12, 2015 at 04:15:10PM +0200, Thomas Monjalon wrote:
> 2015-06-12 15:00, Bruce Richardson:
> > On Fri, Jun 12, 2015 at 08:46:55AM +0300, Panu Matilainen wrote:
> > > On 06/12/2015 08:18 AM, Stephen Hemminger wrote:
> > Also, patch title should be prefixed with "ring pmd" or "drivers/net/ring" rather
> > than rte_ring, since this is a patch for the ring pmd, not the rte_ring library.
> 
> Previously, there was no difference, it was only "ring".
> Prefixes don't include full path nor "pmd".
> Is it really important to make a difference in the commit title between ring lib
> and ring pmd?

Not especially important, no. 

However, if we are going to have prefixes to indicate what component is affected
by a patch, they should at least be unique per component IMHO.

/Bruce
  

Patch

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 6832f01..3dd96ca 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -390,61 +390,6 @@  eth_dev_ring_create(const char *name, const unsigned numa_node,
 	return 0;
 }
 
-
-static int
-eth_dev_ring_pair_create(const char *name, const unsigned numa_node,
-		enum dev_action action)
-{
-	/* rx and tx are so-called from point of view of first port.
-	 * They are inverted from the point of view of second port
-	 */
-	struct rte_ring *rx[RTE_PMD_RING_MAX_RX_RINGS];
-	struct rte_ring *tx[RTE_PMD_RING_MAX_TX_RINGS];
-	unsigned i;
-	char rx_rng_name[RTE_RING_NAMESIZE];
-	char tx_rng_name[RTE_RING_NAMESIZE];
-	unsigned num_rings = RTE_MIN(RTE_PMD_RING_MAX_RX_RINGS,
-			RTE_PMD_RING_MAX_TX_RINGS);
-
-	for (i = 0; i < num_rings; i++) {
-		snprintf(rx_rng_name, sizeof(rx_rng_name), "ETH_RX%u_%s", i, name);
-		rx[i] = (action == DEV_CREATE) ?
-				rte_ring_create(rx_rng_name, 1024, numa_node,
-						RING_F_SP_ENQ|RING_F_SC_DEQ) :
-				rte_ring_lookup(rx_rng_name);
-		if (rx[i] == NULL)
-			return -1;
-		snprintf(tx_rng_name, sizeof(tx_rng_name), "ETH_TX%u_%s", i, name);
-		tx[i] = (action == DEV_CREATE) ?
-				rte_ring_create(tx_rng_name, 1024, numa_node,
-						RING_F_SP_ENQ|RING_F_SC_DEQ):
-				rte_ring_lookup(tx_rng_name);
-		if (tx[i] == NULL)
-			return -1;
-	}
-
-	if (rte_eth_from_rings(rx_rng_name, rx, num_rings, tx, num_rings,
-			numa_node) || rte_eth_from_rings(tx_rng_name, tx, num_rings, rx,
-					num_rings, numa_node))
-		return -1;
-
-	return 0;
-}
-
-int
-rte_eth_ring_pair_create(const char *name, const unsigned numa_node)
-{
-	RTE_LOG(WARNING, PMD, "rte_eth_ring_pair_create is deprecated\n");
-	return eth_dev_ring_pair_create(name, numa_node, DEV_CREATE);
-}
-
-int
-rte_eth_ring_pair_attach(const char *name, const unsigned numa_node)
-{
-	RTE_LOG(WARNING, PMD, "rte_eth_ring_pair_attach is deprecated\n");
-	return eth_dev_ring_pair_create(name, numa_node, DEV_ATTACH);
-}
-
 struct node_action_pair {
 	char name[PATH_MAX];
 	unsigned node;
diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map
index 8ad107d..0875e25 100644
--- a/drivers/net/ring/rte_eth_ring_version.map
+++ b/drivers/net/ring/rte_eth_ring_version.map
@@ -2,8 +2,6 @@  DPDK_2.0 {
 	global:
 
 	rte_eth_from_rings;
-	rte_eth_ring_pair_attach;
-	rte_eth_ring_pair_create;
 
 	local: *;
 };