Re: [vpp-dev] Facing issue Ipv6 routing (Vpp 1908)

2020-11-17 Thread Neale Ranns via lists.fd.io

Hi Chetan,

I think you’ll have to expand a bit on ‘sometimes’ for us to help. Under what 
conditions does this happen?

/neale


From: vpp-dev@lists.fd.io 
Date: Tuesday, 17 November 2020 at 07:40
To: vpp-dev 
Subject: [vpp-dev] Facing issue Ipv6 routing (Vpp 1908)
Hello Everyone,

We are facing an issue with respect to ipv6 fib lookup (Vpp-1908).
Sometimes a packet comes out of the wrong interface , looks like due to wrong 
fib lookup.

I have found one change which is not part of our code
https://gerrit.fd.io/r/c/vpp/+/27255

Can anybody please suggest , is that change could cause such a problem ?

Thanks,
Chetan Bhasin



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18050): https://lists.fd.io/g/vpp-dev/message/18050
Mute This Topic: https://lists.fd.io/mt/78311419/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] Facing issue Ipv6 routing (Vpp 1908)

2020-11-17 Thread chetan bhasin
Hi Neale,

Thanks for your response!

Note - This issue is not reproduced in labs but coming in one of our
deployment sites.

Let me explain the issue -
Client <> SUT(VPP 19.08 + our customized plugins)
<>Server

While sending icmpv6 (Echo Request) from client towards server , sometimes
that Request comes out from the wrong interface. ie

Client <> SUT(VPP 19.08 + our customized plugins)
<>Server
 -ECHO Request-->
 -
>
> Hi Chetan,
>
>
>
> I think you’ll have to expand a bit on ‘sometimes’ for us to help. Under
> what conditions does this happen?
>
>
>
> /neale
>
>
>
>
>
> *From: *vpp-dev@lists.fd.io 
> *Date: *Tuesday, 17 November 2020 at 07:40
> *To: *vpp-dev 
> *Subject: *[vpp-dev] Facing issue Ipv6 routing (Vpp 1908)
>
> Hello Everyone,
>
>
>
> We are facing an issue with respect to ipv6 fib lookup (Vpp-1908).
>
> Sometimes a packet comes out of the wrong interface , looks like due to
> wrong fib lookup.
>
>
>
> I have found one change which is not part of our code
>
> https://gerrit.fd.io/r/c/vpp/+/27255
>
>
>
> Can anybody please suggest , is that change could cause such a problem ?
>
>
>
> Thanks,
>
> Chetan Bhasin
>
>
>
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18051): https://lists.fd.io/g/vpp-dev/message/18051
Mute This Topic: https://lists.fd.io/mt/78311419/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] Configuring VPP as vSwitch and vRouter

2020-11-17 Thread Muruli dhar
Hi,

I have to run few benchmarks using *vpp as vswitch and vrouter* along with
DPDK but i am not finding proper steps on how to configure vpp as vswitch
and vrouter.

I have gone through few youtube links and other wiki links as below but no
luck
https://www.youtube.com/watch?v=z-ZRof2hDP0&feature=youtu.be
https://wiki.fd.io/view/Events/Training-2016-05-Content

I tried steps as mentioned in the below link to get hands-on on vpp as
switch and router.
https://fd.io/docs/vpp/master/gettingstarted/progressivevpp/switching.html
https://fd.io/docs/vpp/master/gettingstarted/progressivevpp/routing.html

So please help me in pointing to the relevant links or docs.

Thanks,
Murulidhar N

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18052): https://lists.fd.io/g/vpp-dev/message/18052
Mute This Topic: https://lists.fd.io/mt/78313976/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev]: Crash in memclnt_queue_callback().

2020-11-17 Thread Rajith PR via lists.fd.io
Hi All,

We are seeing a random crash in *VPP-19.08*. The crash is occurring in
memclnt_queue_callback
and it is in code that we are not using. Any pointers to fix the crash
would be helpful.

*Complete Call Stack:*

Thread 1 (Thread 0x7fe728f43d00 (LWP 189)):

#0  0x7fe728049492 in __GI___waitpid (pid=732,
stat_loc=stat_loc@entry=0x7fe6f9ebeed8, options=options@entry=0)
at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x7fe727fb4177 in do_system (line=) at
../sysdeps/posix/system.c:149
#2  0x7fe728ad6457 in bd_signal_handler_cb (signo=11) at
/development/librtbrickinfra/bd/src/bd.c:770
#3  0x7fe71c90fbf7 in rtb_bd_signal_handler (signo=11) at
/development/libvpp/src/vlib/unix/main.c:80
#4  0x7fe71c90ff92 in unix_signal_handler (signum=11,
si=0x7fe6f9ebf7b0, uc=0x7fe6f9ebf680)
at /development/libvpp/src/vlib/unix/main.c:180
#5  
#6  memclnt_queue_callback (vm=0x7fe71cb49e80 ) at
/development/libvpp/src/vlibmemory/memory_api.c:96
#7  0x7fe71c8a9258 in vlib_main_or_worker_loop (vm=0x7fe71cb49e80
, is_main=1)
at /development/libvpp/src/vlib/main.c:1799
#8  0x7fe71c8a9f9d in vlib_main_loop (vm=0x7fe71cb49e80
) at /development/libvpp/src/vlib/main.c:1982
#9  0x7fe71c8aac7b in vlib_main (vm=0x7fe71cb49e80
, input=0x7fe6f9ebffb0) at
/development/libvpp/src/vlib/main.c:2209
#10 0x7fe71c911745 in thread0 (arg=140630595772032) at
/development/libvpp/src/vlib/unix/main.c:666
#11 0x7fe71c568560 in clib_calljmp () from
/usr/local/lib/libvppinfra.so.1.0.1
#12 0x7ffe85672480 in ?? ()
#13 0x7fe71c911cbb in vlib_unix_main (argc=42,
argv=0x563be4aaa5a0) at /development/libvpp/src/vlib/unix/main.c:736
#14 0x7fe71e0bc9eb in rtb_vpp_core_init (argc=42,
argv=0x563be4aaa5a0) at /development/libvpp/src/vpp/vnet/main.c:483
#15 0x7fe71e18fba2 in rtb_vpp_main () at
/development/libvpp/src/vpp/rtbrick/rtb_vpp_main.c:113
#16 0x7fe728ad5e46 in bd_load_daemon_lib
(dmn_lib_cfg=0x7fe728cf2820 )
---Type  to continue, or q  to quit---
at /development/librtbrickinfra/bd/src/bd.c:627
#17 0x7fe728ad5ef1 in bd_load_all_daemon_libs () at
/development/librtbrickinfra/bd/src/bd.c:646
#18 0x7fe728ad7362 in bd_start_process () at
/development/librtbrickinfra/bd/src/bd.c:1128
#19 0x7fe72583c860 in bds_bd_init () at
/development/librtbrickinfra/libbds/code/bds/src/bds.c:657
#20 0x7fe7258c8a30 in pubsub_bd_init_expiry (data=0x0) at
/development/librtbrickinfra/libbds/code/pubsub/src/pubsub_helper.c:1444
#21 0x7fe7285d6640 in timer_dispatch (item=0x563be68209b0,
p=QB_LOOP_HIGH) at
/development/librtbrickinfra/libqb/lib/loop_timerlist.c:56
#22 0x7fe7285d25d6 in qb_loop_run_level (level=0x563be47a17a0) at
/development/librtbrickinfra/libqb/lib/loop.c:43
#23 0x7fe7285d2d4b in qb_loop_run (lp=0x563be47a1730) at
/development/librtbrickinfra/libqb/lib/loop.c:210
#24 0x7fe7285e461e in lib_qb_service_start_event_loop () at
/development/librtbrickinfra/libqb/lib/wrapper/lib_qb_service.c:257
#25 0x563be3d9f153 in main ()
(gdb)


*Code Snippet:*


 94   for (i = 0; i < vec_len (vl_api_queue_cursizes); i++)

 95 {
 96   if (*vl_api_queue_cursizes[i])
<-Crashed here
 97 {
 98   vm->queue_signal_pending = 1;
 99   vm->api_queue_nonempty = 1;
100   vlib_process_signal_event (vm, vl_api_clnt_node.index,
101  /* event_type */ QUEUE_SIGNAL_EVENT,
102  /* event_data */ 0);
103   break;
104 }
105 }


Thanks,

Rajith

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18053): https://lists.fd.io/g/vpp-dev/message/18053
Mute This Topic: https://lists.fd.io/mt/78314224/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] SVE/SVE2 based vectorization optimization

2020-11-17 Thread Damjan Marion via lists.fd.io

Hi Lijian,

