Hi,
Please note that starting with v21.01, plugin symbols are hidden by default and
can’t be used from another plugin (or any other linked object). You need to add
the __clib_export attribute to the symbols you want to expose to other plugins.
For example, in the dns plugin, the dns_resolve_name function is marked with
__clib_export, in file plugins/dns/dns.c:
__clib_export int
dns_resolve_name (u8 *name, dns_cache_entry_t **ep, dns_pending_request_t *t0,
dns_resolve_name_t *rn)
{
This enables its use by the ikev2 plugin. In file plugins/ikev2/ikev2.c you
have
km->dns_resolve_name =
vlib_get_plugin_symbol ("dns_plugin.so", "dns_resolve_name”);
Best regards,
Mohammed
> On 29 Sep 2021, at 12:59, Dave Barach <[email protected]> wrote:
>
> It’s worth checking that the symbol in question is actually exported. As part
> of upgrading, you may have started using a different toolchain.
>
> $ nm -go <file>.o | grep <missing-symbol>
>
> From: [email protected] <mailto:[email protected]> <[email protected]
> <mailto:[email protected]>> On Behalf Of Satya Murthy
> Sent: Wednesday, September 29, 2021 6:43 AM
> To: [email protected] <mailto:[email protected]>
> Subject: [vpp-dev] vlib_get_plugin_symbol returning null after upgrading to
> 21.06 version
>
> Hi,
>
> We are trying to upgrade to fdio.2106 version from a previous version.
>
> After upgrading to 21.06 version with our custom plugins, we are seeing that
> vlib_get_plugin_symbol() to resolve a symbol from another plugin is always
> returning null.
> This was working fine in the earlier version.
>
> I cross checked that load_one_plugin() is successful in loading all the
> plugins, before we call the vlib_get_plugin_symbol().
>
> Any pointers on what could be happening here ?
>
> --
> Thanks & Regards,
> Murthy
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20223): https://lists.fd.io/g/vpp-dev/message/20223
Mute This Topic: https://lists.fd.io/mt/85945383/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-