Re: [vpp-dev] VPP/How To Build The Sample Plugin

2017-06-02 Thread Luke, Chris
It should be possible to set the shm permissions such that vpp_api_test can be 
run as a non-privileged user; that being the case, don’t use the vppctl wrapper 
script, just invoke vat directly.

Note I’ve not tested this in a while; but we did make it possible last year 
iirc.

Chris.

From: Burt Silverman [mailto:bur...@gmail.com]
Sent: Friday, June 2, 2017 17:54
To: Damjan Marion (damarion) ; Dave Barach 

Cc: Kinsella, Ray ; Luke, Chris 
; Alessio Silvestro ; 
vpp-dev 
Subject: Re: [vpp-dev] VPP/How To Build The Sample Plugin

OK, I figured out how to patch code to add a vat_plugin_path option to 
/etc/vpp/startup.conf, but that was not the answer to the immediate issue, 
regarding my failure to get output from "show pci" under vppctl, when running 
from /home/burt/vpp/build-root/install-vpp-native/vpp/bin.
The issue is that vppctl wants to run a command in this directory as sudo. The 
command is not found because of sudo. There are two fixes in addition to 
building and installing packages:
1. Copy the program vpp_api_test from the aforementioned directory to /usr/bin.
The problem with this approach is that you have to know each time you build 
whether you have changed vpp_api_test and hence need to recopy it to /usr/bin.
2. Use sudoedit to add your bin directory (like 
/home/burt/vpp/build-root/install-vpp-native/vpp/bin) to the secure_path in the 
/etc/sudoers file.
Then  you are good for as long as you do not change the location of your 
tree.
Forgive me for hijacking this sample vpp-plugin thread for a slightly different 
discussion.
Perhaps someone can let me know if this appears usable, or close to usable, or 
far!

[burt@localhost ~/vpp/src/vpp]$git diff .
diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c
index ade32aa..1bc190f 100644
--- a/src/vpp/vnet/main.c
+++ b/src/vpp/vnet/main.c
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include "vat/vat.h"


 static void
@@ -162,6 +163,11 @@ main (int argc, char *argv[])
  if (i < (argc - 1))
