Re: [vpp-dev] nat with multiple in single out

2018-01-17 Thread Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco)
Hi,

Please use "set interface nat44 in loop0 in loop1 in loop2 in loop3 out 
BondEthernet0" (you should set your one outside NAT interface only once).

Regards,
Matus

-Original Message-
From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Carlito Nueno
Sent: Wednesday, January 17, 2018 10:08 PM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] nat with multiple in single out

Hi,

I have 4 VLANs each with loopback interface and a tap interface. I want each of 
the tap interfaces to have access to the WAN (internet) via BondEthernet0 
interface. I am using ubuntu.

snat config:

nat44 add interface address BondEthernet0
set interface nat44 in loop0 out BondEthernet0   // gw addr 10.0.0.1 (ltap0)
set interface nat44 in loop1 out BondEthernet0   // gw 10.1.0.1 (ltap1)
set interface nat44 in loop2 out BondEthernet0   // gw 10.2.0.1 (ltap2)
set interface nat44 in loop3 out BondEthernet0   // gw 10.3.0.1 (ltap3)

I am setting route as:
sudo route add default gw 10.3.0.1 dev ltap3

I am not able to ping. (ping -I ltap3 google.com)

But when I change the order, move loop3 to second position or first position, I 
can ping via ltap3

nat44 add interface address BondEthernet0
set interface nat44 in loop0 out BondEthernet0   // gw addr 10.0.0.1 (ltap0)
set interface nat44 in loop3 out BondEthernet0   // gw 10.3.0.1 (ltap3)
set interface nat44 in loop1 out BondEthernet0   // gw 10.1.0.1 (ltap1)
set interface nat44 in loop2 out BondEthernet0   // gw 10.2.0.1 (ltap2)

I can only ping via whatever interfaces are set in first and second position.

Also when I have more than one set interface nat44, I see an error in the logs:
set interface nat44: add BondEthernet0 failed

when loop3 is in second position:

vpp# sh nat44 detail
NAT plugin mode: dynamic translations enabled
loop0 in
BondEthernet0 out
loop3 in
NAT44 pool addresses interfaces:
BondEthernet0
10.1.0.71
  tenant VRF independent
  0 busy udp ports
  0 busy tcp ports
  0 busy icmp ports
0 users, 1 outside addresses, 0 active sessions, 0 static mappings Hash table 
in2out-ed
0 active elements
0 free lists
0 linear search buckets
0 cache hits, 0 cache misses
Hash table out2in-ed
0 active elements
0 free lists
0 linear search buckets
0 cache hits, 0 cache misses

Thanks
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev


Re: [vpp-dev] Port mirroring support in vpp

2018-01-17 Thread John Lo (loj)
For VPP 18.01 and master, SPAN has been enhanced to allow port mirroring for 
interface in L2 mode such as ones in bridge domains. There is a “L2” argument 
added to the SPAN CLI/API which allow any interface, including vHost, to have 
packet replicated on its L2 input and/or output paths and be sent to the 
specified destination interface.

The CLI syntax for SPAN is now:
DBGvpp# set int span ?
  set interface span … set interface span  [l2] {disable | destination 
 [both|rx|tx]}

If you specify the “l2” keyword, packet replication will be performed on L2 
input and/or output packets on the specified interface. It should work for any 
interface in any bridge domain except BVI. For the BVI, SPAN can only replicate 
L2 input (and not output) packets.

Regards,
John

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Damjan Marion (damarion)
Sent: Wednesday, January 17, 2018 8:17 PM
To: Juraj Linkeš 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Port mirroring support in vpp

Have you tried with SPAN?


On 17 Jan 2018, at 10:07, Juraj Linkeš 
> wrote:

Hi VPP devs,

I’m trying to figure out whether it’s possible to set up port mirroring on a 
vhost-user port in VPP. The case I’m trying to make work is simple: I have 
traffic between two vms (using vhost-user ports) and I want to listen to that 
traffic, replicate it and send it somewhere else (to an interface, but 
preferably an ip).

I’ve looked into what’s available in VPP and there is some support for SPAN, 
but doesn’t seem to work with vhost-user interfaces (I wasn’t able to configure 
it). In fact, it only seems to be configurable on physical interfaces. Is this 
accurate?

Then there are clis for lawful intercept (set li), but the configuration 
doesn’t seem to do anything. Is this supported?

Is there some other way to achieve port mirroring on vhost-user interfaces in 
case the two above are not supported? It can be any unwieldy/hacky way (maybe 
setting something up with multicast?).

Thanks,
Juraj
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Port mirroring support in vpp

2018-01-17 Thread Damjan Marion (damarion)
Have you tried with SPAN?

On 17 Jan 2018, at 10:07, Juraj Linkeš 
> wrote:

Hi VPP devs,

I’m trying to figure out whether it’s possible to set up port mirroring on a 
vhost-user port in VPP. The case I’m trying to make work is simple: I have 
traffic between two vms (using vhost-user ports) and I want to listen to that 
traffic, replicate it and send it somewhere else (to an interface, but 
preferably an ip).

I’ve looked into what’s available in VPP and there is some support for SPAN, 
but doesn’t seem to work with vhost-user interfaces (I wasn’t able to configure 
it). In fact, it only seems to be configurable on physical interfaces. Is this 
accurate?

Then there are clis for lawful intercept (set li), but the configuration 
doesn’t seem to do anything. Is this supported?

Is there some other way to achieve port mirroring on vhost-user interfaces in 
case the two above are not supported? It can be any unwieldy/hacky way (maybe 
setting something up with multicast?).

Thanks,
Juraj
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] [tsc] [nsh_sfc-dev] Stepping down as NSH_SFC PTL

2018-01-17 Thread Ni, Hongjun
Hi all,

Thank you all for your great help and support!

Will continue to contribute and promote FD.io project.

Thanks again,
Hongjun

From: tsc-boun...@lists.fd.io [mailto:tsc-boun...@lists.fd.io] On Behalf Of Ed 
Warnicke
Sent: Thursday, January 18, 2018 12:07 AM
To: Kinsella, Ray 
Cc: t...@lists.fd.io; Zhou, Danny ; vpp-dev@lists.fd.io; 
nsh_sfc-...@lists.fd.io
Subject: Re: [tsc] [nsh_sfc-dev] [vpp-dev] Stepping down as NSH_SFC PTL

Ray,

Thanks for letting us know!

Honjun,

Congratulations!

Ed

On Wed, Jan 17, 2018 at 7:11 AM Kinsella, Ray 
> wrote:

Hongjun is elected as NSH_SFC PLT.
Trishan – can you make the update from the LF side?

Thanks and congrats Hongjun,

Ray K

From: tsc-boun...@lists.fd.io 
[mailto:tsc-boun...@lists.fd.io] On Behalf Of 
Keith Burns
Sent: Wednesday 10 January 2018 00:27
To: Zhou, Danny >
Cc: t...@lists.fd.io; 
nsh_sfc-...@lists.fd.io; 
vpp-dev@lists.fd.io
Subject: Re: [tsc] [vpp-dev] [nsh_sfc-dev] Stepping down as NSH_SFC PTL

+1 Hongjun!

On Jan 4, 2018 7:15 PM, "Zhou, Danny" 
> wrote:
+1 for Hongjun

From: a...@yunify.org 
[mailto:a...@yunify.org]
Sent: Friday, January 5, 2018 9:06 AM
To: Zhou, Danny >; 
t...@lists.fd.io; 
nsh_sfc-...@lists.fd.io
Cc: vpp-dev@lists.fd.io
Subject: Re: [nsh_sfc-dev] Stepping down as NSH_SFC PTL

+1

Thanks for all your hard work!

Ash

Ash Young
M: 408-628-7223

On Wed, Jan 3, 2018 at 8:32 PM -0600, "Zhou, Danny" 
> wrote:
Hi TSC,
I've been taking the NSH_SFC PTL role 1 year ago. It has been a pleasure, but 
also a burden as there are some personal reasons make me cannot focus on 
NSH_SFC anymore, so I am stepping down as NSH_SFC PTL with immediate effect. 
Additionally, I would like to nominate Hongjun Ni, who is the most active 
NSH_SFC maintainer in 2017, as new NSH_SFC PTL for his excellent contribution 
as below:

•  Upstreamed 42 patches totally cover Ingress Classifier, SFF, Egress 
Classifier, NSH-Proxy, NSH-aware NAT, MD-Type2, NSH over Ethernet and NSH TTL.

•  Published four NSH_SFC Releases: 17.01, 17.04, 17.07 and 17.10.

NSH_SFC maintainers,

Pls vote for Hongjun Ni by directly replying this email.

-Danny

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev
___
nsh_sfc-dev mailing list
nsh_sfc-...@lists.fd.io
https://lists.fd.io/mailman/listinfo/nsh_sfc-dev
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] vcl preload usage error

2018-01-17 Thread Liu, Chunmei
Hi all,

 I am a novice at vpp, I am trying to use 
LD_PRELOAD=/../../libvcl_ldpreload.so to run a native app with vpp, I got the 
following error:
vl_api_bind_sock_reply_t_handler:1000: [28874] ERROR: vpp handle 0x0, sid 4: 
bind failed: Address in use (-105)
2018-01-17 15:18:41.187 7fffe2b83700 -1 PosixStack listen unable to listen on 
0.0.0.0:6800/0: (111) Connection refused
vl_api_bind_sock_reply_t_handler:1000: [28874] ERROR: vpp handle 0x0, sid 5: 
bind failed: Address in use (-105)
2018-01-17 15:18:41.187 7fffe2b83700 -1 PosixStack listen unable to listen on 
0.0.0.0:6800/0: (111) Connection refused

And :
/usr/bin/vpp[29054]: transport_alloc_local_endpoint:293: no resolving interface 
for X.X.X.X
/usr/bin/vpp[29054]: vnet_connect: connect failed

What I missed in configure vpp?

Thanks a lot!
-Chunmei
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] nat with multiple in single out

2018-01-17 Thread Carlito Nueno
Hi,

I have 4 VLANs each with loopback interface and a tap interface. I
want each of the tap interfaces to have access to the WAN (internet)
via BondEthernet0 interface. I am using ubuntu.

snat config:

nat44 add interface address BondEthernet0
set interface nat44 in loop0 out BondEthernet0   // gw addr 10.0.0.1 (ltap0)
set interface nat44 in loop1 out BondEthernet0   // gw 10.1.0.1 (ltap1)
set interface nat44 in loop2 out BondEthernet0   // gw 10.2.0.1 (ltap2)
set interface nat44 in loop3 out BondEthernet0   // gw 10.3.0.1 (ltap3)

I am setting route as:
sudo route add default gw 10.3.0.1 dev ltap3

I am not able to ping. (ping -I ltap3 google.com)

But when I change the order, move loop3 to second position or first
position, I can ping via ltap3

nat44 add interface address BondEthernet0
set interface nat44 in loop0 out BondEthernet0   // gw addr 10.0.0.1 (ltap0)
set interface nat44 in loop3 out BondEthernet0   // gw 10.3.0.1 (ltap3)
set interface nat44 in loop1 out BondEthernet0   // gw 10.1.0.1 (ltap1)
set interface nat44 in loop2 out BondEthernet0   // gw 10.2.0.1 (ltap2)

I can only ping via whatever interfaces are set in first and second position.

Also when I have more than one set interface nat44, I see an error in the logs:
set interface nat44: add BondEthernet0 failed

when loop3 is in second position:

vpp# sh nat44 detail
NAT plugin mode: dynamic translations enabled
loop0 in
BondEthernet0 out
loop3 in
NAT44 pool addresses interfaces:
BondEthernet0
10.1.0.71
  tenant VRF independent
  0 busy udp ports
  0 busy tcp ports
  0 busy icmp ports