I looked at your patches and I’m quite concerned about this approach, as you 
basically wrote completely different code path for the feature.
I don't see how we can maintain such code easily specially because today we 
don't have ARM hardware which can run that code.
If we merge that code two things can happen:
a) without testing - that code will fall out of sync quickly
a) with testing - people will not be able to modify existing code without 
updating also SVE code and that may be problem if they don't have access to 
hardware

Majority of the code we have is always dealing with the fixed vector size.
Vector size is mainly human decision in VPP code and it takes into account many 
factors including the size and locality of the data.
So it makes more sense to me that we provide SVE based VEC256 and VEC512 
functions which will make existing code to just work on arm instead of trying 
to implenet and maintain separate code paths…

— 
Damjan



> On 16.11.2020., at 06:10, Lijian Zhang  wrote:
> 
> Hi Damjan,
> I applied SVE based vectorization in ethernet-input node functions.
> Could you please take time to review below patches?
> 
> The patches are committed as the proposal for your comments.
> I have verified the functionality of the code on software emulation platform, 
> and will do performance benchmarking when CPUs with SVE feature are available.
> 
> https://gerrit.fd.io/r/c/vpp/+/29939 vppinfra: apply SVE/SVE2 based 
> vectorization [NEW]
> https://gerrit.fd.io/r/c/vpp/+/29940 ethernet: determine next[] node using 
> SVE [NEW]
> https://gerrit.fd.io/r/c/vpp/+/29941 ethernet: secondary DMAC check using SVE 
> [NEW]
> https://gerrit.fd.io/r/c/vpp/+/29942 ethernet: DMAC check using SVE [NEW]
> https://gerrit.fd.io/r/c/vpp/+/29943 ethernet: DMAC/ethertype parse using SVE 
> [NEW]
> https://gerrit.fd.io/r/c/vpp/+/29944 vlib: SVE based vlib_buffer operations 
> [NEW]
> 
> Thanks.
> 
>> -Original Message-
>> From: Damjan Marion 
>> Sent: 2020年10月22日 20:33
>> To: Lijian Zhang 
>> Cc: nd ; Nitin Saxena ; Govindarajan
>> Mohandoss ; Honnappa Nagarahalli
>> ; Jieqiang Wang
>> ; vpp-dev 
>> Subject: Re: SVE/SVE2 based vectorization optimization
>> 
>> 
>> Dear Lijian,
>> 
>> You took very uncommon example of vector usage in the VPP codebase.
>> Common usage is big packet processing loop which is dealing with 2, 4 or 8
>> packets in one iteration.
>> 
>> I.e. How we will leverage use of SVE in src/vnet/ethernet/node.c ?
>> 
>> Thanks,
>> 
>> —
>> Damjan
>> 
>> 
>> 
>>> On 22.10.2020., at 14:08, Lijian Zhang  wrote:
>>> 
>>> Hi Damjan,
>>> I committed a patch (https://gerrit.fd.io/r/c/vpp/+/28986) to apply
>> SVE/SVE2 based vectorization in VPP.
>>> The patch works a demo, calling for comments from VPP community.
>>> Could you please review the patch?
>>> If the idea in this proposal is agreed, we will find more opportunities to
>> deploy SVE based vectorization in VPP.
>>> 
>>> If necessary, we can make some explanation about the proposal patch in
>> next VPP/Aarch64 meeting to you.
>>> 
>>> Some SVE/SVE2 references:
>>> 1. ACLE (Arm C Language Extension) for
>> SVEhttps://static.docs.arm.com/100987//acle_sve_100987__00_en
>> .pdf
>>> 2. ARM Compiler Scalable Vector Extension User
>> Guidehttps://developer.arm.com/documentation/100891/0607/coding-
>> considerations/using-sve-intrinsics-directly-in-your-c-code
>>> 3. The Scalable Vector Extension (SVE), Architecture Reference Manual
>> Supplement, for ARMv8-
>> Ahttps://static.docs.arm.com/ddi0584/a/DDI0584A_a_SVE_supp_armv8A.pd
>> f
>>> 
>>> 
>>> Thank you.
> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18054): https://lists.fd.io/g/vpp-dev/message/18054
Mute This Topic: https://lists.fd.io/mt/77728478/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] Facing issue Ipv6 routing (Vpp 1908)

2020-11-17 Thread Neale Ranns via lists.fd.io


From:  on behalf of chetan bhasin 

Date: Tuesday 17 November 2020 at 12:27
To: "Neale Ranns (nranns)" 
Cc: vpp-dev 
Subject: Re: [vpp-dev] Facing issue Ipv6 routing (Vpp 1908)

Hi Neale,

Thanks for your response!

Note - This issue is not reproduced in labs but coming in one of our deployment 
sites.

Ah well, if it’s in deployment and not your labs, then it’s probably the 
polarisation frequency of the flux capacitor 😉

Let me explain the issue -
Client <> SUT(VPP 19.08 + our customized plugins)  
<>Server

While sending icmpv6 (Echo Request) from client towards server , sometimes that 
Request comes out from the wrong interface. ie

Client <> SUT(VPP 19.08 + our customized plugins)  
<>Server
 -ECHO Request-->
 -> wrote:

Hi Chetan,

I think you’ll have to expand a bit on ‘sometimes’ for us to help. Under what 
conditions does this happen?

/neale


From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>>
Date: Tuesday, 17 November 2020 at 07:40
To: vpp-dev mailto:vpp-dev@lists.fd.io>>
Subject: [vpp-dev] Facing issue Ipv6 routing (Vpp 1908)
Hello Everyone,

We are facing an issue with respect to ipv6 fib lookup (Vpp-1908).
Sometimes a packet comes out of the wrong interface , looks like due to wrong 
fib lookup.

I have found one change which is not part of our code
https://gerrit.fd.io/r/c/vpp/+/27255

Can anybody please suggest , is that change could cause such a problem ?

Thanks,
Chetan Bhasin



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18055): https://lists.fd.io/g/vpp-dev/message/18055
Mute This Topic: https://lists.fd.io/mt/78311419/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] #vpp #vppcom #vpp-dev #vnet

2020-11-17 Thread nikhil subhedar
Hi All,
Can any one share the sample of sshd_config file? or what things needs to be 
done in order to enable sshd on VPP.?
i am following below link,
https://wiki.fd.io/view/VPP/HostStack/LDP/sshd
but from the server i am getting the RST while 3 way handshaking.

Thanks in advance.

Regards,
Nikhil

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18056): https://lists.fd.io/g/vpp-dev/message/18056
Mute This Topic: https://lists.fd.io/mt/78314955/21656
Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev
Mute #vnet:https://lists.fd.io/g/vpp-dev/mutehashtag/vnet
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] Check if trafic is transit or not

2020-11-17 Thread jerome . bayaux
Hello all,

I'm currently improving some stuff for the IOAM implementation, for example, 
I'm trying to add the possibility to put the Hop-by-Hop extension header 
containing IOAM data inside a newly created packet instead of inserting it 
directly to the existing packet (i.e doing IPv6 in IPv6 encapsulation). This 
will be useful in the case where the IOAM encap node is not the one that 
generates the traffic.

In order to determine when it is necessary to do this IPv6 in IPv6 encap thing, 
in the IOAM encap node, I need to check whether traffic is transit traffic or 
"new" traffic (i.e traffic generated by the node itself). This check needs to 
be put in the vnet/ip/ip6_hop_by_hop.c file, in function: VLIB_NODE_FN 
(ip6_add_hop_by_hop_node).

I guess that a function returning all addresses bound to all interfaces exists 
but it might not be the most efficient solution to use this function.

Then, what would be the best solution to check what I need to check ?

Thanks for your answer,

Jérôme

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18057): https://lists.fd.io/g/vpp-dev/message/18057
Mute This Topic: https://lists.fd.io/mt/78315404/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]: Crash in memclnt_queue_callback().

2020-11-17 Thread Dave Barach
Let’s be clear: you’re seeing a crash in a modified fork of vpp-19.08. I’ve 
never seen such a crash myself, nor has one such been reported by anyone else 
to my knowledge.

 

That having been written, all signs point to the volatile int ** vector 
vl_api_queue_cursizes having had an accident:

 

static void

memclnt_queue_callback (vlib_main_t * vm)

{



  for (i = 0; i < vec_len (vl_api_queue_cursizes); i++)

{

  if (*vl_api_queue_cursizes[i])

  {

vm->queue_signal_pending = 1;

vm->api_queue_nonempty = 1;

vlib_process_signal_event (vm, vl_api_clnt_node.index,

   /* event_type */ QUEUE_SIGNAL_EVENT,

   /* event_data */ 0);

break;

  }

}



}

 

