[vpp-dev] ?????? ?????? How to get interface stats using C api?

2017-09-26 Thread ????????
That is ok??
 Now I am research calling the plugin apis by C. Especially how to call the 
event apis. I would appreciate it if you can write a brief client.




--  --
??: "Keith Burns";;
: 2017??9??27??(??) 10:47
??: ""<15803846...@qq.com>;
: "vpp-dev"; 
: Re: ?? [vpp-dev] How to get interface stats using C api?



Apologies,

It's a callback. 


We probably need some decent literature written for how to consume the various 
C, C++, Python and Lua APIs


If you have a preference for any of those languages I could write a brief 
client program for you and start work on documenting this stuff. 


On Sep 26, 2017 6:04 PM, "" <15803846...@qq.com> wrote:
Hi??
  Thank you for your detail information. After reading this, i can understand. 
But after calling  "want_per_interface_simple_stats" with enable_disable=1, 
num=1 and sw_ifs[4], i do not know how to receive this stats. calling other 
function or variable? Can you tell me how to receive stats in my c program?
   Thanks??




--  --
??: "Keith Burns";;
: 2017??9??27??(??) 6:39
??: ""<15803846...@qq.com>;"vpp-dev";

: Re: [vpp-dev] How to get interface stats using C api?



Hi there,

As of 17.10 you can now register for statistics on a per interface level.


You need the sw_if_index of the interface you want stats for, but the calls are 
in 
https://git.fd.io/vpp/tree/src/vpp/stats/stats.api



but as an example:
Register:
autoreply define want_per_interface_simple_stats {   u32 client_index;   u32 
context;   u32 enable_disable;   u32 pid;   u32 num;   u32 sw_ifs[num]; };
So calling "want_per_interface_simple_stats" with enable_disable=1, num=1 and 
sw_ifs[4] will give you interface_simple_stats every 10sec for sw_if_index=4.
The content of "interface_simple_stats" looks like:
/** \brief Simple per interface stats counters structure @param count - 
number of elements in message @param timestamp - u32 vlib timestamp for 
control plane @param data[count] - vl_api_vnet_simple_counter_t  */ 
manual_print manual_endian define vnet_per_interface_simple_counters {   u32 
count;   u32 timestamp;   vl_api_vnet_simple_counter_t data[count]; };
Where each "vnet_simple_counter_t" looks like:
https://git.fd.io/vpp/tree/src/vnet/interface.api
/** \brief Simple interface counter data type for 
vnet_interface_simple_counters @param sw_if_index - interface indexes for 
counters @param drop - RX or TX drops due to buffer starvation @param 
punt - used with VNET "punt" disposition @param rx_ip4 - received IP4 
packets @param rx_ip6 - received IP6 packets @param rx_no_buffer - no 
RX buffers available @param rx_miss - receive misses @param rx_error - 
receive errors @param tx_error - transmit errors @param rx_mpls - 
received MPLS packet */ typeonly manual_print manual_endian define 
vnet_simple_counter {   u32 sw_if_index;   u64 drop;   u64 punt;   u64 rx_ip4;  
 u64 rx_ip6;   u64 rx_no_buffer;   u64 rx_miss;   u64 rx_error;   u64 tx_error; 
  u64 rx_mpls; };
So you will get back an array of counter structs for each sw_if_index you 
registered for.
At the moment the impl sends on sw_if_index per reply but that is going to 
change so that for each client we send as much in one message as possible.






On Tue, Sep 26, 2017 at 4:50 AM  <15803846...@qq.com> wrote:

Hi,  everyone! How to get interface stats using C api? For example, I want to 
know "GigabitEthernete/0/1" rx packets , what should I do? Thanks
___
 vpp-dev mailing list
 vpp-dev@lists.fd.io
 https://lists.fd.io/mailman/listinfo/vpp-dev___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] 回复: How to get interface stats using C api?

2017-09-26 Thread Keith Burns
Apologies,

It's a callback.

We probably need some decent literature written for how to consume the
various C, C++, Python and Lua APIs

If you have a preference for any of those languages I could write a brief
client program for you and start work on documenting this stuff.

On Sep 26, 2017 6:04 PM, "重新开始" <15803846...@qq.com> wrote:

> Hi,
>   Thank you for your detail information. After reading this, i can
> understand. But after calling  "want_per_interface_simple_stats" with
> enable_disable=1, num=1 and sw_ifs[4], i do not know how to receive this
> stats. calling other function or variable? Can you tell me how to receive
> stats in my c program?
>Thanks!
>
>
> -- 原始邮件 --
> *发件人:* "Keith Burns";;
> *发送时间:* 2017年9月27日(星期三) 上午6:39
> *收件人:* "重新开始"<15803846...@qq.com>;"vpp-dev";
> *主题:* Re: [vpp-dev] How to get interface stats using C api?
>
> Hi there,
>
> As of 17.10 you can now register for statistics on a per interface level.
>
> You need the sw_if_index of the interface you want stats for, but the
> calls are in
> https://git.fd.io/vpp/tree/src/vpp/stats/stats.api
>
> but as an example:
> Register:
>
> autoreply define want_per_interface_simple_stats
> {
>   u32 client_index;
>   u32 context;
>   u32 enable_disable;
>   u32 pid;
>   u32 num;
>   u32 sw_ifs[num];
>
> };
>
>
> So calling "want_per_interface_simple_stats" with enable_disable=1, num=1 and 
> sw_ifs[4] will give you
>
> interface_simple_stats every 10sec for sw_if_index=4.
>
>
> The content of "interface_simple_stats" looks like:
>
>
> /** \brief Simple per interface stats counters structure
> @param count - number of elements in message
> @param timestamp - u32 vlib timestamp for control plane
> @param data[count] - vl_api_vnet_simple_counter_t
>
> */
> manual_print manual_endian define vnet_per_interface_simple_counters
> {
>   u32 count;
>   u32 timestamp;
>   vl_api_vnet_simple_counter_t data[count];
> };
>
>
> Where each "vnet_simple_counter_t" looks like:
>
>
> https://git.fd.io/vpp/tree/src/vnet/interface.api
>
> /** \brief Simple interface counter data type for 
> vnet_interface_simple_counters
> @param sw_if_index - interface indexes for counters
> @param drop - RX or TX drops due to buffer starvation
> @param punt - used with VNET "punt" disposition
> @param rx_ip4 - received IP4 packets
> @param rx_ip6 - received IP6 packets
> @param rx_no_buffer - no RX buffers available
> @param rx_miss - receive misses
> @param rx_error - receive errors
> @param tx_error - transmit errors
> @param rx_mpls - received MPLS packet
>
> */
> typeonly manual_print manual_endian define vnet_simple_counter
> {
>   u32 sw_if_index;
>   u64 drop;
>   u64 punt;
>   u64 rx_ip4;
>   u64 rx_ip6;
>   u64 rx_no_buffer;
>   u64 rx_miss;
>   u64 rx_error;
>   u64 tx_error;
>   u64 rx_mpls;
> };
>
>
> So you will get back an array of counter structs for each sw_if_index you 
> registered for.
>
>
> At the moment the impl sends on sw_if_index per reply but that is going to 
> change so that for each client we send as much in one message as possible.
>
>
>
>
>
> On Tue, Sep 26, 2017 at 4:50 AM 重新开始 <15803846...@qq.com> wrote:
>
>> Hi,  everyone!
>> How to get interface stats using C api?
>> For example, I want to know "GigabitEthernete/0/1" rx packets , what should 
>> I do?
>>
>> Thanks
>>
>> ___
>> vpp-dev mailing list
>> vpp-dev@lists.fd.io
>> https://lists.fd.io/mailman/listinfo/vpp-dev
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] ?????? How to get interface stats using C api?

2017-09-26 Thread ????????
Hi??
  Thank you for your detail information. After reading this, i can understand. 
But after calling  "want_per_interface_simple_stats" with enable_disable=1, 
num=1 and sw_ifs[4], i do not know how to receive this stats. calling other 
function or variable? Can you tell me how to receive stats in my c program?  By 
the way, i use vpp 17.04. is it same?
   Thanks??




--  --
??: "Keith Burns";;
: 2017??9??27??(??) 6:39
??: ""<15803846...@qq.com>;"vpp-dev";

: Re: [vpp-dev] How to get interface stats using C api?



Hi there,

As of 17.10 you can now register for statistics on a per interface level.


You need the sw_if_index of the interface you want stats for, but the calls are 
in 
https://git.fd.io/vpp/tree/src/vpp/stats/stats.api



but as an example:
Register:
autoreply define want_per_interface_simple_stats {   u32 client_index;   u32 
context;   u32 enable_disable;   u32 pid;   u32 num;   u32 sw_ifs[num]; };
So calling "want_per_interface_simple_stats" with enable_disable=1, num=1 and 
sw_ifs[4] will give you interface_simple_stats every 10sec for sw_if_index=4.
The content of "interface_simple_stats" looks like:
/** \brief Simple per interface stats counters structure @param count - 
number of elements in message @param timestamp - u32 vlib timestamp for 
control plane @param data[count] - vl_api_vnet_simple_counter_t  */ 
manual_print manual_endian define vnet_per_interface_simple_counters {   u32 
count;   u32 timestamp;   vl_api_vnet_simple_counter_t data[count]; };
Where each "vnet_simple_counter_t" looks like:
https://git.fd.io/vpp/tree/src/vnet/interface.api
/** \brief Simple interface counter data type for 
vnet_interface_simple_counters @param sw_if_index - interface indexes for 
counters @param drop - RX or TX drops due to buffer starvation @param 
punt - used with VNET "punt" disposition @param rx_ip4 - received IP4 
packets @param rx_ip6 - received IP6 packets @param rx_no_buffer - no 
RX buffers available @param rx_miss - receive misses @param rx_error - 
receive errors @param tx_error - transmit errors @param rx_mpls - 
received MPLS packet */ typeonly manual_print manual_endian define 
vnet_simple_counter {   u32 sw_if_index;   u64 drop;   u64 punt;   u64 rx_ip4;  
 u64 rx_ip6;   u64 rx_no_buffer;   u64 rx_miss;   u64 rx_error;   u64 tx_error; 
  u64 rx_mpls; };
So you will get back an array of counter structs for each sw_if_index you 
registered for.
At the moment the impl sends on sw_if_index per reply but that is going to 
change so that for each client we send as much in one message as possible.






On Tue, Sep 26, 2017 at 4:50 AM  <15803846...@qq.com> wrote:

Hi,  everyone! How to get interface stats using C api? For example, I want to 
know "GigabitEthernete/0/1" rx packets , what should I do? Thanks
___
 vpp-dev mailing list
 vpp-dev@lists.fd.io
 https://lists.fd.io/mailman/listinfo/vpp-dev___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] ?????? How to get interface stats using C api?

2017-09-26 Thread ????????
Hi??
  Thank you for your detail information. After reading this, i can understand. 
But after calling  "want_per_interface_simple_stats" with enable_disable=1, 
num=1 and sw_ifs[4], i do not know how to receive this stats. calling other 
function or variable? Can you tell me how to receive stats in my c program?
   Thanks??




--  --
??: "Keith Burns";;
: 2017??9??27??(??) 6:39
??: ""<15803846...@qq.com>;"vpp-dev";

: Re: [vpp-dev] How to get interface stats using C api?



Hi there,

As of 17.10 you can now register for statistics on a per interface level.


You need the sw_if_index of the interface you want stats for, but the calls are 
in 
https://git.fd.io/vpp/tree/src/vpp/stats/stats.api



but as an example:
Register:
autoreply define want_per_interface_simple_stats {   u32 client_index;   u32 
context;   u32 enable_disable;   u32 pid;   u32 num;   u32 sw_ifs[num]; };
So calling "want_per_interface_simple_stats" with enable_disable=1, num=1 and 
sw_ifs[4] will give you interface_simple_stats every 10sec for sw_if_index=4.
The content of "interface_simple_stats" looks like:
/** \brief Simple per interface stats counters structure @param count - 
number of elements in message @param timestamp - u32 vlib timestamp for 
control plane @param data[count] - vl_api_vnet_simple_counter_t  */ 
manual_print manual_endian define vnet_per_interface_simple_counters {   u32 
count;   u32 timestamp;   vl_api_vnet_simple_counter_t data[count]; };
Where each "vnet_simple_counter_t" looks like:
https://git.fd.io/vpp/tree/src/vnet/interface.api
/** \brief Simple interface counter data type for 
vnet_interface_simple_counters @param sw_if_index - interface indexes for 
counters @param drop - RX or TX drops due to buffer starvation @param 
punt - used with VNET "punt" disposition @param rx_ip4 - received IP4 
packets @param rx_ip6 - received IP6 packets @param rx_no_buffer - no 
RX buffers available @param rx_miss - receive misses @param rx_error - 
receive errors @param tx_error - transmit errors @param rx_mpls - 
received MPLS packet */ typeonly manual_print manual_endian define 
vnet_simple_counter {   u32 sw_if_index;   u64 drop;   u64 punt;   u64 rx_ip4;  
 u64 rx_ip6;   u64 rx_no_buffer;   u64 rx_miss;   u64 rx_error;   u64 tx_error; 
  u64 rx_mpls; };
So you will get back an array of counter structs for each sw_if_index you 
registered for.
At the moment the impl sends on sw_if_index per reply but that is going to 
change so that for each client we send as much in one message as possible.






On Tue, Sep 26, 2017 at 4:50 AM  <15803846...@qq.com> wrote:

Hi,  everyone! How to get interface stats using C api? For example, I want to 
know "GigabitEthernete/0/1" rx packets , what should I do? Thanks
___
 vpp-dev mailing list
 vpp-dev@lists.fd.io
 https://lists.fd.io/mailman/listinfo/vpp-dev___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] How to get interface stats using C api?

2017-09-26 Thread Keith Burns
Hi there,

As of 17.10 you can now register for statistics on a per interface level.

You need the sw_if_index of the interface you want stats for, but the calls
are in
https://git.fd.io/vpp/tree/src/vpp/stats/stats.api

but as an example:
Register:

autoreply define want_per_interface_simple_stats
{
  u32 client_index;
  u32 context;
  u32 enable_disable;
  u32 pid;
  u32 num;
  u32 sw_ifs[num];

};


So calling "want_per_interface_simple_stats" with enable_disable=1,
num=1 and sw_ifs[4] will give you

interface_simple_stats every 10sec for sw_if_index=4.


The content of "interface_simple_stats" looks like:


/** \brief Simple per interface stats counters structure
@param count - number of elements in message
@param timestamp - u32 vlib timestamp for control plane
@param data[count] - vl_api_vnet_simple_counter_t

*/
manual_print manual_endian define vnet_per_interface_simple_counters
{
  u32 count;
  u32 timestamp;
  vl_api_vnet_simple_counter_t data[count];
};


Where each "vnet_simple_counter_t" looks like:


https://git.fd.io/vpp/tree/src/vnet/interface.api

/** \brief Simple interface counter data type for vnet_interface_simple_counters
@param sw_if_index - interface indexes for counters
@param drop - RX or TX drops due to buffer starvation
@param punt - used with VNET "punt" disposition
@param rx_ip4 - received IP4 packets
@param rx_ip6 - received IP6 packets
@param rx_no_buffer - no RX buffers available
@param rx_miss - receive misses
@param rx_error - receive errors
@param tx_error - transmit errors
@param rx_mpls - received MPLS packet

*/
typeonly manual_print manual_endian define vnet_simple_counter
{
  u32 sw_if_index;
  u64 drop;
  u64 punt;
  u64 rx_ip4;
  u64 rx_ip6;
  u64 rx_no_buffer;
  u64 rx_miss;
  u64 rx_error;
  u64 tx_error;
  u64 rx_mpls;
};


So you will get back an array of counter structs for each sw_if_index
you registered for.


At the moment the impl sends on sw_if_index per reply but that is
going to change so that for each client we send as much in one message
as possible.





On Tue, Sep 26, 2017 at 4:50 AM 重新开始 <15803846...@qq.com> wrote:

> Hi,  everyone!
> How to get interface stats using C api?
> For example, I want to know "GigabitEthernete/0/1" rx packets , what should I 
> do?
>
> Thanks
>
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Trunk ports with VPP

2017-09-26 Thread Prabhjot Singh Sethi
the better configuration that suits my case for adding vlan tag while
egressing packet on sub interfaces is to use "pop 1" tag-rewrite.

However it is still a mystery why there is an issue with ingress of
vlan tagged packet, even though the packet is tagged with appropriate
vlan it stays on the main interface and is not supplied to sub
interface.

Can someone please help if there is something not supported here?

i am using VPP 17.07 with ubuntu 14.04
and using host interfaces for testing as of now

Regards,
Prabhjot

- Original Message -
From:
 "Prabhjot Singh Sethi" 

To:
"John Lo (loj)" , "Prabhjot Singh Sethi"
, 
Cc:

Sent:
Tue, 26 Sep 2017 20:01:03 +0530
Subject:
RE: [vpp-dev] Trunk ports with VPP

 Thanks for pointing it out, somehow intuitively i thought it is an
egress property of sub interface to attach vlan tag.

with the correct config to access ports in the bridge domain fix the
egress with a vlan tag on the trunk port.
however now while receiving the tagged packet on trunk port i see
correct tag, but it somehow is not associating it to correct bridge
domain.

so i have interface host-eth10 and sub interface host-eth10.10
host-eth10 is associated to bridge domain 2 and sub interface is
associated to bridge domain 3
when VPP receives tagged packet with vlan 10 it still associates it to
bd 2 and not bd 3

if i don't associate any bd with base interface it just drops the
packet with some error.

Also somewhere we expect to use translate vlan tags to different
external tags which need not be same as the one tag for bridge domain,
please let us know if it is a supported config.
set interface l2 tag-rewrite GigabitEthernet2/0/0.10 translate 1-1
dot1q 10

Regards,
Prabhjot

- Original Message -
From:
 "John Lo (loj)" 

To:
"Prabhjot Singh Sethi" ,
"vpp-dev@lists.fd.io" 
Cc:

Sent:
Mon, 25 Sep 2017 20:38:11 +
Subject:
RE: [vpp-dev] Trunk ports with VPP

The access port config from the example doc is aa follows:

create vhost socket /tmp/sock2.sock server

set interface state VirtualEthernet0/0/2 up

set interface l2 bridge VirtualEthernet0/0/2 200

set interface l2 tag-rewrite VirtualEthernet0/0/2 push dot1q 200

  

Note the tag-rewrite config on access port to push the VLAN tag on
the packet. Did you do this on the access ports?

  

Regards,

John

    

FROM: vpp-dev-boun...@lists.fd.io
[mailto:vpp-dev-boun...@lists.fd.io] ON BEHALF OF Prabhjot Singh Sethi
SENT: Monday, September 25, 2017 2:11 PM
TO: vpp-dev@lists.fd.io
SUBJECT: [vpp-dev] Trunk ports with VPP

  

Hi,

    i am trying to achieve trunck ports with VPP using following
documentation


https://wiki.fd.io/view/VPP/Interconnecting_vRouters_with_VPP#Create_TRUNK_ports
[1]

only difference is that i am trying this with host interfaces
connected to netns instance.

  

However packet egressing on this trunk port remains untagged
irrespective of which sub-interface it came from.

  

i am i missing something over here ?

  

Regards,
 Prabhjot



Links:
--
[1]
https://wiki.fd.io/view/VPP/Interconnecting_vRouters_with_VPP#Create_TRUNK_ports

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

Re: [vpp-dev] 17.10 IPsec work

2017-09-26 Thread Sergio Gonzalez Monroy

Hi Matt,

The idea was to use the midchain-adj infrastructure (aka new FIB, aka 
FIB 2.0) when using IPsec tunnel interface and build the final 'rewrite' 
at tunnel creation for outbound traffic.


Current IPsec path for outbound packet:
... -> ip4-lookup ->  ip4-rewrite ->ipsec-if-output -> esp-encrypt -> 
ip4-lookup -> ip4-rewrite -> ...


Using midchain-adj:
... -> ip4-lookup ->  midchain-adj -> esp-encrypt-X -> midchain-adj-tx 
-> ip4-rewrite -> ...


We still need to setup the sequence, esp footer, padding  and 
crypto/integ in the esp-encrypt-X node, which is basically similar to 
esp-encrypt but without doing the ip/esp encap.


Unfortunately the feature won't make 17.10 release.

Thanks,
Sergio

On 26/09/2017 15:06, Matthew Smith wrote:


Hi,

There is an item listed as “IPSec rework - utilize new FIB” on the 
list of deliverables in the 17.10 release plan at 
https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_17.10. 
Does anyone have any more information on what that work will include?


Thanks!
-Matt Smith



___
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] 17.10 IPsec work

2017-09-26 Thread Matthew Smith

Hi,

There is an item listed as “IPSec rework - utilize new FIB” on the list of 
deliverables in the 17.10 release plan at 
https://wiki.fd.io/view/Projects/vpp/Release_Plans/Release_Plan_17.10 
. Does 
anyone have any more information on what that work will include?

Thanks!
-Matt Smith

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

Re: [vpp-dev] deadlock issue in VPP during DHCP packet processing

2017-09-26 Thread John Lo (loj)
There was a patch recently merged in mater/17.10:
https://gerrit.fd.io/r/#/c/8464/

Can you try the latest image from master/17.10 or apply the patch it into your 
17.07 tree and rebuild?

Regards,
John

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Balaji Kn
Sent: Tuesday, September 26, 2017 8:37 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] deadlock issue in VPP during DHCP packet processing

Hello All,

I am working on VPP 17.07 and using DHCP proxy functionality. CPU configuration 
provided as one main thread and one worker thread.

cpu {
  main-core 0
  corelist-workers 1
}

Deadlock is observed while processing DHCP offer packet in VPP. However issue 
is not observed if i comment CPU configuration in startup.conf file (if running 
in single thread) and everything works smoothly.

Following message is displayed on console.
vlib_worker_thread_barrier_sync: worker thread deadlock

Backtrace from core file generated.
[New LWP 12792]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/vpp -c /etc/vpp/startup.conf'.
Program terminated with signal SIGABRT, Aborted.
#0  0x7f721ab0fc37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x7f721ab0fc37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x7f721ab13028 in __GI_abort () at abort.c:89
#2  0x00407073 in os_panic () at 
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vpp/vnet/main.c:263
#3  0x7f721c0b5d5d in vlib_worker_thread_barrier_sync (vm=0x7f721c2e12e0 
)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/threads.c:1192
#4  0x7f721c2e973a in vl_msg_api_handler_with_vm_node 
(am=am@entry=0x7f721c5063a0 , the_msg=the_msg@entry=0x304bc6d4,
vm=vm@entry=0x7f721c2e12e0 , 
node=node@entry=0x7f71da6a8000)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlibapi/api_shared.c:501
#5  0x7f721c2f34be in memclnt_process (vm=, 
node=0x7f71da6a8000, f=)
at 
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlibmemory/memory_vlib.c:544
#6  0x7f721c08ec96 in vlib_process_bootstrap (_a=)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/main.c:1259
#7  0x7f721b2ec858 in clib_calljmp () at 
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vppinfra/longjmp.S:110
#8  0x7f71da9efe20 in ?? ()
#9  0x7f721c090041 in vlib_process_startup (f=0x0, p=0x7f71da6a8000, 
vm=0x7f721c2e12e0 )
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/main.c:1281
#10 dispatch_process (vm=0x7f721c2e12e0 , p=0x7f71da6a8000, 
last_time_stamp=58535483853222, f=0x0)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/main.c:1324
#11 0x00d800d9 in ?? ()

Any pointers would be appreciated.

Regards,
Balaji

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

Re: [vpp-dev] deadlock issue in VPP during DHCP packet processing

2017-09-26 Thread Dave Barach (dbarach)
Does this happen w/ master/latest? My guess: yes...

Florin and I are working on a patch to fix an obvious issue in this path right 
now, look for results shortly...

HTH... Dave


From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Balaji Kn
Sent: Tuesday, September 26, 2017 8:37 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] deadlock issue in VPP during DHCP packet processing

Hello All,

I am working on VPP 17.07 and using DHCP proxy functionality. CPU configuration 
provided as one main thread and one worker thread.

cpu {
  main-core 0
  corelist-workers 1
}

Deadlock is observed while processing DHCP offer packet in VPP. However issue 
is not observed if i comment CPU configuration in startup.conf file (if running 
in single thread) and everything works smoothly.

Following message is displayed on console.
vlib_worker_thread_barrier_sync: worker thread deadlock

