Re: [EXTERNAL] [vpp-dev] Coverity errors nag-o-gram

2022-01-18 Thread Chris Luke via lists.fd.io
And in case it’s not obvious, the scanning tool had a holiday hiatus, but I got 
it back on its feet a week or so ago.

Chris.

From: vpp-dev@lists.fd.io  on behalf of Ole Troan 

Date: Tuesday, January 18, 2022 at 06:16
To: Neale Ranns , Pablo Camarillo (pcamaril) 
, Radu Nicolau , Steven Luong 
(sluong) , tetsuya@gmail.com , 
hongjun...@intel.com , Andrew Yourtchenko 
, Mohsin Kazmi (sykazmi) , Damjan Marion 
, moham...@hawari.fr , 
satoru.matsush...@gmail.com , j...@netgate.com 
, Roy Fan Zhang 
Cc: vpp-dev 
Subject: [EXTERNAL] [vpp-dev] Coverity errors nag-o-gram
Guys, can we do a little effort here. Those of you in the To: field, you know 
what to do.

https://urldefense.com/v3/__https://github.com/vpp-dev/vpp-coverity-report__;!!CQl3mcHX2A!VD9Z5KHMIzmZ9lHiLYQBKY73N56grRVrtJzl_cwu0oTktr9tgfeQgqWav_mi4bjFwQ$

Best regards,
Ole

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20745): https://lists.fd.io/g/vpp-dev/message/20745
Mute This Topic: https://lists.fd.io/mt/88508258/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] Multi-threading locks and synchronization

2021-07-13 Thread Chris Luke via lists.fd.io
Really depends on what you need it to do, which I may have missed. Why do you 
need any synchronization at all?

Chris


From: vpp-dev@lists.fd.io  on behalf of satish amara 

Date: Monday, July 12, 2021 at 23:59
To: vpp-dev@lists.fd.io 
Subject: Re: [EXTERNAL] Re: [vpp-dev] Multi-threading locks and synchronization
Thank you for your explanation.  What is recommended way if a custom plugin is 
working on multiple threads. Direct the packet in the same flow to the same 
thread or use spinlocks for synchronization. It looks like for IPSEC VPP code 
is trying the process the packets on the same flow on the same thread.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19754): https://lists.fd.io/g/vpp-dev/message/19754
Mute This Topic: https://lists.fd.io/mt/84165477/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] Multi-threading locks and synchronization

2021-07-12 Thread Chris Luke via lists.fd.io
Grossly simplified explanation: Because of how VPP works, all packets are 
processed to completion on every vector (there may be exceptions, but it’s not 
typical, VPP really does not want to hang on to packets across cycles). Once a 
vector has been completed, there’s a barrier lock to allow main thread 
operations on worker thread data structures (such as collecting counters), and 
once those are complete the barrier is lifted and the next vector ingested. Not 
all main thread operations happen on every barrier, and naturally given the 
time sensitive nature all that code is carefully vetted. It may seem like an 
inefficient way, but it avoids a lot of locking – and especially checking for 
locks.

Thus “flushed” is the wrong perspective; there is no flushing when everything 
is processed to completion anyway.

Chris.

From: vpp-dev@lists.fd.io  on behalf of satish amara 

Date: Monday, July 12, 2021 at 16:48
To: Damjan Marion , vpp-dev@lists.fd.io 
Subject: [EXTERNAL] Re: [vpp-dev] Multi-threading locks and synchronization
"Interfaces are created/deleted under the barrier so there is not packets in 
flight."
Can you please add more details?  I just gave a scenario. In general, this is 
applicable to all meta fields  /Opaque fields. How are handling the outdated 
meta fields in packets due to config changes?  Does this mean all the packets 
need to be flushed out or processed before the new config is applied?

On Mon, Jul 12, 2021 at 11:04 AM Damjan Marion 
mailto:dmar...@me.com>> wrote:

On 11.07.2021., at 17:10, satish amara 
mailto:satishkam...@gmail.com>> wrote:


[Edited Message Follows]
Hi,
   I have a few questions about how synchronization is being done when there 
are multiple workers/threads accessing the same data structure.
For example, IPsec headers have a seq number that gets incremented.
If we have IPsec flow and encrypting packets on VPP do we assume that packets 
in the same flow go to the same core for encryption?

Yes, we handoff all packets to the owning thread. For fat flows we have crypto 
scheduler which offloads crypto operations to the multiple cores
but order is still maintained by the owning thread.


In IP lookup will find the adjacency and store it in the Opaque field.. Send to 
another node to rewrite. Before the packet gets processed in the next node if 
the interface is removed from the forwarding table. What will happen?   Lots of 
info being stored in Opaque fields for a couple of features. How the code is 
making sure changes in the config data are taken care of when the packets are 
still being processed by intermediate nodes in the graph.

Interfaces are created/deleted under the barrier so there is not packets in 
flight.

—
Damjan


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19749): https://lists.fd.io/g/vpp-dev/message/19749
Mute This Topic: https://lists.fd.io/mt/84165477/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] VPP Emacs Lisp evolution to P4

2021-05-05 Thread Chris Luke via lists.fd.io
Hi Hemant,

Do you plan to open source and maintain this code generator?

Chris.

From: vpp-dev@lists.fd.io  On Behalf Of hemant via 
lists.fd.io
Sent: Wednesday, May 5, 2021 12:09
To: hem...@mnkcg.com; vpp-dev@lists.fd.io
Subject: [EXTERNAL] Re: [vpp-dev] VPP Emacs Lisp evolution to P4


I don't know why the email I sent earlier did not show up as text. Resending.



[If you didn’t read this recent short blog I wrote, 
https://mnkcg.com/need-for-a-p4tovpp-compiler/, this is what the first 
paragraph of the blog says.



“VPP has stellar data plane code open-sourced by Cisco as a FD.io Linux 
project.  Now VPP runs crypto on latest Intel server hardware at 1 Tbps.  Most 
VPP new features are implemented as a plugin.  VPP provides a script using 
Emacs Lisp to generate a plugin’s stub code.  The generated code includes API 
and CLI to enable-disable plugin.  MNK Labs & Consulting saw a need to generate 
a complete VPP plugin – this would cause less bugs with new plugin and also 
accelerate VPP plugin development. Emacs Lisp is not the right tool to generate 
a full VPP plugin including data plane code.  MNK saw P4 as a good fit to 
describe any data plane and used P4 to generate a VPP plugin.”



I have proved my point by generating a 5G UPF plugin using the compiler. ]



Hemant



-Original Message-
From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of hemant via 
lists.fd.io
Sent: Wednesday, May 05, 2021 10:47 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] VPP Emacs Lisp evolution to P4









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

2021-04-08 Thread Chris Luke via lists.fd.io
As Andrew says, vppctl is not ideal for this purpose.

Your GDB trace looks like it was vppctl itself, and it's stuck waiting on 
connect() - which means the far end, VPP, did not accept() the connection. My 
immediate reaction would be to check netstat to see if there's lots of old unix 
sockets still connected to the CLI endpoint.

But digging deeper, we should note that ping is in some regards special in the 
way it handles the CLI session compared to other CLI comments, because it wants 
to solicit input to interrupt a long-running ping. All of the CLI interaction - 
input and output - is in the main thread and each ping runs synchronously in 
that thread, if I remember correctly. Did I read that you run pings to 50 
different destinations every 5 seconds? Are those 50 dispatched in parallel? I 
think you'll be hitting contention for the main thread if so; while it's 
pinging it's not accepting connections. If several of your destinations are not 
reachable then you'll be waiting on several ping timeouts before any accept() 
happens.

Chris.


-Original Message-
From: vpp-dev@lists.fd.io  On Behalf Of Andrew Yourtchenko
Sent: Thursday, April 8, 2021 11:18
To: yichanglui 
Cc: vpp-dev@lists.fd.io
Subject: [EXTERNAL] Re: [vpp-dev] vpp hang on

Hi,

first, a general comment: the vpp ping was aimed only for quick 
connectivity/diagnostic checks, not for continuous monitoring; and probably 
especially not using vppctl - since that involves a lot of overhead.

There are a few options:

1) Before the commit 34716fae918750e4fc7a7da4b06e0dfbdef2d1c5, there was code 
that performed the monitoring of targets on an ongoing basis.
You could probably take a look at that code and build something that is a bit 
more scalable and is more lightweight - and then upstream it as a separate 
plugin, provided you are happy to become a maintainer.

2) worst case, have a daemon that connects to VPP over the API and issues the 
commands using the cli_inband; maybe even adding an API call to ping plugin, 
such that you did not have the parse the commands.

That said, we should narrow down the issue that you are observing with the CLI, 
since regardless of how many times you do vppctl there should be no problem. 
Even if your version 19.08 is no longer receiving fixes, it's worth 
understanding what the problem is.

Were you able to reproduce the issue in your lab environment ?

--a


On 4/8/21, yichanglui  wrote:
> hi
>
> We are going to use "vppctl ping " to detect whether the device is
> reacehable, but we have some problem below :
>
>
>
>
> we have above 50 service to do "vppctl ping 100.100.0.x repeat 1
> table-id x " detect different devices,  each service exec this command
> per 5 second, after 3~4 days,  all vppctl ping service hang on,  we
> use gdb to debug , vppctl are hang on below point at
> src\vppinfra\socket.c: clib_socket_init
>
>
>
>
> ==
>
>
>
>
> 416  if (addr.sa.sa_family == PF_INET)
> (gdb)
> 419  if (s->flags & CLIB_SOCKET_F_IS_SERVER)
> (gdb)
> 497  if ((s->flags & CLIB_SOCKET_F_NON_BLOCKING_CONNECT)
> (gdb)
> 505  if (connect (s->fd, , addr_len) < 0
>
>
> ==
>
> it may cause some error on vpp socket  , when vppctl connect to vpp
> many times.
>
>
>
>
> our vpp version is below,
>
> =
>
> Version:  v19.08.1-229~g1517d5e72-dirty
> Compiled by:  root
> Compile host: i-qvoo7mp3
> Compile date: Fri Nov  1 20:53:55 CST 2019
> Compile location: /root/ws/vpp
> Compiler: GCC 7.5.0
> Current PID:  4652
>
> =
>
>
> Linux version is below:
>
>
> Linux version 4.15.0-112-generic (buildd@lcy01-amd64-027) (gcc version
> 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #113-Ubuntu SMP Thu Jul 9
> 23:41:39 UTC 2020
>
>
>
>
> On the other hander,  Is any other better method to do network health
> detection , like one-arm-echo bfd? because we may detect the device
> that not support bfd.
>
>
>
>
>
>
>
>
>
>
>
>

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

2021-03-31 Thread Chris Luke via lists.fd.io
+1

-Original Message-
From: vpp-dev@lists.fd.io  On Behalf Of Damjan Marion via 
lists.fd.io
Sent: Wednesday, March 31, 2021 13:58
To: vpp-dev 
Cc: Zhang, Roy Fan 
Subject: [EXTERNAL] [vpp-dev] New Committer Proposal


Dear VPP Committers,

I would like to propose Roy Fan Zhang from Intel as a new VPP committer.
Fan made significant contributions to the VPP including the async crypto 
infrastructure and crypto scheduler.
Beside that I found that Fan is active in the community, and willing to help.

Please let me know if you agree/neutral/disagree with +1/0/-1 (committers only 
please).

My +1 is here.

Thanks,

Damjan


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19075): https://lists.fd.io/g/vpp-dev/message/19075
Mute This Topic: https://lists.fd.io/mt/81758204/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] Issue with cloning repo on VM

2021-02-21 Thread Chris Luke via lists.fd.io
Rajesh,

It looks like a local system issue, nothing to do with git or gerrit per se.

Your system is tell you it’s not letting you create that file. You should 
investigate that. I believe it’s out of scope for this list I’m afraid.

Chris.

From: vpp-dev@lists.fd.io  On Behalf Of Rajesh Dawadi via 
lists.fd.io
Sent: Sunday, February 21, 2021 09:19
To: vpp-dev@lists.fd.io; vpp-dev-inter...@cisco.com
Subject: [EXTERNAL] Re: [vpp-dev] Issue with cloning repo on VM

Hi, Has anyone faced similar issues when trying to clone on an Ubuntu VM? All 
the options suggested on google search didnt work, both https and ssh clone 
didnt work even after adding a new ssh public key.
Thanks,
Rajesh

On Sunday, February 14, 2021, 2:54:15 p.m. EST, Rajesh Dawadi 
mailto:dwdraj...@yahoo.com>> wrote:


Hi,
I am trying to setup the VPP repo on a Ubuntu VM running on MAC host and was 
trying to follow the steps mentioned here for "Pulling code via authenticated 
https": 
https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code

 However, I face 2 issues with both authenticated and the anonymous cloning 
with git.
1. git clone fails with error " git clone 
https://gerrit.fd.io/r/vpp
Cloning into 'vpp'...
remote: Counting objects: 93, done
fatal: Unable to create temporary file 
'/home/rajesh/vpp_ubuntu/repo/vpp/.git/objects/pack/tmp_pack_XX': Operation 
not permitted
fatal: index-pack failed" .
I tried to add chmod on the .git directory but it didn't help.

2. With authenticated https, it fails at the authentication step itself, even 
though the same username/password credential works for the Linux Foundation 
account at:
git clone 
https://dwdraj...@gerrit.fd.io/r/a/vpp
Cloning into 'vpp'...
Password for 'https://dwdraj...@gerrit.fd.io': 

remote: Unauthorized
fatal: Authentication failed for 
'https://gerrit.fd.io/r/a/vpp/'"

Any one faced similar issue with Ubuntu VM on MAC ?
Thanks a lot ,
Rajesh
"

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18777): https://lists.fd.io/g/vpp-dev/message/18777
Mute This Topic: https://lists.fd.io/mt/80803544/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] RFC: Enabling Gerrit Auto-Abandon job on VPP master

2021-01-27 Thread Chris Luke via lists.fd.io
+1

I used to do this manually, in effect, though I’ve been less active the past 
while which probably accounts for the growth!

FWIW, I usually performed it on an approximate 60 day nudge and 90 day abandon, 
about once a month, schedule. I did similar with JIRA but less frequently. I 
felt the warning of impending abandonment important enough to make the effort 
to do it, though my recollection suggests that in one case did it actually 
result in a proposal being revived.

Chris.

From: vpp-dev@lists.fd.io  On Behalf Of Dave Wallace
Sent: Wednesday, January 27, 2021 16:50
To: vpp-dev@lists.fd.io
Subject: [EXTERNAL] [vpp-dev] RFC: Enabling Gerrit Auto-Abandon job on VPP 
master

Folks,

There are currently 636 open Gerrit Reviews on VPP master [0], the oldest being 
submitted on Jun 13, 2016 [1]!

I would like to propose that the Gerrit Review Auto-Abandon job [2] to reduce 
the size of the queue to a more reasonable length. Benefits include (from [3]):

- %< -
Abandoning old inactive changes has the following advantages:

it signals change authors that changes are considered outdated

it keeps dashboards clean

it reduces the load on the server (for open changes the mergeability flag 
is recomputed whenever a change is merged)

If a change is still wanted it can be restored by clicking on the Restore 
button.
- %< -

I would like to propose the following configuration [2] for auto-abandon:

changeCleanup.abandonAfter: 30d
changeCleanup.abandonIfMergeable:   default (true)
changeCleanup.cleanupAccountPatchReview:default (false)
changeCleanup.abandonMessage:   default
changeCleanup.startTime:Sat 00:00
changeCleanup.interval: 1 day

If you are opposed to the use of Auto-abandon, please propose an alternative 
method to clean up the backlog of reviews on VPP master and maintain a 
reasonably sized queue.
If you approve of the concept, please respond with a +1.
If you approve of the concept but don't like the configuration, please respond 
with your preferred configuration.

Lack of response will be interpreted as approval of the use of auto-abandon 
with the proposed configuration ;)

Thanks,
-daw-

[0] dwallacelf@daw-server-2:~$ ssh -p 29418 gerrit.fd.io gerrit query 
status:open project:vpp branch:master --format=JSON --no-limit | tail -1
{"type":"stats","rowCount":636,"runTimeMilliseconds":1467,"moreChanges":false}
[1] 
https://gerrit.fd.io/r/c/vpp/+/1529
[2] 
https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#changeCleanup
[3] 
https://gerrit-review.googlesource.com/Documentation/user-change-cleanup.html#auto-abandon

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18611): https://lists.fd.io/g/vpp-dev/message/18611
Mute This Topic: https://lists.fd.io/mt/80171630/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] Check running status of vpp

2020-12-16 Thread Chris Luke via lists.fd.io
It is odd that the filesystem entry for the CLI socket would exist but it says 
“connection refused”. Any log messages from VPP complaining about not being 
able to create the socket? I wonder if the filesystem entry is a remnant from a 
previous session that was not cleaned up.

Chris.


From: vpp-dev@lists.fd.io  On Behalf Of 
ashish.sax...@hsc.com
Sent: Tuesday, December 15, 2020 23:29
To: vpp-dev@lists.fd.io
Subject: [EXTERNAL] [vpp-dev] Check running status of vpp

Hi All,

I am using VPP version 20.05.1 on my setup and my application is running vppctl 
commands after checking that VPP process is created , but sometimes it happens 
that though vpp process is created and vpp is running, still vpp doesn't accept 
any vppctl commands and is giving this error:
connect (fd 3, '/run/vpp/cli.sock'): Connection refused

Is there any way we can check from the application code that vpp is up and 
running and ready to accept vppctl commands?
Thanks and Regards,
Ashish

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