Re: [vpp-dev] [SFC] Query regarding SFC classifier configuration for ip4 traffic

2017-11-05 Thread Ni, Hongjun
Hi Phaneendra,
Please see inline comments.

-Hongjun

From: Phaneendra Manda [mailto:mphaneen...@gmail.com]
Sent: Sunday, November 5, 2017 1:18 AM
To: Ni, Hongjun 
Cc: vpp-dev@lists.fd.io; nsh_sfc-...@lists.fd.io
Subject: Re: [vpp-dev] [SFC] Query regarding SFC classifier configuration for 
ip4 traffic

Hi Hongjun,

Firstly i would like to thank you for your support. This link was a great help 
and i was able to get the configuration for classifier and i can see the 
packets coming to nsh-classifier node in the packet trace.

I need some more support on the below items:

1. It would be a great if you can share me the configuration in VPP through CLI 
for SFF and proxy.
[Hongjun] Please refer to 
https://wiki.fd.io/view/NSH_SFC/Build,_Install,_and_Test_Images

2. Is there any performance statistics that SFC feature can support like 
capacity, throughput etc..
[Hongjun] Please refer to 
https://wiki.fd.io/view/File:NSH_SFC_17.01_Preliminary_Perf.pptx

Currently i was stuck at the below problem.
3. Now i can get the packet at nsh-classifier node. But it fails to lookup in 
the ip4-table.
[Hongjun] You need add ip route and arp for vxlan-gpe tunnel’s remote ip. Such 
as:
ip route add 192.168.50.74/24 via 192.168.50.73
set ip arp TenGigabitEthernet5/0/1 192.168.50.74 02fe.8629.b438

Below is my configuration for vxlan-gpe:
vpp# sh vxlan-gpe
[0] local: 192.168.20.1 remote: 192.168.20.2   vxlan VNI 100 next-protocol nsh 
fibs: (encap 0, decap 0)

Ping to SF ip address is success
vpp# ping 192.168.20.2 source GigabitEthernet0/10/0
64 bytes from 192.168.20.2: icmp_seq=1 ttl=64 time=.3264 ms
64 bytes from 192.168.20.2: icmp_seq=2 ttl=64 time=.1723 ms


Below is the packet trace:
vpp# show trace
--- Start of thread 0 vpp_main ---
Packet 1

00:35:34:038659: dpdk-input
  GigabitEthernet0/9/0 rx queue 0
  buffer 0x4cf2: current data 0, length 124, free-list 0, clone-count 0, 
totlen-nifb 0, trace 0x0
  PKT MBUF: port 0, nb_segs 1, pkt_len 124
buf_len 2176, data_len 124, ol_flags 0x0, data_off 128, phys_addr 0x7e033cc0
packet_type 0x0
  IP4: 08:00:27:aa:bb:21 -> 08:00:27:aa:bb:01
  UDP: 192.168.0.10 -> 192.0.0.1
tos 0x00, ttl 255, length 110, checksum 0x4923
fragment id 0xf1a7
  UDP: 1024 -> 1024
length 90, checksum 0x
00:35:34:038709: ethernet-input
  IP4: 08:00:27:aa:bb:21 -> 08:00:27:aa:bb:01
00:35:34:038717: l2-input
  l2-input: sw_if_index 1 dst 08:00:27:aa:bb:01 src 08:00:27:aa:bb:21
00:35:34:038720: l2-input-classify
  l2-classify: sw_if_index 1, table 0, offset c0, next 17
00:35:34:038722: nsh-classifier

  nsh ver 0 ttl 3 len 6 (24 bytes) md_type 1 next_protocol 1
  service path 185 service index 255
  c1 1 c2 2 c3 3 c4 4

00:35:34:038731: vxlan-gpe-encap
  VXLAN-GPE-ENCAP: tunnel 2
00:35:34:038734: ip4-lookup
  fib 0 dpo-idx 0 flow hash: 0x
  IP6_HOP_BY_HOP_OPTIONS: 0.0.0.2 -> 0.0.0.3
version 0, header length 0
tos 0xc6, ttl 0, length 257, checksum 0x0001 (should be 0x)
fragment id 0x006c offset 53240, flags MORE_FRAGMENTSDONT_FRAGMENT
00:35:34:038737: ip4-drop
IP6_HOP_BY_HOP_OPTIONS: 0.0.0.2 -> 0.0.0.3
  version 0, header length 0
  tos 0xc6, ttl 0, length 257, checksum 0x0001 (should be 0x)
  fragment id 0x006c offset 53240, flags MORE_FRAGMENTSDONT_FRAGMENT
00:35:34:038738: error-drop
  ip4-input: ip4 adjacency drop


--
Thanks & regards,
Phaneendra Manda.


On Thu, Nov 2, 2017 at 5:02 PM, Ni, Hongjun 
> wrote:
Hi Phaneendra,

Please refer to below link to see how to configure it and packet trace:
https://wiki.fd.io/view/File:NSH-Classifier-Output.png

-Hongjun

From: Phaneendra Manda 
[mailto:mphaneen...@gmail.com]
Sent: Wednesday, November 1, 2017 4:39 PM
To: Ni, Hongjun >
Cc: vpp-dev@lists.fd.io; 
nsh_sfc-...@lists.fd.io
Subject: Re: [vpp-dev] [SFC] Query regarding SFC classifier configuration for 
ip4 traffic

Hi Hongjun,

Thank your very much for your support.

I have tried this configuration for UDP packets and below is my configuration

classify table mask l3 ip4 proto
classify session l2-input-hit-next input-node nsh-classifier table-index 0 
match l3 ip4 proto 17 opaque-index 47615
set int l2 bridge GigabitEthernet0/9/0 1 1
set interface l2 input classify intfc GigabitEthernet0/9/0 ip4-table 0

When i send a UDP packet, the packet reaches till "l2-input-classify" and goes 
to "l2-learn" node. How can i direct the packet to "nsh-classifier" node?

Trace output below :

00:49:42:211037: dpdk-input
  GigabitEthernet0/9/0 rx queue 0
  buffer 0x4d8e: current data 0, length 132, free-list 0, clone-count 0, 
totlen-nifb 0, trace 0x1
  PKT MBUF: port 0, nb_segs 1, pkt_len 132
buf_len 2176, data_len 132, ol_flags 0x0, data_off 128, phys_addr 0x74d32280

Re: [vpp-dev] IPV6 Forwarding error

2017-11-05 Thread yug...@telincn.com
Hi  neale,
I add this protection, but other errors come out in many different ways, all 
are ipv6 fib process errors.


fib_node_index_t
ip6_mfib_table_lookup2 (const ip6_mfib_t *mfib,
const ip6_address_t *src,
const ip6_address_t *grp)
{
ip6_mfib_node_t *i6mn;
ip6_mfib_key_t key;
if(!mfib)
return 0; (or  return ~0;)
   
IP6_MFIB_MK_KEY(grp, src, );

i6mn = (ip6_mfib_node_t*) rn_match(key.key,
   (struct radix_node_head *)mfib->rhead); 
// const cast

ASSERT(NULL != i6mn);

return (i6mn->i6mn_entry);
}

Regards,
Ewan


yug...@telincn.com
 
From: yug...@telincn.com
Date: 2017-11-06 09:17
To: Neale Ranns (nranns); vpp-dev
Subject: Re: Re: [vpp-dev] IPV6 Forwarding error
Hi neale,
I've added a protection on it, but should it be invalid somehow?

Regards,
Ewan


yug...@telincn.com
 
From: Neale Ranns (nranns)
Date: 2017-11-04 23:01
To: yug...@telincn.com; vpp-dev
Subject: Re: [vpp-dev] IPV6 Forwarding error
 
Hi Ewan,
 
I would guess that fib_index0 is invalid.
 
/neale
 
From:  on behalf of "yug...@telincn.com" 

Date: Saturday, 4 November 2017 at 11:11
To: vpp-dev 
Subject: [vpp-dev] IPV6 Forwarding error
 
Hi all,
Here is ipv6 forwarding error, my version is 17.04.
Any idea?
 


Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
mfib_forward_lookup (is_v4=0, frame=0x7fffb8626f00, node=0x7fffb5cffe80, 
vm=0x779aa2a0 )
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vnet/mfib/mfib_forward.c:305
305 mfei0 = ip6_mfib_table_lookup2(ip6_mfib_get(fib_index0),
(gdb) bt
#0  mfib_forward_lookup (is_v4=0, frame=0x7fffb8626f00, node=0x7fffb5cffe80, 
vm=0x779aa2a0 )
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vnet/mfib/mfib_forward.c:305
#1  ip6_mfib_forward_lookup (frame=0x7fffb8626f00, node=0x7fffb5cffe80, 
vm=0x779aa2a0 )
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vnet/mfib/mfib_forward.c:353
#2  ip6_mfib_forward_lookup_avx2 (vm=0x779aa2a0 , 
node=0x7fffb5cffe80, frame=0x7fffb8626f00)
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vnet/mfib/mfib_forward.c:369
#3  0x77757129 in dispatch_node (vm=0x779aa2a0 , 
node=0x7fffb5cffe80, type=, 
dispatch_state=VLIB_NODE_STATE_POLLING, frame=, 
last_time_stamp=10161712619298)
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:998
#4  0x7775741d in dispatch_pending_node (vm=vm@entry=0x779aa2a0 
, p=0x7fffb8556de8, 
last_time_stamp=) at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:1144
#5  0x77757e7d in vlib_main_or_worker_loop (is_main=1, 
vm=0x779aa2a0 )
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:1591
#6  vlib_main_loop (vm=0x779aa2a0 ) at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:1611
#7  vlib_main (vm=vm@entry=0x779aa2a0 , 
input=input@entry=0x7fffb4cd4fa0)
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:1739
#8  0x77790f23 in thread0 (arg=140737347494560) at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/unix/main.c:507
#9  0x75a3dce0 in clib_calljmp () at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vppinfra/longjmp.S:110
#10 0x7fffd410 in ?? ()
#11 0x7779193d in vlib_unix_main (argc=, argv=)
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/unix/main.c:606
 
Regards,
Ewan


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

[vpp-dev] multi-core multi-threading performance

2017-11-05 Thread Pragash Vijayaragavan
Hi ,

We are measuring performance of ip6 lookup in multi-core multi-worker
environments and
we don't see good scaling of performance when we keep increasing the number
of cores/workers.

We are just changing the startup.conf file to create more workers,
rx-queues, sock-mem etc. Should we do anything else to see an increase in
performance.

Is there a limitation on the performance even if we increase the number of
workers.

Is it dependent on the number of hardware NICs we have, we only have 1 NIC
to receive the traffic.


TIA,

Thanks,

Pragash Vijayaragavan
Grad Student at Rochester Institute of Technology
email : pxv3...@rit.edu
ph : 585 764 4662
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] IPV6 Forwarding error

2017-11-05 Thread yug...@telincn.com
Hi neale,
I've added a protection on it, but should it be invalid somehow?

Regards,
Ewan


yug...@telincn.com
 
From: Neale Ranns (nranns)
Date: 2017-11-04 23:01
To: yug...@telincn.com; vpp-dev
Subject: Re: [vpp-dev] IPV6 Forwarding error
 
Hi Ewan,
 
I would guess that fib_index0 is invalid.
 
/neale
 
From:  on behalf of "yug...@telincn.com" 

Date: Saturday, 4 November 2017 at 11:11
To: vpp-dev 
Subject: [vpp-dev] IPV6 Forwarding error
 
Hi all,
Here is ipv6 forwarding error, my version is 17.04.
Any idea?
 


Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
mfib_forward_lookup (is_v4=0, frame=0x7fffb8626f00, node=0x7fffb5cffe80, 
vm=0x779aa2a0 )
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vnet/mfib/mfib_forward.c:305
305 mfei0 = ip6_mfib_table_lookup2(ip6_mfib_get(fib_index0),
(gdb) bt
#0  mfib_forward_lookup (is_v4=0, frame=0x7fffb8626f00, node=0x7fffb5cffe80, 
vm=0x779aa2a0 )
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vnet/mfib/mfib_forward.c:305
#1  ip6_mfib_forward_lookup (frame=0x7fffb8626f00, node=0x7fffb5cffe80, 
vm=0x779aa2a0 )
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vnet/mfib/mfib_forward.c:353
#2  ip6_mfib_forward_lookup_avx2 (vm=0x779aa2a0 , 
node=0x7fffb5cffe80, frame=0x7fffb8626f00)
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vnet/mfib/mfib_forward.c:369
#3  0x77757129 in dispatch_node (vm=0x779aa2a0 , 
node=0x7fffb5cffe80, type=, 
dispatch_state=VLIB_NODE_STATE_POLLING, frame=, 
last_time_stamp=10161712619298)
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:998
#4  0x7775741d in dispatch_pending_node (vm=vm@entry=0x779aa2a0 
, p=0x7fffb8556de8, 
last_time_stamp=) at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:1144
#5  0x77757e7d in vlib_main_or_worker_loop (is_main=1, 
vm=0x779aa2a0 )
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:1591
#6  vlib_main_loop (vm=0x779aa2a0 ) at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:1611
#7  vlib_main (vm=vm@entry=0x779aa2a0 , 
input=input@entry=0x7fffb4cd4fa0)
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/main.c:1739
#8  0x77790f23 in thread0 (arg=140737347494560) at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/unix/main.c:507
#9  0x75a3dce0 in clib_calljmp () at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vppinfra/longjmp.S:110
#10 0x7fffd410 in ?? ()
#11 0x7779193d in vlib_unix_main (argc=, argv=)
at 
/home/wangzy/Desktop/VBRASV100R001/vpp1704/build-data/../src/vlib/unix/main.c:606
 
Regards,
Ewan


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

Re: [vpp-dev] Ask a question, thanks!

2017-11-05 Thread Luke, Chris
One looks up the FIB attached to the interface the packet arrives on. The other 
checks whether a previous node indicated which FIB this packet should be 
forwarded via. Many nodes have documented how they use sw_if_index[], see 
https://docs.fd.io/vpp/18.01/dc/da9/ip4__forward_8c.html#a981572b77836b7b06de0d93847867180

Chris.

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of yao.chen...@zte.com.cn
Sent: Saturday, November 4, 2017 1:45
To: vpp-dev@lists.fd.io
Cc: lou.fangli...@zte.com.cn; wan.jun...@zte.com.cn
Subject: [vpp-dev] Ask a question, thanks!


 Hi,

in below  fun ip4_lookup_inline,i have a question,  please see also the 
following red part.

always_inline uword

ip4_lookup_inline (vlib_main_t * vm,

 vlib_node_runtime_t * node,

 vlib_frame_t * frame,

 int lookup_for_responses_to_locally_received_packets)



fib_index0 =

  vec_elt (im->fib_index_by_sw_if_index,

   vnet_buffer (p0)->sw_if_index[VLIB_RX]);

//above code ,get fib table index from vnet_buffer 
(p0)->sw_if_index[VLIB_RX] by vec_elt



fib_index0 =

  (vnet_buffer (p0)->sw_if_index[VLIB_TX] ==

   (u32) ~ 0) ? fib_index0 : vnet_buffer (p0)->sw_if_index[VLIB_TX];

  // here my question:if vnet_buffer (p0)->sw_if_index[VLIB_TX] is 
valid(not -1) , direct use vnet_buffer (p0)->sw_if_index[VLIB_TX] as fib table  
 index  .why direct use  vnet_buffer 
(p0)->sw_if_index[VLIB_TX]  instead of use vec_elt to get ?


regards,

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

[vpp-dev] Ask a question, thanks!

2017-11-05 Thread yao.chenghu
Hi,


in below  fun ip4_lookup_inline,i have a question,  please see also the 
following red part.


always_inline uword


ip4_lookup_inline (vlib_main_t * vm,


   vlib_node_runtime_t * node,


   vlib_frame_t * frame,


   int lookup_for_responses_to_locally_received_packets)





  fib_index0 =


vec_elt (im->fib_index_by_sw_if_index,


 vnet_buffer (p0)->sw_if_index[VLIB_RX]);


//above code ,get fib table index from vnet_buffer 
(p0)->sw_if_index[VLIB_RX] by vec_elt 






  fib_index0 =


(vnet_buffer (p0)->sw_if_index[VLIB_TX] ==


 (u32) ~ 0) ? fib_index0 : vnet_buffer (p0)->sw_if_index[VLIB_TX];


  // here my question:if vnet_buffer (p0)->sw_if_index[VLIB_TX] is 
valid(not -1) , direct use vnet_buffer (p0)->sw_if_index[VLIB_TX] as fib table  
 index  .why direct use  vnet_buffer 
(p0)->sw_if_index[VLIB_TX]  instead of use vec_elt to get ?



regards,


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

Re: [vpp-dev] VPP @ IETF 100

2017-11-05 Thread Charles Eckel (eckelcu)
-Original Message-
From:  on behalf of Ole Troan 

Date: Thursday, November 2, 2017 at 7:41 AM
To: vpp-dev 
Subject: [vpp-dev] VPP @ IETF 100

Guys,

VPP is in a couple of projects at the IETF 100 Hackathon in Singapore.

https://www.ietf.org/registration/MeetingWiki/wiki/100hackathon

Great to know VPP will be featured in projects at the upcoming hackathon. It 
might be good to mention VPP explicitly within the description of those 
projects on the wiki to make them easy to find.

If you aren't able to join there, but are in Singapore later in the week.
Would you be interested in a small VPP developer gathering? Lunch, dinner 
or hide away in a corner coding?
Please let me know directly, and I will summarize to the list.

If helpful, you can now schedule time in the Code Lounge 
(https://www.ietf.org/registration/MeetingWiki/wiki/doku.php?id=100codelounge[]=code[]=lounge)
 during the week of the IETF meeting.

I will be at the IETF hackathon in Singapore and at the meeting thereafter. I 
am a novice user of VPP rather than a VPP developer, but if something comes 
together, I would be thrilled to join.

Cheers,
Charles

Also if anyone has ideas for things to take to the IETF hackathon, please 
register and update the wiki.

Best regards,
Ole


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