From patchwork Fri Sep 29 07:17:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Zhiyong" X-Patchwork-Id: 29414 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 225271B1A9; Fri, 29 Sep 2017 09:17:44 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id BE2341AEF3 for ; Fri, 29 Sep 2017 09:17:34 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 29 Sep 2017 00:17:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,451,1500966000"; d="scan'208";a="156891485" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.182]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2017 00:17:32 -0700 From: Zhiyong Yang To: dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net, Zhiyong Yang Date: Fri, 29 Sep 2017 15:17:23 +0800 Message-Id: <20170929071727.21618-2-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170929071727.21618-1-zhiyong.yang@intel.com> References: <20170925032231.72897-1-zhiyong.yang@intel.com> <20170929071727.21618-1-zhiyong.yang@intel.com> Subject: [dpdk-dev] [PATCH v6 1/5] net/bonding: remove bonding APIs using ABI versioning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: Ferruh Yigit --- drivers/net/bonding/rte_eth_bond_8023ad.c | 149 +-------------------------- drivers/net/bonding/rte_eth_bond_8023ad.h | 18 ---- drivers/net/bonding/rte_eth_bond_version.map | 4 - 3 files changed, 2 insertions(+), 169 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 20b5a8961..c2b9e053c 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -1111,27 +1111,6 @@ bond_mode_8023ad_conf_get(struct rte_eth_dev *dev, conf->tx_period_ms = mode4->tx_period_timeout / ms_ticks; conf->update_timeout_ms = mode4->update_timeout_us / 1000; conf->rx_marker_period_ms = mode4->rx_marker_timeout / ms_ticks; -} - -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) -{ - 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; conf->agg_selection = mode4->agg_selection; } @@ -1171,27 +1150,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 +1165,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,7 +1295,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals, } int -rte_eth_bond_8023ad_conf_get_v20(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; @@ -1373,46 +1310,6 @@ rte_eth_bond_8023ad_conf_get_v20(uint8_t 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, - 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_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 +1380,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 +1395,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); - diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h index 1d353c734..d609745e0 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.h +++ b/drivers/net/bonding/rte_eth_bond_8023ad.h @@ -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 diff --git a/drivers/net/bonding/rte_eth_bond_version.map b/drivers/net/bonding/rte_eth_bond_version.map index 0f4e847da..ec3374b0f 100644 --- a/drivers/net/bonding/rte_eth_bond_version.map +++ b/drivers/net/bonding/rte_eth_bond_version.map @@ -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;