[dpdk-dev,v4,1/5] net/bonding: remove bonding APIs using ABI versioning
Checks
Commit Message
There are two bonding APIs using ABI versioning, and both have
port_id as parameter. Since we are already breaking ABI, no need
to keep older versions of APIs.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
drivers/net/bonding/rte_eth_bond_8023ad.c | 139 +--------------------------
drivers/net/bonding/rte_eth_bond_8023ad.h | 18 ----
drivers/net/bonding/rte_eth_bond_version.map | 4 -
3 files changed, 2 insertions(+), 159 deletions(-)
Comments
On 9/21/2017 9:32 AM, Zhiyong Yang wrote:
> There are two bonding APIs using ABI versioning, and both have
> port_id as parameter. Since we are already breaking ABI, no need
> to keep older versions of APIs.
>
> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
<...>
> -int
> -rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
> +rte_eth_bond_8023ad_conf_get(uint8_t port_id,
> struct rte_eth_bond_8023ad_conf *conf)
> {
> struct rte_eth_dev *bond_dev;
> @@ -1409,10 +1320,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
> bond_mode_8023ad_conf_get_v1708(bond_dev, conf);
I am aware this is not focus of the patchset, but it would be good to
rename this function too and remove _v1708 suffix.
It seems there is already a function named "bond_mode_8023ad_conf_get"
and after removed code, "bond_mode_8023ad_conf_get" only called by
"bond_mode_8023ad_conf_get_v1708":
bond_mode_8023ad_conf_get_v1708()
bond_mode_8023ad_conf_get()
So it is possible to merge them into name "bond_mode_8023ad_conf_get()"
Thanks,
ferruh
Ferruh,
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Thursday, September 21, 2017 6:37 PM
> To: Yang, Zhiyong <zhiyong.yang@intel.com>; dev@dpdk.org
> Cc: thomas@monjalon.net
> Subject: Re: [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI
> versioning
>
> On 9/21/2017 9:32 AM, Zhiyong Yang wrote:
> > There are two bonding APIs using ABI versioning, and both have port_id
> > as parameter. Since we are already breaking ABI, no need to keep older
> > versions of APIs.
> >
> > Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
>
> <...>
>
> > -int
> > -rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
> > +rte_eth_bond_8023ad_conf_get(uint8_t port_id,
> > struct rte_eth_bond_8023ad_conf *conf) {
> > struct rte_eth_dev *bond_dev;
> > @@ -1409,10 +1320,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t
> port_id,
> > bond_mode_8023ad_conf_get_v1708(bond_dev, conf);
>
> I am aware this is not focus of the patchset, but it would be good to rename this
> function too and remove _v1708 suffix.
>
> It seems there is already a function named "bond_mode_8023ad_conf_get"
> and after removed code, "bond_mode_8023ad_conf_get" only called by
> "bond_mode_8023ad_conf_get_v1708":
>
> bond_mode_8023ad_conf_get_v1708()
> bond_mode_8023ad_conf_get()
>
> So it is possible to merge them into name "bond_mode_8023ad_conf_get()"
>
Ok. I will merge them into one.
> Thanks,
> Ferruh
@@ -1114,17 +1114,6 @@ bond_mode_8023ad_conf_get(struct rte_eth_dev *dev,
}
static void
-bond_mode_8023ad_conf_get_v1607(struct rte_eth_dev *dev,
- struct rte_eth_bond_8023ad_conf *conf)
-{
- struct bond_dev_private *internals = dev->data->dev_private;
- struct mode8023ad_private *mode4 = &internals->mode4;
-
- bond_mode_8023ad_conf_get(dev, conf);
- conf->slowrx_cb = mode4->slowrx_cb;
-}
-
-static void
bond_mode_8023ad_conf_get_v1708(struct rte_eth_dev *dev,
struct rte_eth_bond_8023ad_conf *conf)
{
@@ -1171,27 +1160,6 @@ bond_mode_8023ad_conf_assign(struct mode8023ad_private *mode4,
mode4->dedicated_queues.tx_qid = UINT16_MAX;
}
-static void
-bond_mode_8023ad_setup_v20(struct rte_eth_dev *dev,
- struct rte_eth_bond_8023ad_conf *conf)
-{
- struct rte_eth_bond_8023ad_conf def_conf;
- struct bond_dev_private *internals = dev->data->dev_private;
- struct mode8023ad_private *mode4 = &internals->mode4;
-
- if (conf == NULL) {
- conf = &def_conf;
- bond_mode_8023ad_conf_get_default(conf);
- }
-
- bond_mode_8023ad_stop(dev);
- bond_mode_8023ad_conf_assign(mode4, conf);
-
- if (dev->data->dev_started)
- bond_mode_8023ad_start(dev);
-}
-
-
void
bond_mode_8023ad_setup(struct rte_eth_dev *dev,
struct rte_eth_bond_8023ad_conf *conf)
@@ -1207,27 +1175,6 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev,
bond_mode_8023ad_stop(dev);
bond_mode_8023ad_conf_assign(mode4, conf);
-
-
- if (dev->data->dev_started)
- bond_mode_8023ad_start(dev);
-}
-
-static void
-bond_mode_8023ad_setup_v1708(struct rte_eth_dev *dev,
- struct rte_eth_bond_8023ad_conf *conf)
-{
- struct rte_eth_bond_8023ad_conf def_conf;
- struct bond_dev_private *internals = dev->data->dev_private;
- struct mode8023ad_private *mode4 = &internals->mode4;
-
- if (conf == NULL) {
- conf = &def_conf;
- bond_mode_8023ad_conf_get_default(conf);
- }
-
- bond_mode_8023ad_stop(dev);
- bond_mode_8023ad_conf_assign(mode4, conf);
mode4->slowrx_cb = conf->slowrx_cb;
mode4->agg_selection = AGG_STABLE;
@@ -1358,43 +1305,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
}
int
-rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf)
-{
- struct rte_eth_dev *bond_dev;
-
- if (valid_bonded_port_id(port_id) != 0)
- return -EINVAL;
-
- if (conf == NULL)
- return -EINVAL;
-
- bond_dev = &rte_eth_devices[port_id];
- bond_mode_8023ad_conf_get(bond_dev, conf);
- return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_conf_get, _v20, 2.0);
-
-int
-rte_eth_bond_8023ad_conf_get_v1607(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf)
-{
- struct rte_eth_dev *bond_dev;
-
- if (valid_bonded_port_id(port_id) != 0)
- return -EINVAL;
-
- if (conf == NULL)
- return -EINVAL;
-
- bond_dev = &rte_eth_devices[port_id];
- bond_mode_8023ad_conf_get_v1607(bond_dev, conf);
- return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_conf_get, _v1607, 16.07);
-
-int
-rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint8_t port_id,
struct rte_eth_bond_8023ad_conf *conf)
{
struct rte_eth_dev *bond_dev;
@@ -1409,10 +1320,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
bond_mode_8023ad_conf_get_v1708(bond_dev, conf);
return 0;
}
-MAP_STATIC_SYMBOL(int rte_eth_bond_8023ad_conf_get(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf),
- rte_eth_bond_8023ad_conf_get_v1708);
-BIND_DEFAULT_SYMBOL(rte_eth_bond_8023ad_conf_get, _v1708, 17.08);
int
rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
@@ -1483,25 +1390,7 @@ bond_8023ad_setup_validate(uint8_t port_id,
}
int
-rte_eth_bond_8023ad_setup_v20(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf)
-{
- struct rte_eth_dev *bond_dev;
- int err;
-
- err = bond_8023ad_setup_validate(port_id, conf);
- if (err != 0)
- return err;
-
- bond_dev = &rte_eth_devices[port_id];
- bond_mode_8023ad_setup_v20(bond_dev, conf);
-
- return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_setup, _v20, 2.0);
-
-int
-rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint8_t port_id,
struct rte_eth_bond_8023ad_conf *conf)
{
struct rte_eth_dev *bond_dev;
@@ -1516,30 +1405,6 @@ rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
return 0;
}
-VERSION_SYMBOL(rte_eth_bond_8023ad_setup, _v1607, 16.07);
-
-
-int
-rte_eth_bond_8023ad_setup_v1708(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf)
-{
- struct rte_eth_dev *bond_dev;
- int err;
-
- err = bond_8023ad_setup_validate(port_id, conf);
- if (err != 0)
- return err;
-
- bond_dev = &rte_eth_devices[port_id];
- bond_mode_8023ad_setup_v1708(bond_dev, conf);
-
- return 0;
-}
-BIND_DEFAULT_SYMBOL(rte_eth_bond_8023ad_setup, _v1708, 17.08);
-MAP_STATIC_SYMBOL(int rte_eth_bond_8023ad_setup(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf),
- rte_eth_bond_8023ad_setup_v1708);
-
@@ -194,15 +194,6 @@ struct rte_eth_bond_8023ad_slave_info {
int
rte_eth_bond_8023ad_conf_get(uint8_t port_id,
struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v1607(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf);
/**
* @internal
@@ -218,15 +209,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
int
rte_eth_bond_8023ad_setup(uint8_t port_id,
struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v20(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v1708(uint8_t port_id,
- struct rte_eth_bond_8023ad_conf *conf);
/**
* @internal
@@ -1,8 +1,6 @@
DPDK_2.0 {
global:
- rte_eth_bond_8023ad_conf_get;
- rte_eth_bond_8023ad_setup;
rte_eth_bond_active_slaves_get;
rte_eth_bond_create;
rte_eth_bond_link_monitoring_set;
@@ -39,8 +37,6 @@ DPDK_16.07 {
rte_eth_bond_8023ad_ext_distrib;
rte_eth_bond_8023ad_ext_distrib_get;
rte_eth_bond_8023ad_ext_slowtx;
- rte_eth_bond_8023ad_conf_get;
- rte_eth_bond_8023ad_setup;
} DPDK_16.04;