Re: [vpp-dev] Questions about AF_PACKET and VNET_DEVICE_CLASS Functions

2017-03-22 Thread Damjan Marion

> On 20 Mar 2017, at 20:25, Jon Loeliger  wrote:
> 
> Folks,
> 
> I am trying to understand a bit more about the "host" interface
> for some AF_PACKET interfaces.
> 
> Currently, there is a single API call to create an AF_PACKET interface.
> It simultaneously sets the HW_ADDR (ie, MAC address) of the interface
> to either  user-specified value, or a randomly generated value.
> 
> I'd like to separate the two steps, or at the very least, be able to set
> the MAC address in a separate API call that isn't the initial CREATE call.
> Why?  Imagine the sequence of commands that might look like this:
> 
> # interface host fred
> #mac 11:22:33:44:55:66
> #no shutdown
> # exit
> 
> So, at the time of "interface host fred", we'd like to cause the interface
> to be created, but the MAC isn't really available yet.  Then later, when
> we see the "mac " line, we'd like to set, or change, the MAC with the
> new user-supplied value.
> 
> In the case of a "normal" or DPDK interface, the VNET_DEVICE_CLASS
> functions specify a .mac_addr_change_function.  Roughly from
> src/plugins/dpdk/device/device.c lines 774 or so:
> 
> VNET_DEVICE_CLASS (dpdk_device_class) = {
> .mac_addr_change_function = dpdk_set_mac_address,
> };
> 
> That's all well and good.
> 
> Naturally, no such mac_addr_change_function exists for the
> AF_PACKET device class.
> 
> My question is:  Is there a fundamental reason that prevents such
> a function from being written, or is it a case of simply "we just haven't
> gotten to that detail yet”?

If I remember correctly mac_addr_change_function is optional callback
for interfaces which need to do some special work when mac address is changed.
DPDK is such change as we need to call rte_eth_dev_default_mac_addr_set DPDK 
API.
as AF_PACKET doesn’t need to do any special work, it is not defined.

So what are you asking should simply work, have you tried "set interface mac 
address” CLI?


>  The latter case implying that someone
> could actually achieve a MAC addr change on the AF_PACKET
> interface, if an enterprising young engineer were to, say, write a new
> API function to get there.
> 
> So, yeah, I know the actual MAC might not be really important, but
> maybe the user is trying to match some external requirement or so?
> I don't know.
> 
> Thoughts?
> jdl
> 
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev

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

Re: [vpp-dev] VPP Python API for create host-interface ?

2017-03-22 Thread Shravan Ambati
Hi Keith,

Sorry I forgot to mention earlier
I did create the veth pair using “ip link” and the other end is linked to a 
network namespace using netns. I was able to create the host-interface on the 
vpp cli using
sh-4.2# vppctl create host-interface veth0-craft0

sh-4.2# vppctl show int
  Name   Idx   State  Counter  Count
host-veth0-craft0 1down
local00down

When I try to do the same thing using the python API I ran into issues 
mentioned below.
I have reference the wiki page https://wiki.fd.io/view/VPP/Python_API

Thanks
Shravan

From: Keith Burns [mailto:alaga...@gmail.com]
Sent: Tuesday, March 21, 2017 5:01 PM
To: Shravan Ambati 
Cc: vpp-dev ; otr...@employees.org
Subject: Re: [vpp-dev] VPP Python API for create host-interface ?

Check what the name of the system interface is:

ip -o a

We don't create the veth pair for you, so once you do this with "ip link" and 
ostensibly move one end into a netns, the other end is the one you add to VPP.



On Mar 21, 2017 2:06 PM, "Shravan Ambati" 
mailto:shravan.amb...@calix.com>> wrote:
Thanks Ole!
I did try it before. I ran into issues when I invoke the API.

>>> r = vpp.af_packet_create(veth0-craft0)
Traceback (most recent call last):
File "", line 1, in 
NameError: name 'veth0' is not defined

>>> r = vpp.af_packet_create('veth0-craft0')
Traceback (most recent call last):
File "", line 1, in 
TypeError: () takes exactly 0 arguments (1 given)

>>> r = vpp.af_packet_create(1)
Traceback (most recent call last):
File "", line 1, in 
TypeError: () takes exactly 0 arguments (1 given)

I am a python newbie, so please excuse my naïve question.
This is probably not a vpp issue. I must be invoking the Api wrong way.
Do you happen to know by any chance what is the right way to invoke it?


Thanks
Shravan


-Original Message-
From: otr...@employees.org 
[mailto:otr...@employees.org]
Sent: Tuesday, March 21, 2017 5:33 AM
To: Shravan Ambati mailto:shravan.amb...@calix.com>>
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] VPP Python API for create host-interface ?

Hi there,

> I am running the latest vpp code from master branch.
> I am looking at the python APIs that vpp provides.
> I am specifically trying to find the API for the following cli command
> - create host-interface  []
>
> I could not find where exactly this is defined in the json files in
> /usr/shar/vpp/api/ Or is this not supported through API ?

Looks like we're not quite consistent on naming.
It is this API you are looking for I think:

/** \brief Create host-interface
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@param host_if_name - interface name
@param hw_addr - interface MAC
@param use_random_hw_addr - use random generated MAC */ define 
af_packet_create {
  u32 client_index;
  u32 context;

  u8 host_if_name[64];
  u8 hw_addr[6];
  u8 use_random_hw_addr;
};


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

[vpp-dev] vpp-plugins RPM dependency

2017-03-22 Thread Feng Pan
Hi All,

With latest master builds of VPP (on Centos with rpm repo), it seems like
it's necessary to install vpp-plugins package for vpp to start, without it,
I get the following error when running vpp (with default config file):

vlib_plugin_early_init:360: plugin path /usr/lib/vpp_plugins
vlib_call_all_config_functions: unknown input `dpdk  '

Looking at the spec file, vpp package depends on vpp-lib only, so it
appears that we need to add vpp-plugins to the dependency list too.
However, it also looks like vpp-plugins depends on vpp package, so I'm
trying to figure out what the right dependency relationship is :)

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

Re: [vpp-dev] vpp-plugins RPM dependency

2017-03-22 Thread Dave Barach (dbarach)
Simply remove the “dpdk” stanza from /etc/vpp/startup.conf if you want to run 
vpp without the dpdk plugin.

Thanks… Dave

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Feng Pan
Sent: Wednesday, March 22, 2017 1:47 PM
To: vpp-dev 
Subject: [vpp-dev] vpp-plugins RPM dependency

Hi All,

With latest master builds of VPP (on Centos with rpm repo), it seems like it's 
necessary to install vpp-plugins package for vpp to start, without it, I get 
the following error when running vpp (with default config file):

vlib_plugin_early_init:360: plugin path /usr/lib/vpp_plugins
vlib_call_all_config_functions: unknown input `dpdk  '

Looking at the spec file, vpp package depends on vpp-lib only, so it appears 
that we need to add vpp-plugins to the dependency list too. However, it also 
looks like vpp-plugins depends on vpp package, so I'm trying to figure out what 
the right dependency relationship is :)

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

Re: [vpp-dev] vpp-plugins RPM dependency

2017-03-22 Thread Ed Warnicke
Commenting out the dpdk stanza is a great workaround but we may want to
look at bit more closely at the issue... as installing the vpp project
should result in an out of the box runnable vpp.

Ed

On Wed, Mar 22, 2017 at 11:44 AM, Dave Barach (dbarach) 
wrote:

> Simply remove the “dpdk” stanza from /etc/vpp/startup.conf if you want to
> run vpp without the dpdk plugin.
>
>
>
> Thanks… Dave
>
>
>
> *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On
> Behalf Of *Feng Pan
> *Sent:* Wednesday, March 22, 2017 1:47 PM
> *To:* vpp-dev 
> *Subject:* [vpp-dev] vpp-plugins RPM dependency
>
>
>
> Hi All,
>
>
>
> With latest master builds of VPP (on Centos with rpm repo), it seems like
> it's necessary to install vpp-plugins package for vpp to start, without it,
> I get the following error when running vpp (with default config file):
>
>
>
> vlib_plugin_early_init:360: plugin path /usr/lib/vpp_plugins
>
> vlib_call_all_config_functions: unknown input `dpdk  '
>
>
>
> Looking at the spec file, vpp package depends on vpp-lib only, so it
> appears that we need to add vpp-plugins to the dependency list too.
> However, it also looks like vpp-plugins depends on vpp package, so I'm
> trying to figure out what the right dependency relationship is :)
>
>
>
> Thanks
>
> Feng
>
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] vpp-plugins RPM dependency

2017-03-22 Thread Burt Silverman
I was tempted to reply to Feng's post that I know what the dependency
relationship is: it is circular. But I remembered
https://www.youtube.com/watch?v=PjIzbvT6Q8c and figured I had better let
others handle this one!

On Wed, Mar 22, 2017 at 2:46 PM, Ed Warnicke  wrote:

> Commenting out the dpdk stanza is a great workaround but we may want to
> look at bit more closely at the issue... as installing the vpp project
> should result in an out of the box runnable vpp.
>
> Ed
>
> On Wed, Mar 22, 2017 at 11:44 AM, Dave Barach (dbarach)  > wrote:
>
>> Simply remove the “dpdk” stanza from /etc/vpp/startup.conf if you want to
>> run vpp without the dpdk plugin.
>>
>>
>>
>> Thanks… Dave
>>
>>
>>
>> *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On
>> Behalf Of *Feng Pan
>> *Sent:* Wednesday, March 22, 2017 1:47 PM
>> *To:* vpp-dev 
>> *Subject:* [vpp-dev] vpp-plugins RPM dependency
>>
>>
>>
>> Hi All,
>>
>>
>>
>> With latest master builds of VPP (on Centos with rpm repo), it seems like
>> it's necessary to install vpp-plugins package for vpp to start, without it,
>> I get the following error when running vpp (with default config file):
>>
>>
>>
>> vlib_plugin_early_init:360: plugin path /usr/lib/vpp_plugins
>>
>> vlib_call_all_config_functions: unknown input `dpdk  '
>>
>>
>>
>> Looking at the spec file, vpp package depends on vpp-lib only, so it
>> appears that we need to add vpp-plugins to the dependency list too.
>> However, it also looks like vpp-plugins depends on vpp package, so I'm
>> trying to figure out what the right dependency relationship is :)
>>
>>
>>
>> Thanks
>>
>> Feng
>>
>> ___
>> vpp-dev mailing list
>> vpp-dev@lists.fd.io
>> https://lists.fd.io/mailman/listinfo/vpp-dev
>>
>
>
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] vpp-plugins RPM dependency

2017-03-22 Thread Feng Pan
So this would suggest that VPP by default (that is, by doing 'yum install
vpp') will not have dpdk support, and vpp-plugins must also be installed to
add it, I would think dpdk plugin should be either packaged or installed
together with VPP by default, and can be disabled if desired.

In any case, will deployment model stay this way? I'll need to make changes
to puppet module to include other packages if that's how it will be going
forward. Also, dpdk section should be commented out in the config file so
we can start VPP service using the default config.

Thanks
Feng

On Wed, Mar 22, 2017 at 2:46 PM, Ed Warnicke  wrote:

> Commenting out the dpdk stanza is a great workaround but we may want to
> look at bit more closely at the issue... as installing the vpp project
> should result in an out of the box runnable vpp.
>
> Ed
>
> On Wed, Mar 22, 2017 at 11:44 AM, Dave Barach (dbarach)  > wrote:
>
>> Simply remove the “dpdk” stanza from /etc/vpp/startup.conf if you want to
>> run vpp without the dpdk plugin.
>>
>>
>>
>> Thanks… Dave
>>
>>
>>
>> *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On
>> Behalf Of *Feng Pan
>> *Sent:* Wednesday, March 22, 2017 1:47 PM
>> *To:* vpp-dev 
>> *Subject:* [vpp-dev] vpp-plugins RPM dependency
>>
>>
>>
>> Hi All,
>>
>>
>>
>> With latest master builds of VPP (on Centos with rpm repo), it seems like
>> it's necessary to install vpp-plugins package for vpp to start, without it,
>> I get the following error when running vpp (with default config file):
>>
>>
>>
>> vlib_plugin_early_init:360: plugin path /usr/lib/vpp_plugins
>>
>> vlib_call_all_config_functions: unknown input `dpdk  '
>>
>>
>>
>> Looking at the spec file, vpp package depends on vpp-lib only, so it
>> appears that we need to add vpp-plugins to the dependency list too.
>> However, it also looks like vpp-plugins depends on vpp package, so I'm
>> trying to figure out what the right dependency relationship is :)
>>
>>
>>
>> Thanks
>>
>> Feng
>>
>> ___
>> vpp-dev mailing list
>> vpp-dev@lists.fd.io
>> https://lists.fd.io/mailman/listinfo/vpp-dev
>>
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] VPP 17.04 RC1 - stable/1704 pulled

2017-03-22 Thread otroan
All,

The stable/1704 branch has been pulled and tags have been laid.
Master is now open again for all changes.

With regards to stable/1704 (from the release wiki):

Once we've pulled the 17.04 release throttle
We need to be disciplined with respect to bugfix commits. Here are a few 
common-sense suggestions:

• All bug fixes must be double-committed to the release throttle as 
well as to the master branch
• Commit first to the release throttle, then "git cherry-pick" 
into master
• Manual merges may be required, depending on the degree of 
divergence between throttle and master
• All bug fixes need to have a Jira ticket
• Please put Jira IDs into the commit messages.
• Please use the same Jira ID


Best regards,
Ole


signature.asc
Description: Message signed with OpenPGP
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev