On Mon, Apr 03, 2017 at 08:51:09PM +0800, 倪红军 wrote: > Hi Luk, > > > The following is the diagram of router plugin: > In order to insert routes from BIRD, the route will go through: BIRD -> tap > interface -> netlink plugin -> insert FIB. > Not tested the performance yet. But I guess it is a tap interface limitation. > > > I think a better way is just like Ed Warnicke suggested in bottom email: > https://gerrit.fd.io/r/#/c/5004/ - which introduces memif interfaces... which > I think Damjan eventually wants a library for so that you could > use them for things like taps for routing protocol packets...
If performance is of utmost importance, I recommend using the binary api or building vpp into your application so you can program the fib directly. As Hongjun noted, you are executing a lot of "extra" code to translate from netlink to vpp so one should not expect optimal performance in this model. -Jeff > > > > > Thanks, > Hongjun > > At 2017-04-03 05:47:20, "Łukasz Chrustek" <luk...@chrustek.net> wrote: > Thank You very much Hongjun, I will test it. > > I will test it - mean while, with our programmer, I run the plugin but > inserting routes (full BGP feed) thrugh tap interface take very long time. Is > it vpp limitation or tap interface ? > > Regards > Luk > > > | > | Hey Luk, > > I have fixed some issues in netlink and router plugin in below patch: Now it > can work with VPP. > https://gerrit.fd.io/r/#/c/5881/Fix compile issue for netlink and router > plugin > > Build script is: > cd /root/vpp > ln -sf /root/vpp/vppsb/netlink > ln -sf /root/vpp/vppsb/router > ln -sf /root/vpp/vppsb/netlink/netlink.mk build-data/packages/ > ln -sf /root/vpp/vppsb/router/router.mk build-data/packages/ > > cd /root/vpp/build-root > make V=0 PLATFORM=vpp TAG=vpp_debug netlink-install router-install > > ln -sf > /root/vpp/build-root/install-vpp_debug-native/router/lib64/router.so.0.0.0 \ > /usr/lib/vpp_plugins/router.so > > I tested it with VPP master using below script: and it works. > enable tap-inject > > classify table mask l3 ip4 proto > ip route add 10.0.0.4/30 via classify 0 > ip route add 10.0.0.22/32 via classify 0 > classify session hit-next ip4-node tap-inject-neighbor table-index 0 match l3 > ip4 proto 89 > classify session hit-next ip4-node tap-inject-neighbor table-index 0 match l3 > ip4 proto 2 > > But it seems that VPP master failed to add multicast route via classify > table, because ip_mroute_command does not support this. > DBGvpp# ip mroute add 224.0.0.4/30 via classify 0 > ip mroute: parse error `via classify 0' > I am not sure whether ip_mroute_command will add it later? > > In VPP stable/1701, all multicast routes are added through “ip route add” > command, so below configuration works in stable/1701. > ip route add 224.0.0.4/30 via classify 0 > I also have a patch that can work well in VPP stable/1701. If required, I can > send it to you. > > Thanks Dave and Shaw, Jeffrey for your great help! > > Regards, > Hongjun > > From:vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On > Behalf Of Ni, Hongjun > Sent: Wednesday, March 29, 2017 9:51 AM > To: Dave Barach (dbarach) <dbar...@cisco.com>; Ed Warnicke > <hagb...@gmail.com>; Lukasz Chrustek <ski...@tlen.pl> > Cc: Shaw, Jeffrey B <jeffrey.b.s...@intel.com>; Damjan Marion (damarion) > <damar...@cisco.com>; vpp-dev@lists.fd.io; Lukasz Chrustek > <luk...@chrustek.net> > Subject: Re: [vpp-dev] Building router plugin > > Thanks Dave. Will look into it. > > From: Dave Barach (dbarach) [mailto:dbar...@cisco.com] > Sent: Tuesday, March 28, 2017 7:52 PM > To: Ni, Hongjun <hongjun...@intel.com>; Ed Warnicke <hagb...@gmail.com>; > Lukasz Chrustek <ski...@tlen.pl> > Cc: Shaw, Jeffrey B <jeffrey.b.s...@intel.com>; Damjan Marion (damarion) > <damar...@cisco.com>; vpp-dev@lists.fd.io; Lukasz Chrustek > <luk...@chrustek.net> > Subject: RE: [vpp-dev] Building router plugin > > FWIW: I sent diffs to fix the build-system integration over the weekend, as > well as a fair fraction of the FIB 2.0 integration... > > Thanks… Dave > > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On > Behalf Of Ni, Hongjun > Sent: Monday, March 27, 2017 10:32 PM > To: Ed Warnicke <hagb...@gmail.com>; Lukasz Chrustek <ski...@tlen.pl> > Cc: Shaw, Jeffrey B <jeffrey.b.s...@intel.com>; Damjan Marion (damarion) > <damar...@cisco.com>; vpp-dev@lists.fd.io; Lukasz Chrustek > <luk...@chrustek.net> > Subject: Re: [vpp-dev] Building router plugin > > Hi Luk, > > We are using netlink and router plugin in VPP stable 17.01, and also met the > same issue. > > I have submitted a patch to fix a compile issue in netlink for review, now > netlink could compile ok in VPP stable 17.01. > https://gerrit.fd.io/r/#/c/5881/FIx compile issue for netlink > > I am working on router plugin now, hope to address some issues and make it > work again in VPP stable 17.01. > > For VPP 17.04, make file may need to be changed as per new building system. > > Regards, > Hongjun > > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On > Behalf Of Ed Warnicke > Sent: Tuesday, March 28, 2017 6:10 AM > To: Łukasz Chrustek <ski...@tlen.pl> > Cc: Damjan Marion (damarion) <damar...@cisco.com>; Lukasz Chrustek > <luk...@chrustek.net>; vpp-dev@lists.fd.io; Shaw, Jeffrey B > <jeffrey.b.s...@intel.com> > Subject: Re: [vpp-dev] Building router plugin > > You might also look at > > https://gerrit.fd.io/r/#/c/5004/ - which introduces memif interfaces... which > I think Damjan eventually wants a library for so that you could > use them for things like taps for routing protocol packets... > > Ed > > On Mon, Mar 27, 2017 at 2:43 PM, Łukasz Chrustek <ski...@tlen.pl> wrote: > > | > | Hi, > > Ok, thank You. I will give a try with earlier version of vpp, as Jeff > suggests. I have running netlink plugin, but as Ole wrote - most > important is router plugin. > > Cheers, > Luk > > >> You basically have two options: > >> 1. Teach your routing protocol daemon to directly talk to VPP for > >> configuring the FIB. > >> 2. Do not modify the routing daemon and let VPP map routes written in the > >> kernel. > >> > >> For 1, you will need the router plugin, but for packet punting only. > >> > >> For 2., you will need both netlink+router plugins. The netlink plugin > >> (which actually more like a library), shouldn't require so much changes > >> though. > > > With TCP support in VPP I was playing with the idea of integrating exaBGP > > as a VPP plugin. > > Use the Python API binding to program routes, and receive the BGP > > stream across a fifo (or even the API). > > > Cheers, > > Ole > > >>> Le 26 mars 2017 à 16:31, Łukasz Chrustek <ski...@tlen.pl> a écrit : > >>> > >>> Hello, > >>> > >>> thank all of You for clarification of status router plugin. > >>> > >>> I'm trying to use vpp+dpdk as bare metal linux ruter with bgp and ospf > >>> routing protocols, goal is to make very fast router with dynamic routing > >>> protocols. Can You advice is there any other way to exchange dynamic > >>> routing information between os and vpp ? > >>> > >>> Regards > >>> Lukasz > >>> > >>> > >>> The mailman did not let my last message go through because it was too big > >>> so I am removing the previous threads to keep this message under 100KB > >>> limit. > >>> > >>> Hello, > >>> > >>> Dave and Pierre are correct, the router plugin is no longer being > >>> maintained. There was not much interest in the community for this project > >>> at the time and I have since moved on to other things. I’d be happy to > >>> help a new maintainer with any questions they may have. > >>> > >>> If you really want to just test it out, I suggest attempting to checkout > >>> a commit of VPP close to the last commit on the router plugin. Somewhere > >>> closely following VPP commit 0bfe5d8c792abcdb, “A Protocol Independent > >>> Hierarchical FIB (VPP-352)” will work (you might have to git bisect to > >>> get something that compiles right away). > >>> > >>> If necessary, I can submit a patch to remove the router plugin from the > >>> VPP sandbox with a note on the wiki page mentioning the finalization of > >>> the project. I recall there being an 8-month time limit for these the > >>> sandbox projects. > >>> > >>> -Jeff > >>> > >>> > >>> > >> > >> _______________________________________________ > >> vpp-dev mailing list > >> vpp-dev@lists.fd.io > >> https://lists.fd.io/mailman/listinfo/vpp-dev > -- > Pozdrowienia, > Łukasz Chrustek > > _______________________________________________ > vpp-dev mailing list > vpp-dev@lists.fd.io > https://lists.fd.io/mailman/listinfo/vpp-dev | > | > > > > -- > Pozdrawiam, > Łukasz Chrustek _______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev