[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
On 11/20/2015 09:46 PM, Eric Kinzie wrote: > On Tue Nov 03 11:48:57 + 2015, Ferruh Yigit wrote: >> On Tue, Nov 03, 2015 at 01:31:45PM +0200, Panu Matilainen wrote: >>> On 11/03/2015 01:02 PM, Ferruh Yigit wrote: On Tue, Nov 03, 2015 at 08:48:16AM +0200, Panu Matilainen wrote: > On 11/02/2015 06:42 PM, Eric Kinzie wrote: >> On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: >>> 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: 2340 g F .text 0171 bond_mode_8023ad_setup@@DPDK_2.2 2260 g F .text 00da bond_mode_8023ad_setup at DPDK_2.0 2260 g F .text 00da bond_mode_8023ad_setup_v20 2340 g F .text 0171 bond_mode_8023ad_setup_v22 *UND* 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? >> >> Yes, I think these should probably be moved. >> >> 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: >> >> >> These were not exported to begin with. But after versioning these >> functions, they are exported unless explicitly declared to be local here. >> > > And this does not ring any warning bells? :) > > Sorry, I was not looking at the patch as a whole. You're declaring these > symbols as exported with the versioning macros, eg > > BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); > > ...and then explicitly telling it to not export them by declaring local, > and > then we wonder why it has trouble finding the symbols. > The versioning macros wont invent the librte_ prefix for you, you need to > rename the functions accordingly. > > But all this versioning gymnastics is moot anyway because you declare the > ABI incompatible: > > -LIBABIVER := 1 > +LIBABIVER := 2 > > This changes the library soname, so no binary compiled against the > previous > version can possibly use it anymore. As in, by definition there can be no > callers of the _v20 variants after this ABI version bump. > An observation: even soname is different, just renaming .so file itself works. And this can be useful for the case: libx.so.1 provides functions A, B, C app1 compiled against libx.so.1, using only function B libx.so.1 updated only thefunction A and become libx.so.2 app1 still can run successfully by re-naming lib to libx.so.1 (even soname is libx.so.2) But for this usage, user needs to know which function updated and is it safe or not to use this
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
On Tue Nov 03 11:48:57 + 2015, Ferruh Yigit wrote: > On Tue, Nov 03, 2015 at 01:31:45PM +0200, Panu Matilainen wrote: > > On 11/03/2015 01:02 PM, Ferruh Yigit wrote: > >> On Tue, Nov 03, 2015 at 08:48:16AM +0200, Panu Matilainen wrote: > >>> On 11/02/2015 06:42 PM, Eric Kinzie wrote: > On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: > > 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: > >> 2340 g F .text 0171 > >> bond_mode_8023ad_setup@@DPDK_2.2 > >> 2260 g F .text 00da > >> bond_mode_8023ad_setup at DPDK_2.0 > >> 2260 g F .text 00da > >> bond_mode_8023ad_setup_v20 > >> 2340 g F .text 0171 > >> bond_mode_8023ad_setup_v22 > >> *UND* 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? > > Yes, I think these should probably be moved. > > > >> > >>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: > > > These were not exported to begin with. But after versioning these > functions, they are exported unless explicitly declared to be local here. > > >>> > >>> And this does not ring any warning bells? :) > >>> > >>> Sorry, I was not looking at the patch as a whole. You're declaring these > >>> symbols as exported with the versioning macros, eg > >>> > >>> BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); > >>> > >>> ...and then explicitly telling it to not export them by declaring local, > >>> and > >>> then we wonder why it has trouble finding the symbols. > >>> The versioning macros wont invent the librte_ prefix for you, you need to > >>> rename the functions accordingly. > >>> > >>> But all this versioning gymnastics is moot anyway because you declare the > >>> ABI incompatible: > >>> > >>> -LIBABIVER := 1 > >>> +LIBABIVER := 2 > >>> > >>> This changes the library soname, so no binary compiled against the > >>> previous > >>> version can possibly use it anymore. As in, by definition there can be no > >>> callers of the _v20 variants after this ABI version bump. > >>> > >> An observation: even soname is different, just renaming .so file itself > >> works. > >> > >> And this can be useful for the case: > >> libx.so.1 provides functions A, B, C > >> app1 compiled against libx.so.1, using only function B > >> > >> libx.so.1 updated only thefunction A and become libx.so.2 > >> app1 still can run successfully by re-naming lib to libx.so.1 (even soname > >> is libx.so.2) > >> > >> But for this usage, user needs to know which function updated and is it > >> safe or not to use this library, > >> I wonder if there is an automatic
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
On 11/03/2015 01:02 PM, Ferruh Yigit wrote: > On Tue, Nov 03, 2015 at 08:48:16AM +0200, Panu Matilainen wrote: >> On 11/02/2015 06:42 PM, Eric Kinzie wrote: >>> On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: 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: > 2340 g F .text 0171 > bond_mode_8023ad_setup@@DPDK_2.2 > 2260 g F .text 00da bond_mode_8023ad_setup > at DPDK_2.0 > 2260 g F .text 00da > bond_mode_8023ad_setup_v20 > 2340 g F .text 0171 > bond_mode_8023ad_setup_v22 > *UND* 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? >>> >>> Yes, I think these should probably be moved. >>> >>> > > 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: >>> >>> >>> These were not exported to begin with. But after versioning these >>> functions, they are exported unless explicitly declared to be local here. >>> >> >> And this does not ring any warning bells? :) >> >> Sorry, I was not looking at the patch as a whole. You're declaring these >> symbols as exported with the versioning macros, eg >> >> BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); >> >> ...and then explicitly telling it to not export them by declaring local, and >> then we wonder why it has trouble finding the symbols. >> The versioning macros wont invent the librte_ prefix for you, you need to >> rename the functions accordingly. >> >> But all this versioning gymnastics is moot anyway because you declare the >> ABI incompatible: >> >> -LIBABIVER := 1 >> +LIBABIVER := 2 >> >> This changes the library soname, so no binary compiled against the previous >> version can possibly use it anymore. As in, by definition there can be no >> callers of the _v20 variants after this ABI version bump. >> > An observation: even soname is different, just renaming .so file itself works. > > And this can be useful for the case: > libx.so.1 provides functions A, B, C > app1 compiled against libx.so.1, using only function B > > libx.so.1 updated only thefunction A and become libx.so.2 > app1 still can run successfully by re-naming lib to libx.so.1 (even soname is > libx.so.2) > > But for this usage, user needs to know which function updated and is it safe > or not to use this library, > I wonder if there is an automatic way of resolving this dependency. Erm, no. The whole point of changing soname and the physical filename is to tell others it is incompatible with earlier versions. Yes you can rename the file and get lucky (or not), just like you can play Russian roulette. Neither are particularly healthy ideas. Symbol version exists in part to allow libraries to evolve while maintaining compatibility, but it requires careful planning and programming. When public structs change, the structs would have to be versioned too, and from there on it starts getting more and more
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
On Tue Nov 03 10:30:56 +0200 2015, Panu Matilainen wrote: > On 11/03/2015 10:16 AM, Thomas Monjalon wrote: > >2015-11-03 08:48, Panu Matilainen: > >>On 11/02/2015 06:42 PM, Eric Kinzie wrote: > >>>On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: > 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: > >2340 g F .text 0171 > >bond_mode_8023ad_setup@@DPDK_2.2 > >2260 g F .text 00da bond_mode_8023ad_setup > >at DPDK_2.0 > >2260 g F .text 00da > >bond_mode_8023ad_setup_v20 > >2340 g F .text 0171 > >bond_mode_8023ad_setup_v22 > > *UND* 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? > >>> > >>>Yes, I think these should probably be moved. > >>> > >>> > > > > 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: > >>> > >>> > >>>These were not exported to begin with. But after versioning these > >>>functions, they are exported unless explicitly declared to be local here. > >>> > >> > >>And this does not ring any warning bells? :) > >> > >>Sorry, I was not looking at the patch as a whole. You're declaring these > >>symbols as exported with the versioning macros, eg > >> > >>BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); > >> > >>...and then explicitly telling it to not export them by declaring local, > >>and then we wonder why it has trouble finding the symbols. > >>The versioning macros wont invent the librte_ prefix for you, you need > >>to rename the functions accordingly. > >> > >>But all this versioning gymnastics is moot anyway because you declare > >>the ABI incompatible: > >> > >>-LIBABIVER := 1 > >>+LIBABIVER := 2 > >> > >>This changes the library soname, so no binary compiled against the > >>previous version can possibly use it anymore. As in, by definition there > >>can be no callers of the _v20 variants after this ABI version bump. > > > >Panu, thanks for your careful review. > >We must remove the private functions from the export map.and not bump > >LIBABIVER. > > > > Actually the LIBABIVER bump seems appropriate since a public struct > (rte_eth_bond_8023ad_conf) changes size. > > As for the rest, I'm not quite sure what the patch is trying to > achieve. I initially assumed its trying to add a new incompatible > version of rte_bond_mode_8023ad_setup() and > rte_eth_bond_8023ad_conf_get() which could be a perfectly reasonable > thing to do in some circumstances. As it is, the patch actually adds > versioning to an internal symbol which just doesn't make sense at > all. Symbol versioning is only meaningful for public symbols. > > - Panu - It's likely I misintepreted some advice from an ealier review of this code. The intention was to prevent an application accidentally reading/writing
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
On Tue, Nov 03, 2015 at 01:31:45PM +0200, Panu Matilainen wrote: > On 11/03/2015 01:02 PM, Ferruh Yigit wrote: >> On Tue, Nov 03, 2015 at 08:48:16AM +0200, Panu Matilainen wrote: >>> On 11/02/2015 06:42 PM, Eric Kinzie wrote: On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: > 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: >> 2340 g F .text 0171 >> bond_mode_8023ad_setup@@DPDK_2.2 >> 2260 g F .text 00da bond_mode_8023ad_setup >> at DPDK_2.0 >> 2260 g F .text 00da >> bond_mode_8023ad_setup_v20 >> 2340 g F .text 0171 >> bond_mode_8023ad_setup_v22 >> *UND* 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? Yes, I think these should probably be moved. >> >> 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: These were not exported to begin with. But after versioning these functions, they are exported unless explicitly declared to be local here. >>> >>> And this does not ring any warning bells? :) >>> >>> Sorry, I was not looking at the patch as a whole. You're declaring these >>> symbols as exported with the versioning macros, eg >>> >>> BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); >>> >>> ...and then explicitly telling it to not export them by declaring local, and >>> then we wonder why it has trouble finding the symbols. >>> The versioning macros wont invent the librte_ prefix for you, you need to >>> rename the functions accordingly. >>> >>> But all this versioning gymnastics is moot anyway because you declare the >>> ABI incompatible: >>> >>> -LIBABIVER := 1 >>> +LIBABIVER := 2 >>> >>> This changes the library soname, so no binary compiled against the previous >>> version can possibly use it anymore. As in, by definition there can be no >>> callers of the _v20 variants after this ABI version bump. >>> >> An observation: even soname is different, just renaming .so file itself >> works. >> >> And this can be useful for the case: >> libx.so.1 provides functions A, B, C >> app1 compiled against libx.so.1, using only function B >> >> libx.so.1 updated only thefunction A and become libx.so.2 >> app1 still can run successfully by re-naming lib to libx.so.1 (even soname >> is libx.so.2) >> >> But for this usage, user needs to know which function updated and is it safe >> or not to use this library, >> I wonder if there is an automatic way of resolving this dependency. > > Erm, no. The whole point of changing soname and the physical filename is to > tell others it is incompatible with earlier versions. Yes you can rename the > file and get lucky (or not), just like you can play Russian roulette. > Neither are particularly healthy ideas. > > Symbol version
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
On Tue, Nov 03, 2015 at 08:48:16AM +0200, Panu Matilainen wrote: > On 11/02/2015 06:42 PM, Eric Kinzie wrote: >> On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: >>> 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: 2340 g F .text 0171 bond_mode_8023ad_setup@@DPDK_2.2 2260 g F .text 00da bond_mode_8023ad_setup at DPDK_2.0 2260 g F .text 00da bond_mode_8023ad_setup_v20 2340 g F .text 0171 bond_mode_8023ad_setup_v22 *UND* 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? >> >> Yes, I think these should probably be moved. >> >> 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: >> >> >> These were not exported to begin with. But after versioning these >> functions, they are exported unless explicitly declared to be local here. >> > > And this does not ring any warning bells? :) > > Sorry, I was not looking at the patch as a whole. You're declaring these > symbols as exported with the versioning macros, eg > > BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); > > ...and then explicitly telling it to not export them by declaring local, and > then we wonder why it has trouble finding the symbols. > The versioning macros wont invent the librte_ prefix for you, you need to > rename the functions accordingly. > > But all this versioning gymnastics is moot anyway because you declare the > ABI incompatible: > > -LIBABIVER := 1 > +LIBABIVER := 2 > > This changes the library soname, so no binary compiled against the previous > version can possibly use it anymore. As in, by definition there can be no > callers of the _v20 variants after this ABI version bump. > An observation: even soname is different, just renaming .so file itself works. And this can be useful for the case: libx.so.1 provides functions A, B, C app1 compiled against libx.so.1, using only function B libx.so.1 updated only thefunction A and become libx.so.2 app1 still can run successfully by re-naming lib to libx.so.1 (even soname is libx.so.2) But for this usage, user needs to know which function updated and is it safe or not to use this library, I wonder if there is an automatic way of resolving this dependency. > - Panu - >
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
2015-11-03 10:30, Panu Matilainen: > On 11/03/2015 10:16 AM, Thomas Monjalon wrote: > > 2015-11-03 08:48, Panu Matilainen: > >> On 11/02/2015 06:42 PM, Eric Kinzie wrote: > >>> On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: > 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: > > 2340 g F .text 0171 > > bond_mode_8023ad_setup@@DPDK_2.2 > > 2260 g F .text 00da bond_mode_8023ad_setup > > at DPDK_2.0 > > 2260 g F .text 00da > > bond_mode_8023ad_setup_v20 > > 2340 g F .text 0171 > > bond_mode_8023ad_setup_v22 > > *UND* 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? > >>> > >>> Yes, I think these should probably be moved. > >>> > >>> > > > > 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: > >>> > >>> > >>> These were not exported to begin with. But after versioning these > >>> functions, they are exported unless explicitly declared to be local here. > >>> > >> > >> And this does not ring any warning bells? :) > >> > >> Sorry, I was not looking at the patch as a whole. You're declaring these > >> symbols as exported with the versioning macros, eg > >> > >> BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); > >> > >> ...and then explicitly telling it to not export them by declaring local, > >> and then we wonder why it has trouble finding the symbols. > >> The versioning macros wont invent the librte_ prefix for you, you need > >> to rename the functions accordingly. > >> > >> But all this versioning gymnastics is moot anyway because you declare > >> the ABI incompatible: > >> > >> -LIBABIVER := 1 > >> +LIBABIVER := 2 > >> > >> This changes the library soname, so no binary compiled against the > >> previous version can possibly use it anymore. As in, by definition there > >> can be no callers of the _v20 variants after this ABI version bump. > > > > Panu, thanks for your careful review. > > We must remove the private functions from the export map.and not bump > > LIBABIVER. > > Actually the LIBABIVER bump seems appropriate since a public struct > (rte_eth_bond_8023ad_conf) changes size. Not sure. It is added at the end of a struct which is not embedded elsewhere. > As for the rest, I'm not quite sure what the patch is trying to achieve. > I initially assumed its trying to add a new incompatible version of > rte_bond_mode_8023ad_setup() and rte_eth_bond_8023ad_conf_get() which > could be a perfectly reasonable thing to do in some circumstances. As it > is, the patch actually adds versioning to an internal symbol which just > doesn't make sense at all. Symbol versioning is only meaningful for > public symbols. Yes
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
On 11/03/2015 10:16 AM, Thomas Monjalon wrote: > 2015-11-03 08:48, Panu Matilainen: >> On 11/02/2015 06:42 PM, Eric Kinzie wrote: >>> On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: 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: > 2340 g F .text 0171 > bond_mode_8023ad_setup@@DPDK_2.2 > 2260 g F .text 00da bond_mode_8023ad_setup > at DPDK_2.0 > 2260 g F .text 00da > bond_mode_8023ad_setup_v20 > 2340 g F .text 0171 > bond_mode_8023ad_setup_v22 > *UND* 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? >>> >>> Yes, I think these should probably be moved. >>> >>> > > 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: >>> >>> >>> These were not exported to begin with. But after versioning these >>> functions, they are exported unless explicitly declared to be local here. >>> >> >> And this does not ring any warning bells? :) >> >> Sorry, I was not looking at the patch as a whole. You're declaring these >> symbols as exported with the versioning macros, eg >> >> BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); >> >> ...and then explicitly telling it to not export them by declaring local, >> and then we wonder why it has trouble finding the symbols. >> The versioning macros wont invent the librte_ prefix for you, you need >> to rename the functions accordingly. >> >> But all this versioning gymnastics is moot anyway because you declare >> the ABI incompatible: >> >> -LIBABIVER := 1 >> +LIBABIVER := 2 >> >> This changes the library soname, so no binary compiled against the >> previous version can possibly use it anymore. As in, by definition there >> can be no callers of the _v20 variants after this ABI version bump. > > Panu, thanks for your careful review. > We must remove the private functions from the export map.and not bump > LIBABIVER. > Actually the LIBABIVER bump seems appropriate since a public struct (rte_eth_bond_8023ad_conf) changes size. As for the rest, I'm not quite sure what the patch is trying to achieve. I initially assumed its trying to add a new incompatible version of rte_bond_mode_8023ad_setup() and rte_eth_bond_8023ad_conf_get() which could be a perfectly reasonable thing to do in some circumstances. As it is, the patch actually adds versioning to an internal symbol which just doesn't make sense at all. Symbol versioning is only meaningful for public symbols. - Panu -
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
2015-11-03 08:48, Panu Matilainen: > On 11/02/2015 06:42 PM, Eric Kinzie wrote: > > On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: > >> 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: > >>> 2340 g F .text 0171 > >>> bond_mode_8023ad_setup@@DPDK_2.2 > >>> 2260 g F .text 00da bond_mode_8023ad_setup > >>> at DPDK_2.0 > >>> 2260 g F .text 00da > >>> bond_mode_8023ad_setup_v20 > >>> 2340 g F .text 0171 > >>> bond_mode_8023ad_setup_v22 > >>> *UND* 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? > > > > Yes, I think these should probably be moved. > > > > > >>> > >>> 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: > > > > > > These were not exported to begin with. But after versioning these > > functions, they are exported unless explicitly declared to be local here. > > > > And this does not ring any warning bells? :) > > Sorry, I was not looking at the patch as a whole. You're declaring these > symbols as exported with the versioning macros, eg > > BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); > > ...and then explicitly telling it to not export them by declaring local, > and then we wonder why it has trouble finding the symbols. > The versioning macros wont invent the librte_ prefix for you, you need > to rename the functions accordingly. > > But all this versioning gymnastics is moot anyway because you declare > the ABI incompatible: > > -LIBABIVER := 1 > +LIBABIVER := 2 > > This changes the library soname, so no binary compiled against the > previous version can possibly use it anymore. As in, by definition there > can be no callers of the _v20 variants after this ABI version bump. Panu, thanks for your careful review. We must remove the private functions from the export map.and not bump LIBABIVER.
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
On 11/02/2015 06:42 PM, Eric Kinzie wrote: > On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: >> 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: >>> 2340 g F .text 0171 >>> bond_mode_8023ad_setup@@DPDK_2.2 >>> 2260 g F .text 00da bond_mode_8023ad_setup at >>> DPDK_2.0 >>> 2260 g F .text 00da bond_mode_8023ad_setup_v20 >>> 2340 g F .text 0171 bond_mode_8023ad_setup_v22 >>> *UND* 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? > > Yes, I think these should probably be moved. > > >>> >>> 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: > > > These were not exported to begin with. But after versioning these > functions, they are exported unless explicitly declared to be local here. > And this does not ring any warning bells? :) Sorry, I was not looking at the patch as a whole. You're declaring these symbols as exported with the versioning macros, eg BIND_DEFAULT_SYMBOL(bond_mode_8023ad_setup, _v22, 2.2); ...and then explicitly telling it to not export them by declaring local, and then we wonder why it has trouble finding the symbols. The versioning macros wont invent the librte_ prefix for you, you need to rename the functions accordingly. But all this versioning gymnastics is moot anyway because you declare the ABI incompatible: -LIBABIVER := 1 +LIBABIVER := 2 This changes the library soname, so no binary compiled against the previous version can possibly use it anymore. As in, by definition there can be no callers of the _v20 variants after this ABI version bump. - Panu -
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
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: > 2340 g F .text 0171 > bond_mode_8023ad_setup@@DPDK_2.2 > 2260 g F .text 00da bond_mode_8023ad_setup at > DPDK_2.0 > 2260 g F .text 00da bond_mode_8023ad_setup_v20 > 2340 g F .text 0171 bond_mode_8023ad_setup_v22 > *UND* 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 -
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
On Mon Nov 02 12:23:47 +0200 2015, Panu Matilainen wrote: > 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: > >2340 g F .text 0171 > >bond_mode_8023ad_setup@@DPDK_2.2 > >2260 g F .text 00da bond_mode_8023ad_setup at > >DPDK_2.0 > >2260 g F .text 00da bond_mode_8023ad_setup_v20 > >2340 g F .text 0171 bond_mode_8023ad_setup_v22 > > *UND* 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? Yes, I think these should probably be moved. > > > > 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: These were not exported to begin with. But after versioning these functions, they are exported unless explicitly declared to be local 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 - > >
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
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: 2340 g F .text 0171 bond_mode_8023ad_setup@@DPDK_2.2 2260 g F .text 00da bond_mode_8023ad_setup at DPDK_2.0 2260 g F .text 00da bond_mode_8023ad_setup_v20 2340 g F .text 0171 bond_mode_8023ad_setup_v22 *UND* bond_mode_8023ad_setup I don't understand the problem and I am considering disabling versioning in combined library. Any idea?
[dpdk-dev] [PATCH v6 3/4] bond mode 4: allow external state machine
From: Eric KinzieProvide 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 --- drivers/net/bonding/Makefile |2 +- drivers/net/bonding/rte_eth_bond_8023ad.c | 240 - drivers/net/bonding/rte_eth_bond_8023ad.h | 44 drivers/net/bonding/rte_eth_bond_8023ad_private.h | 28 +++ drivers/net/bonding/rte_eth_bond_version.map | 10 + 5 files changed, 321 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/Makefile b/drivers/net/bonding/Makefile index dee0875..8b892ca 100644 --- a/drivers/net/bonding/Makefile +++ b/drivers/net/bonding/Makefile @@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS) EXPORT_MAP := rte_eth_bond_version.map -LIBABIVER := 1 +LIBABIVER := 2 # # all source are stored in SRCS-y diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 08f679f..0461fb5 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -39,9 +39,12 @@ #include #include #include +#include #include "rte_eth_bond_private.h" +static void bond_mode_8023ad_ext_periodic_cb(void *arg); + #ifdef RTE_LIBRTE_BOND_DEBUG_8023AD #define MODE4_DEBUG(fmt, ...) RTE_LOG(DEBUG, PMD, "%6u [Port %u: %s] " fmt, \ bond_dbg_get_time_diff_ms(), slave_id, \ @@ -999,7 +1002,28 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev) } void -bond_mode_8023ad_conf_get(struct rte_eth_dev *dev, +bond_mode_8023ad_conf_get_v20(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 = >mode4; + uint64_t ms_ticks = rte_get_tsc_hz() / 1000; + + conf->fast_periodic_ms = mode4->fast_periodic_timeout / ms_ticks; + conf->slow_periodic_ms = mode4->slow_periodic_timeout / ms_ticks; + conf->short_timeout_ms = mode4->short_timeout / ms_ticks; + conf->long_timeout_ms = mode4->long_timeout / ms_ticks; + conf->aggregate_wait_timeout_ms = mode4->aggregate_wait_timeout / ms_ticks; + 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; + conf->slowrx_cb = mode4->slowrx_cb; +} + +VERSION_SYMBOL(bond_mode_8023ad_conf_get, _v20, 2.0); + +void +bond_mode_8023ad_conf_get_v22(struct rte_eth_dev *dev, struct rte_eth_bond_8023ad_conf *conf) { struct bond_dev_private *internals = dev->data->dev_private; @@ -1014,10 +1038,15 @@ 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; + conf->slowrx_cb = mode4->slowrx_cb; } +BIND_DEFAULT_SYMBOL(bond_mode_8023ad_conf_get, _v22, 2.2); +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_v22); + void -bond_mode_8023ad_setup(struct rte_eth_dev *dev, +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; @@ -1047,6 +1076,50 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev, mode4->update_timeout_us = conf->update_timeout_ms * 1000; } +VERSION_SYMBOL(bond_mode_8023ad_setup, _v20, 2.0); + +void +bond_mode_8023ad_setup_v22(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 = >mode4; + uint64_t ms_ticks = rte_get_tsc_hz() / 1000; + + if (conf == NULL) { + conf = _conf; + conf->fast_periodic_ms = BOND_8023AD_FAST_PERIODIC_MS; + conf->slow_periodic_ms = BOND_8023AD_SLOW_PERIODIC_MS; + conf->short_timeout_ms = BOND_8023AD_SHORT_TIMEOUT_MS; + conf->long_timeout_ms = BOND_8023AD_LONG_TIMEOUT_MS; + conf->aggregate_wait_timeout_ms = BOND_8023AD_AGGREGATE_WAIT_TIMEOUT_MS; + conf->tx_period_ms = BOND_8023AD_TX_MACHINE_PERIOD_MS; + conf->rx_marker_period_ms = BOND_8023AD_RX_MARKER_PERIOD_MS; + conf->update_timeout_ms = BOND_MODE_8023AX_UPDATE_TIMEOUT_MS; + conf->slowrx_cb = NULL; + } + +