Backtrace from core file generated.
[New LWP 12792]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/vpp -c /etc/vpp/startup.conf'.
Program terminated with signal SIGABRT, Aborted.
#0  0x7f721ab0fc37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x7f721ab0fc37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x7f721ab13028 in __GI_abort () at abort.c:89
#2  0x00407073 in os_panic () at 
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vpp/vnet/main.c:263
#3  0x7f721c0b5d5d in vlib_worker_thread_barrier_sync (vm=0x7f721c2e12e0 
)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/threads.c:1192
#4  0x7f721c2e973a in vl_msg_api_handler_with_vm_node 
(am=am@entry=0x7f721c5063a0 , the_msg=the_msg@entry=0x304bc6d4,
vm=vm@entry=0x7f721c2e12e0 , 
node=node@entry=0x7f71da6a8000)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlibapi/api_shared.c:501
#5  0x7f721c2f34be in memclnt_process (vm=, 
node=0x7f71da6a8000, f=)
at 
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlibmemory/memory_vlib.c:544
#6  0x7f721c08ec96 in vlib_process_bootstrap (_a=)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/main.c:1259
#7  0x7f721b2ec858 in clib_calljmp () at 
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vppinfra/longjmp.S:110
#8  0x7f71da9efe20 in ?? ()
#9  0x7f721c090041 in vlib_process_startup (f=0x0, p=0x7f71da6a8000, 
vm=0x7f721c2e12e0 )
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/main.c:1281
#10 dispatch_process (vm=0x7f721c2e12e0 , p=0x7f71da6a8000, 
last_time_stamp=58535483853222, f=0x0)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/main.c:1324
#11 0x00d800d9 in ?? ()

Any pointers would be appreciated.

Regards,
Balaji

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

[vpp-dev] deadlock issue in VPP during DHCP packet processing

2017-09-26 Thread Balaji Kn
Hello All,

I am working on VPP 17.07 and using DHCP proxy functionality. CPU
configuration provided as one main thread and one worker thread.

cpu {
  main-core 0
  corelist-workers 1
}

Deadlock is observed while processing DHCP offer packet in VPP. However
issue is not observed if i comment CPU configuration in startup.conf file
(if running in single thread) and everything works smoothly.

*Following message is displayed on console.*
vlib_worker_thread_barrier_sync: worker thread deadlock

*Backtrace from core file generated.*
[New LWP 12792]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/vpp -c /etc/vpp/startup.conf'.
Program terminated with signal SIGABRT, Aborted.
#0  0x7f721ab0fc37 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x7f721ab0fc37 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x7f721ab13028 in __GI_abort () at abort.c:89
#2  0x00407073 in os_panic () at
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vpp/vnet/main.c:263
#3  0x7f721c0b5d5d in vlib_worker_thread_barrier_sync
(vm=0x7f721c2e12e0 )
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/threads.c:1192
#4  0x7f721c2e973a in vl_msg_api_handler_with_vm_node
(am=am@entry=0x7f721c5063a0
, the_msg=the_msg@entry=0x304bc6d4,
vm=vm@entry=0x7f721c2e12e0 , node=node@entry
=0x7f71da6a8000)
at
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlibapi/api_shared.c:501
#5  0x7f721c2f34be in memclnt_process (vm=,
node=0x7f71da6a8000, f=)
at
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlibmemory/memory_vlib.c:544
#6  0x7f721c08ec96 in vlib_process_bootstrap (_a=)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/main.c:1259
#7  0x7f721b2ec858 in clib_calljmp () at
/root/vfe/fe-vfe/datapath/vpp/build-data/../src/vppinfra/longjmp.S:110
#8  0x7f71da9efe20 in ?? ()
#9  0x7f721c090041 in vlib_process_startup (f=0x0, p=0x7f71da6a8000,
vm=0x7f721c2e12e0 )
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/main.c:1281
#10 dispatch_process (vm=0x7f721c2e12e0 ,
p=0x7f71da6a8000, last_time_stamp=58535483853222, f=0x0)
at /root/vfe/fe-vfe/datapath/vpp/build-data/../src/vlib/main.c:1324
#11 0x00d800d9 in ?? ()

Any pointers would be appreciated.

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

[vpp-dev] How to get interface stats using C api?

2017-09-26 Thread ????????
Hi,  everyone! How to get interface stats using C api? For example, I want to 
know "GigabitEthernete/0/1" rx packets , what should I do? Thanks___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev