From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D40318E88 for ; Mon, 2 Nov 2015 11:23:49 +0100 (CET) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 26E3FC1C7517; Mon, 2 Nov 2015 10:23:49 +0000 (UTC) Received: from dhcp195.koti.laiskiainen.org (vpn1-5-236.ams2.redhat.com [10.36.5.236]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA2ANln6005611; Mon, 2 Nov 2015 05:23:48 -0500 To: Thomas Monjalon , Eric Kinzie References: <1445268976-27491-1-git-send-email-ehkinzie@gmail.com> <1445268976-27491-4-git-send-email-ehkinzie@gmail.com> <1706989.WgznurFLZ8@xps13> From: Panu Matilainen Message-ID: <563739B3.1040809@redhat.com> Date: Mon, 2 Nov 2015 12:23:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1706989.WgznurFLZ8@xps13> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v6 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: Mon, 02 Nov 2015 10:23:50 -0000 On 11/01/2015 08:17 PM, Thomas Monjalon wrote: > 2015-10-19 08:36, Eric Kinzie: >> Size of struct rte_eth_bond_8023ad_conf changed. Increment LIBABIVER >> and version bond_mode_8023ad_setup and bond_mode_8023ad_conf_get >> functions. > [...] >> +VERSION_SYMBOL(bond_mode_8023ad_setup, _v20, 2.0); > [...] >> +BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); >> +MAP_STATIC_SYMBOL(void bond_mode_8023ad_setup(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf), \ >> + bond_mode_8023ad_setup_v22); > > I'm sorry it doesn't work well when trying to build a combined lib: > > ld: libdpdk.so: version node not found for symbol bond_mode_8023ad_setup@@DPDK_2.2 > > The symbols are OK in the .o file: > 0000000000002340 g F .text 0000000000000171 bond_mode_8023ad_setup@@DPDK_2.2 > 0000000000002260 g F .text 00000000000000da bond_mode_8023ad_setup@DPDK_2.0 > 0000000000002260 g F .text 00000000000000da bond_mode_8023ad_setup_v20 > 0000000000002340 g F .text 0000000000000171 bond_mode_8023ad_setup_v22 > 0000000000000000 *UND* 0000000000000000 bond_mode_8023ad_setup > > I don't understand the problem and I am considering disabling versioning in > combined library. > > Any idea? > The .map additions look incorrect to me: > diff --git a/drivers/net/bonding/rte_eth_bond_version.map b/drivers/net/bonding/rte_eth_bond_version.map > index 22bd920..7f78717 100644 > --- a/drivers/net/bonding/rte_eth_bond_version.map > +++ b/drivers/net/bonding/rte_eth_bond_version.map > @@ -17,6 +17,9 @@ 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; These symbols didn't exist in DPDK 2.0 but are only being added here. So why are they being added to the 2.0 section? > > local: *; > }; > @@ -27,3 +30,10 @@ DPDK_2.1 { > rte_eth_bond_free; > > } DPDK_2.0; > + > +DPDK_2.2 { > + local > + > + bond_mode_8023ad_conf_get; > + bond_mode_8023ad_setup; > +} DPDK_2.1; These are marked local, as in, "not exported" which doesn't seem right. Also they're lacking the rte_eth_ prefix. AFAICS this is what the symbol export map should look like here: DPDK_2.2 { global: rte_eth_bond_8023ad_ext_collect; rte_eth_bond_8023ad_ext_distrib; rte_eth_bond_8023ad_ext_slowtx; rte_eth_bond_mode_8023ad_conf_get; rte_eth_bond_mode_8023ad_setup; } DPDK_2.1; That said, problems with symbol versioning and the combined library were predicted from the start, once the individual library versions start advancing. For one, the combined library itself is not versioned at all it is offending the ABI policy all the time. Replacing the library with a linker script, as suggested before by Neil Horman and Sergio Gonzales Monroy would eliminate these problems. - Panu -