[dpdk-dev,1/3] pmd_ring: remove deprecated functions
Commit Message
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 | 4 +--
2 files changed, 1 insertion(+), 58 deletions(-)
Comments
On Mon, Jun 15, 2015 at 09:51:11AM -0700, 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 | 4 +--
> 2 files changed, 1 insertion(+), 58 deletions(-)
>
[..snip..]
> diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map
> index 8ad107d..5ee55d9 100644
> --- a/drivers/net/ring/rte_eth_ring_version.map
> +++ b/drivers/net/ring/rte_eth_ring_version.map
> @@ -1,9 +1,7 @@
> -DPDK_2.0 {
> +DPDK_2.1 {
> global:
>
> rte_eth_from_rings;
> - rte_eth_ring_pair_attach;
> - rte_eth_ring_pair_create;
>
> local: *;
> };
[ABI newbie question] Is this how deprecating a fn is done? We no longer have any DPDK_2.0
version listings in the .map file?
On Tue, 16 Jun 2015 14:52:16 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:
> On Mon, Jun 15, 2015 at 09:51:11AM -0700, 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 | 4 +--
> > 2 files changed, 1 insertion(+), 58 deletions(-)
> >
> [..snip..]
> > diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map
> > index 8ad107d..5ee55d9 100644
> > --- a/drivers/net/ring/rte_eth_ring_version.map
> > +++ b/drivers/net/ring/rte_eth_ring_version.map
> > @@ -1,9 +1,7 @@
> > -DPDK_2.0 {
> > +DPDK_2.1 {
> > global:
> >
> > rte_eth_from_rings;
> > - rte_eth_ring_pair_attach;
> > - rte_eth_ring_pair_create;
> >
> > local: *;
> > };
>
> [ABI newbie question] Is this how deprecating a fn is done? We no longer have any DPDK_2.0
> version listings in the .map file?
Notice the version # changed as well, so linker will generate a new version.
The function was marked deprecated in last version.
2015-06-16 16:05, Stephen Hemminger:
> On Tue, 16 Jun 2015 14:52:16 +0100
> Bruce Richardson <bruce.richardson@intel.com> wrote:
>
> > On Mon, Jun 15, 2015 at 09:51:11AM -0700, 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 | 4 +--
> > > 2 files changed, 1 insertion(+), 58 deletions(-)
> > >
> > [..snip..]
> > > diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map
> > > index 8ad107d..5ee55d9 100644
> > > --- a/drivers/net/ring/rte_eth_ring_version.map
> > > +++ b/drivers/net/ring/rte_eth_ring_version.map
> > > @@ -1,9 +1,7 @@
> > > -DPDK_2.0 {
> > > +DPDK_2.1 {
> > > global:
> > >
> > > rte_eth_from_rings;
> > > - rte_eth_ring_pair_attach;
> > > - rte_eth_ring_pair_create;
> > >
> > > local: *;
> > > };
> >
> > [ABI newbie question] Is this how deprecating a fn is done? We no longer have any DPDK_2.0
> > version listings in the .map file?
>
> Notice the version # changed as well, so linker will generate a new version.
> The function was marked deprecated in last version.
What happens if you load the 2.1 lib with an app built for 2.0?
Shouldn't we keep the DPDK_2.0 block?
On Tue, 16 Jun 2015 23:37:32 +0000
Thomas Monjalon <thomas.monjalon@6wind.com> wrote:
> 2015-06-16 16:05, Stephen Hemminger:
> > On Tue, 16 Jun 2015 14:52:16 +0100
> > Bruce Richardson <bruce.richardson@intel.com> wrote:
> >
> > > On Mon, Jun 15, 2015 at 09:51:11AM -0700, 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 | 4 +--
> > > > 2 files changed, 1 insertion(+), 58 deletions(-)
> > > >
> > > [..snip..]
> > > > diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map
> > > > index 8ad107d..5ee55d9 100644
> > > > --- a/drivers/net/ring/rte_eth_ring_version.map
> > > > +++ b/drivers/net/ring/rte_eth_ring_version.map
> > > > @@ -1,9 +1,7 @@
> > > > -DPDK_2.0 {
> > > > +DPDK_2.1 {
> > > > global:
> > > >
> > > > rte_eth_from_rings;
> > > > - rte_eth_ring_pair_attach;
> > > > - rte_eth_ring_pair_create;
> > > >
> > > > local: *;
> > > > };
> > >
> > > [ABI newbie question] Is this how deprecating a fn is done? We no longer have any DPDK_2.0
> > > version listings in the .map file?
> >
> > Notice the version # changed as well, so linker will generate a new version.
> > The function was marked deprecated in last version.
>
> What happens if you load the 2.1 lib with an app built for 2.0?
> Shouldn't we keep the DPDK_2.0 block?
What happens is that build process makes a new version of DPDK package
with a new version number. This version can co-exist on same system with
old library (depends on library packaging).
Old library will have old functions, and old application will
use old library. New applications will be have new so version and get the
new library.
http://unix.stackexchange.com/questions/475/how-do-so-shared-object-numbers-work
If we didn't do this, nothing could ever really be removed!
On 06/17/2015 03:39 AM, Stephen Hemminger wrote:
> On Tue, 16 Jun 2015 23:37:32 +0000
> Thomas Monjalon <thomas.monjalon@6wind.com> wrote:
>
>> 2015-06-16 16:05, Stephen Hemminger:
>>> On Tue, 16 Jun 2015 14:52:16 +0100
>>> Bruce Richardson <bruce.richardson@intel.com> wrote:
>>>
>>>> On Mon, Jun 15, 2015 at 09:51:11AM -0700, 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 | 4 +--
>>>>> 2 files changed, 1 insertion(+), 58 deletions(-)
>>>>>
>>>> [..snip..]
>>>>> diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map
>>>>> index 8ad107d..5ee55d9 100644
>>>>> --- a/drivers/net/ring/rte_eth_ring_version.map
>>>>> +++ b/drivers/net/ring/rte_eth_ring_version.map
>>>>> @@ -1,9 +1,7 @@
>>>>> -DPDK_2.0 {
>>>>> +DPDK_2.1 {
>>>>> global:
>>>>>
>>>>> rte_eth_from_rings;
>>>>> - rte_eth_ring_pair_attach;
>>>>> - rte_eth_ring_pair_create;
>>>>>
>>>>> local: *;
>>>>> };
>>>>
>>>> [ABI newbie question] Is this how deprecating a fn is done? We no longer have any DPDK_2.0
>>>> version listings in the .map file?
>>>
>>> Notice the version # changed as well, so linker will generate a new version.
>>> The function was marked deprecated in last version.
>>
>> What happens if you load the 2.1 lib with an app built for 2.0?
>> Shouldn't we keep the DPDK_2.0 block?
>
> What happens is that build process makes a new version of DPDK package
> with a new version number. This version can co-exist on same system with
> old library (depends on library packaging).
> Old library will have old functions, and old application will
> use old library. New applications will be have new so version and get the
> new library.
>
> http://unix.stackexchange.com/questions/475/how-do-so-shared-object-numbers-work
>
> If we didn't do this, nothing could ever really be removed!
Yes, soname bump is required when symbols are removed.
However that doesn't change the version the remaining symbols were
introduced, eg rte_eth_from_rings() in this case, so AIUI you should
leave the DPDK_2.0 {} block version alone. If new symbols get added in
2.1 then a new DPDK_2.1 block needs to be added for those.
- Panu -
@@ -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;
@@ -1,9 +1,7 @@
-DPDK_2.0 {
+DPDK_2.1 {
global:
rte_eth_from_rings;
- rte_eth_ring_pair_attach;
- rte_eth_ring_pair_create;
local: *;
};