vlib_plugin_path = argv[++i];
}
+  else if (!strncmp (argv[i], "vat_plugin_path", 15))
+   {
+ if (i < (argc - 1))
+   vat_plugin_path = argv[++i];
+   }
   else if (!strncmp (argv[i], "heapsize", 8))
{
  sizep = (u8 *) argv[i + 1];
@@ -252,6 +258,16 @@ plugin_path_config (vlib_main_t * vm, unformat_input_t * in

 VLIB_CONFIG_FUNCTION (plugin_path_config, "plugin_path");

+static clib_error_t *
+vat_plugin_path_config (vlib_main_t * vm, unformat_input_t * input)
+{
+  clib_error_t *error;
+
+  error = plugin_path_config (vm, input);
+  return error;
+}
+VLIB_CONFIG_FUNCTION (vat_plugin_path_config, "vat_plugin_path");
+
 void vl_msg_api_post_mortem_dump (void);
 void elog_post_mortem_dump (void);

Burt


On Thu, Jun 1, 2017 at 1:43 PM, Burt Silverman 
> wrote:
Oh, man, that (referring to my last post) is some tricky stuff. My reaction 
reminds me of one of my colleagues reaction years ago when I created some 
firmware that would only fit in flash by using an AIX C compiler optimization 
trick that discarded uncalled functions. After I told him the solution he 
required, he exclaimed loudly, "OH, I THINK IT STINKS." Now, one of my issues, 
not the primary question, but the "stinks" issue, is that there are at least 
two unique load_one_plugin functions that behave differently but both show up 
in the log as "load_one_plugin."
OK, the function in vlib/unix/plugin.c will not accept my vpp_api_test_plugins 
even though I have them in the plugin path I configured in 
/etc/vpp/startup.conf, because they do not have section 
vlib_plugin_registration in the ELF. I think there is a separate 
vat_plugin_path that is hard coded to /usr/lib/vpp_api_test_plugins in 
vpp/api/plugin.c. How can I configure this so that I can have these vat plugins 
in $TOP/build-root/install-vpp-native/vpp/lib64/vpp_api_test_plugins? As I have 
mentioned earlier, I am trying to come up with a developer work flow that does 
not require building and installing packages.
Burt

On Wed, May 31, 2017 at 3:56 PM, Burt Silverman 
> wrote:
Damjan,
I have a related question, but it does not involve the sample-plugin. I wish to 
"make build-release" and then adjust my plugin path in /etc/vpp/startup.conf to 
use the plugin directories underneath 
TOP/build-root/install-vpp-native/vpp/lib64. Well it seems that the plugins in 
directory vpp_plugins are acceptable, but the ones in vpp_api_test_plugins are 
not. I end up with a result like:

[burt@localhost ~]$source ./vpp.sh
[sudo] password for burt:
vlib_plugin_early_init:356: plugin path 
/home/burt/vpp/build-root/install-vpp-native/vpp/lib64/vpp_plugins:/home/burt/vpp/build-root/install-vpp-native/vpp/lib64/vpp_api_test_plugins

Re: [vpp-dev] Subif/VLAN Questions

2017-06-02 Thread John Lo (loj)
Hi Jon,

The difference between the two sub-interface create APIs is that 
create_vlan_subif is typically used for creating a  sub-interface for L3 IP 
forwarding where you just specify two parameters: sw_if_index of the main 
interface and the VLAN ID. It create a sub-interface using the same VLAN ID as 
the sub-interface .N value, doing exact match on a dot1q VLAN tag of the  
specified ID value. 

The create_subif API is the generic sub-interface creation API where you can 
specify sub-interface more flexibly, such as sub-interface ID (so that you can 
choose to be the same or different to that of VLAN ID), how many VLAN tags, 
dot1ad or not (i.e. dot1q), exact match or not (i.e. best match with at least 
that number of VLAN tags), default sub-interface, sub-interface without VLAN 
tags, etc. With this API there are 10 parameters to specify to provide the 
ability to create more flexible sub-interface classification for L2 forwarding.

More explanation of sub-interface classification of packets can be found in the 
comments to the sub-interface creation CLI "create sub-interfaces" in 
src/vnet/interface_cli.c, starting at around  line 737, where the CLI also have 
an abbreviated form matching that of the simpler create_vlan_subif API.

As for deleting a VTR operation on an interface, it is achieved using the VTR 
API using L2_VTR_DISABLED for the parameter vtr_op.  I agree with you the 
"DISABLE" naming may the impression VTR operation is still present but 
disabled.  The fact is that it is deleted and there is no way to "enable" the 
VTR operation that was "disabled". 

As for using u32 for all VTR API parameters, I don't know of any justification 
other than that it was coded this way since day one and never been cleaned up. 
Both push_dot1q and vtr_op can be u8; tag1 and tag2 can be u16.

Regards,
John

-Original Message-
From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Jon Loeliger
Sent: Friday, June 02, 2017 10:26 AM
To: vpp-dev 
Subject: [vpp-dev] Subif/VLAN Questions

Hey Audience,

Guess what!  (What?)

I have another set of questions!

This time, VLAN/Subif related.  Start with the easy one:  Is the API call 
create_vlan_subif slated for removal or deprecation?  I think it should be.
It seems to me to be totally redundant and a subset of the more general API 
call create_subif.  Under the covers, they resolve to an identical SW interface 
creation function as well.  Or have I missed something here?

So the mystery question now:  Why is there no mechanism to delete an
L2 interface VLAN tag rewrite rule?  Sure, one can apply a "disable"
operation to the subif, but that is not the same as removing the rewrite rule.  
Is it expected that the user will just remove the whole subif to achieve this 
effect?

And the question of inconsistency:  Why does the l2_interface_vlan_tag_rewrite 
API call only use u32 values, even for fields that are clearly only, say, a u16 
or u8?  Seems like everywhere else things have been meticulously sized; just 
not on this call.

Thanks,
jdl
___
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] VPP/How To Build The Sample Plugin

2017-06-02 Thread Burt Silverman
OK, I figured out how to patch code to add a vat_plugin_path option to
/etc/vpp/startup.conf, but that was not the answer to the immediate issue,
regarding my failure to get output from "show pci" under vppctl, when
running from /home/burt/vpp/build-root/install-vpp-native/vpp/bin.

The issue is that vppctl wants to run a command in this directory as sudo.
The command is not found because of sudo. There are two fixes in addition
to building and installing packages:

1. Copy the program vpp_api_test from the aforementioned directory to
/usr/bin.
The problem with this approach is that you have to know each time you
build whether you have changed vpp_api_test and hence need to recopy it to
/usr/bin.

2. Use sudoedit to add your bin directory (like
/home/burt/vpp/build-root/install-vpp-native/vpp/bin) to the secure_path in
the /etc/sudoers file.
Then  you are good for as long as you do not change the location of
your tree.

Forgive me for hijacking this sample vpp-plugin thread for a slightly
different discussion.

Perhaps someone can let me know if this appears usable, or close to usable,
or far!

[burt@localhost ~/vpp/src/vpp]$git diff .
diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c
index ade32aa..1bc190f 100644
--- a/src/vpp/vnet/main.c
+++ b/src/vpp/vnet/main.c
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include "vat/vat.h"


 static void
@@ -162,6 +163,11 @@ main (int argc, char *argv[])
  if (i < (argc - 1))
vlib_plugin_path = argv[++i];
}
+  else if (!strncmp (argv[i], "vat_plugin_path", 15))
+   {
+ if (i < (argc - 1))
+   vat_plugin_path = argv[++i];
+   }
   else if (!strncmp (argv[i], "heapsize", 8))
{
  sizep = (u8 *) argv[i + 1];
@@ -252,6 +258,16 @@ plugin_path_config (vlib_main_t * vm, unformat_input_t
* in

 VLIB_CONFIG_FUNCTION (plugin_path_config, "plugin_path");

+static clib_error_t *
+vat_plugin_path_config (vlib_main_t * vm, unformat_input_t * input)
+{
+  clib_error_t *error;
+
+  error = plugin_path_config (vm, input);
+  return error;
+}
+VLIB_CONFIG_FUNCTION (vat_plugin_path_config, "vat_plugin_path");
+
 void vl_msg_api_post_mortem_dump (void);
 void elog_post_mortem_dump (void);

Burt


On Thu, Jun 1, 2017 at 1:43 PM, Burt Silverman  wrote:

> Oh, man, that (referring to my last post) is some tricky stuff. My
> reaction reminds me of one of my colleagues reaction years ago when I
> created some firmware that would only fit in flash by using an AIX C
> compiler optimization trick that discarded uncalled functions. After I told
> him the solution he required, he exclaimed loudly, "OH, I THINK IT STINKS."
> Now, one of my issues, not the primary question, but the "stinks" issue, is
> that there are at least two unique load_one_plugin functions that behave
> differently but both show up in the log as "load_one_plugin."
>
> OK, the function in vlib/unix/plugin.c will not accept my
> vpp_api_test_plugins even though I have them in the plugin path I
> configured in /etc/vpp/startup.conf, because they do not have section
> vlib_plugin_registration in the ELF. I think there is a separate
> vat_plugin_path that is hard coded to /usr/lib/vpp_api_test_plugins in
> vpp/api/plugin.c. How can I configure this so that I can have these vat
> plugins in $TOP/build-root/install-vpp-native/vpp/lib64/vpp_api_test_plugins?
> As I have mentioned earlier, I am trying to come up with a developer work
> flow that does not require building and installing packages.
>
> Burt
>
> On Wed, May 31, 2017 at 3:56 PM, Burt Silverman  wrote:
>
>> Damjan,
>>
>> I have a related question, but it does not involve the sample-plugin. I
>> wish to "make build-release" and then adjust my plugin path in
>> /etc/vpp/startup.conf to use the plugin directories underneath
>> TOP/build-root/install-vpp-native/vpp/lib64. Well it seems that the
>> plugins in directory vpp_plugins are acceptable, but the ones in
>> vpp_api_test_plugins are not. I end up with a result like:
>>
>> [burt@localhost ~]$source ./vpp.sh
>> [sudo] password for burt:
>> vlib_plugin_early_init:356: plugin path /home/burt/vpp/build-root/inst
>> all-vpp-native/vpp/lib64/vpp_plugins:/home/burt/vpp/build-
>> root/install-vpp-native/vpp/lib64/vpp_api_test_plugins
>> load_one_plugin:184: Loaded plugin: acl_plugin.so (Access Control Lists)
>> load_one_plugin:83: Not a plugin: acl_test_plugin.so
>> load_one_plugin:184: Loaded plugin: dpdk_plugin.so (Data Plane
>> Development Kit (DPDK))
>> load_one_plugin:83: Not a plugin: dpdk_test_plugin.so
>> load_one_plugin:184: Loaded plugin: flowperpkt_plugin.so (Flow per Packet)
>> load_one_plugin:83: Not a plugin: flowperpkt_test_plugin.so
>> ...
>> load_one_plugin:63: Loaded plugin: /usr/lib/vpp_api_test_plugins/
>> acl_test_plugin.so
>> load_one_plugin:63: Loaded plugin: /usr/lib/vpp_api_test_plugins/
>> dpdk_test_plugin.so
>> load_one_plugin:63: Loaded plugin: 

Re: [vpp-dev] Build failures on master

2017-06-02 Thread Ed Kern (ejk)
Tomas,

Just another data point for you/whomever its not specific to forking..
If you do a shallow clone  —depth=1 you will get the same error on build…

Ed




On Jun 2, 2017, at 12:49 AM, Tomas Brännström 
> wrote:

No it's the same :-(

One thing though: when I get these errors I clone from a fork of the vpp repo 
that we made. Is there some kind of git-hook that creates these version 
files/update the .deb files with a version when cloning from the main vpp 
gerrit repository, that might not fire when cloning from a fork?

/Tomas

On 1 June 2017 at 19:02, Florin Coras 
> wrote:
Hi Tomas,

That sure is weird.

(backup everything that’s not in git)
git clean -fdx
make bootstrap
make build

Do you still see the issue?

HTH,
Florin

On Jun 1, 2017, at 6:18 AM, Tomas Brännström 
> wrote:

Hi
I'm getting build errors when trying to build a recent commit on the master 
branch:

/home/ubuntu/git/vpp/build-data/../src/vnet/tcp/builtin_client.c:25:29: fatal 
error: vpp/app/version.h: No such file or directory
 #include 
 ^
compilation terminated.

I'm building using the "extras/vagrant/build.sh" script (or 
"build-root/vagrant/build.sh" in slightly earlier versions). What's strange 
here is that I built it successfully on the exact same commit yesterday on 
another machine. The commit in question is 
79ea7ec3b3c04d334a21107818c64d70c42b99ae but I tried on the latest master as 
well.

Also, I tried to build an earlier version (git tag v17.07-rc0) and got another 
error, where the .deb files could not be built  because the "version" was 
missing. I don't have the exact printout though.

Am I missing something here? I'm trying to build in an ubuntu trusty server 
install, and it has worked before.

/Tomas

___
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 mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Subif/VLAN Questions

2017-06-02 Thread Jon Loeliger
Hey Audience,

Guess what!  (What?)

I have another set of questions!

This time, VLAN/Subif related.  Start with the easy one:  Is the API call
create_vlan_subif slated for removal or deprecation?  I think it should be.
It seems to me to be totally redundant and a subset of the more general
API call create_subif.  Under the covers, they resolve to an identical SW
interface creation function as well.  Or have I missed something here?

So the mystery question now:  Why is there no mechanism to delete an
L2 interface VLAN tag rewrite rule?  Sure, one can apply a "disable"
operation to the subif, but that is not the same as removing the rewrite
rule.  Is it expected that the user will just remove the whole subif to
achieve this effect?

And the question of inconsistency:  Why does the l2_interface_vlan_tag_rewrite
API call only use u32 values, even for fields that are clearly only, say, a u16
or u8?  Seems like everywhere else things have been meticulously sized; just
not on this call.

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


Re: [vpp-dev] VPP Node Debug

2017-06-02 Thread otroan
Alessio,

Run in the foreground with unix { interactive }.
And directly from a the build directory.
The vagrant stuff is mostly useful for demo and first look. Sounds like you 
really want to do some development.

Cheers,
Ole

> On 2 Jun 2017, at 13:31, Alessio Silvestro  wrote:
> 
> I am running the vagrant machine provided, so I run on Ubuntu 16.04.02 TLS.
> 
> I tried clib_warning(), clib_unix_warning(), clib_error() and 
> clib_unix_error().
> 
> I inserted that line in both vvp/src/vnet/ip/punt.c and 
> vpp/src/vnet/ip/ip4_forward.c  in order to be sure that the packet was 
> actually reaching the node.
> 
> However, there is no sign in /var/log/syslog or anywhere else I can think of 
> about that message
> 
> Are you sure there is no other place where they can be printed?
> 
> Thanks for the cooperation,
> Alessio
> 
> On Thu, Jun 1, 2017 at 7:26 PM, John Lo (loj)  wrote:
> The output of clib_warning() call should be in the syslog. If running vpp in 
> Ubuntu, take a look in /var/log/syslog.  -John
> 
> 
> 
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Alessio Silvestro
> Sent: Thursday, June 01, 2017 12:11 PM
> To: Luke, Chris 
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] VPP Node Debug
> 
> 
> 
> I knew VPP run in user space and that printk is not the best option, however 
> from the documentation it is not clear to me how to do that.
> 
> 
> 
> For example now I inserted the command clib_warning("I am here!") in the node 
> I create -- that from vppctl show trace I can see processes the packets.
> 
> 
> 
> Where does it prints?
> 
> 
> 
> Still I cannot figure it out.
> 
> 
> 
> Thanks,
> 
> Alessio
> 
> 
> 
> On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris  wrote:
> 
> printk() is typically a kernel thing, no? This isn’t kernel code. 
> 
> 
> 
> If you just want stuff on the console when running in a debugger, or 
> interactively, clib_warning() may be what you are looking for.
> 
> 
> 
> Chris.
> 
> 
> 
> 
> 
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Alessio Silvestro
> Sent: Thursday, June 1, 2017 10:35
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] VPP Node Debug
> 
> 
> 
> Hi all,
> 
> 
> 
> I am using this code "https://gerrit.fd.io/r/#/c/6721/; to in order to enable 
> an external process to receive UDP packets.
> 
> 
> 
> I tried to use printk -- including module.h in the c file.
> 
> 
> 
> When I compile VPP with:
> 
> 
> 
> TOPDIR/vpp make build-release
> 
> 
> 
> I got the following error
> 
> 
> 
> fatal error: linux/module.h: No such file or directory
> 
> compilation terminated.
> 
> 
> 
> Do you have any idea why?
> 
> 
> 
> Is there a better way to debug the code of a node in VPP?
> 
> 
> 
> Thanks,
> 
> Alessio
> 
> 
> 
> 
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev



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

Re: [vpp-dev] VPP Node Debug

2017-06-02 Thread Alessio Silvestro
I am running the vagrant machine provided, so I run on Ubuntu 16.04.02 TLS.

I tried clib_warning(), clib_unix_warning(), clib_error() and
clib_unix_error().

I inserted that line in both vvp/src/vnet/ip/punt.c and
vpp/src/vnet/ip/ip4_forward.c  in order to be sure that the packet was
actually reaching the node.

However, there is no sign in /var/log/syslog or anywhere else I can think
of about that message

Are you sure there is no other place where they can be printed?

Thanks for the cooperation,
Alessio

On Thu, Jun 1, 2017 at 7:26 PM, John Lo (loj)  wrote:

> The output of clib_warning() call should be in the syslog. If running vpp
> in Ubuntu, take a look in /var/log/syslog.  -John
>
>
>
> *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On
> Behalf Of *Alessio Silvestro
> *Sent:* Thursday, June 01, 2017 12:11 PM
> *To:* Luke, Chris 
> *Cc:* vpp-dev@lists.fd.io
> *Subject:* Re: [vpp-dev] VPP Node Debug
>
>
>
> I knew VPP run in user space and that printk is not the best option,
> however from the documentation it is not clear to me how to do that.
>
>
>
> For example now I inserted the command clib_warning("I am here!") in the
> node I create -- that from vppctl show trace I can see processes the
> packets.
>
>
>
> Where does it prints?
>
>
>
> Still I cannot figure it out.
>
>
>
> Thanks,
>
> Alessio
>
>
>
> On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris 
> wrote:
>
> printk() is typically a kernel thing, no? This isn’t kernel code. 
>
>
>
> If you just want stuff on the console when running in a debugger, or
> interactively, clib_warning() may be what you are looking for.
>
>
>
> Chris.
>
>
>
>
>
> *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On
> Behalf Of *Alessio Silvestro
> *Sent:* Thursday, June 1, 2017 10:35
> *To:* vpp-dev@lists.fd.io
> *Subject:* [vpp-dev] VPP Node Debug
>
>
>
> Hi all,
>
>
>
> I am using this code "https://gerrit.fd.io/r/#/c/6721/; to in order to
> enable an external process to receive UDP packets.
>
>
>
> I tried to use printk -- including module.h in the c file.
>
>
>
> When I compile VPP with:
>
>
>
> TOPDIR/vpp make build-release
>
>
>
> I got the following error
>
>
>
> fatal error: linux/module.h: No such file or directory
>
> compilation terminated.
>
>
>
> Do you have any idea why?
>
>
>
> Is there a better way to debug the code of a node in VPP?
>
>
>
> Thanks,
>
> Alessio
>
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] MPLS L3VPN PING FAILED

2017-06-02 Thread Neale Ranns (nranns)

Hi Xyxue,

L3VPN should work directly from master branch. So yes, clone from 
https://gerrit.fd.io/r/vpp.

In my opinion, the best way to try out a gerrit patch is to:
  git review –d 

for example to get the L2VPN code it’s;
  git review –d 6861

this will create a new branch it your git repro. Saves you managing various 
patch files.

Regards,
neale

From: 薛欣颖 
Date: Friday, 2 June 2017 at 07:20
To: "Neale Ranns (nranns)" , vpp-dev 
Subject: Re: Re: [vpp-dev] MPLS L3VPN PING FAILED

Hi Neale,

These patches you upload have something conflict with the  master branch.I 
can't add all the patches.
Can I use' git clone https://gerrit.fd.io/r/vpp 'to get the vpp  code with your 
pathes?

Thanks,
xyxue


From: Neale Ranns (nranns)
Date: 2017-05-31 18:09
To: 薛欣颖; vpp-dev
Subject: Re: [vpp-dev] MPLS L3VPN PING FAILED
Hi Xyxue,

The MPLS config works for me with:
  DBGvpp# sh version
   vpp v17.07-rc0~314-g79ea7ec built by vagrant on localhost at Wed May 31 
00:46:42 PDT 2017
which is master branch from a few hours ago.

Regards,
neale

Packet 1

00:09:02:603978: af-packet-input
  af_packet: hw_if_index 1 next-index 4
tpacket2_hdr:
  status 0x2001 len 98 snaplen 98 mac 66 net 80
  sec 0x592e95b3 nsec 0x8466a6e vlan 0 vlan_tpid 0
00:09:02:604038: ethernet-input
  IP4: 3a:4c:48:ed:59:c3 -> 02:fe:1a:e1:c5:4c
00:09:02:604054: ip4-input
  ICMP: 192.168.2.20 -> 192.168.3.20
tos 0x00, ttl 64, length 84, checksum 0x26b8
fragment id 0x8d78, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x1c3e
00:09:02:604062: ip4-lookup
  fib 1 dpo-idx 3 flow hash: 0x
  ICMP: 192.168.2.20 -> 192.168.3.20
tos 0x00, ttl 64, length 84, checksum 0x26b8
fragment id 0x8d78, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x1c3e
00:09:02:604072: ip4-mpls-label-imposition
mpls-header:[33:63:0:eos]
00:09:02:604081: mpls-midchain
  adj-idx 5 : mpls via 0.0.0.0  mpls-tunnel0:
  stacked-on:
[@5]: dpo-load-balance: [proto:mpls index:32 buckets:1 uRPF:-1 to:[0:0] 
via:[43:3784]]
  [0] [@6]: mpls-label:[1]:[34:255:0:neos]
  [@1]: mpls via 2.1.1.2 host-vcore-link-1: 
