Hi Neale, You should be able to fake a binary api connection from within vpp with vl_api_memclnt_create_internal (there be dragons). The mutex is used only to synchronize producers and consumer (typically should be only one) so it shouldn’t block unless you run out of space in the queue. Similarly, with socket transport you can in theory run out of socket tx buffer, so you need to decide what to do in that case, i.e., probably drop.
Cheers, Florin > On Feb 11, 2021, at 8:49 AM, Neale Ranns <ne...@graphiant.com> wrote: > > > Hi Ben, > > Not a silly idea 😊 but given the shared memory’s mutex based read/write > mechanism, one can’t connect to VPP form within VPP. Maybe socket transport > for the API is an option, otherwise we considered a new ‘direct’ transport > for the API, which as you say would be a bit like RPC. The plugin could then > use the VAPI function wrappers over this direct transport. > > /neale > > > > From: Benoit Ganne (bganne) <bga...@cisco.com <mailto:bga...@cisco.com>> > Date: Thursday, 11 February 2021 at 17:17 > To: Neale Ranns <ne...@graphiant.com <mailto:ne...@graphiant.com>>, > vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io > <mailto:vpp-dev@lists.fd.io>> > Subject: RE: [vpp-dev] RFC: Interface Mirroring for Linux Network > Stackintegration > > Hi Neale, > > > this adds another plugin that acts as a netlink listener and invokes VPP > > internal APIs (i.e. directly calls e.g. FIB and ip-neighbour) to add state > > to VPP. > [...] > > Disadvantages: > > 1. Not using VPP's binary API means you do not get the tracing > > function, which in turn means you do not get the replay function. These > > are both exceptionally useful field debugging tools. > > Maybe a silly idea, but I guess you could always call the APIs from the > plugin instead of direct function calls, a bit like RPC to main thread? That > still means a single process to operate but you can use API replay. > > ben > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18730): https://lists.fd.io/g/vpp-dev/message/18730 Mute This Topic: https://lists.fd.io/mt/80033164/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-