Hi Neale, Ben, > On 11 Feb 2021, at 17:50, 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.
Once upon a time I had a very cursed throwaway prototype called “VPP api freezer”, where I did just that, more over it also maintained its own separate shared memory endpoint pretending to be an earlier version of VPP it was an extremely nasty trick of hijacking the queue signal callback but maybe it can be reincarnated into something less cursed :-) https://github.com/ayourtch/vpp-api-freezer/blob/142c25b71d2edd27117946e4cbc290243aa4b468/src/api1908compat.c#L535 Though I remember my biggest problem with that hack was not calling the VPP api (that seemed to work fine) but rather monitoring two “server” sides of shared memory at once ... (Also, as I finished typing, I also remembered about the “binary-api” command that seemingly does just this - issuing calls to binary api to its own running instance ?) Not sure if it is if any use, and sorry if I misunderstood anything from the problem ! :-) —a > 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> > Date: Thursday, 11 February 2021 at 17:17 > To: Neale Ranns <ne...@graphiant.com>, vpp-dev@lists.fd.io > <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 (#18731): https://lists.fd.io/g/vpp-dev/message/18731 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] -=-=-=-=-=-=-=-=-=-=-=-