On 26/05/15 16:41, Eric Kinzie wrote: > From: Eric Kinzie <ekinzie at brocade.com> > > 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 <ehkinzie at gmail.com> > --- .... >
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: *; };