Re: [vpp-dev] Difference between python api and vppctl result - stats

2018-09-17 Thread Marco Varlese
On Mon, 2018-09-17 at 20:33 +0200, Ole Troan wrote:
> Marco,
> 
> > > > Which version of vpp python api does include this stats api?
> > > > I tried it at vpp stable/1807, but there was no VPPStats module in it!
> > > 
> > > Going in 18.10. I recommend latest master for now. 
> > 
> > Great! Any chances to see it added to the wiki page for 18.10? 
> > https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_18.10
> 
> Now there is a probability near 1 that you will see it on the wiki page! ;-)
Thanks :)
> 
> Best regards,
> Ole
> 
> > > > 
> > > > On Mon, Sep 17, 2018 at 11:45 AM Ole Troan  wrote:
> > > > > Brayan,
> > > > > 
> > > > > > I would like to share my problem with you in order to find solution.
> > > > > > As you can see in vppctl output file, "vppctl show hardware" command
> > > > > > result contains "rx broadcast packets" and "tx broadcast packets".
> > > > > > However, when I used vpp python api to extract these stats, the
> > > > > > value of VNET_INTERFACE_COUNTER_RX_BROADCAST and
> > > > > > VNET_INTERFACE_COUNTER_TX_BROADCAST are stuck on zero incorrectly.
> > > > > > attached you can see my python script and its output and vppctl
> > > > > > command output. This behavior exists in multicast stats.
> > > > > > 
> > > > > > Best Regards,
> > > > > > 
> > > > > > 
> > > > > > vppctl output: https://pastebin.com/zXrArE4b
> > > > > > Python Script: https://pastebin.com/gDJbH1if
> > > > > > Python Script output: https://pastebin.com/q4dJ8VMs
> > > > > 
> > > > > Firstly these are not exactly the same counters. The first ones come
> > > > > directly from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are
> > > > > from the stats_collect_rx_node, sitting as an input feature behind
> > > > > device-input.
> > > > > I don’t know if they are different because the broadcasts are filtered
> > > > > out before reaching VPP or if there is a better explanation, Damjan?
> > > > > 
> > > > > With regards to Python and stats collection, or any stats collection
> > > > > in general. I would encourage you to try out the new stats segment.
> > > > > 
> > > > > In Python you basically do:
> > > > > 
> > > > > from vpp_papi.vpp_stats import VPPStats
> > > > > stat = VPPStats( > > > > dir = stat.ls(['^/if’]) # For all interface counters use “show
> > > > > statistics segment” or vpp_get_stats ls to see all available counters
> > > > > counters = stat.dump(dir)
> > > > > 
> > > > > Then counters[‘/if/tx'][thread index][sw_if_index] will give you the
> > > > > TX counter for a particular worker thread / software interface.
> > > > > 
> > > > > Cheers,
> > > > > Ole
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > > Links: You receive all messages sent to this group.
> > > > 
> > > > View/Reply Online (#10515): https://lists.fd.io/g/vpp-dev/message/10515
> > > > Mute This Topic: https://lists.fd.io/mt/25704565/675193
> > > > Group Owner: vpp-dev+ow...@lists.fd.io
> > > > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsubb  [otr...@employees.org
> > > > ]
> > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > 
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > 
> > > View/Reply Online (#10516): https://lists.fd.io/g/vpp-dev/message/10516
> > > Mute This Topic: https://lists.fd.io/mt/25704565/675056
> > > Group Owner: vpp-dev+ow...@lists.fd.io
> > > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsubb  [mvarl...@suse.de]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > 
> > 
> > -- 
> > Marco V
> > 
> > SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
> > HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10527): https://lists.fd.io/g/vpp-dev/message/10527
> Mute This Topic: https://lists.fd.io/mt/25704565/675056
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsubb  [mvarl...@suse.de]
> -=-=-=-=-=-=-=-=-=-=-=-
-- 
Marco V

SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10530): https://lists.fd.io/g/vpp-dev/message/10530
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Help with ikev2/ipsec

2018-09-17 Thread carlito nueno
Hi all,

I am trying to setup vpn on a vpp router. Testing via MacOS, as client.
When a MacOS device connects it should join into a VLAN and receives
an ip address under subnet 10.154.3.0/24.

I am following this:
https://wiki.fd.io/view/VPP/IPSec_and_IKEv2#VPP_configuration_2

vpp.conf

set int state TenGigabitEthernet8/0/0 up
set int ip address TenGigabitEthernet8/0/0 71.22.100.124/29
ip route add 0.0.0.0/0 via 71.22.100.130
ikev2 profile add pr1
ikev2 profile set pr1 auth shared-key-mic string Vpp123
ikev2 profile set pr1 id local fqdn vpp.home
ikev2 profile set pr1 id remote fqdn roadwarrior.vpn.example.com
ikev2 profile set pr1 traffic-selector local ip-range 10.154.3.2 -
10.154.3.220 port-range 0 - 65535 protocol 0
ikev2 profile set pr1 traffic-selector remote ip-range 10.154.3.2 -
10.154.3.220 port-range 0 - 65535 protocol 0

set int state GigabitEthernet4/0/0 up

loopback create
set int l2 bridge loop2 3 bvi
set int ip address loop2 10.154.3.1/24
set int state loop2 up

create sub GigabitEthernet4/0/0 3
set int l2 bridge GigabitEthernet4/0/0.3 3
set int l2 tag-rewrite GigabitEthernet4/0/0.3 pop 1
set int state GigabitEthernet4/0/0.3 up

nat44 add interface address TenGigabitEthernet8/0/0
set interface nat44 in loop2 out TenGigabitEthernet8/0/0

macOS network settings:
server address: 71.22.100.124
remote id: vpp.home
local id: roadwarrior.vpn.example.com
Shared Secret: Vpp123

sh ikev2 sa is empty.

Thanks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10529): https://lists.fd.io/g/vpp-dev/message/10529
Mute This Topic: https://lists.fd.io/mt/25742356/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] received signal SIGSEGV and vpp restarts continuously

2018-09-17 Thread carlito nueno
Hi Dave,

Have been running vpp v18.10-rc0~161-g34eb5d42 for 2 weeks and 3 days
without a problem.
So, it was a mistake on my part.

Thanks
On Mon, Aug 27, 2018 at 1:22 PM Dave Barach (dbarach)  wrote:
>
> Cool... Please let us know if you run into trouble...
>
> Thanks... Dave
>
> -Original Message-
> From: Carlito Nueno 
> Sent: Monday, August 27, 2018 4:09 PM
> To: Dave Barach (dbarach) 
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] received signal SIGSEGV and vpp restarts continuously
>
> Hi Dave,
>
> I recompiled vpp v18.10-rc0~229-g869031c5 using master on 08-23-18 and have 
> been running it since. I ran a few tests with various loads and it hasn't 
> crash so far. So, I guess it was some kind of mistake on my part.
>
> I will report back if anything changes.
>
> Thank you.
> On Thu, Aug 23, 2018 at 5:36 AM Dave Barach (dbarach)  
> wrote:
> >
> > Looks like a  NULL pointer - please decode the pc. It would help if you 
> > could repro the problem with a debug image and send a full backtrace.
> >
> > vnet[10192]: received signal SIGSEGV, PC 0x7fa62aecade3, faulting
> > address 0x0
> >
> > D.
> >
> > -Original Message-
> > From: vpp-dev@lists.fd.io  On Behalf Of carlito
> > nueno
> > Sent: Wednesday, August 22, 2018 4:07 PM
> > To: vpp-dev@lists.fd.io
> > Subject: [vpp-dev] received signal SIGSEGV and vpp restarts
> > continuously
> >
> > Hi all,
> >
> > I am using vpp 18.10 master branch and have 6 tap devices:
> > lstack[1...6]
> >
> > startup.conf
> > unix {
> > nodaemon
> > log /var/log/vpp/vpp.log
> > full-coredump
> > cli-listen /run/vpp/cli.sock
> > gid vpp
> > startup-config /home/testvpp/vpp.conf
> > }
> >
> > api-trace {
> > on
> > }
> >
> > api-segment {
> > gid vpp
> > }
> >
> > cpu {
> > main-core 2
> > corelist-workers 3
> > }
> >
> > nat {
> > translation hash buckets 16000
> > translation hash memory 268435456
> > max translations per user 128
> > }
> >
> > dpdk {
> > num-mbufs 32768
> > }
> >
> > Error:
> > Started vector packet processing engine.
> > vpp[10192]: vlib_plugin_early_init:361: plugin path
> > /usr/lib/vpp_plugins:/usr/lib64/vpp_plugins
> > vpp[10192]: load_one_plugin:189: Loaded plugin: abf_plugin.so (ACL
> > based Forwarding)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: acl_plugin.so (Access
> > Control Lists)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: avf_plugin.so (Intel
> > Adaptive Virtual Function (AVF) Device Plugin)
> > vpp[10192]: load_one_plugin:191: Loaded plugin: cdp_plugin.so
> > vpp[10192]: load_one_plugin:189: Loaded plugin: dpdk_plugin.so (Data
> > Plane Development Kit (DPDK))
> > vpp[10192]: load_one_plugin:189: Loaded plugin: flowprobe_plugin.so
> > (Flow per Packet)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: gbp_plugin.so (Group
> > Based Policy)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: gtpu_plugin.so
> > (GTPv1-U)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: igmp_plugin.so (IGMP
> > messaging)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: ila_plugin.so
> > (Identifier-locator addressing for IPv6)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: ioam_plugin.so
> > (Inbound OAM)
> > vpp[10192]: load_one_plugin:117: Plugin disabled (default):
> > ixge_plugin.so
> > vpp[10192]: load_one_plugin:189: Loaded plugin: l2e_plugin.so (L2
> > Emulation)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: lacp_plugin.so (Link
> > Aggregation Control Protocol)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: lb_plugin.so (Load
> > Balancer)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: mactime_plugin.so
> > (Time-based MAC source-address filter)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: map_plugin.so (Mapping
> > of address and port (MAP))
> > vpp[10192]: load_one_plugin:189: Loaded plugin: memif_plugin.so
> > (Packet Memory Interface (experimetal))
> > vpp[10192]: load_one_plugin:189: Loaded plugin: nat_plugin.so (Network
> > Address Translation)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: pppoe_plugin.so
> > (PPPoE)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: srv6ad_plugin.so
> > (Dynamic SRv6 proxy)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: srv6am_plugin.so
> > (Masquerading SRv6 proxy)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: srv6as_plugin.so
> > (Static SRv6 proxy)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: stn_plugin.so (VPP
> > Steals the NIC for Container integration)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: tlsmbedtls_plugin.so
> > (mbedtls based TLS Engine)
> > vpp[10192]: load_one_plugin:189: Loaded plugin: tlsopenssl_plugin.so
> > (openssl based TLS Engine)
> > vpp[10192]: load_one_plugin:117: Plugin disabled (default):
> > unittest_plugin.so
> > vpp[10192]: /usr/bin/vpp[10192]: clib_elf_parse_file: open
> > `linux-vdso.so.1': No such file or directory
> > /usr/bin/vpp[10192]: clib_elf_parse_file: open `linux-vdso.so.1': No
> > such file or directory
> > vpp[10192]: /usr/bin/vpp[10192]: 

Re: [vpp-dev] Difference between python api and vppctl result - stats

2018-09-17 Thread Ole Troan
Marco,

>>> Which version of vpp python api does include this stats api?
>>> I tried it at vpp stable/1807, but there was no VPPStats module in it!
>> 
>> Going in 18.10. I recommend latest master for now. 
> Great! Any chances to see it added to the wiki page for 18.10? 
> https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_18.10

Now there is a probability near 1 that you will see it on the wiki page! ;-)

Best regards,
Ole

>>> 
>>> On Mon, Sep 17, 2018 at 11:45 AM Ole Troan  wrote:
 Brayan,
 
 > I would like to share my problem with you in order to find solution.
 > As you can see in vppctl output file, "vppctl show hardware" command 
 > result contains "rx broadcast packets" and "tx broadcast packets". 
 > However, when I used vpp python api to extract these stats, the value of 
 > VNET_INTERFACE_COUNTER_RX_BROADCAST and 
 > VNET_INTERFACE_COUNTER_TX_BROADCAST are stuck on zero incorrectly. 
 > attached you can see my python script and its output and vppctl command 
 > output. This behavior exists in multicast stats.
 > 
 > Best Regards,
 > 
 > 
 > vppctl output: https://pastebin.com/zXrArE4b
 > Python Script: https://pastebin.com/gDJbH1if
 > Python Script output: https://pastebin.com/q4dJ8VMs
 
 Firstly these are not exactly the same counters. The first ones come 
 directly from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are from 
 the stats_collect_rx_node, sitting as an input feature behind device-input.
 I don’t know if they are different because the broadcasts are filtered out 
 before reaching VPP or if there is a better explanation, Damjan?
 
 With regards to Python and stats collection, or any stats collection in 
 general. I would encourage you to try out the new stats segment.
 
 In Python you basically do:
 
 from vpp_papi.vpp_stats import VPPStats
 stat = VPPStats(>>> dir = stat.ls(['^/if’]) # For all interface counters use “show statistics 
 segment” or vpp_get_stats ls to see all available counters
 counters = stat.dump(dir)
 
 Then counters[‘/if/tx'][thread index][sw_if_index] will give you the TX 
 counter for a particular worker thread / software interface.
 
 Cheers,
 Ole
 
 
 
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> 
>>> View/Reply Online (#10515): https://lists.fd.io/g/vpp-dev/message/10515
>>> Mute This Topic: https://lists.fd.io/mt/25704565/675193
>>> Group Owner: vpp-dev+ow...@lists.fd.io
>>> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [otr...@employees.org]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> 
>> View/Reply Online (#10516): https://lists.fd.io/g/vpp-dev/message/10516
>> Mute This Topic: https://lists.fd.io/mt/25704565/675056
>> Group Owner: vpp-dev+ow...@lists.fd.io
>> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [mvarl...@suse.de]
>> -=-=-=-=-=-=-=-=-=-=-=-
>> 
> -- 
> Marco V
> 
> SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10527): https://lists.fd.io/g/vpp-dev/message/10527
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Odd problem in adding new session on vpp when its session table is full

2018-09-17 Thread Andrew Yourtchenko
Dear Rubina,

looking at the outputs, there are a few anomalies that hopefully you
can clarify:

1) the max session count is 100. The latest master has the default
limit of 50, and I do not see any startup config parameters
changing that. Which version are you testing with/building off ?

2) there are 6 fa_conn_list_head elements in each worker for your
outputs. That number was initially 3, and in the early spring when I
introduced the purgatory list and the reserved unused list this number
has increased to 5. The vectors are initialized at a start with a
constant, so I am wondering why your outputs have a different number.

Would be able to comment on these observations ?

Thank you!

--a

On 9/17/18, Rubina Bianchi  wrote:
>   *   Dear VPP
>
> I ran a test on VPP configured with permit+reflect ACl rules with t-rex. In
> this test, I put two interfaces on one bridge-domain and had an ACL on all
> of its input and output interfaces. The ACL had just one rule which was
> allowing any traffic. I ran my test until VPP's session table was full. I
> run t-rex whith following command:
>
> "./t-rex-64 -f cap2/sfr.yaml-m 10  -d  1"
>
>
> After a couple of days, I took another test  on VPP. I tried to establish a
> ssh session between two clients via my VPP. But session could not be
> established. When I checked VPP trace, All of my ssh packets where dropped
> due to following error:
>
> "acl-plugin-in-ip4-l2: too many sessions to add new"
>
> when I checked VPP's session table, I realized that it was full. No session
> where deleted since my previous test and no session where going to be added
> to session table.I also checked my /var/log/hawk.log file and saw following
> error:
>
> "acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple
> collision!"
>
> I could not fix this problem so I restarted my VPP service. After that,
> I could not reproduce this state again. Does anyone have any idea on
> what my problem on VPP was?
>
> I attached my hawk.log, vpp trace, "vppctl sh acl-plugin sessions" output
> and startup.conf file to this email.
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10526): https://lists.fd.io/g/vpp-dev/message/10526
Mute This Topic: https://lists.fd.io/mt/25722080/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Odd problem in adding new session on vpp when its session table is full

2018-09-17 Thread Andrew Yourtchenko
Dear Rubina,

The outputs you include - you took them on that second test two days later ? 
Then it looks like session lists got wrong, so the cleaner could not traverse 
the sessions to clean, I suspect I might be something I missed within the 
session reuse logic when the table is full. Let me investigate this a bit more, 
I will get back to you. 

--a

> On 17 Sep 2018, at 13:40, Rubina Bianchi  wrote:
> 
> Dear VPP
> 
> I ran a test on VPP configured with permit+reflect ACl rules with t-rex. In 
> this test, I put two interfaces on one bridge-domain and had an ACL on all of 
> its input and output interfaces. The ACL had just one rule which was allowing 
> any traffic. I ran my test until VPP's session table was full. I run t-rex 
> whith following command:
>  "./t-rex-64 -f cap2/sfr.yaml-m 10  -d  1"
> 
> After a couple of days, I took another test  on VPP. I tried to establish a 
> ssh session between two clients via my VPP. But session could not be 
> established. When I checked VPP trace, All of my ssh packets where dropped 
> due to following error:
>  "acl-plugin-in-ip4-l2: too many sessions to add new"
> when I checked VPP's session table, I realized that it was full. No session 
> where deleted since my previous test and no session where going to be added 
> to session table.I also checked my /var/log/hawk.log file and saw following 
> error:
>  "acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!"
> 
> I could not fix this problem so I restarted my VPP service. After that, 
> I could not reproduce this state again. Does anyone have any idea on
> what my problem on VPP was?
> I attached my hawk.log, vpp trace, "vppctl sh acl-plugin sessions" output and 
> startup.conf file to this email.
> 
> 
> 
> 
> 
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10519): https://lists.fd.io/g/vpp-dev/message/10519
> Mute This Topic: https://lists.fd.io/mt/25722080/675608
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [ayour...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10525): https://lists.fd.io/g/vpp-dev/message/10525
Mute This Topic: https://lists.fd.io/mt/25722080/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Difference between python api and vppctl result - stats

2018-09-17 Thread Marco Varlese
On Mon, 2018-09-17 at 13:00 +0200, Ole Troan wrote:
Brayan,

Which version of vpp python api does include this stats api?
I tried it at vpp stable/1807, but there was no VPPStats module in it!

Going in 18.10. I recommend latest master for now. 
Great! Any chances to see it added to the wiki page for 18.10? 
https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_18.10

> 
> Cheers 
> Ole
Thanks,
Marco




On Mon, Sep 17, 2018 at 11:45 AM Ole Troan  wrote:
Brayan,


> I would like to share my problem with you in order to find solution.

> As you can see in vppctl output file, "vppctl show hardware" command result 
> contains "rx broadcast packets" and "tx broadcast packets". However, when I 
> used vpp python api to extract these stats, the value of 
> VNET_INTERFACE_COUNTER_RX_BROADCAST and VNET_INTERFACE_COUNTER_TX_BROADCAST 
> are stuck on zero incorrectly. attached you can see my python script and its 
> output and vppctl command output. This behavior exists in multicast stats.

> 

> Best Regards,

> 

> 

> vppctl output: https://pastebin.com/zXrArE4b

> Python Script: https://pastebin.com/gDJbH1if

> Python Script output: https://pastebin.com/q4dJ8VMs


Firstly these are not exactly the same counters. The first ones come directly 
from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are from the 
stats_collect_rx_node, sitting as an input feature behind device-input.

I don’t know if they are different because the broadcasts are filtered out 
before reaching VPP or if there is a better explanation, Damjan?


With regards to Python and stats collection, or any stats collection in 
general. I would encourage you to try out the new stats segment.


In Python you basically do:


from vpp_papi.vpp_stats import VPPStats

stat = VPPStats(https://lists.fd.io/g/vpp-dev/message/10515
Mute This Topic: https://lists.fd.io/mt/25704565/675193
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [otr...@employees.org]
-=-=-=-=-=-=-=-=-=-=-=-
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10516): https://lists.fd.io/g/vpp-dev/message/10516
> Mute This Topic: https://lists.fd.io/mt/25704565/675056
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [mvarl...@suse.de]
> -=-=-=-=-=-=-=-=-=-=-=-
> 
-- 
Marco V


SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10524): https://lists.fd.io/g/vpp-dev/message/10524
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Difference between python api and vppctl result - stats

2018-09-17 Thread brayan ortega
Is there any documentation or sample code to follow?
I'm still unable to made a successful run. My new error:

Traceback (most recent call last):
  File "/root/src/test.py", line 5, in 
counters = stat.dump(dir)
  File "/usr/lib/python2.7/dist-packages/vpp_papi/vpp_stats.py", line 131,
in dump
e = stat_entry_to_python(self.api, rv[i])
  File "/usr/lib/python2.7/dist-packages/vpp_papi/vpp_stats.py", line 104,
in stat_entry_to_python
return simple_counter_vec_list(e.simple_counter_vec)
TypeError: simple_counter_vec_list() takes exactly 2 arguments (1 given)

On Mon, Sep 17, 2018 at 4:23 PM Ole Troan  wrote:

> Brayan,
>
> Yes you need stats { socket-name  }
>
> Or something like it. (Out running)
>
> Ole
>
> On 17 Sep 2018, at 13:49, brayan ortega 
> wrote:
>
> Thanks for quick response, I tried latest vpp master version.
> Does it necessary to change vpp startup.conf? I faced with following error:
>
> socket_config: unknown host `vpp_stats'
> Traceback (most recent call last):
>   File "/root/src/test.py", line 3, in 
> stat = VPPStats('vpp_stats')
>   File "/usr/lib/python2.7/dist-packages/vpp_papi/vpp_stats.py", line 117,
> in __init__
> raise IOError()
> IOError
>
> Best Regards,
>
> On Mon, Sep 17, 2018 at 3:30 PM Ole Troan  wrote:
>
>> Brayan,
>>
>> Which version of vpp python api does include this stats api?
>> I tried it at vpp stable/1807, but there was no VPPStats module in it!
>>
>>
>> Going in 18.10. I recommend latest master for now.
>>
>> Cheers
>> Ole
>>
>>
>>
>> On Mon, Sep 17, 2018 at 11:45 AM Ole Troan  wrote:
>>
>>> Brayan,
>>>
>>> > I would like to share my problem with you in order to find solution.
>>> > As you can see in vppctl output file, "vppctl show hardware" command
>>> result contains "rx broadcast packets" and "tx broadcast packets". However,
>>> when I used vpp python api to extract these stats, the value of
>>> VNET_INTERFACE_COUNTER_RX_BROADCAST and VNET_INTERFACE_COUNTER_TX_BROADCAST
>>> are stuck on zero incorrectly. attached you can see my python script and
>>> its output and vppctl command output. This behavior exists in multicast
>>> stats.
>>> >
>>> > Best Regards,
>>> >
>>> >
>>> > vppctl output: https://pastebin.com/zXrArE4b
>>> > Python Script: https://pastebin.com/gDJbH1if
>>> > Python Script output: https://pastebin.com/q4dJ8VMs
>>>
>>> Firstly these are not exactly the same counters. The first ones come
>>> directly from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are from
>>> the stats_collect_rx_node, sitting as an input feature behind device-input.
>>> I don’t know if they are different because the broadcasts are filtered
>>> out before reaching VPP or if there is a better explanation, Damjan?
>>>
>>> With regards to Python and stats collection, or any stats collection in
>>> general. I would encourage you to try out the new stats segment.
>>>
>>> In Python you basically do:
>>>
>>> from vpp_papi.vpp_stats import VPPStats
>>> stat = VPPStats(>> dir = stat.ls(['^/if’]) # For all interface counters use “show
>>> statistics segment” or vpp_get_stats ls to see all available counters
>>> counters = stat.dump(dir)
>>>
>>> Then counters[‘/if/tx'][thread index][sw_if_index] will give you the TX
>>> counter for a particular worker thread / software interface.
>>>
>>> Cheers,
>>> Ole
>>>
>>>
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>>
>> View/Reply Online (#10515): https://lists.fd.io/g/vpp-dev/message/10515
>> Mute This Topic: https://lists.fd.io/mt/25704565/675193
>> Group Owner: vpp-dev+ow...@lists.fd.io
>> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [otr...@employees.org]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#10520): https://lists.fd.io/g/vpp-dev/message/10520
> Mute This Topic: https://lists.fd.io/mt/25704565/675193
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [otr...@employees.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10523): https://lists.fd.io/g/vpp-dev/message/10523
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] VPP's C-type-api example

2018-09-17 Thread Klement Sekera via Lists.Fd.Io
If you do not consume a message (in this case most probably the reply to
vapi_tap_deelte), then on disconnect, the client library does that internally
and prints a warning about it...

Quoting wangchuan...@163.com (2018-09-17 12:00:27)
>Hi Klement,
>    Please accept my heartfelt thanks.
>Everything is fine, but one: Calling 'vapi_tap_delete' without any other
>calling would cause some warining or error printed at my terminal: 
>my vpp is 18.04 stable.
>"tapDelete begin 
>tapDelete end
>vl_client_disconnect:313: queue drain: 79
>msg_handler_internal:432: no handler for msg id 79
>The end"
>Thanks again!
> 
>--
> 
>wangchuan...@163.com
> 
>   
>  From: [1]Klement Sekera
>  Date: 2018-09-17 15:53
>  To: [2]wangchuan...@163.com; [3]Ole Troan
>  CC: [4]Dave Barach (dbarach); [5]vpp-dev
>  Subject: Re: [vpp-dev] VPP's C-type-api example
>  There is no such parameter called `chroot_prefix`. I will assume you are
>  asking about `api_prefix`.
>   
>  Running VPP creates shared memory segments under /dev/shm. By default
>  (no prefix provided), these files are called global_vm and vpe-api.
>  Multiple VPP instances' names would collide and to be able to run more
>  than one VPP, you need to supply unique prefix to 2nd, 3rd,
>  etc. VPP instance. This turns shared memory file names for those
>  instances to -global_vm and -vpe-api.
>   
>  When API bindings are connecting to VPP, they are using these files
>  under /dev/shm. Thus, to connect, the same prefix needs to be
>  supplied to VPP and client.
>   
>  It's called api-segment in the startup config.
>   
>  
> https://wiki.fd.io/view/VPP/Command-line_Arguments#.22api-segment.22_parameters
>   
>  Quoting wangchuan...@163.com (2018-09-15 11:46:54)
>  >    Hi Klement,
>  >        I change the vapi_c_test.c and let the 3rd param[chroot_prefix
>  ==
>  >    NULL] of  'vapi_connect',    and all pass!
>  >    I have not quite understand this parameter "chroot_prefix"
>   by reading the
>  >    code.
>  >    Explain briefly ,please?
>  >    Thanks a lot!
>  >
>  >   
>  
> --
>  >
>  >    wangchuan...@163.com
>  >
>  >   
>  >  From: [1]wangchuan...@163.com
>  >  Date: 2018-09-15 09:23
>  >  To: [2]Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at
>  Cisco);
>  >  [3]Ole Troan
>  >  CC: [4]Dave Barach (dbarach); [5]vpp-dev
>  >  Subject: Re: Re: [vpp-dev] VPP's C-type-api example
>  >  Hi Klement,
>  >      I do not understande your mean.    VPP cmdline?
>  >  I want to make my ext-program who can initialize the running
>  vpp-service
>  >  not by vppctl-shell
>  >  "systemctl start VPP"    without any change for vpp-code and
>  >  startup.conf.
>  >  Can you describe their relationship?
>  >   My executable program name is "test", and how can i  connect to
>  vpp?
>  >
>  >   
>  
> --
>  >
>  >  wangchuan...@163.com
>  >
>  >     
>  >    From: [6]Klement Sekera
>  >    Date: 2018-09-14 19:55
>  >    To: [7]wangchuan...@163.com; [8]Ole Troan
>  >    CC: [9]Dave Barach (dbarach); [10]vpp-dev
>  >    Subject: Re: [vpp-dev] VPP's C-type-api example
>  >    And what is your vpp cmdline? is vpp running with "my-api-test"
>  api
>  >    prefix?
>  >     
>  >    Quoting wangchuan...@163.com (2018-09-14 07:25:06)
>  >    >    sorry,
>  >    >        That my carelessness.  Whole cmd as root  is :  
>  #./test
>  >    "/my-api"
>  >    >    "my-api-test"
>  >    >    And vpp_api_test can connect to vpp.
>  >    >
>  >    >   
>  >   
>  
> --
>  >    >
>  >    >    wangchuan...@163.com
>  >    >
>  >    >   
>  >    >  From: [1]Ole Troan
>  >    >  Date: 2018-09-14 00:35
>  >    >  To: [2]wangchuanguo
>  >    >  CC: [3]Klement Sekera -X (ksekera - PANTHEON
>  TECHNOLOGIES at
>  >    Cisco);
>  >    >  [4]Dave Barach (dbarach); [5]vpp-dev
>  >    >  Subject: Re: [vpp-dev] VPP's C-type-api example
>  >    >  > 1、as root, install the rpm(vpp-selinux, vpp-lib,
>  vpp-18.04,
>  >    >  vpp-plugins),  start service vpp and I come into vppctl.
>  >    >  > 2、I copy test/ext/vapi_c_test.c to main.c(a new file,
>  a 

Re: [vpp-dev] Difference between python api and vppctl result - stats

2018-09-17 Thread Ole Troan
Brayan,

Yes you need stats { socket-name  }

Or something like it. (Out running)

Ole

> On 17 Sep 2018, at 13:49, brayan ortega  wrote:
> 
> Thanks for quick response, I tried latest vpp master version.
> Does it necessary to change vpp startup.conf? I faced with following error:
> 
> socket_config: unknown host `vpp_stats'
> Traceback (most recent call last):
>   File "/root/src/test.py", line 3, in 
> stat = VPPStats('vpp_stats')
>   File "/usr/lib/python2.7/dist-packages/vpp_papi/vpp_stats.py", line 117, in 
> __init__
> raise IOError()
> IOError
> 
> Best Regards,
> 
>> On Mon, Sep 17, 2018 at 3:30 PM Ole Troan  wrote:
>> Brayan,
>> 
>>> Which version of vpp python api does include this stats api?
>>> I tried it at vpp stable/1807, but there was no VPPStats module in it!
>> 
>> Going in 18.10. I recommend latest master for now. 
>> 
>> Cheers 
>> Ole
>> 
>> 
>>> 
 On Mon, Sep 17, 2018 at 11:45 AM Ole Troan  wrote:
 Brayan,
 
 > I would like to share my problem with you in order to find solution.
 > As you can see in vppctl output file, "vppctl show hardware" command 
 > result contains "rx broadcast packets" and "tx broadcast packets". 
 > However, when I used vpp python api to extract these stats, the value of 
 > VNET_INTERFACE_COUNTER_RX_BROADCAST and 
 > VNET_INTERFACE_COUNTER_TX_BROADCAST are stuck on zero incorrectly. 
 > attached you can see my python script and its output and vppctl command 
 > output. This behavior exists in multicast stats.
 > 
 > Best Regards,
 > 
 > 
 > vppctl output: https://pastebin.com/zXrArE4b
 > Python Script: https://pastebin.com/gDJbH1if
 > Python Script output: https://pastebin.com/q4dJ8VMs
 
 Firstly these are not exactly the same counters. The first ones come 
 directly from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are from 
 the stats_collect_rx_node, sitting as an input feature behind device-input.
 I don’t know if they are different because the broadcasts are filtered out 
 before reaching VPP or if there is a better explanation, Damjan?
 
 With regards to Python and stats collection, or any stats collection in 
 general. I would encourage you to try out the new stats segment.
 
 In Python you basically do:
 
 from vpp_papi.vpp_stats import VPPStats
 stat = VPPStats(>>> dir = stat.ls(['^/if’]) # For all interface counters use “show statistics 
 segment” or vpp_get_stats ls to see all available counters
 counters = stat.dump(dir)
 
 Then counters[‘/if/tx'][thread index][sw_if_index] will give you the TX 
 counter for a particular worker thread / software interface.
 
 Cheers,
 Ole
 
 
 
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> 
>>> View/Reply Online (#10515): https://lists.fd.io/g/vpp-dev/message/10515
>>> Mute This Topic: https://lists.fd.io/mt/25704565/675193
>>> Group Owner: vpp-dev+ow...@lists.fd.io
>>> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [otr...@employees.org]
>>> -=-=-=-=-=-=-=-=-=-=-=-
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10520): https://lists.fd.io/g/vpp-dev/message/10520
> Mute This Topic: https://lists.fd.io/mt/25704565/675193
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [otr...@employees.org]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10521): https://lists.fd.io/g/vpp-dev/message/10521
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Difference between python api and vppctl result - stats

2018-09-17 Thread brayan ortega
Thanks for quick response, I tried latest vpp master version.
Does it necessary to change vpp startup.conf? I faced with following error:

socket_config: unknown host `vpp_stats'
Traceback (most recent call last):
  File "/root/src/test.py", line 3, in 
stat = VPPStats('vpp_stats')
  File "/usr/lib/python2.7/dist-packages/vpp_papi/vpp_stats.py", line 117,
in __init__
raise IOError()
IOError

Best Regards,

On Mon, Sep 17, 2018 at 3:30 PM Ole Troan  wrote:

> Brayan,
>
> Which version of vpp python api does include this stats api?
> I tried it at vpp stable/1807, but there was no VPPStats module in it!
>
>
> Going in 18.10. I recommend latest master for now.
>
> Cheers
> Ole
>
>
>
> On Mon, Sep 17, 2018 at 11:45 AM Ole Troan  wrote:
>
>> Brayan,
>>
>> > I would like to share my problem with you in order to find solution.
>> > As you can see in vppctl output file, "vppctl show hardware" command
>> result contains "rx broadcast packets" and "tx broadcast packets". However,
>> when I used vpp python api to extract these stats, the value of
>> VNET_INTERFACE_COUNTER_RX_BROADCAST and VNET_INTERFACE_COUNTER_TX_BROADCAST
>> are stuck on zero incorrectly. attached you can see my python script and
>> its output and vppctl command output. This behavior exists in multicast
>> stats.
>> >
>> > Best Regards,
>> >
>> >
>> > vppctl output: https://pastebin.com/zXrArE4b
>> > Python Script: https://pastebin.com/gDJbH1if
>> > Python Script output: https://pastebin.com/q4dJ8VMs
>>
>> Firstly these are not exactly the same counters. The first ones come
>> directly from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are from
>> the stats_collect_rx_node, sitting as an input feature behind device-input.
>> I don’t know if they are different because the broadcasts are filtered
>> out before reaching VPP or if there is a better explanation, Damjan?
>>
>> With regards to Python and stats collection, or any stats collection in
>> general. I would encourage you to try out the new stats segment.
>>
>> In Python you basically do:
>>
>> from vpp_papi.vpp_stats import VPPStats
>> stat = VPPStats(> dir = stat.ls(['^/if’]) # For all interface counters use “show
>> statistics segment” or vpp_get_stats ls to see all available counters
>> counters = stat.dump(dir)
>>
>> Then counters[‘/if/tx'][thread index][sw_if_index] will give you the TX
>> counter for a particular worker thread / software interface.
>>
>> Cheers,
>> Ole
>>
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#10515): https://lists.fd.io/g/vpp-dev/message/10515
> Mute This Topic: https://lists.fd.io/mt/25704565/675193
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [otr...@employees.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10520): https://lists.fd.io/g/vpp-dev/message/10520
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Odd problem in adding new session on vpp when its session table is full

2018-09-17 Thread Rubina Bianchi
  *   Dear VPP

I ran a test on VPP configured with permit+reflect ACl rules with t-rex. In 
this test, I put two interfaces on one bridge-domain and had an ACL on all of 
its input and output interfaces. The ACL had just one rule which was allowing 
any traffic. I ran my test until VPP's session table was full. I run t-rex 
whith following command:

"./t-rex-64 -f cap2/sfr.yaml-m 10  -d  1"


After a couple of days, I took another test  on VPP. I tried to establish a ssh 
session between two clients via my VPP. But session could not be established. 
When I checked VPP trace, All of my ssh packets where dropped due to following 
error:

"acl-plugin-in-ip4-l2: too many sessions to add new"

when I checked VPP's session table, I realized that it was full. No session 
where deleted since my previous test and no session where going to be added to 
session table.I also checked my /var/log/hawk.log file and saw following error:

"acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!"

I could not fix this problem so I restarted my VPP service. After that,
I could not reproduce this state again. Does anyone have any idea on
what my problem on VPP was?

I attached my hawk.log, vpp trace, "vppctl sh acl-plugin sessions" output and 
startup.conf file to this email.




2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 5-tuple collision!
2018 Sep 11 15:14:39 rubina acl_fa_node_fn:516: BUG: session LSB16(sw_if_index) and 

Re: [vpp-dev] VPP's C-type-api example

2018-09-17 Thread wangchuan...@163.com
Hi Klement,
Please accept my heartfelt thanks.
Everything is fine, but one: Calling 'vapi_tap_delete' without any other 
calling would cause some warining or error printed at my terminal: 
my vpp is 18.04 stable.
"tapDelete begin 
tapDelete end
vl_client_disconnect:313: queue drain: 79
msg_handler_internal:432: no handler for msg id 79
The end"

Thanks again!



wangchuan...@163.com
 
From: Klement Sekera
Date: 2018-09-17 15:53
To: wangchuan...@163.com; Ole Troan
CC: Dave Barach (dbarach); vpp-dev
Subject: Re: [vpp-dev] VPP's C-type-api example
There is no such parameter called `chroot_prefix`. I will assume you are
asking about `api_prefix`.
 
Running VPP creates shared memory segments under /dev/shm. By default
(no prefix provided), these files are called global_vm and vpe-api.
Multiple VPP instances' names would collide and to be able to run more
than one VPP, you need to supply unique prefix to 2nd, 3rd,
etc. VPP instance. This turns shared memory file names for those
instances to -global_vm and -vpe-api.
 
When API bindings are connecting to VPP, they are using these files
under /dev/shm. Thus, to connect, the same prefix needs to be
supplied to VPP and client.
 
It's called api-segment in the startup config.
 
https://wiki.fd.io/view/VPP/Command-line_Arguments#.22api-segment.22_parameters
 
Quoting wangchuan...@163.com (2018-09-15 11:46:54)
>Hi Klement,
>I change the vapi_c_test.c and let the 3rd param[chroot_prefix ==
>NULL] of  'vapi_connect',and all pass!
>I have not quite understand this parameter "chroot_prefix"  by reading the
>code.
>Explain briefly ,please?
>Thanks a lot!
> 
>--
> 
>wangchuan...@163.com
> 
>   
>  From: [1]wangchuan...@163.com
>  Date: 2018-09-15 09:23
>  To: [2]Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at Cisco);
>  [3]Ole Troan
>  CC: [4]Dave Barach (dbarach); [5]vpp-dev
>  Subject: Re: Re: [vpp-dev] VPP's C-type-api example
>  Hi Klement,
>  I do not understande your mean.VPP cmdline?
>  I want to make my ext-program who can initialize the running vpp-service
>  not by vppctl-shell
>  "systemctl start VPP"without any change for vpp-code and
>  startup.conf.
>  Can you describe their relationship?
>   My executable program name is "test", and how can i  connect to vpp?
> 
>--
> 
>  wangchuan...@163.com
> 
> 
>From: [6]Klement Sekera
>Date: 2018-09-14 19:55
>To: [7]wangchuan...@163.com; [8]Ole Troan
>CC: [9]Dave Barach (dbarach); [10]vpp-dev
>Subject: Re: [vpp-dev] VPP's C-type-api example
>And what is your vpp cmdline? is vpp running with "my-api-test" api
>prefix?
> 
>Quoting wangchuan...@163.com (2018-09-14 07:25:06)
>>sorry,
>>That my carelessness.  Whole cmd as root  is :   #./test
>"/my-api"
>>"my-api-test"
>>And vpp_api_test can connect to vpp.
>>
>>   
>
> --
>>
>>wangchuan...@163.com
>>
>>   
>>  From: [1]Ole Troan
>>  Date: 2018-09-14 00:35
>>  To: [2]wangchuanguo
>>  CC: [3]Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at
>Cisco);
>>  [4]Dave Barach (dbarach); [5]vpp-dev
>>  Subject: Re: [vpp-dev] VPP's C-type-api example
>>  > 1、as root, install the rpm(vpp-selinux, vpp-lib, vpp-18.04,
>>  vpp-plugins),  start service vpp and I come into vppctl.
>>  > 2、I copy test/ext/vapi_c_test.c to main.c(a new file, a new
>dir).
>>  >compile using: gcc -std=gnu99 -g -Wall -pthread 
>>  -I/usr/include/ -lvppinfra -lvlibmemoryclient -lsvm -lpthread
>-lcheck
>>  -lrt -lm -lvapiclient -lsubunit main.c -o test
>>  > 3、then,#./test
>>  >But it shows vl_map_shmem:639: region init fail
>>   
>>  That’s an indication that it cannot connect to VPP.
>>  Can vpp_api_test connect?
>>   
>>  Cheers,
>>  Ole
>>   
>>   
>>  >
>>  > wangchuan...@163.com
>>  > 
>>  > From: Ole Troan
>>  > Date: 2018-09-13 21:44
>>  > To: wangchuan...@163.com
>>  > CC: Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at
>Cisco); Dave
>>  Barach (dbarach); vpp-dev
>>  > Subject: Re: [vpp-dev] VPP's C-type-api example
>>  > > i am be root
>>  > 
>>  > Then you must provide more details.
>   

[vpp-dev] Build a telecom-class Security gateway device with VPP

2018-09-17 Thread 田野
Dear VPP developers:

 

I am a project manager from China mainland.

Currently we are planning to develop a high performance Security gateway device 
to connect

between HNB/ENB and 3G/4G core network.

The basic requirement is:

l Support 10K Ipsec tunnels concurrently and up to 10G+ uplink throughput.

n At least support IKEv2

n DPD

l Support IPv4/IPv6

l Support NAT

l Support duo-uplink port for backup and load balance.

l Support OAM system(cli or web based or SNMP)

l Support Qos

 

I think this kind of product is already exist, just like the “CASA Axyom 
Security Gateway”(I already attached it with this email)

My question is :

1.Is it a good idea to build it with VPP ? What feature I listed above 
could be reused with VPP?

2.If VPP is a good choice, is there anything I need to do by myself? If 
any, can you brief me what kind of customization or development I need to do?-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10517): https://lists.fd.io/g/vpp-dev/message/10517
Mute This Topic: https://lists.fd.io/mt/25721930/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Difference between python api and vppctl result - stats

2018-09-17 Thread Ole Troan
Brayan,

> Which version of vpp python api does include this stats api?
> I tried it at vpp stable/1807, but there was no VPPStats module in it!

Going in 18.10. I recommend latest master for now. 

Cheers 
Ole


> 
>> On Mon, Sep 17, 2018 at 11:45 AM Ole Troan  wrote:
>> Brayan,
>> 
>> > I would like to share my problem with you in order to find solution.
>> > As you can see in vppctl output file, "vppctl show hardware" command 
>> > result contains "rx broadcast packets" and "tx broadcast packets". 
>> > However, when I used vpp python api to extract these stats, the value of 
>> > VNET_INTERFACE_COUNTER_RX_BROADCAST and 
>> > VNET_INTERFACE_COUNTER_TX_BROADCAST are stuck on zero incorrectly. 
>> > attached you can see my python script and its output and vppctl command 
>> > output. This behavior exists in multicast stats.
>> > 
>> > Best Regards,
>> > 
>> > 
>> > vppctl output: https://pastebin.com/zXrArE4b
>> > Python Script: https://pastebin.com/gDJbH1if
>> > Python Script output: https://pastebin.com/q4dJ8VMs
>> 
>> Firstly these are not exactly the same counters. The first ones come 
>> directly from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are from 
>> the stats_collect_rx_node, sitting as an input feature behind device-input.
>> I don’t know if they are different because the broadcasts are filtered out 
>> before reaching VPP or if there is a better explanation, Damjan?
>> 
>> With regards to Python and stats collection, or any stats collection in 
>> general. I would encourage you to try out the new stats segment.
>> 
>> In Python you basically do:
>> 
>> from vpp_papi.vpp_stats import VPPStats
>> stat = VPPStats(> dir = stat.ls(['^/if’]) # For all interface counters use “show statistics 
>> segment” or vpp_get_stats ls to see all available counters
>> counters = stat.dump(dir)
>> 
>> Then counters[‘/if/tx'][thread index][sw_if_index] will give you the TX 
>> counter for a particular worker thread / software interface.
>> 
>> Cheers,
>> Ole
>> 
>> 
>> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10515): https://lists.fd.io/g/vpp-dev/message/10515
> Mute This Topic: https://lists.fd.io/mt/25704565/675193
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [otr...@employees.org]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10516): https://lists.fd.io/g/vpp-dev/message/10516
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Difference between python api and vppctl result - stats

2018-09-17 Thread brayan ortega
Hi Ole,

Which version of vpp python api does include this stats api?
I tried it at vpp stable/1807, but there was no VPPStats module in it!

Best Regards,

On Mon, Sep 17, 2018 at 11:45 AM Ole Troan  wrote:

> Brayan,
>
> > I would like to share my problem with you in order to find solution.
> > As you can see in vppctl output file, "vppctl show hardware" command
> result contains "rx broadcast packets" and "tx broadcast packets". However,
> when I used vpp python api to extract these stats, the value of
> VNET_INTERFACE_COUNTER_RX_BROADCAST and VNET_INTERFACE_COUNTER_TX_BROADCAST
> are stuck on zero incorrectly. attached you can see my python script and
> its output and vppctl command output. This behavior exists in multicast
> stats.
> >
> > Best Regards,
> >
> >
> > vppctl output: https://pastebin.com/zXrArE4b
> > Python Script: https://pastebin.com/gDJbH1if
> > Python Script output: https://pastebin.com/q4dJ8VMs
>
> Firstly these are not exactly the same counters. The first ones come
> directly from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are from
> the stats_collect_rx_node, sitting as an input feature behind device-input.
> I don’t know if they are different because the broadcasts are filtered out
> before reaching VPP or if there is a better explanation, Damjan?
>
> With regards to Python and stats collection, or any stats collection in
> general. I would encourage you to try out the new stats segment.
>
> In Python you basically do:
>
> from vpp_papi.vpp_stats import VPPStats
> stat = VPPStats( dir = stat.ls(['^/if’]) # For all interface counters use “show statistics
> segment” or vpp_get_stats ls to see all available counters
> counters = stat.dump(dir)
>
> Then counters[‘/if/tx'][thread index][sw_if_index] will give you the TX
> counter for a particular worker thread / software interface.
>
> Cheers,
> Ole
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10515): https://lists.fd.io/g/vpp-dev/message/10515
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] VPP's C-type-api example

2018-09-17 Thread Klement Sekera via Lists.Fd.Io
There is no such parameter called `chroot_prefix`. I will assume you are
asking about `api_prefix`.

Running VPP creates shared memory segments under /dev/shm. By default
(no prefix provided), these files are called global_vm and vpe-api.
Multiple VPP instances' names would collide and to be able to run more
than one VPP, you need to supply unique prefix to 2nd, 3rd,
etc. VPP instance. This turns shared memory file names for those
instances to -global_vm and -vpe-api.

When API bindings are connecting to VPP, they are using these files
under /dev/shm. Thus, to connect, the same prefix needs to be
supplied to VPP and client.

It's called api-segment in the startup config.

https://wiki.fd.io/view/VPP/Command-line_Arguments#.22api-segment.22_parameters

Quoting wangchuan...@163.com (2018-09-15 11:46:54)
>Hi Klement,
>    I change the vapi_c_test.c and let the 3rd param[chroot_prefix ==
>NULL] of  'vapi_connect',    and all pass!
>I have not quite understand this parameter "chroot_prefix"  by reading the
>code.
>Explain briefly ,please?
>Thanks a lot!
> 
>--
> 
>wangchuan...@163.com
> 
>   
>  From: [1]wangchuan...@163.com
>  Date: 2018-09-15 09:23
>  To: [2]Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at Cisco);
>  [3]Ole Troan
>  CC: [4]Dave Barach (dbarach); [5]vpp-dev
>  Subject: Re: Re: [vpp-dev] VPP's C-type-api example
>  Hi Klement,
>      I do not understande your mean.    VPP cmdline?
>  I want to make my ext-program who can initialize the running vpp-service
>  not by vppctl-shell
>  "systemctl start VPP"    without any change for vpp-code and
>  startup.conf.
>  Can you describe their relationship?
>   My executable program name is "test", and how can i  connect to vpp?
> 
>--
> 
>  wangchuan...@163.com
> 
> 
>From: [6]Klement Sekera
>Date: 2018-09-14 19:55
>To: [7]wangchuan...@163.com; [8]Ole Troan
>CC: [9]Dave Barach (dbarach); [10]vpp-dev
>Subject: Re: [vpp-dev] VPP's C-type-api example
>And what is your vpp cmdline? is vpp running with "my-api-test" api
>prefix?
> 
>Quoting wangchuan...@163.com (2018-09-14 07:25:06)
>>    sorry,
>>        That my carelessness.  Whole cmd as root  is :   #./test
>"/my-api"
>>    "my-api-test"
>>    And vpp_api_test can connect to vpp.
>>
>>   
>
> --
>>
>>    wangchuan...@163.com
>>
>>   
>>  From: [1]Ole Troan
>>  Date: 2018-09-14 00:35
>>  To: [2]wangchuanguo
>>  CC: [3]Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at
>Cisco);
>>  [4]Dave Barach (dbarach); [5]vpp-dev
>>  Subject: Re: [vpp-dev] VPP's C-type-api example
>>  > 1、as root, install the rpm(vpp-selinux, vpp-lib, vpp-18.04,
>>  vpp-plugins),  start service vpp and I come into vppctl.
>>  > 2、I copy test/ext/vapi_c_test.c to main.c(a new file, a new
>dir).
>>  >    compile using: gcc -std=gnu99 -g -Wall -pthread 
>>  -I/usr/include/ -lvppinfra -lvlibmemoryclient -lsvm -lpthread
>-lcheck
>>  -lrt -lm -lvapiclient -lsubunit main.c -o test
>>  > 3、then,    #./test
>>  >    But it shows vl_map_shmem:639: region init fail
>>   
>>  That’s an indication that it cannot connect to VPP.
>>  Can vpp_api_test connect?
>>   
>>  Cheers,
>>  Ole
>>   
>>   
>>  >
>>  > wangchuan...@163.com
>>  > 
>>  > From: Ole Troan
>>  > Date: 2018-09-13 21:44
>>  > To: wangchuan...@163.com
>>  > CC: Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at
>Cisco); Dave
>>  Barach (dbarach); vpp-dev
>>  > Subject: Re: [vpp-dev] VPP's C-type-api example
>>  > > i am be root
>>  > 
>>  > Then you must provide more details.
>>  > 
>>  > Cheers,
>>  > Ole
>>  > 
>>  > 
>>  > >
>>  > > wangchuan...@163.com
>>  > >
>>  > > From: Ole Troan
>>  > > Date: 2018-09-13 21:26
>>  > > To: wangchuan...@163.com
>>  > > CC: Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at
>Cisco);
>>  Dave Barach (dbarach); vpp-dev
>>  > > Subject: Re: [vpp-dev] VPP's C-type-api example
>>  > > > But I got some error 

[vpp-dev] setting speed and duplex in dpdk_update_link_state

2018-09-17 Thread emma sdi
Dear vpp

we set speed and duplex In function dpdk_update_link_state, although
When link_status is down, speed and duplex is unknown.
So I commit my suggestion in gerrit id 14848
.

Cheers
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10513): https://lists.fd.io/g/vpp-dev/message/10513
Mute This Topic: https://lists.fd.io/mt/25721090/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Does vector header always be aligned ?

2018-09-17 Thread Dai, Wei
This issue exists in stable/1807.
In the main branch, the vec_header_t defined in vec_bootstrap.h has additional 
u32 dlmalloc_header_offset and
this make sizeof(vc_header_t) =8 and vec header can be aligned at least at 8 
byte boundary.


> -Original Message-
> From: vpp-dev@lists.fd.io [mailto:vpp-dev@lists.fd.io] On Behalf Of Dai, Wei
> Sent: Monday, September 17, 2018 11:29 AM
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Does vector header always be aligned ?
> 
> If a vec header had better be aligned at 8 byte boundary, currently
> _vec_resize_inline( ) can't guarantee the vec header is aligned as no
> alignment requirement of vec header is input into this function.
> 
> For example,  when a hash is created, the hash vector (hash_pair_t) is
> aligned at
> 8 byte boundary,  but the hash_header often is only aligned at 4 byte
> boundary not 8 byte boundary.
> hash_header(void *v)  let hash_header be 68 bytes ahead of hash vector .
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10512): https://lists.fd.io/g/vpp-dev/message/10512
Mute This Topic: https://lists.fd.io/mt/25719963/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Difference between python api and vppctl result - stats

2018-09-17 Thread Ole Troan
Brayan,

> I would like to share my problem with you in order to find solution.
> As you can see in vppctl output file, "vppctl show hardware" command result 
> contains "rx broadcast packets" and "tx broadcast packets". However, when I 
> used vpp python api to extract these stats, the value of 
> VNET_INTERFACE_COUNTER_RX_BROADCAST and VNET_INTERFACE_COUNTER_TX_BROADCAST 
> are stuck on zero incorrectly. attached you can see my python script and its 
> output and vppctl command output. This behavior exists in multicast stats.
> 
> Best Regards,
> 
> 
> vppctl output: https://pastebin.com/zXrArE4b
> Python Script: https://pastebin.com/gDJbH1if
> Python Script output: https://pastebin.com/q4dJ8VMs

Firstly these are not exactly the same counters. The first ones come directly 
from DPDK I believe, and the VNET_INTERFACE_COUNTER ones are from the 
stats_collect_rx_node, sitting as an input feature behind device-input.
I don’t know if they are different because the broadcasts are filtered out 
before reaching VPP or if there is a better explanation, Damjan?

With regards to Python and stats collection, or any stats collection in 
general. I would encourage you to try out the new stats segment.

In Python you basically do:

from vpp_papi.vpp_stats import VPPStats
stat = VPPStats(-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10511): https://lists.fd.io/g/vpp-dev/message/10511
Mute This Topic: https://lists.fd.io/mt/25704565/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-