From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4E38011C5 for ; Thu, 2 Jul 2015 15:23:21 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 02 Jul 2015 06:23:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,393,1432623600"; d="scan'208";a="757229705" Received: from dwdohert-dpdk-fedora-20.ir.intel.com ([163.33.213.98]) by orsmga002.jf.intel.com with ESMTP; 02 Jul 2015 06:23:07 -0700 Message-ID: <55953CE0.7020202@intel.com> Date: Thu, 02 Jul 2015 14:30:08 +0100 From: Declan Doherty User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Eric Kinzie , dev@dpdk.org References: <1432654909-13845-1-git-send-email-ehkinzie@gmail.com> <1432654909-13845-4-git-send-email-ehkinzie@gmail.com> In-Reply-To: <1432654909-13845-4-git-send-email-ehkinzie@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Eric Kinzie Subject: Re: [dpdk-dev] [PATCH v4 3/4] bond mode 4: allow external state machine X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 13:23:22 -0000 On 26/05/15 16:41, Eric Kinzie wrote: > From: Eric Kinzie > > Provide functions to allow an external 802.3ad state machine to transmit > and recieve LACPDUs and to set the collection/distribution flags on > slave interfaces. > > Size of struct rte_eth_bond_8023ad_conf changed. Increment LIBABIVER > and version bond_mode_8023ad_setup and bond_mode_8023ad_conf_get > functions. > > Signed-off-by: Eric Kinzie > --- .... > Hey Eric, sorry for talking so long to get back with these comments. I had some issues with the ABI versioning and the static linking with the test app, also the ABI versioning wasn't implemented as specified in the latest guidelines document, I had to make the following changes to get things to link correctly for me. Also in rte_eth_bond_8023ad_ext_slowtx it's probably worth while checking the ethertype in the eth header. diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 06534ae..a9e6a50 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -1001,7 +1001,7 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev) bond_mode_8023ad_start(bond_dev); } -void __vsym +void bond_mode_8023ad_conf_get_v20(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf) { @@ -1020,9 +1020,8 @@ bond_mode_8023ad_conf_get_v20(struct rte_eth_dev *dev, conf->slowrx_cb = mode4->slowrx_cb; } -VERSION_SYMBOL(bond_mode_8023ad_conf_get, _v20, 2.0); -void __vsym +void bond_mode_8023ad_conf_get_v21(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf) { @@ -1041,9 +1040,10 @@ bond_mode_8023ad_conf_get_v21(struct rte_eth_dev *dev, conf->slowrx_cb = mode4->slowrx_cb; } -BIND_DEFAULT_SYMBOL(bond_mode_8023ad_conf_get, _v21, 2.1); +MAP_STATIC_SYMBOL(void bond_mode_8023ad_conf_get(struct rte_eth_dev *dev, + struct rte_eth_bond_8023ad_conf *conf), bond_mode_8023ad_conf_get_v21); -void __vsym +void bond_mode_8023ad_setup_v20(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf) { @@ -1074,9 +1074,8 @@ bond_mode_8023ad_setup_v20(struct rte_eth_dev *dev, mode4->update_timeout_us = conf->update_timeout_ms * 1000; } -VERSION_SYMBOL(bond_mode_8023ad_setup, _v20, 2.0); -void __vsym +void bond_mode_8023ad_setup_v21(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf) { @@ -1114,8 +1113,9 @@ bond_mode_8023ad_setup_v21(struct rte_eth_dev *dev, bond_mode_8023ad_start(dev); } -BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v21, 2.1); - +MAP_STATIC_SYMBOL(void bond_mode_8023ad_setup(struct rte_eth_dev *dev, + struct rte_eth_bond_8023ad_conf *conf), + bond_mode_8023ad_setup_v21); int bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev) { @@ -1407,7 +1407,8 @@ rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id, /* only enqueue LACPDUs */ lacp = rte_pktmbuf_mtod(lacp_pkt, struct lacpdu_header *); - if (lacp->lacpdu.subtype != SLOW_SUBTYPE_LACP) + if (lacp-> eth_hdr. ether_type != rte_cpu_to_be(ETHER_TYPE_SLOW) || + lacp->lacpdu.subtype != SLOW_SUBTYPE_LACP) return -EINVAL; MODE4_DEBUG("sending LACP frame\n"); diff --git a/drivers/net/bonding/rte_eth_bond_8023ad_private.h b/drivers/net/bonding/rte_eth_bond_8023ad_private.h index cb39004..d1a1af0 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad_private.h +++ b/drivers/net/bonding/rte_eth_bond_8023ad_private.h @@ -191,7 +191,7 @@ struct bond_dev_private; /** * @internal * - * Get configuration of bonded interface. + * Retreive mode 4 configuration of bonded interface. * * * @param dev Bonded interface @@ -201,6 +201,18 @@ void bond_mode_8023ad_conf_get(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf); +void +bond_mode_8023ad_conf_get_v20(struct rte_eth_dev *dev, + struct rte_eth_bond_8023ad_conf *conf); + +VERSION_SYMBOL(bond_mode_8023ad_conf_get, _v20, 2.0); + +void +bond_mode_8023ad_conf_get_v21(struct rte_eth_dev *dev, + struct rte_eth_bond_8023ad_conf *conf); + +BIND_DEFAULT_SYMBOL(bond_mode_8023ad_conf_get, _v21, 2.1); + /** * @internal * @@ -214,31 +226,19 @@ bond_mode_8023ad_conf_get(struct rte_eth_dev *dev, void bond_mode_8023ad_setup(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf); -void __vsym +void bond_mode_8023ad_setup_v20(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf); -void __vsym -bond_mode_8023ad_setup_v21(struct rte_eth_dev *dev, - struct rte_eth_bond_8023ad_conf *conf); -/** - * @internal - * - * Retreive mode 4 configuration of bonded interface. - * - * @param dev Bonded interface - * @param conf Bonded interface configuration - */ +VERSION_SYMBOL(bond_mode_8023ad_setup, _v20, 2.0); + void -bond_mode_8023ad_conf_get(struct rte_eth_dev *dev, - struct rte_eth_bond_8023ad_conf *conf); -void __vsym -bond_mode_8023ad_conf_get_v20(struct rte_eth_dev *dev, - struct rte_eth_bond_8023ad_conf *conf); -void __vsym -bond_mode_8023ad_conf_get_v21(struct rte_eth_dev *dev, +bond_mode_8023ad_setup_v21(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf); +BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v21, 2.1); + + /** * @internal diff --git a/drivers/net/bonding/rte_eth_bond_version.map b/drivers/net/bonding/rte_eth_bond_version.map index 328a423..0e144e3 100644 --- a/drivers/net/bonding/rte_eth_bond_version.map +++ b/drivers/net/bonding/rte_eth_bond_version.map @@ -2,6 +2,9 @@ DPDK_2.0 { global: rte_eth_bond_8023ad_conf_get; + rte_eth_bond_8023ad_ext_collect; + rte_eth_bond_8023ad_ext_distrib; + rte_eth_bond_8023ad_ext_slowtx; rte_eth_bond_8023ad_setup; rte_eth_bond_active_slaves_get; rte_eth_bond_create; @@ -17,9 +20,6 @@ DPDK_2.0 { rte_eth_bond_slaves_get; rte_eth_bond_xmit_policy_get; rte_eth_bond_xmit_policy_set; - rte_eth_bond_8023ad_ext_collect; - rte_eth_bond_8023ad_ext_distrib; - rte_eth_bond_8023ad_ext_slowtx; local: *; };