Try a debug image. Try capturing “i”, and the value vl_api_queue_cursizes[i] 
before dereferencing as a pointer. Add a couple of global variables with names 
which won’t collide with anything else:

 

void int oingo_save_i;

void oingo_save_cursizep;

 

In the loop, set:

   oingo_save_i = i;

   oingo_save_cursizep = vl_api_queue_cursizes[i];

 

   if(*vl_api_queue_cursizes[i])

 

 

Capture a coredump. It should be obvious why the reference blows up. If you 
can, change your custom signal handler so that the faulting virtual address is 
as obvious as possible.

 

Beyond that, you’re on your own.

 

HTH... Dave 

 

From: vpp-dev@lists.fd.io  On Behalf Of Rajith PR via 
lists.fd.io
Sent: Tuesday, November 17, 2020 7:03 AM
To: vpp-dev 
Subject: [vpp-dev]: Crash in memclnt_queue_callback().

 

Hi All,

 

We are seeing a random crash in VPP-19.08. The crash is occurring in 
memclnt_queue_callback and it is in code that we are not using. Any pointers to 
fix the crash would be helpful.

 

Complete Call Stack:

 

Thread 1 (Thread 0x7fe728f43d00 (LWP 189)):

#0  0x7fe728049492 in __GI___waitpid (pid=732, 
stat_loc=stat_loc@entry=0x7fe6f9ebeed8, options=options@entry=0)
at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x7fe727fb4177 in do_system (line=) at 
../sysdeps/posix/system.c:149
#2  0x7fe728ad6457 in bd_signal_handler_cb (signo=11) at 
/development/librtbrickinfra/bd/src/bd.c:770
#3  0x7fe71c90fbf7 in rtb_bd_signal_handler (signo=11) at 
/development/libvpp/src/vlib/unix/main.c:80
#4  0x7fe71c90ff92 in unix_signal_handler (signum=11, si=0x7fe6f9ebf7b0, 
uc=0x7fe6f9ebf680)
at /development/libvpp/src/vlib/unix/main.c:180
#5  
#6  memclnt_queue_callback (vm=0x7fe71cb49e80 ) at 
/development/libvpp/src/vlibmemory/memory_api.c:96
#7  0x7fe71c8a9258 in vlib_main_or_worker_loop (vm=0x7fe71cb49e80 
, is_main=1)
at /development/libvpp/src/vlib/main.c:1799
#8  0x7fe71c8a9f9d in vlib_main_loop (vm=0x7fe71cb49e80 ) 
at /development/libvpp/src/vlib/main.c:1982
#9  0x7fe71c8aac7b in vlib_main (vm=0x7fe71cb49e80 , 
input=0x7fe6f9ebffb0) at /development/libvpp/src/vlib/main.c:2209
#10 0x7fe71c911745 in thread0 (arg=140630595772032) at 
/development/libvpp/src/vlib/unix/main.c:666
#11 0x7fe71c568560 in clib_calljmp () from 
/usr/local/lib/libvppinfra.so.1.0.1
#12 0x7ffe85672480 in ?? ()
#13 0x7fe71c911cbb in vlib_unix_main (argc=42, argv=0x563be4aaa5a0) at 
/development/libvpp/src/vlib/unix/main.c:736
#14 0x7fe71e0bc9eb in rtb_vpp_core_init (argc=42, argv=0x563be4aaa5a0) at 
/development/libvpp/src/vpp/vnet/main.c:483
#15 0x7fe71e18fba2 in rtb_vpp_main () at 
/development/libvpp/src/vpp/rtbrick/rtb_vpp_main.c:113
#16 0x7fe728ad5e46 in bd_load_daemon_lib (dmn_lib_cfg=0x7fe728cf2820 
)
---Type  to continue, or q  to quit---
at /development/librtbrickinfra/bd/src/bd.c:627
#17 0x7fe728ad5ef1 in bd_load_all_daemon_libs () at 
/development/librtbrickinfra/bd/src/bd.c:646
#18 0x7fe728ad7362 in bd_start_process () at 
/development/librtbrickinfra/bd/src/bd.c:1128
#19 0x7fe72583c860 in bds_bd_init () at 
/development/librtbrickinfra/libbds/code/bds/src/bds.c:657
#20 0x7fe7258c8a30 in pubsub_bd_init_expiry (data=0x0) at 
/development/librtbrickinfra/libbds/code/pubsub/src/pubsub_helper.c:1444
#21 0x7fe7285d6640 in timer_dispatch (item=0x563be68209b0, p=QB_LOOP_HIGH) 
at /development/librtbrickinfra/libqb/lib/loop_timerlist.c:56
#22 0x7fe7285d25d6 in qb_loop_run_level (level=0x563be47a17a0) at 
/development/librtbrickinfra/libqb/lib/loop.c:43
#23 0x7fe7285d2d4b in qb_loop_run (lp=0x563be47a1730) at 
/development/librtbrickinfra/libqb/lib/loop.c:210
#24 0x7fe7285e461e in lib_qb_service_start_event_loop () at 
/development/librtbrickinfra/libqb/lib/wrapper/lib_qb_service.c:257
#25 0x563be3d9f153 in main ()
(gdb) 
 
Code Snippet:
 
 94   for (i = 0; i < vec_len (vl_api_queue_cursizes); i++)

 95 {
 96   if (*vl_api_queue_cursizes[i]) 
<-Crashed here
 97 {
 98   vm->queue_signal_pending = 1;
 99   vm->api_queue_nonempty = 1;
100   vlib_process_signal_event (vm, vl_api_clnt_node.index,
101

Re: [vpp-dev] #vpp #vppcom #vpp-dev #vnet

2020-11-17 Thread Florin Coras
Hi Nikhil, 

Just use a default sshd_config file and change the 3 lines mentioned in the 
wiki. Note that this has been tested only with “through the stack” tcp 
connections, i.e., server running on top of vpp on one host and the client 
(running on linux, not using vpp) on a different host. 

You may want to start simpler, say with iperf3. 

Regards,
Florin

> On Nov 17, 2020, at 4:59 AM, nikhil subhedar  wrote:
> 
> Hi All,
> Can any one share the sample of sshd_config file? or what things needs to be 
> done in order to enable sshd on VPP.?
> i am following below link,
> https://wiki.fd.io/view/VPP/HostStack/LDP/sshd 
> 
> but from the server i am getting the RST while 3 way handshaking.
> 
> Thanks in advance.
> 
> Regards,
> Nikhil 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18059): https://lists.fd.io/g/vpp-dev/message/18059
Mute This Topic: https://lists.fd.io/mt/78314955/21656
Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp
Mute #vnet:https://lists.fd.io/g/vpp-dev/mutehashtag/vnet
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev]: Crash in memclnt_queue_callback().

2020-11-17 Thread Rajith PR via lists.fd.io
Thanks Dave, will check it out.

-Rajith

On Tue, Nov 17, 2020 at 8:40 PM  wrote:

> Let’s be clear: you’re seeing a crash in a *modified fork* of vpp-19.08.
> I’ve never seen such a crash myself, nor has one such been reported by
> anyone else to my knowledge.
>
>
>
> That having been written, all signs point to the volatile int ** vector
> vl_api_queue_cursizes having had an accident:
>
>
>
> static void
>
> memclnt_queue_callback (vlib_main_t * vm)
>
> {
>
> 
>
>   for (i = 0; i < vec_len (vl_api_queue_cursizes); i++)
>
> {
>
>   if (*vl_api_queue_cursizes[i])
>
>   {
>
> vm->queue_signal_pending = 1;
>
> vm->api_queue_nonempty = 1;
>
> vlib_process_signal_event (vm, vl_api_clnt_node.index,
>
>/* event_type */ QUEUE_SIGNAL_EVENT,
>
>/* event_data */ 0);
>
> break;
>
>   }
>
> }
>
> 
>
> }
>
>
>
> Try a debug image. Try capturing “i”, and the value
> vl_api_queue_cursizes[i] before dereferencing as a pointer. Add a couple of
> global variables with names which won’t collide with anything else:
>
>
>
> void int oingo_save_i;
>
> void oingo_save_cursizep;
>
>
>
> In the loop, set:
>
>oingo_save_i = i;
>
>oingo_save_cursizep = vl_api_queue_cursizes[i];
>
>
>
>if(*vl_api_queue_cursizes[i])
>
>  
>
>
>
> Capture a coredump. It should be obvious why the reference blows up. If
> you can, change your custom signal handler so that the faulting virtual
> address is as obvious as possible.
>
>
>
> Beyond that, you’re on your own.
>
>
>
> HTH... Dave
>
>
>
> *From:* vpp-dev@lists.fd.io  *On Behalf Of *Rajith
> PR via lists.fd.io
> *Sent:* Tuesday, November 17, 2020 7:03 AM
> *To:* vpp-dev 
> *Subject:* [vpp-dev]: Crash in memclnt_queue_callback().
>
>
>
> Hi All,
>
>
>
> We are seeing a random crash in *VPP-19.08*. The crash is occurring in 
> memclnt_queue_callback
> and it is in code that we are not using. Any pointers to fix the crash
> would be helpful.
>
>
>
> *Complete Call Stack:*
>
>
>
> Thread 1 (Thread 0x7fe728f43d00 (LWP 189)):
>
> #0  0x7fe728049492 in __GI___waitpid (pid=732, 
> stat_loc=stat_loc@entry=0x7fe6f9ebeed8, options=options@entry=0)
>
> at ../sysdeps/unix/sysv/linux/waitpid.c:30
>
> #1  0x7fe727fb4177 in do_system (line=) at 
> ../sysdeps/posix/system.c:149
>
> #2  0x7fe728ad6457 in bd_signal_handler_cb (signo=11) at 
> /development/librtbrickinfra/bd/src/bd.c:770
>
> #3  0x7fe71c90fbf7 in rtb_bd_signal_handler (signo=11) at 
> /development/libvpp/src/vlib/unix/main.c:80
>
> #4  0x7fe71c90ff92 in unix_signal_handler (signum=11, si=0x7fe6f9ebf7b0, 
> uc=0x7fe6f9ebf680)
>
> at /development/libvpp/src/vlib/unix/main.c:180
>
> #5  
>
> #6  memclnt_queue_callback (vm=0x7fe71cb49e80 ) at 
> /development/libvpp/src/vlibmemory/memory_api.c:96
>
> #7  0x7fe71c8a9258 in vlib_main_or_worker_loop (vm=0x7fe71cb49e80 
> , is_main=1)
>
> at /development/libvpp/src/vlib/main.c:1799
>
> #8  0x7fe71c8a9f9d in vlib_main_loop (vm=0x7fe71cb49e80 
> ) at /development/libvpp/src/vlib/main.c:1982
>
> #9  0x7fe71c8aac7b in vlib_main (vm=0x7fe71cb49e80 , 
> input=0x7fe6f9ebffb0) at /development/libvpp/src/vlib/main.c:2209
>
> #10 0x7fe71c911745 in thread0 (arg=140630595772032) at 
> /development/libvpp/src/vlib/unix/main.c:666
>
> #11 0x7fe71c568560 in clib_calljmp () from 
> /usr/local/lib/libvppinfra.so.1.0.1
>
> #12 0x7ffe85672480 in ?? ()
>
> #13 0x7fe71c911cbb in vlib_unix_main (argc=42, argv=0x563be4aaa5a0) at 
> /development/libvpp/src/vlib/unix/main.c:736
>
> #14 0x7fe71e0bc9eb in rtb_vpp_core_init (argc=42, argv=0x563be4aaa5a0) at 
> /development/libvpp/src/vpp/vnet/main.c:483
>
> #15 0x7fe71e18fba2 in rtb_vpp_main () at 
> /development/libvpp/src/vpp/rtbrick/rtb_vpp_main.c:113
>
> #16 0x7fe728ad5e46 in bd_load_daemon_lib (dmn_lib_cfg=0x7fe728cf2820 
> )
>
> ---Type  to continue, or q  to quit---
>
> at /development/librtbrickinfra/bd/src/bd.c:627
>
> #17 0x7fe728ad5ef1 in bd_load_all_daemon_libs () at 
> /development/librtbrickinfra/bd/src/bd.c:646
>
> #18 0x7fe728ad7362 in bd_start_process () at 
> /development/librtbrickinfra/bd/src/bd.c:1128
>
> #19 0x7fe72583c860 in bds_bd_init () at 
> /development/librtbrickinfra/libbds/code/bds/src/bds.c:657
>
> #20 0x7fe7258c8a30 in pubsub_bd_init_expiry (data=0x0) at 
> /development/librtbrickinfra/libbds/code/pubsub/src/pubsub_helper.c:1444
>
> #21 0x7fe7285d6640 in timer_dispatch (item=0x563be68209b0, 
> p=QB_LOOP_HIGH) at /development/librtbrickinfra/libqb/lib/loop_timerlist.c:56
>
> #22 0x7fe7285d25d6 in qb_loop_run_level (level=0x563be47a17a0) at 
> /development/librtbrickinfra/libqb/lib/loop.c:43
>
> #23 0x7fe7285d2d4b in qb_loop_run (lp=0x563be47a1730) at 
> /development/librtbrickinfra/libqb/lib/loop.c:210
>
> #24 0x7fe7285e461e in lib_qb_service_start_event_loop () at 
> /development/librtbrickinfra/libqb/lib/wrapper/lib_qb_servic

Re: [vpp-dev] Increasing NAT worker handoff frame queue size NAT_FQ_NELTS to avoid congestion drops?

2020-11-17 Thread Elias Rudberg
Hi Klement,

> I see no reason why this shouldn’t be configurable.
> [...]
> Would you like to submit a patch?

Sure, I'll give that a try, adding it as a config option of the same
kind as other NAT options.

Best regards,
Elias


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18061): https://lists.fd.io/g/vpp-dev/message/18061
Mute This Topic: https://lists.fd.io/mt/78230881/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] vppctl fails from within the application (system cmd returns 256)

2020-11-17 Thread Benoit Ganne (bganne) via lists.fd.io
> Could anyone suggest anything else to check

You can try to trace you process to see what is going on, eg.
~# strace -f ./a.out

> we had few issues with vpp
> api/vcl libraries and have not decided to pursue vpp - api for now, so
> vppctl is the only option.

Can you share what prevents you from using the API? This is what is supposed to 
be used by an external controller. I do not think it is a good idea to use 
vppctl in the long run (nonetheless because errors are hard to diagnose, as you 
can see tight now).

Best
ben

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18062): https://lists.fd.io/g/vpp-dev/message/18062
Mute This Topic: https://lists.fd.io/mt/78297645/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [EXTERNAL] [vpp-dev] vppctl fails from within the application (system cmd returns 256)

2020-11-17 Thread Chris Luke via lists.fd.io
Is vppctl in the system path? Otherwise fully specify the path to the vppctl 
binary in those system calls.

Chris.

From: vpp-dev@lists.fd.io  On Behalf Of Aniket Pugaonkar
Sent: Monday, November 16, 2020 12:41
To: vpp-dev@lists.fd.io
Subject: [EXTERNAL] [vpp-dev] vppctl fails from within the application (system 
cmd returns 256)

Hi,

i am having a issue with VPP running on RH8.2 with version 20.05.1.

There are 4 commands that I am trying to run from my application (using 
vppcli), fairly straight forward.  the Trace.Writeline function is just a 
utility to print out the trace.

what I see is the ret val is 256 indicating system command did not get executed 
properly. however  the same command when i type it manually , works perfectly 
fine.. Not sure what is wrong. I am logged in as root and running the process 
using "./a.out"  (manually) as a root.

Could anyone suggest anything else to check apart from switching to VPP API to 
configure interfaces/add routes etc? we had few issues with vpp api/vcl 
libraries and have not decided to pursue vpp - api for now, so vppctl is the 
only option. Alternative is to write a ipaddr.txt file and put it in 
startup.conf  -> which will do the trick. However I want to do it from 
application.   is there special flag in vpp.log to enable that can give 
information. i could not find anything useful in vpp.log