0 users, 1 outside addresses, 0 active sessions, 0 static mappings
Hash table in2out-ed
0 active elements
0 free lists
0 linear search buckets
0 cache hits, 0 cache misses
Hash table out2in-ed
0 active elements
0 free lists
0 linear search buckets
0 cache hits, 0 cache misses

Thanks
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev


Re: [vpp-dev] Heads up: VPPAPIGEN rewrite

2018-01-17 Thread Jon Loeliger
On Wed, Jan 17, 2018 at 2:25 AM, Ole Troan  wrote:

> Hi there,
>
> For a while there has been some interest in making the API language more
> explicit.
> This is a rewrite of the vppapigen generator with support for services {}
> (like grpc), enums, output plugins, better error checking.
>

The change is in:
> https://gerrit.fd.io/r/#/c/8781/
>
> The compiler generates the same output as before. As this has quite a few
> stake holders I will hold off for a week or so awaiting comments before
> asking for it to be published.
>
>
> Future planned features:
>  - unions
>  - bool, text
>  - array support (including length)
>  - proto3 output plugin
>  - Refactor C/C++ generator as a plugin
>  - Refactor Java generator as a plugin


Ole,

Can we add to the "Future Plans" list?
I would like to see it draw a correlation between a message's actual
list of fields and the attempt at a documentation for those fields.
Specifically, there always seems to be some discrepancy and it is
hard to tell which to believe without then going and reading the code.
If the fields and doc lines for the fields at least agreed on which fields
were present, that would be a start.

Thanks,
jdl
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] [nsh_sfc-dev] [tsc] Stepping down as NSH_SFC PTL

2018-01-17 Thread Ed Warnicke
Ray,

Thanks for letting us know!

Honjun,

Congratulations!

Ed

On Wed, Jan 17, 2018 at 7:11 AM Kinsella, Ray 
wrote:

>
>
> Hongjun is elected as NSH_SFC PLT.
>
> Trishan – can you make the update from the LF side?
>
>
>
> Thanks and congrats Hongjun,
>
>
>
> Ray K
>
>
>
> *From:* tsc-boun...@lists.fd.io [mailto:tsc-boun...@lists.fd.io] *On
> Behalf Of *Keith Burns
> *Sent:* Wednesday 10 January 2018 00:27
> *To:* Zhou, Danny 
> *Cc:* t...@lists.fd.io; nsh_sfc-...@lists.fd.io; vpp-dev@lists.fd.io
> *Subject:* Re: [tsc] [vpp-dev] [nsh_sfc-dev] Stepping down as NSH_SFC PTL
>
>
>
> +1 Hongjun!
>
>
>
> On Jan 4, 2018 7:15 PM, "Zhou, Danny"  wrote:
>
> +1 for Hongjun
>
>
>
> *From:* a...@yunify.org [mailto:a...@yunify.org]
> *Sent:* Friday, January 5, 2018 9:06 AM
> *To:* Zhou, Danny ; t...@lists.fd.io;
> nsh_sfc-...@lists.fd.io
> *Cc:* vpp-dev@lists.fd.io
> *Subject:* Re: [nsh_sfc-dev] Stepping down as NSH_SFC PTL
>
>
>
> +1
>
>
>
> Thanks for all your hard work!
>
>
>
> Ash
>
>
>
> Ash Young
>
> M: 408-628-7223 <(408)%20628-7223>
>
>
>
> On Wed, Jan 3, 2018 at 8:32 PM -0600, "Zhou, Danny" 
> wrote:
>
> Hi TSC,
>
> I've been taking the NSH_SFC PTL role 1 year ago. It has been a pleasure,
> but also a burden as there are some personal reasons make me cannot focus
> on NSH_SFC anymore, so I am stepping down as NSH_SFC PTL with immediate
> effect. Additionally, I would like to nominate Hongjun Ni, who is the
> most active NSH_SFC maintainer in 2017, as new NSH_SFC PTL for his
> excellent contribution as below:
>
> l  Upstreamed 42 patches totally cover Ingress Classifier, SFF, Egress
> Classifier, NSH-Proxy, NSH-aware NAT, MD-Type2, NSH over Ethernet and NSH
> TTL.
>
> l  Published four NSH_SFC Releases: 17.01, 17.04, 17.07 and 17.10.
>
>
>
> NSH_SFC maintainers,
>
>
>
> Pls vote for Hongjun Ni by directly replying this email.
>
>
>
> -Danny
>
>
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev
>
> ___
> nsh_sfc-dev mailing list
> nsh_sfc-...@lists.fd.io
> https://lists.fd.io/mailman/listinfo/nsh_sfc-dev
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Create an arc

2018-01-17 Thread Dave Barach (dbarach)
Dear Korian,

Steering traffic from ip4_lookup to  is easily accomplished by 
setting the fib result [dpo->dpoi_next_node] to send matching traffic where you 
want it to go. 

Add an arc from ip4/6_lookup to  by calling vlib_node_add_next(...) 
to create the arc, then create fib entries with dpoi_next_node set to the 
returned next_index.

This is not a feature arc problem. Attempting to solve it as such will cause no 
end of trouble. 

Neale, please jump in as needed...

HTH... Dave

-Original Message-
From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of korian edeline
Sent: Wednesday, January 17, 2018 9:30 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Create an arc

Hi all,

Here is the deal:

I have 2 nodes (my-node-1, my-node-2),  I would like my-node-1 to receive 
packets from ip4-lookup, forwarding to either ip4-rewrite, error-drop or 
my-node-2. my-node-2 should only receive from my-node-1 and forward to 
ip4-rewrite or error-drop.

If I put them BEFORE ip4-lookup, i can use pre-built arc ip4-unicast and 
everything works perfect. But i figured that if i want them after ip4-lookup, i 
have to create my own arc. So here is what i have, plus replacing occurences of 
"ip4-unicast" by "my-arc".

VNET_FEATURE_ARC_INIT (my_arc, static) = {
   .arc_name = "my-arc,
   .start_nodes = VNET_FEATURES ("ip4-lookup"),
   .arc_index_ptr = _main.feature_arc_index };

What am i missing  ?

Thanks

Korian

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] [tsc] [nsh_sfc-dev] Stepping down as NSH_SFC PTL

2018-01-17 Thread Kinsella, Ray

Hongjun is elected as NSH_SFC PLT.
Trishan – can you make the update from the LF side?

Thanks and congrats Hongjun,

Ray K

From: tsc-boun...@lists.fd.io [mailto:tsc-boun...@lists.fd.io] On Behalf Of 
Keith Burns
Sent: Wednesday 10 January 2018 00:27
To: Zhou, Danny 
Cc: t...@lists.fd.io; nsh_sfc-...@lists.fd.io; vpp-dev@lists.fd.io
Subject: Re: [tsc] [vpp-dev] [nsh_sfc-dev] Stepping down as NSH_SFC PTL

+1 Hongjun!

On Jan 4, 2018 7:15 PM, "Zhou, Danny" 
> wrote:
+1 for Hongjun

From: a...@yunify.org 
[mailto:a...@yunify.org]
Sent: Friday, January 5, 2018 9:06 AM
To: Zhou, Danny >; 
t...@lists.fd.io; 
nsh_sfc-...@lists.fd.io
Cc: vpp-dev@lists.fd.io
Subject: Re: [nsh_sfc-dev] Stepping down as NSH_SFC PTL

+1

Thanks for all your hard work!

Ash

Ash Young
M: 408-628-7223

On Wed, Jan 3, 2018 at 8:32 PM -0600, "Zhou, Danny" 
> wrote:
Hi TSC,
I've been taking the NSH_SFC PTL role 1 year ago. It has been a pleasure, but 
also a burden as there are some personal reasons make me cannot focus on 
NSH_SFC anymore, so I am stepping down as NSH_SFC PTL with immediate effect. 
Additionally, I would like to nominate Hongjun Ni, who is the most active 
NSH_SFC maintainer in 2017, as new NSH_SFC PTL for his excellent contribution 
as below:

•  Upstreamed 42 patches totally cover Ingress Classifier, SFF, Egress 
Classifier, NSH-Proxy, NSH-aware NAT, MD-Type2, NSH over Ethernet and NSH TTL.

•  Published four NSH_SFC Releases: 17.01, 17.04, 17.07 and 17.10.

NSH_SFC maintainers,

Pls vote for Hongjun Ni by directly replying this email.

-Danny

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Port mirroring support in vpp

2018-01-17 Thread Juraj Linkeš
Hi VPP devs,

I'm trying to figure out whether it's possible to set up port mirroring on a 
vhost-user port in VPP. The case I'm trying to make work is simple: I have 
traffic between two vms (using vhost-user ports) and I want to listen to that 
traffic, replicate it and send it somewhere else (to an interface, but 
preferably an ip).

I've looked into what's available in VPP and there is some support for SPAN, 
but doesn't seem to work with vhost-user interfaces (I wasn't able to configure 
it). In fact, it only seems to be configurable on physical interfaces. Is this 
accurate?

Then there are clis for lawful intercept (set li), but the configuration 
doesn't seem to do anything. Is this supported?

Is there some other way to achieve port mirroring on vhost-user interfaces in 
case the two above are not supported? It can be any unwieldy/hacky way (maybe 
setting something up with multicast?).

Thanks,
Juraj
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] How can i setup multi-vrf mpls configuration in vpp?

2018-01-17 Thread Neale Ranns (nranns)
Hi Reza,

I would suggest you start with this:
  https://wiki.fd.io/view/VPP/MPLS_FIB

and then if you’ve further questions, perhaps a diagram outlining what you 
would like to configure.

Regards,
neale

From:  on behalf of "mirzaei.reza" 

Date: Wednesday, 17 January 2018 at 10:50
To: Vpp Dev 
Subject: [vpp-dev] How can i setup multi-vrf mpls configuration in vpp?


Hi

I want to know how can i setup multi-vrf mpls configuration in vpp? Is there 
any documents that describe this matter?

Best regards

Reza
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] How can i setup multi-vrf mpls configuration in vpp?

2018-01-17 Thread mirzaei.reza
Hi 

I want to know how can i setup multi-vrf mpls configuration in vpp? Is
there any documents that describe this matter? 

Best regards 

Reza___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Heads up: VPPAPIGEN rewrite

2018-01-17 Thread Ole Troan
Hi there,

For a while there has been some interest in making the API language more 
explicit.
This is a rewrite of the vppapigen generator with support for services {} (like 
grpc), enums, output plugins, better error checking.
Currently supported is C/JSON output plugins.

It also removes the need for compiling native tools from the build process.

Implemented in Python PLY, and currently runs about two orders of magnitude 
slower than the C version.
(150ms to process a 30KB input file versus 2ms for the C version).

The change is in:
https://gerrit.fd.io/r/#/c/8781/

The compiler generates the same output as before. As this has quite a few stake 
holders I will hold off for a week or so awaiting comments before asking for it 
to be published.

Commit comments:

VPPAPIGEN: vppapigen replacement in Python PLY.

This is a version of the VPP API generator in Python PLY. It supports
the existing language, and has a plugin architecture for generators.
Currently C and JSON are supported.

Changes:
 - vl_api_version changed to option version = "major.minor.patch"
 - enum support
 - Better error checking and reporting
 - import support (removed the C pre-processor)
 - services (tying request/reply together), support for events.
 - plugin architecture for output modules (C (server side) and JSON 
supported now).

Version:
 option version = "1.0.0";

Enum:
 enum colours {
   RED,
   BLUE = 50,
 };
 define foo {
  vl_api_colours_t colours;
 };

Services:
 service {
  rpc foo returns foo_reply;
  rpc foo_dump returns stream foo_details;
  rpc want_stats returns want_stats_reply
  events ip4_counters, ip6_counters;
 };

Future planned features:
 - unions
 - bool, text
 - array support (including length)
 - proto3 output plugin
 - Refactor C/C++ generator as a plugin
 - Refactor Java generator as a plugin


Cheers,
Ole


signature.asc
Description: Message signed with OpenPGP
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev