Do you have a specific reason for calling that function?

If the answer amounts to “I need some memory,” please use clib_mem_alloc(...) 
instead.

Thanks… Dave

From: yug...@telincn.com [mailto:yug...@telincn.com]
Sent: Thursday, March 2, 2017 2:43 AM
To: Luke, Chris <chris_l...@comcast.com>; Dave Barach (dbarach) 
<dbar...@cisco.com>; Ed Warnicke <hagb...@gmail.com>
Cc: vpp-dev <vpp-dev@lists.fd.io>
Subject: Re: RE: [vpp-dev] system func in vpp

Is func rte_malloc safe to be called between   rte_spinlock_lock  adn 
rte_spinlock_unlock   or can it be only called  at main thread?

Ewan
________________________________
yug...@telincn.com<mailto:yug...@telincn.com>

From: Luke, Chris<mailto:chris_l...@comcast.com>
Date: 2017-03-01 20:14
To: yug...@telincn.com<mailto:yug...@telincn.com>; Dave Barach 
(dbarach)<mailto:dbar...@cisco.com>; Ed Warnicke<mailto:hagb...@gmail.com>
CC: vpp-dev<mailto:vpp-dev@lists.fd.io>
Subject: RE: RE: [vpp-dev] system func in vpp
A Unix domain socket would work, if you use it only from the main thread.

Instead though, VPP already has a performant binary API that uses shared 
memory. Could you not use this? What sort of messages are you trying to send?

Chris.

From: yug...@telincn.com<mailto:yug...@telincn.com> [mailto:yug...@telincn.com]
Sent: Wednesday, March 1, 2017 4:38
To: Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>>; Luke, 
Chris <chris_l...@cable.comcast.com<mailto:chris_l...@cable.comcast.com>>; Ed 
Warnicke <hagb...@gmail.com<mailto:hagb...@gmail.com>>
Cc: vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>
Subject: Re: RE: [vpp-dev] system func in vpp

Thanks.
So it's not security to use unix socket too? If i want to send some data  from 
vpp to linux or to another process, any options?

Regards,
Ewan
________________________________
yug...@telincn.com<mailto:yug...@telincn.com>

From: Dave Barach (dbarach)<mailto:dbar...@cisco.com>
Date: 2017-02-28 21:12
To: Luke, Chris<mailto:chris_l...@comcast.com>; 
yug...@telincn.com<mailto:yug...@telincn.com>; Ed 
Warnicke<mailto:hagb...@gmail.com>
CC: vpp-dev<mailto:vpp-dev@lists.fd.io>
Subject: RE: [vpp-dev] system func in vpp
See also src/vnet/unix/tuntap.c, which seems to already do pretty much what 
you’re describing. It’s disabled by default. Use the command-line argument 
“tuntap { enable }” to kick the tires.

In addition to the concerns which Chris mentioned, adding ‘system(“foo”)’ calls 
to vpp is not a security best practice.

Thanks… Dave

From: vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io> 
[mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of Luke, Chris
Sent: Tuesday, February 28, 2017 7:18 AM
To: yug...@telincn.com<mailto:yug...@telincn.com>; Ed Warnicke 
<hagb...@gmail.com<mailto:hagb...@gmail.com>>
Cc: vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>
Subject: Re: [vpp-dev] system func in vpp

Using any syscall needs thinking through from inside VPP. Using system() or 
similar is simply ill-advised; what you’re doing is best done outside of VPP 
where the penalty of executing fork() is much diminished.

If you really must create these interfaces from inside VPP then I suggest you 
look up the netlink ABI in Linux, which is what the ‘ip’ program uses, and 
program it directly.

Chris.

From: vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io> 
[mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of 
yug...@telincn.com<mailto:yug...@telincn.com>
Sent: Monday, February 27, 2017 22:56
To: Ed Warnicke <hagb...@gmail.com<mailto:hagb...@gmail.com>>
Cc: vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>
Subject: Re: [vpp-dev] system func in vpp

I would like to add veth interface in vpp for every phy interface, " system("ip 
link add vpp type veth peer name kernel-vpp") ".
It's convenient  to do this from vpp.

Regards,
Ewan.
________________________________
yug...@telincn.com<mailto:yug...@telincn.com>

From: Ed Warnicke<mailto:hagb...@gmail.com>
Date: 2017-02-28 11:44
To: yug...@telincn.com<mailto:yug...@telincn.com>
CC: vpp-dev<mailto:vpp-dev@lists.fd.io>
Subject: Re: Re: [vpp-dev] system func in vpp
Why would you do that from within vpp?

Ed

On Mon, Feb 27, 2017 at 8:36 PM, yug...@telincn.com<mailto:yug...@telincn.com> 
<yug...@telincn.com<mailto:yug...@telincn.com>> wrote:
"int system(const char *command)"

I would like to use this func to start another dameon , such as "  
system("zebra -d")  ".

Regards,
Ewan
________________________________
yug...@telincn.com<mailto:yug...@telincn.com>

From: Ed Warnicke<mailto:hagb...@gmail.com>
Date: 2017-02-28 11:15
To: yug...@telincn.com<mailto:yug...@telincn.com>
CC: vpp-dev<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] system func in vpp
I'm not quite sure what you mean by the 'func system'...

Ed

On Mon, Feb 27, 2017 at 7:26 PM, yug...@telincn.com<mailto:yug...@telincn.com> 
<yug...@telincn.com<mailto:yug...@telincn.com>> wrote:
Hi, all

Does vpp can't use func  system? Any reason to this or what can i do  if i 
really need ?

________________________________
yug...@telincn.com<mailto:yug...@telincn.com>

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
https://lists.fd.io/mailman/listinfo/vpp-dev


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

Reply via email to