string s1("vppctl create sub-interfaces HundredGigabitEthernet12/0/1 
501");
string s2("vppctl set interface state HundredGigabitEthernet12/0/1 up");
string s3("vppctl set interface state HundredGigabitEthernet12/0/1.501 
up");
string s4("vppctl set interface ip address 
HundredGigabitEthernet12/0/1.501 2001:5b0::501:b883:31f:19e:8879/64");

int ret;
ret = system(s1.c_str());
Trace.WriteLine(TraceConstants::Configuration, "Cmd: ", s1, ", ret = ", 
ret);
ret = system(s2.c_str());
Trace.WriteLine(TraceConstants::Configuration, "Cmd: ", s2, ", ret = ", 
ret);
ret = system(s3.c_str());
Trace.WriteLine(TraceConstants::Configuration, "Cmd: ", s3, ", ret = ", 
ret);
ret = system(s4.c_str());
Trace.WriteLine(TraceConstants::Configuration, "Cmd: ", s4, ", ret = ", 
ret);


my startup.conf file:

unix {
  nodaemon
  log /var/log/vpp/vpp.log
  full-coredump
  cli-listen /run/vpp/cli.sock
  gid vpp
}


[cid:image002.png@01D6BCD6.975B3AD0]




--

Thanks and regards,
Aniket Pugaonkar

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18063): https://lists.fd.io/g/vpp-dev/message/18063
Mute This Topic: https://lists.fd.io/mt/78320037/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] svm ASAN check error

2020-11-17 Thread Benoit Ganne (bganne) via lists.fd.io
> You can try the following steps:
> 1.make VPP_EXTRA_CMAKE_ARGS=-DVPP_ENABLE_SANITIZE_ADDR=ON build
> 2.make run
> 3.session enable

Thanks, can you check if https://gerrit.fd.io/r/c/vpp/+/29969 fix your issue?

Best
ben

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18064): https://lists.fd.io/g/vpp-dev/message/18064
Mute This Topic: https://lists.fd.io/mt/78245228/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] Python API modules

2020-11-17 Thread Paul Vinciguerra
I think that generating the python code makes the most sense.  The body of
the code can still defer to the dynamically generated object, since it's
not available until runtime anyway, but the user no longer has to resort to
using lambdas because of the deferred bindings.

I imagined it would work like a regular module:

>>> import vpp_papi.plugins.map as map
>>> dir(map)
...
>>> help(map)

vppapigen would generate stubs such as:

vpp_papi.plugins.map.py:

def map_add_domain(client_index: u32, context: u32, ip6_prefix:
IPV6Network, ip4_prefix: IPV6Network, ip6_src: IPV6Interface, ea_bits_len :
u8, psid_offset : u8, psid_length : u8, mtu: u16, tag : str  ) -> i32:
   """docstring from .api block comment
   """
 >

The user, of course, still needs to connect to VPP for their code to run.

but the typedefs could become data classes and the encode/decode methods in
the test code become unnecessary.
vl_api_ip_ecn_t.IP_API_ECN_NONE could become ip_ecn.NONE

The IDE's could then provide type checking and auto completion. (So one
would know that NONE was an option without referring to the sources.)

We would need to play around with it to see how well it works.

On Sat, Nov 14, 2020 at 1:16 PM  wrote:

> Hi Paul,
>
> Picking off one issue at the time.
>
> > Why won't Ole, as maintainer, allow it?
> >
> > The build system uses something called vppapigen to generate the c
> include files and the json files.  It could as easily generate static stubs
> so that development with python could be usable without a running vpp
> instance.
>
> I certainly didn't intend for my opinion to come off as a "don't allow".
>
> Initially the Python code was fully generated from vppapigen. With a class
> per .api file and fully formed methods. Later it evolved to dynamically
> create all functions based on the API representations in JSON.
>
> (This latter change made the Python binding independent of VPP version
> which is how it was possible to individually package it and put it on PyPI,
> but lets do that on a separate thread.)
>
> Generating Python code from vppapigen is simple. But just how do you want
> these stubs to look like and how should they be packaged and used?
>
> If I have pushed back on this it's likely more out of ignorance of the
> problem rather than ill will. ;-)
>
> Best regards,
> Ole

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18065): https://lists.fd.io/g/vpp-dev/message/18065
Mute This Topic: https://lists.fd.io/mt/78229638/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] Jenkins jobs UNSTABLE due to failure to upload logs to nexus.fd.io

2020-11-17 Thread Dave Wallace

Folks,

There is an issue with CI jobs being marked as UNSTABLE due to the 
failure to upload log files to nexus.fd.io.  This is causing the CI job 
pipeline to be stalled due to checkstyle job not succeeding.


I have opened a case with LF-IT: 
https://jira.linuxfoundation.org/plugins/servlet/theme/portal/2/IT-21051


Thanks,
-daw-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18066): https://lists.fd.io/g/vpp-dev/message/18066
Mute This Topic: https://lists.fd.io/mt/78321469/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 clearing a -2 review.

2020-11-17 Thread Paul Vinciguerra
Ok.  This is a backwards request.  I'm asking for help trying to explain
properly why I've -2'd a change.  The code is both useful to the community
and cleanly written.  I think the plumbing needs some help.  When we find
someone who is willing and able to contribute, I'd like to not frustrate
them away.

At a high level, when we run tests, the makefile sets up a specific
environment that is passed to run_tests.py (which is a re-implementation of
the python stdlib unittest. test runner).  The test runner does discovery,
that is that it finds all the tests that match a customized string, and
builds a list of tests which are either run serially or forked in parallel.

What people have done is put conditional logic in the test case and change
the behavior after the test has started.  I consider this analogous to you
unrolling a loop and me coming by and testing if 1==2 for each element of
your unrolled loop.

The test should instead be done once in the runner, instead of 2400 or so
times for every submission into the gate.

To explain this, I cherry-picked some of my code and submitted it as an
example.  My example is here:  https://gerrit.fd.io/r/c/vpp/+/29938. It'
not something I planned to contribute, but I changed it enough to get it to
pass the date.

The commit I am blocking is here: https://gerrit.fd.io/r/c/vpp/+/29921 .

How do I, with limited cycles, convey what needs to be done without writing
sample code or going in and patching over someone's work.
The code is well written and I'd rather +2 it and try to coax some more
contributions.  ;)

Paul

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18067): https://lists.fd.io/g/vpp-dev/message/18067
Mute This Topic: https://lists.fd.io/mt/78323128/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] Requirements for Test

2020-11-17 Thread Paul Vinciguerra
Dave W. and I were chatting about putting together a collection of agreed
upon improvements for the test infrastructure.

If people want to respond to this thread or email me, I will start a .rst
that we can maintain in the repo.

I want to start the thread off with my disagreement with previous comments
that the module owner owns the tests.  The module owner owns the test
objectives.  I never commented until now because I wanted to see where
things went.

Back in May, Neale fixed this bug: https://gerrit.fd.io/r/c/vpp/+/27187

It was a typo that was slipping by because in the test framework, we send
the *same* packet over and over again.  So, by design, b[0] == b[1] and the
test didn't actually test the code.

We have never addressed the failing in the test framework.  In this case, I
think we actually have to make changes to VPP to make it more testable.
Say if we add a .stride_width to a node registration, the test could query
the .stride_width and make sure there were always (stride_width + x)
distinct packets.
(I guess that's my long winded way of saying that to fix the tests, we may
need to fix VPP)

I'm also curious as to what you think what the goal of the test
framework is.  Even though it relies on the python.unittest library, it
rarely runs unit tests.  We have cases where it runs and reports on c unit
tests, but mainly my experience is that it is a sort of regression test.  A
while back when the api was being changed, the tests were just adjusted to
match the new values.

I'm curious to hear what others have to add.

Paul

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18068): https://lists.fd.io/g/vpp-dev/message/18068
Mute This Topic: https://lists.fd.io/mt/78323792/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] vppctl fails from within the application (system cmd returns 256)

2020-11-17 Thread Aniket Pugaonkar
sorry, forgot to reply-all

Hi Ben,

When i use the same command in sample test application (just int main()..)
they work fine. but when I add them in my multithreaded application, it
does not work.  Please see below Strace output of the application.   even
fully specifying path to vppctl and cli.sock is not working

since it is multithreaded, the main process creates the app
(vppcom_app_create).
another thread configures the interfaces using the CLI (vppctl) - which is
failing these commands
one thread is using VCL to receive, another thread is using VCL to transmit.
before VCL Rx and Tx threads are started, configuration thread tries to
configure the VPP interface using the CLI.

We ran into issues while making this application (that uses VCL)  work with
another application that used VAPI to configure VPP, and had to revert back
the code to vpp cli for other application.

commands that fail from my multithreaded application:
 /usr/bin/vppctl -s /run/vpp/cli.sock  create sub-interfaces
HundredGigabitEthernet12/0/0 701
 /usr/bin/vppctl -s /run/vpp/cli.sock set interface state
HundredGigabitEthernet12/0/0 up
 /usr/bin/vppctl -s /run/vpp/cli.sock set interface state
HundredGigabitEthernet12/0/0.701up
/usr/bin/vppctl -s /run/vpp/cli.sock  set interface ip address
HundredGigabitEthernet12/0/0.701 fd0d:1:2:cc:a5a5:301f:fe3a:a5a5/64



[pid 2536742] rt_sigaction(SIGCHLD, {sa_handler=SIG_DFL, sa_mask=[],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fbced84f790},
{sa_handler=0x55ee9d32d180, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART,
sa_restorer=0x7fbced84f790}, 8) = 0
*[pid 2536742] execve("/usr/bin/vppctl", ["/usr/bin/vppctl", "-s",
"/run/vpp/cli.sock", "ip", "mroute", "add",
"ff38:23:2001:5b0:2000::3002/128", "via", "tuntap-0", "Accept"],
0x55ee9ead72c0 /* 27 vars */) = 0*
[pid 2536742] brk(NULL) = 0x55fce62d4000
[pid 2536742] arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc94d85710) = -1 EINVAL
(Invalid argument)
[pid 2536742] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file
or directory)
[pid 2536742] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 0
[pid 2536742] fstat(0, {st_mode=S_IFREG|0644, st_size=62967, ...}) = 0
[pid 2536742] mmap(NULL, 62967, PROT_READ, MAP_PRIVATE, 0, 0) =
0x7ffb8ce4f000
[pid 2536742] close(0)  = 0
[pid 2536742] openat(AT_FDCWD, "/lib64/libvppinfra.so.20.05.1",
O_RDONLY|O_CLOEXEC) = 0
[pid 2536742] read(0,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\230\0\0\0\0\0\0"..., 832)
= 832
[pid 2536742] fstat(0, {st_mode=S_IFREG|0755, st_size=509240, ...}) = 0
[pid 2536742] mmap(NULL, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb8ce4d000
[pid 2536742] mmap(NULL, 2603336, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 0, 0) = 0x7ffb8c9bb000
[pid 2536742] mprotect(0x7ffb8ca35000, 2093056, PROT_NONE) = 0
[pid 2536742] mmap(0x7ffb8cc34000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 0, 0x79000) = 0x7ffb8cc34000
[pid 2536742] mmap(0x7ffb8cc36000, 2376, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffb8cc36000
[pid 2536742] close(0)  = 0
[pid 2536742] openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 0
[pid 2536742] read(0,
"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\305\0\0\0\0\0\0"...,
832) = 832
[pid 2536742] fstat(0, {st_mode=S_IFREG|0755, st_size=2714928, ...}) = 0
[pid 2536742] mmap(NULL, 3674432, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 0, 0) = 0x7ffb8c639000
[pid 2536742] mprotect(0x7ffb8c7ba000, 2093056, PROT_NONE) = 0
[pid 2536742] mmap(0x7ffb8c9b9000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 0, 0x18) = 0x7ffb8c9b9000
[pid 2536742] close(0)  = 0
[pid 2536742] openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 0
[pid 2536742] read(0,
"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2607\2\0\0\0\0\0"..., 832)
= 832
[pid 2536742] fstat(0, {st_mode=S_IFREG|0755, st_size=4176104, ...}) = 0
[pid 2536742] mmap(NULL, 3938144, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 0, 0) = 0x7ffb8c277000
[pid 2536742] mprotect(0x7ffb8c43, 2093056, PROT_NONE) = 0
[pid 2536742] mmap(0x7ffb8c62f000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 0, 0x1b8000) = 0x7ffb8c62f000
[pid 2536742] mmap(0x7ffb8c635000, 14176, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffb8c635000
[pid 2536742] close(0)  = 0
[pid 2536742] mmap(NULL, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb8ce4a000
[pid 2536742] arch_prctl(ARCH_SET_FS, 0x7ffb8ce4a740) = 0
[pid 2536742] mprotect(0x7ffb8c62f000, 16384, PROT_READ) = 0
[pid 2536742] mprotect(0x7ffb8c9b9000, 4096, PROT_READ) = 0
[pid 2536742] mprotect(0x7ffb8cc34000, 4096, PROT_READ) = 0
[pid 2536742] mprotect(0x55fce5ec7000, 4096, PROT_READ) = 0
[pid 2536742] mprotect(0x7ffb8ce5f000, 4096, PROT_READ) = 0
[pid 2536742] munmap(0x7ffb8ce4f000, 62967) = 0
[pid 2536742] mmap(NULL, 131

Re: [vpp-dev] Help clearing a -2 review.

2020-11-17 Thread Andrew Yourtchenko
Paul, is it 2400 comparisons per single test or 2400 comparisons in total ?

If the latter, I would rather optimize for readability, since it’s probably 
less than a second of run time.

Specifically about the example with debugging of internals - replacing the 
hooks with subclassing hinders the intent imho - for that particular case.

--a

> On 17 Nov 2020, at 19:50, Paul Vinciguerra  wrote:
> 
> 
> Ok.  This is a backwards request.  I'm asking for help trying to explain 
> properly why I've -2'd a change.  The code is both useful to the community 
> and cleanly written.  I think the plumbing needs some help.  When we find 
> someone who is willing and able to contribute, I'd like to not frustrate them 
> away.
> 
> At a high level, when we run tests, the makefile sets up a specific 
> environment that is passed to run_tests.py (which is a re-implementation of 
> the python stdlib unittest. test runner).  The test runner does discovery, 
> that is that it finds all the tests that match a customized string, and 
> builds a list of tests which are either run serially or forked in parallel.
> 
> What people have done is put conditional logic in the test case and change 
> the behavior after the test has started.  I consider this analogous to you 
> unrolling a loop and me coming by and testing if 1==2 for each element of 
> your unrolled loop.
> 
> The test should instead be done once in the runner, instead of 2400 or so 
> times for every submission into the gate.
> 
> To explain this, I cherry-picked some of my code and submitted it as an 
> example.  My example is here:  https://gerrit.fd.io/r/c/vpp/+/29938. It' not 
> something I planned to contribute, but I changed it enough to get it to pass 
> the date.
> 
> The commit I am blocking is here: https://gerrit.fd.io/r/c/vpp/+/29921 .
> 
> How do I, with limited cycles, convey what needs to be done without writing 
> sample code or going in and patching over someone's work.
> The code is well written and I'd rather +2 it and try to coax some more 
> contributions.  ;)
> 
> Paul 
> 
> 
> 
>   
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18070): https://lists.fd.io/g/vpp-dev/message/18070
Mute This Topic: https://lists.fd.io/mt/78323128/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] Help clearing a -2 review.

2020-11-17 Thread Naveen Joy via lists.fd.io
Paul,

I have pushed an update reducing the number of conditional tests to 1. Runs in 
O(1) constant time.
Going forward, can you at least do a small favor and provide some clear code 
review feedback rather than something like the below?
“A RunningVPPTestCase or similar should be subclassed from VPPTestcase, with 
your changes and in
run_tests, the testcases should be downcast. I have a working prototype I could 
provide that I used to
refactor the debug_internal code if you're interested.”

Thanks,
Naveen


From:  on behalf of Andrew Yourtchenko 
Date: Tuesday, November 17, 2020 at 2:49 PM
To: Paul Vinciguerra 
Cc: vpp-dev 
Subject: Re: [vpp-dev] Help clearing a -2 review.

Paul, is it 2400 comparisons per single test or 2400 comparisons in total ?

If the latter, I would rather optimize for readability, since it’s probably 
less than a second of run time.

Specifically about the example with debugging of internals - replacing the 
hooks with subclassing hinders the intent imho - for that particular case.

--a


On 17 Nov 2020, at 19:50, Paul Vinciguerra  wrote:
Ok.  This is a backwards request.  I'm asking for help trying to explain 
properly why I've -2'd a change.  The code is both useful to the community and 
cleanly written.  I think the plumbing needs some help.  When we find someone 
who is willing and able to contribute, I'd like to not frustrate them away.

At a high level, when we run tests, the makefile sets up a specific environment 
that is passed to run_tests.py (which is a re-implementation of the python 
stdlib unittest. test runner).  The test runner does discovery, that is that it 
finds all the tests that match a customized string, and builds a list of tests 
which are either run serially or forked in parallel.

What people have done is put conditional logic in the test case and change the 
behavior after the test has started.  I consider this analogous to you 
unrolling a loop and me coming by and testing if 1==2 for each element of your 
unrolled loop.

The test should instead be done once in the runner, instead of 2400 or so times 
for every submission into the gate.

To explain this, I cherry-picked some of my code and submitted it as an 
example.  My example is here:  https://gerrit.fd.io/r/c/vpp/+/29938. It' not 
something I planned to contribute, but I changed it enough to get it to pass 
the date.

The commit I am blocking is here: https://gerrit.fd.io/r/c/vpp/+/29921 .

How do I, with limited cycles, convey what needs to be done without writing 
sample code or going in and patching over someone's work.
The code is well written and I'd rather +2 it and try to coax some more 
contributions.  ;)

Paul







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18071): https://lists.fd.io/g/vpp-dev/message/18071
Mute This Topic: https://lists.fd.io/mt/78323128/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [EXTERNAL] Re: [vpp-dev] vppctl fails from within the application (system cmd returns 256)

2020-11-17 Thread Chris Luke via lists.fd.io
On this line in the trace:

[pid 2536742] socket(AF_UNIX, SOCK_STREAM, 0) = 0

It says it’s returning file descriptor 0 for the socket. Similarly other file 
opens and subsequent closes are using descriptor 0. 0 is normally stdin. Are 
stdin & out closed? That could cause all kinds of strange issues, especially 
when it tries to print the results to a closed stdout descriptor.

Chris.

From: vpp-dev@lists.fd.io  On Behalf Of Aniket Pugaonkar
Sent: Tuesday, November 17, 2020 17:04
To: Benoit Ganne (bganne) 
Cc: vpp-dev@lists.fd.io
Subject: [EXTERNAL] Re: [vpp-dev] vppctl fails from within the application 
(system cmd returns 256)

sorry, forgot to reply-all

Hi Ben,

When i use the same command in sample test application (just int main()..) they 
work fine. but when I add them in my multithreaded application, it does not 
work.  Please see below Strace output of the application.   even fully 
specifying path to vppctl and cli.sock is not working

since it is multithreaded, the main process creates the app (vppcom_app_create).
another thread configures the interfaces using the CLI (vppctl) - which is 
failing these commands
one thread is using VCL to receive, another thread is using VCL to transmit.
before VCL Rx and Tx threads are started, configuration thread tries to 
configure the VPP interface using the CLI.

We ran into issues while making this application (that uses VCL)  work with 
another application that used VAPI to configure VPP, and had to revert back the 
code to vpp cli for other application.

commands that fail from my multithreaded application:
 /usr/bin/vppctl -s /run/vpp/cli.sock  create sub-interfaces 
HundredGigabitEthernet12/0/0 701
 /usr/bin/vppctl -s /run/vpp/cli.sock set interface state 
HundredGigabitEthernet12/0/0 up
 /usr/bin/vppctl -s /run/vpp/cli.sock set interface state 
HundredGigabitEthernet12/0/0.701up
/usr/bin/vppctl -s /run/vpp/cli.sock  set interface ip address 
HundredGigabitEthernet12/0/0.701 fd0d:1:2:cc:a5a5:301f:fe3a:a5a5/64



[pid 2536742] rt_sigaction(SIGCHLD, {sa_handler=SIG_DFL, sa_mask=[], 
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fbced84f790}, 
{sa_handler=0x55ee9d32d180, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, 
sa_restorer=0x7fbced84f790}, 8) = 0
[pid 2536742] execve("/usr/bin/vppctl", ["/usr/bin/vppctl", "-s", 
"/run/vpp/cli.sock", "ip", "mroute", "add", "ff38:23:2001:5b0:2000::3002/128", 
"via", "tuntap-0", "Accept"], 0x55ee9ead72c0 /* 27 vars */) = 0
[pid 2536742] brk(NULL) = 0x55fce62d4000
[pid 2536742] arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc94d85710) = -1 EINVAL 
(Invalid argument)
[pid 2536742] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or 
directory)
[pid 2536742] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 0
[pid 2536742] fstat(0, {st_mode=S_IFREG|0644, st_size=62967, ...}) = 0
[pid 2536742] mmap(NULL, 62967, PROT_READ, MAP_PRIVATE, 0, 0) = 0x7ffb8ce4f000
[pid 2536742] close(0)  = 0
[pid 2536742] openat(AT_FDCWD, "/lib64/libvppinfra.so.20.05.1", 
O_RDONLY|O_CLOEXEC) = 0
[pid 2536742] read(0, 
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\230\0\0\0\0\0\0"..., 832) = 832
[pid 2536742] fstat(0, {st_mode=S_IFREG|0755, st_size=509240, ...}) = 0
[pid 2536742] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x7ffb8ce4d000
[pid 2536742] mmap(NULL, 2603336, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_DENYWRITE, 0, 0) = 0x7ffb8c9bb000
[pid 2536742] mprotect(0x7ffb8ca35000, 2093056, PROT_NONE) = 0
[pid 2536742] mmap(0x7ffb8cc34000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 0, 0x79000) = 0x7ffb8cc34000
[pid 2536742] mmap(0x7ffb8cc36000, 2376, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffb8cc36000
[pid 2536742] close(0)  = 0
[pid 2536742] openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 0
[pid 2536742] read(0, 
"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\305\0\0\0\0\0\0"..., 832) = 
832
[pid 2536742] fstat(0, {st_mode=S_IFREG|0755, st_size=2714928, ...}) = 0
[pid 2536742] mmap(NULL, 3674432, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_DENYWRITE, 0, 0) = 0x7ffb8c639000
[pid 2536742] mprotect(0x7ffb8c7ba000, 2093056, PROT_NONE) = 0
[pid 2536742] mmap(0x7ffb8c9b9000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 0, 0x18) = 0x7ffb8c9b9000
[pid 2536742] close(0)  = 0
[pid 2536742] openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 0
[pid 2536742] read(0, 
"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2607\2\0\0\0\0\0"..., 832) = 832
[pid 2536742] fstat(0, {st_mode=S_IFREG|0755, st_size=4176104, ...}) = 0
[pid 2536742] mmap(NULL, 3938144, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_DENYWRITE, 0, 0) = 0x7ffb8c277000
[pid 2536742] mprotect(0x7ffb8c43, 2093056, PROT_NONE) = 0
[pid 2536742] mmap(0x7ffb8c62f000, 24576, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 0, 0x1b8000) = 0x7ffb8c62f000
[pid 2536742] mmap(0x7ffb8c635000, 14176, 

Re: [vpp-dev] svm ASAN check error

2020-11-17 Thread jiangxiaoming
Hi ben:
The issue still exist with patch https://gerrit.fd.io/r/c/vpp/+/29969 ( 
https://gerrit.fd.io/r/c/vpp/+/29969 )

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18073): https://lists.fd.io/g/vpp-dev/message/18073
Mute This Topic: https://lists.fd.io/mt/78245228/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] Help clearing a -2 review.

2020-11-17 Thread Paul Vinciguerra
Thanks Naveen.

That's what I'm looking for.  Did you see the comment with the posted code
example?: https://gerrit.fd.io/r/c/vpp/+/29938?  I posted it so you could
see it, then had to go back and get it to pass the gate so anyone could see
that it doesn't impact the current framework.



On Tue, Nov 17, 2020 at 6:05 PM Naveen Joy (najoy)  wrote:

> Paul,
>
>
>
> I have pushed an update reducing the number of conditional tests to 1.
> Runs in O(1) constant time.
>
> Going forward, can you at least do a small favor and provide some clear
> code review feedback rather than something like the below?
>
> “A RunningVPPTestCase or similar should be subclassed from VPPTestcase,
> with your changes and in
>
> run_tests, the testcases should be downcast. I have a working prototype I
> could provide that I used to
>
> refactor the debug_internal code if you're interested.”
>
>
>
> Thanks,
>
> Naveen
>
>
>
>
>
> *From: * on behalf of Andrew Yourtchenko <
> ayour...@gmail.com>
> *Date: *Tuesday, November 17, 2020 at 2:49 PM
> *To: *Paul Vinciguerra 
> *Cc: *vpp-dev 
> *Subject: *Re: [vpp-dev] Help clearing a -2 review.
>
>
>
> Paul, is it 2400 comparisons per single test or 2400 comparisons in total ?
>
>
>
> If the latter, I would rather optimize for readability, since it’s
> probably less than a second of run time.
>
>
>
> Specifically about the example with debugging of internals - replacing the
> hooks with subclassing hinders the intent imho - for that particular case.
>
>
>
> --a
>
>
>
> On 17 Nov 2020, at 19:50, Paul Vinciguerra 
> wrote:
>
> Ok.  This is a backwards request.  I'm asking for help trying to explain
> properly why I've -2'd a change.  The code is both useful to the community
> and cleanly written.  I think the plumbing needs some help.  When we find
> someone who is willing and able to contribute, I'd like to not frustrate
> them away.
>
>
>
> At a high level, when we run tests, the makefile sets up a specific
> environment that is passed to run_tests.py (which is a re-implementation of
> the python stdlib unittest. test runner).  The test runner does discovery,
> that is that it finds all the tests that match a customized string, and
> builds a list of tests which are either run serially or forked in parallel.
>
>
>
> What people have done is put conditional logic in the test case and change
> the behavior after the test has started.  I consider this analogous to you
> unrolling a loop and me coming by and testing if 1==2 for each element of
> your unrolled loop.
>
>
>
> The test should instead be done once in the runner, instead of 2400 or so
> times for every submission into the gate.
>
>
>
> To explain this, I cherry-picked some of my code and submitted it as an
> example.  My example is here:  https://gerrit.fd.io/r/c/vpp/+/29938. It'
> not something I planned to contribute, but I changed it enough to get it to
> pass the date.
>
>
>
> The commit I am blocking is here: https://gerrit.fd.io/r/c/vpp/+/29921 .
>
>
>
> How do I, with limited cycles, convey what needs to be done without
> writing sample code or going in and patching over someone's work.
>
> The code is well written and I'd rather +2 it and try to coax some more
> contributions.  ;)
>
>
>
> Paul
>
>
>
>
>
>
>
>
>
>
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18074): https://lists.fd.io/g/vpp-dev/message/18074
Mute This Topic: https://lists.fd.io/mt/78323128/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] Help clearing a -2 review.

2020-11-17 Thread Paul Vinciguerra
reposting to the list.

2400 for each 'make test' run.

On Tue, Nov 17, 2020 at 10:27 PM Paul Vinciguerra <
pvi...@vinciconsulting.com> wrote:

> 2400 for each 'make test' run.
>
> On Tue, Nov 17, 2020 at 5:48 PM Andrew 👽 Yourtchenko 
> wrote:
>
>> Paul, is it 2400 comparisons per single test or 2400 comparisons in total
>> ?
>>
>> If the latter, I would rather optimize for readability, since it’s
>> probably less than a second of run time.
>>
>> Specifically about the example with debugging of internals - replacing
>> the hooks with subclassing hinders the intent imho - for that particular
>> case.
>>
>> --a
>>
>> On 17 Nov 2020, at 19:50, Paul Vinciguerra 
>> wrote:
>>
>> 
>> Ok.  This is a backwards request.  I'm asking for help trying to explain
>> properly why I've -2'd a change.  The code is both useful to the community
>> and cleanly written.  I think the plumbing needs some help.  When we find
>> someone who is willing and able to contribute, I'd like to not frustrate
>> them away.
>>
>> At a high level, when we run tests, the makefile sets up a specific
>> environment that is passed to run_tests.py (which is a re-implementation of
>> the python stdlib unittest. test runner).  The test runner does discovery,
>> that is that it finds all the tests that match a customized string, and
>> builds a list of tests which are either run serially or forked in parallel.
>>
>> What people have done is put conditional logic in the test case and
>> change the behavior after the test has started.  I consider this analogous
>> to you unrolling a loop and me coming by and testing if 1==2 for each
>> element of your unrolled loop.
>>
>> The test should instead be done once in the runner, instead of 2400 or so
>> times for every submission into the gate.
>>
>> To explain this, I cherry-picked some of my code and submitted it as an
>> example.  My example is here:  https://gerrit.fd.io/r/c/vpp/+/29938. It'
>> not something I planned to contribute, but I changed it enough to get it to
>> pass the date.
>>
>> The commit I am blocking is here: https://gerrit.fd.io/r/c/vpp/+/29921 .
>>
>> How do I, with limited cycles, convey what needs to be done without
>> writing sample code or going in and patching over someone's work.
>> The code is well written and I'd rather +2 it and try to coax some more
>> contributions.  ;)
>>
>> Paul
>>
>>
>>
>>
>>
>> 
>>
>>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18075): https://lists.fd.io/g/vpp-dev/message/18075
Mute This Topic: https://lists.fd.io/mt/78323128/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] Help clearing a -2 review.

2020-11-17 Thread Andrew Yourtchenko


> On 18 Nov 2020, at 04:35, Paul Vinciguerra  wrote:
> 
> 
> reposting to the list.
> 
> 2400 for each 'make test' run.

Yeah so then it probably would make less than a second of run time - in this 
case I would squarely optimize for a better readability by the unsuspecting 
person later on.

Arguably it’s a trickier criterion though, since probably depends on what one 
is used to.

—a

> 
>> On Tue, Nov 17, 2020 at 10:27 PM Paul Vinciguerra 
>>  wrote:
>> 2400 for each 'make test' run.
>> 
>>> On Tue, Nov 17, 2020 at 5:48 PM Andrew 👽 Yourtchenko  
>>> wrote:
>>> Paul, is it 2400 comparisons per single test or 2400 comparisons in total ?
>>> 
>>> If the latter, I would rather optimize for readability, since it’s probably 
>>> less than a second of run time.
>>> 
>>> Specifically about the example with debugging of internals - replacing the 
>>> hooks with subclassing hinders the intent imho - for that particular case.
>>> 
>>> --a
>>> 
> On 17 Nov 2020, at 19:50, Paul Vinciguerra  
> wrote:
> 
 
 Ok.  This is a backwards request.  I'm asking for help trying to explain 
 properly why I've -2'd a change.  The code is both useful to the community 
 and cleanly written.  I think the plumbing needs some help.  When we find 
 someone who is willing and able to contribute, I'd like to not frustrate 
 them away.
 
 At a high level, when we run tests, the makefile sets up a specific 
 environment that is passed to run_tests.py (which is a re-implementation 
 of the python stdlib unittest. test runner).  The test runner does 
 discovery, that is that it finds all the tests that match a customized 
 string, and builds a list of tests which are either run serially or forked 
 in parallel.
 
 What people have done is put conditional logic in the test case and change 
 the behavior after the test has started.  I consider this analogous to you 
 unrolling a loop and me coming by and testing if 1==2 for each element of 
 your unrolled loop.
 
 The test should instead be done once in the runner, instead of 2400 or so 
 times for every submission into the gate.
 
 To explain this, I cherry-picked some of my code and submitted it as an 
 example.  My example is here:  https://gerrit.fd.io/r/c/vpp/+/29938. It' 
 not something I planned to contribute, but I changed it enough to get it 
 to pass the date.
 
 The commit I am blocking is here: https://gerrit.fd.io/r/c/vpp/+/29921 .
 
 How do I, with limited cycles, convey what needs to be done without 
 writing sample code or going in and patching over someone's work.
 The code is well written and I'd rather +2 it and try to coax some more 
 contributions.  ;)
 
 Paul 
 
 
 
   
 
 
 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18076): https://lists.fd.io/g/vpp-dev/message/18076
Mute This Topic: https://lists.fd.io/mt/78323128/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] Help clearing a -2 review.

2020-11-17 Thread Andrew Yourtchenko
Also, specifically for 29938: I tested it and it appears to break the
TEST_DEBUG usage.

So in my view it strengthens the case for having the
non-performance-critical code that is the obvious to read and modify.

--a

On 11/18/20, Andrew Yourtchenko via lists.fd.io
 wrote:
>
>
>> On 18 Nov 2020, at 04:35, Paul Vinciguerra 
>> wrote:
>>
>> 
>> reposting to the list.
>>
>> 2400 for each 'make test' run.
>
> Yeah so then it probably would make less than a second of run time - in this
> case I would squarely optimize for a better readability by the unsuspecting
> person later on.
>
> Arguably it’s a trickier criterion though, since probably depends on what
> one is used to.
>
> —a
>
>>
>>> On Tue, Nov 17, 2020 at 10:27 PM Paul Vinciguerra
>>>  wrote:
>>> 2400 for each 'make test' run.
>>>
 On Tue, Nov 17, 2020 at 5:48 PM Andrew 👽 Yourtchenko
  wrote:
 Paul, is it 2400 comparisons per single test or 2400 comparisons in
 total ?

 If the latter, I would rather optimize for readability, since it’s
 probably less than a second of run time.

 Specifically about the example with debugging of internals - replacing
 the hooks with subclassing hinders the intent imho - for that particular
 case.

 --a

>> On 17 Nov 2020, at 19:50, Paul Vinciguerra
>>  wrote:
>>
> 
> Ok.  This is a backwards request.  I'm asking for help trying to
> explain properly why I've -2'd a change.  The code is both useful to
> the community and cleanly written.  I think the plumbing needs some
> help.  When we find someone who is willing and able to contribute, I'd
> like to not frustrate them away.
>
> At a high level, when we run tests, the makefile sets up a specific
> environment that is passed to run_tests.py (which is a
> re-implementation of the python stdlib unittest. test runner).  The
> test runner does discovery, that is that it finds all the tests that
> match a customized string, and builds a list of tests which are either
> run serially or forked in parallel.
>
> What people have done is put conditional logic in the test case and
> change the behavior after the test has started.  I consider this
> analogous to you unrolling a loop and me coming by and testing if 1==2
> for each element of your unrolled loop.
>
> The test should instead be done once in the runner, instead of 2400 or
> so times for every submission into the gate.
>
> To explain this, I cherry-picked some of my code and submitted it as an
> example.  My example is here:  https://gerrit.fd.io/r/c/vpp/+/29938.
> It' not something I planned to contribute, but I changed it enough to
> get it to pass the date.
>
> The commit I am blocking is here: https://gerrit.fd.io/r/c/vpp/+/29921
> .
>
> How do I, with limited cycles, convey what needs to be done without
> writing sample code or going in and patching over someone's work.
> The code is well written and I'd rather +2 it and try to coax some more
> contributions.  ;)
>
> Paul
>
>
>
>
>
>
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18077): https://lists.fd.io/g/vpp-dev/message/18077
Mute This Topic: https://lists.fd.io/mt/78323128/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-