02feb30a3b6f02fe4eafc6638847 flow hash: 0x

00:09:02:604088: adj-midchain-tx
  adj-midchain:[5]:mpls via 0.0.0.0  mpls-tunnel0:
  stacked-on:
[@5]: dpo-load-balance: [proto:mpls index:32 buckets:1 uRPF:-1 to:[0:0] 
via:[43:3784]]
  [0] [@6]: mpls-label:[1]:[34:255:0:neos]
  [@1]: mpls via 2.1.1.2 host-vcore-link-1: 02feb30a3b6f02fe4eafc6638847
00:09:02:604096: mpls-label-imposition
mpls-header:[34:255:0:neos]
00:09:02:604100: mpls-output
  adj-idx 4 : mpls via 2.1.1.2 host-vcore-link-1: 02feb30a3b6f02fe4eafc6638847 
flow hash: 0x
  : 
  0020: 
00:09:02:604102: host-vcore-link-1-output
  host-vcore-link-1
  MPLS: 02:fe:4e:af:c6:63 -> 02:fe:b3:0a:3b:6f
  label 34 exp 0, s 0, ttl 255

Packet 2

00:09:02:604968: af-packet-input
  af_packet: hw_if_index 2 next-index 4
tpacket2_hdr:
  status 0x2001 len 106 snaplen 106 mac 66 net 80
  sec 0x592e95b3 nsec 0x84c97da vlan 0 vlan_tpid 0
00:09:02:604978: ethernet-input
  MPLS: 02:fe:b3:0a:3b:6f -> 02:fe:4e:af:c6:63
00:09:02:604987: mpls-input
  MPLS: next mpls-lookup[1]  label 1024 ttl 255
00:09:02:604993: mpls-lookup
  MPLS: next [8], lookup fib index 0, LB index 34 hash 0 label 1024 eos 0
00:09:02:605000: lookup-mpls-dst
 fib-index:0 hdr:[1023:63:0:eos] load-balance:33
00:09:02:605005: ip4-mpls-label-disposition
  disp:0
00:09:02:605008: lookup-ip4-dst
 fib-index:1 addr:192.168.2.20 load-balance:35
00:09:02:605014: ip4-rewrite
  tx_sw_if_index 1 dpo-idx 6 : ipv4 via 192.168.2.20 host-vce-link-1: 
3a4c48ed59c302fe1ae1c54c0800 flow hash: 0x
  : 3a4c48ed59c302fe1ae1c54c08004554e9fd3e010c33c0a80314c0a8
  0020: 0214243e07d20010b3952e59311e02001011
00:09:02:605018: host-vce-link-1-output
  host-vce-link-1
  IP4: 02:fe:1a:e1:c5:4c -> 3a:4c:48:ed:59:c3
  ICMP: 192.168.3.20 -> 192.168.2.20
tos 0x00, ttl 62, length 84, checksum 0x0c33
fragment id 0xe9fd
  ICMP echo_reply checksum 0x243e







From: 薛欣颖 
Date: Wednesday, 31 May 2017 at 08:40
To: "Neale Ranns (nranns)" , vpp-dev 
Subject: Re: Re: [vpp-dev] MPLS L3VPN PING FAILED

Hi Neale,

The configuration without MPLS:
    
 ###VPP1
create host-interface name eth0
create host-interface name eth1
set interface ip table host-eth1 0
set interface ip table host-eth0 1
set interface mac address host-eth0 00:03:7F:FF:FF:FF
set interface mac address host-eth1 00:03:7F:FF:FF:FE
set int ip address host-eth0 192.168.3.1/24
set int ip address host-eth1 

[vpp-dev] MEGA Invitation

2017-06-02 Thread MEGA
vpp-dev@lists.fd.io

The user with the email chillance...@gmail.com has sent you an
invitation to join MEGA.

""

Join chillance...@gmail.com on MEGA by clicking below:

https://mega.nz/#newsignupdnBwLWRldkBsaXN0cy5mZC5pb9MWSVQ_uQpu

Best regards,
— Team MEGA

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

[vpp-dev] How to send stats or information to control plane

2017-06-02 Thread 王鹏
Hi,
   we need to send information to control plane at any time in our vpp 
application. Which way can we use ? The Events API ? How to use ? Can anyone 
explain this or provide a sample ? Thank you !___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Build failures on master

2017-06-02 Thread Tomas Brännström
No it's the same :-(

One thing though: when I get these errors I clone from a fork of the vpp
repo that we made. Is there some kind of git-hook that creates these
version files/update the .deb files with a version when cloning from the
main vpp gerrit repository, that might not fire when cloning from a fork?

/Tomas

On 1 June 2017 at 19:02, Florin Coras  wrote:

> Hi Tomas,
>
> That sure is weird.
>
> (backup everything that’s not in git)
> git clean -fdx
> make bootstrap
> make build
>
> Do you still see the issue?
>
> HTH,
> Florin
>
> On Jun 1, 2017, at 6:18 AM, Tomas Brännström 
> wrote:
>
> Hi
> I'm getting build errors when trying to build a recent commit on the
> master branch:
>
> /home/ubuntu/git/vpp/build-data/../src/vnet/tcp/builtin_client.c:25:29:
> fatal error: vpp/app/version.h: No such file or directory
>  #include 
>  ^
> compilation terminated.
>
> I'm building using the "extras/vagrant/build.sh" script (or
> "build-root/vagrant/build.sh" in slightly earlier versions). What's strange
> here is that I built it successfully on the exact same commit yesterday on
> another machine. The commit in question is 
> 79ea7ec3b3c04d334a21107818c64d70c42b99ae
> but I tried on the latest master as well.
>
> Also, I tried to build an earlier version (git tag v17.07-rc0) and got
> another error, where the .deb files could not be built  because the
> "version" was missing. I don't have the exact printout though.
>
> Am I missing something here? I'm trying to build in an ubuntu trusty
> server install, and it has worked before.
>
> /Tomas
>
> ___
> 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] MPLS L3VPN PING FAILED

2017-06-02 Thread 薛欣颖
Hi Neale,

These patches you upload have something conflict with the  master branch.I 
can't add all the patches.
Can I use' git clone https://gerrit.fd.io/r/vpp 'to get the vpp  code with your 
pathes?

Thanks,
xyxue


 
From: Neale Ranns (nranns)
Date: 2017-05-31 18:09
To: 薛欣颖; vpp-dev
Subject: Re: [vpp-dev] MPLS L3VPN PING FAILED
Hi Xyxue,
 
The MPLS config works for me with:
  DBGvpp# sh version
   vpp v17.07-rc0~314-g79ea7ec built by vagrant on localhost at Wed May 31 
00:46:42 PDT 2017
which is master branch from a few hours ago.
 
Regards,
neale
 
Packet 1
 
00:09:02:603978: af-packet-input
  af_packet: hw_if_index 1 next-index 4
tpacket2_hdr:
  status 0x2001 len 98 snaplen 98 mac 66 net 80
  sec 0x592e95b3 nsec 0x8466a6e vlan 0 vlan_tpid 0
00:09:02:604038: ethernet-input
  IP4: 3a:4c:48:ed:59:c3 -> 02:fe:1a:e1:c5:4c
00:09:02:604054: ip4-input
  ICMP: 192.168.2.20 -> 192.168.3.20
tos 0x00, ttl 64, length 84, checksum 0x26b8
fragment id 0x8d78, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x1c3e
00:09:02:604062: ip4-lookup
  fib 1 dpo-idx 3 flow hash: 0x
  ICMP: 192.168.2.20 -> 192.168.3.20
tos 0x00, ttl 64, length 84, checksum 0x26b8
fragment id 0x8d78, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x1c3e
00:09:02:604072: ip4-mpls-label-imposition
mpls-header:[33:63:0:eos]
00:09:02:604081: mpls-midchain
  adj-idx 5 : mpls via 0.0.0.0  mpls-tunnel0: 
  stacked-on:
[@5]: dpo-load-balance: [proto:mpls index:32 buckets:1 uRPF:-1 to:[0:0] 
via:[43:3784]]
  [0] [@6]: mpls-label:[1]:[34:255:0:neos]
  [@1]: mpls via 2.1.1.2 host-vcore-link-1: 
02feb30a3b6f02fe4eafc6638847 flow hash: 0x
  
00:09:02:604088: adj-midchain-tx
  adj-midchain:[5]:mpls via 0.0.0.0  mpls-tunnel0: 
  stacked-on:
[@5]: dpo-load-balance: [proto:mpls index:32 buckets:1 uRPF:-1 to:[0:0] 
via:[43:3784]]
  [0] [@6]: mpls-label:[1]:[34:255:0:neos]
  [@1]: mpls via 2.1.1.2 host-vcore-link-1: 02feb30a3b6f02fe4eafc6638847
00:09:02:604096: mpls-label-imposition
mpls-header:[34:255:0:neos]
00:09:02:604100: mpls-output
  adj-idx 4 : mpls via 2.1.1.2 host-vcore-link-1: 02feb30a3b6f02fe4eafc6638847 
flow hash: 0x
  : 
  0020: 
00:09:02:604102: host-vcore-link-1-output
  host-vcore-link-1
  MPLS: 02:fe:4e:af:c6:63 -> 02:fe:b3:0a:3b:6f
  label 34 exp 0, s 0, ttl 255
 
Packet 2
 
00:09:02:604968: af-packet-input
  af_packet: hw_if_index 2 next-index 4
tpacket2_hdr:
  status 0x2001 len 106 snaplen 106 mac 66 net 80
  sec 0x592e95b3 nsec 0x84c97da vlan 0 vlan_tpid 0
00:09:02:604978: ethernet-input
  MPLS: 02:fe:b3:0a:3b:6f -> 02:fe:4e:af:c6:63
00:09:02:604987: mpls-input
  MPLS: next mpls-lookup[1]  label 1024 ttl 255
00:09:02:604993: mpls-lookup
  MPLS: next [8], lookup fib index 0, LB index 34 hash 0 label 1024 eos 0
00:09:02:605000: lookup-mpls-dst
 fib-index:0 hdr:[1023:63:0:eos] load-balance:33
00:09:02:605005: ip4-mpls-label-disposition
  disp:0
00:09:02:605008: lookup-ip4-dst
 fib-index:1 addr:192.168.2.20 load-balance:35
00:09:02:605014: ip4-rewrite
  tx_sw_if_index 1 dpo-idx 6 : ipv4 via 192.168.2.20 host-vce-link-1: 
3a4c48ed59c302fe1ae1c54c0800 flow hash: 0x
  : 3a4c48ed59c302fe1ae1c54c08004554e9fd3e010c33c0a80314c0a8
  0020: 0214243e07d20010b3952e59311e02001011
00:09:02:605018: host-vce-link-1-output
  host-vce-link-1
  IP4: 02:fe:1a:e1:c5:4c -> 3a:4c:48:ed:59:c3
  ICMP: 192.168.3.20 -> 192.168.2.20
tos 0x00, ttl 62, length 84, checksum 0x0c33
fragment id 0xe9fd
  ICMP echo_reply checksum 0x243e
 
 
 
 
 
 
 
From: 薛欣颖 
Date: Wednesday, 31 May 2017 at 08:40
To: "Neale Ranns (nranns)" , vpp-dev 
Subject: Re: Re: [vpp-dev] MPLS L3VPN PING FAILED
 
Hi Neale,
 
The configuration without MPLS:
    
 ###VPP1 
create host-interface name eth0
create host-interface name eth1
set interface ip table host-eth1 0
set interface ip table host-eth0 1
set interface mac address host-eth0 00:03:7F:FF:FF:FF
set interface mac address host-eth1 00:03:7F:FF:FF:FE
set int ip address host-eth0 192.168.3.1/24
set int ip address host-eth1 2.1.1.1/24
ip route add 192.168.2.0/24 via 2.1.1.2

    
 VPP2
create host-interface name eth0
create host-interface name eth1
set int state host-eth1 up
set int state host-eth0 up
set interface mac address host-eth0 00:50:43:00:02:02
set interface mac address host-eth1 0E:1A:0D:00:50:43
set int ip address host-eth0 192.168.2.1/24
set int ip address host-eth1 2.1.1.2/24
ip route add 192.168.3.0/24  via 2.1.1.1


The configuration with MPLS:
   
 PE1  
 
create host-interface name eth0
create host-interface name eth1
set int state host-eth1 up
set int