Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory in ovsdb

2016-09-13 Thread Wojciechowicz, RobertX
Hi Aaron,

just a gentle reminder. I hope you didn't forget about this topic. ;)

Br,
Robert


> -Original Message-
> From: Aaron Conole [mailto:acon...@redhat.com]
> Sent: Wednesday, August 10, 2016 3:06 PM
> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Cc: Mooney, Sean K <sean.k.moo...@intel.com>; dev@openvswitch.org;
> Flavio Leitner <f...@sysclose.org>
> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory
> in ovsdb
> 
> "Wojciechowicz, RobertX" <robertx.wojciechow...@intel.com> writes:
> 
> > Hi Aaron,
> >
> > did you have time by any chance to get back to this topic?
> 
> I haven't, sorry.  Was busy on PTO, welcoming a future Free Software
> user (and possible developer) into the world ;)
> 
> I have some things to finish up and then I'll get back to it.
> 
> > If I correctly understood you have some idea what's the best way to
> expose
> > this vhost-user/runtime directory.
> >
> > Br,
> > Robert
> >
> >
> >> -Original Message-
> >> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of
> Mooney,
> >> Sean K
> >> Sent: Wednesday, July 20, 2016 2:37 PM
> >> To: Aaron Conole <acon...@redhat.com>
> >> Cc: dev@openvswitch.org; Flavio Leitner <f...@sysclose.org>
> >> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> directory
> >> in ovsdb
> >>
> >> Hi sorry for the delay
> >> Replies inline.
> >>
> >> > -Original Message-
> >> > From: Aaron Conole [mailto:acon...@redhat.com]
> >> > Sent: Monday, July 11, 2016 6:44 PM
> >> > To: Mooney, Sean K <sean.k.moo...@intel.com>
> >> > Cc: Flavio Leitner <f...@sysclose.org>; dev@openvswitch.org
> >> > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> >> directory in
> >> > ovsdb
> >> >
> >> > "Mooney, Sean K" <sean.k.moo...@intel.com> writes:
> >> >
> >> > > "Wojciechowicz, RobertX" 
> writes:
> >> > >
> >> > >> Hi Ben,
> >> > >>
> >> > >>
> >> > >>> -Original Message-
> >> > >>> From: Ben Pfaff [mailto:blp at ovn.org]
> >> > >>> Sent: Tuesday, July 5, 2016 5:07 PM
> >> > >>> To: Wojciechowicz, RobertX 
> >> > >>> Cc: dev at openvswitch.org
> >> > >>> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> >> > >>> directory in ovsdb
> >> > >>>
> >> > >>> On Mon, Jul 04, 2016 at 07:22:40AM +, Wojciechowicz, RobertX
> >> wrote:
> >> > >>> > Hi,
> >> > >>> >
> >> > >>> > > -Original Message-
> >> > >>> > > From: Ben Pfaff [mailto:blp at ovn.org]
> >> > >>> > > Sent: Saturday, July 2, 2016 2:49 AM
> >> > >>> > > To: Wojciechowicz, RobertX  intel.com>
> >> > >>> > > Cc: dev at openvswitch.org
> >> > >>> > > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user
> >> > >>> > > socket
> >> > >>> directory
> >> > >>> > > in ovsdb
> >> > >>> > >
> >> > >>> > > On Mon, Jun 20, 2016 at 10:16:51AM +, Wojciechowicz,
> >> RobertX
> >> > >>> wrote:
> >> > >>> > > > Hi,
> >> > >>> > > >
> >> > >>> > > > > -Original Message-
> >> > >>> > > > > From: Ben Pfaff [mailto:blp at ovn.org]
> >> > >>> > > > > Sent: Wednesday, June 8, 2016 10:41 PM
> >> > >>> > > > > To: Wojciechowicz, RobertX  >> > >>> > > > > intel.com>
> >> > >>> > > > > Cc: dev at openvswitch.org
> >> > >>> > > > > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user
> >> > >>> > > > > socket
> >> > >>> > > directory
> >> > >>> > > > > in ovsdb
> >> > >>> > > > >
> >> > >>> > > > > On Thu, Jun 02, 2016 at 11:25:56AM +0100, Robert
> &g

Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory in ovsdb

2016-08-10 Thread Wojciechowicz, RobertX
Hi Aaron,

did you have time by any chance to get back to this topic?
If I correctly understood you have some idea what's the best way to expose
this vhost-user/runtime directory.

Br,
Robert


> -Original Message-
> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Mooney,
> Sean K
> Sent: Wednesday, July 20, 2016 2:37 PM
> To: Aaron Conole <acon...@redhat.com>
> Cc: dev@openvswitch.org; Flavio Leitner <f...@sysclose.org>
> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory
> in ovsdb
> 
> Hi sorry for the delay
> Replies inline.
> 
> > -Original Message-
> > From: Aaron Conole [mailto:acon...@redhat.com]
> > Sent: Monday, July 11, 2016 6:44 PM
> > To: Mooney, Sean K <sean.k.moo...@intel.com>
> > Cc: Flavio Leitner <f...@sysclose.org>; dev@openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> directory in
> > ovsdb
> >
> > "Mooney, Sean K" <sean.k.moo...@intel.com> writes:
> >
> > > "Wojciechowicz, RobertX"  writes:
> > >
> > >> Hi Ben,
> > >>
> > >>
> > >>> -Original Message-
> > >>> From: Ben Pfaff [mailto:blp at ovn.org]
> > >>> Sent: Tuesday, July 5, 2016 5:07 PM
> > >>> To: Wojciechowicz, RobertX 
> > >>> Cc: dev at openvswitch.org
> > >>> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> > >>> directory in ovsdb
> > >>>
> > >>> On Mon, Jul 04, 2016 at 07:22:40AM +, Wojciechowicz, RobertX
> wrote:
> > >>> > Hi,
> > >>> >
> > >>> > > -Original Message-
> > >>> > > From: Ben Pfaff [mailto:blp at ovn.org]
> > >>> > > Sent: Saturday, July 2, 2016 2:49 AM
> > >>> > > To: Wojciechowicz, RobertX 
> > >>> > > Cc: dev at openvswitch.org
> > >>> > > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user
> > >>> > > socket
> > >>> directory
> > >>> > > in ovsdb
> > >>> > >
> > >>> > > On Mon, Jun 20, 2016 at 10:16:51AM +, Wojciechowicz,
> RobertX
> > >>> wrote:
> > >>> > > > Hi,
> > >>> > > >
> > >>> > > > > -Original Message-
> > >>> > > > > From: Ben Pfaff [mailto:blp at ovn.org]
> > >>> > > > > Sent: Wednesday, June 8, 2016 10:41 PM
> > >>> > > > > To: Wojciechowicz, RobertX  > >>> > > > > intel.com>
> > >>> > > > > Cc: dev at openvswitch.org
> > >>> > > > > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user
> > >>> > > > > socket
> > >>> > > directory
> > >>> > > > > in ovsdb
> > >>> > > > >
> > >>> > > > > On Thu, Jun 02, 2016 at 11:25:56AM +0100, Robert
> > >>> > > > > Wojciechowicz
> > >>> wrote:
> > >>> > > > > > In order to correctly interoperate with Openstack and ODL,
> > >>> > > > > > the vhost-user socket directory must be exposed from OVS
> > >>> > > > > > via
> > >>> OVSDB.
> > >>> > > > > > Different distros may package OVS in different ways, so
> > >>> > > > > > the locations of these sockets may vary depending on how
> > >>> > > > > > ovs-vswitchd has been started. Some clients need
> > >>> > > > > > information
> > >>> where
> > >>> > > > > > the sockets are located when instantiating Qemu virtual
> machines.
> > >>> > > > > > The full vhost-user socket directory is constructed from
> > >>> > > > > > current OVS working directory and optionally from specified
> > subdirectory.
> > >>> > > > > > This patch exposes vhost-user socket directory in
> > >>> > > > > > Open_vSwitch table in other_config column in two following
> keys:
> > >>> > > > > > 1. ovs-run-dir- OVS working directory
> > >>> > > > > > 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be
> > >>> >

Re: [ovs-dev] [PATCH RFC] sflow: Export OVS PMD threads statistics via sFlow

2016-07-21 Thread Wojciechowicz, RobertX
Hi,

so after the discussion it turned out that summarized info about pmd threads
will be enough. I'm going to prepare the patch where those new sflow counters
will look as follows:

struct dpif_pmd_stats {
unsigned num_threads; /* Number of PMD threads */
uint64_t cycles_polling; /* Number of PMD thread polling cycles */
uint64_t cycles_processing;  /* Number of PMD thread processing cycles */
uint64_t cycles_total; /* Number of all PMD thread cycles */
 };

If there are any more suggestions I should consider in the next patch
please share with me.

Br,
Robert


> -Original Message-
> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of
> Wojciechowicz, RobertX
> Sent: Wednesday, July 6, 2016 10:27 AM
> To: Neil McKee <neil.mc...@inmon.com>
> Cc: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH RFC] sflow: Export OVS PMD threads statistics
> via sFlow
> 
> Hi Neil,
> 
> many thanks for your comments.
> My answers inline.
> 
> > -Original Message-
> > From: Neil McKee [mailto:neil.mc...@inmon.com]
> > Sent: Tuesday, July 5, 2016 7:36 PM
> > To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> > Cc: dev@openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH RFC] sflow: Export OVS PMD threads
> statistics
> > via sFlow
> >
> > Robert,
> >
> > Two comments:
> >
> > (1)  To add an sFlow extension like this you tag it with an
> > IANA-assigned enterprise number from:
> >
> > https://www.iana.org/assignments/enterprise-numbers/enterprise-
> > numbers
> >
> > The enterprise number goes in the high 20 bits, as described on page
> > 25 of http://sflow.org/sflow_version_5.txt
> >
> > So instead of :
> >
> > SFLCOUNTERS_OVSPMD = 2208
> >
> > You need something  like:
> >
> > #define IANA_ENTERPRISE_VMWARE 6876
> > SFLCOUNTERS_OVSPMD  = (IANA_ENTERPRISE_VMWARE << 12) + 2208
> >
> > Or perhaps:
> >
> > #define IANA_ENTERPRISE_INTEL 343
> > SFLCOUNTERS_OVSPMD  = (IANA_ENTERPRISE_INTEL << 12) + 2208
> >
> > And the "2208" could be "1" since this would be the first structure
> > from that enterprise (I think).
> 
> [RW] Sure, I wanted to discuss the idea of exporting PMD statistics
> via sflow in the first place. I will prepare the correct counter type ID
> if this idea will be accepted.
> 
> >
> > (2) It would be better to export a summary instead.   For example:
> >
> > struct dpif_pmd_stats {
> >unsigned num_threads; /* Number of PMD threads */
> >uint64_t cycles_polling; /* Number of PMD thread polling cycles 
> > */
> >uint64_t cycles_processing;  /* Number of PMD thread processing cycles
> */
> >uint64_t cycles_total; /* Number of all PMD thread cycles */
> > };
> >
> > This would make the data easier to digest and act upon downstream --
> > remember,  there may be many thousands of agents sending this every 20
> > seconds.   It would also avoid the potential problem of a large number
> > of threads resulting in an MTU problem if a single counter-sample was
> > ever more than 1500 bytes.  But of course the particular summary you
> > choose depends on what decision-making you want to drive with this
> > feed?
> 
> [RW] Right, I'm still thinking about this. I modeled it after
> "ovs-appctl pmd-stats-show", because it would be great to have information
> how much headroom we have on a particular pmd thread. In the future
> we could also add other metrics. But as you said for thousands of agents
> and large number of threads it might be too much.
> Now I'm starting to think that average core utilization might
> be enough for the analysis.
> 
> >
> > Neil
> >
> >
> >
> >
> > On Tue, Jul 5, 2016 at 5:26 AM, Robert Wojciechowicz
> > <robertx.wojciechow...@intel.com> wrote:
> > > The OVS PMD threads utilization has been identified
> > > as important metric when managing large deployments.
> > > This patch exposes via sFlow PMD utilization metrics,
> > > which are also available using ovs-appctl utility
> > > (command: dpif-netdev/pmd-stats-show).
> > >
> > > Signed-off-by: Robert Wojciechowicz
> <robertx.wojciechow...@intel.com>
> > > ---
> > >  lib/dpif-netdev.c| 38 
> > >  lib/dpif-netlink.c   |  1 +
> > >  lib/dpif-provider.h  |  4 +++
> > >  lib/dpif.c   | 12 
> > >  lib/dpif.h  

Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory in ovsdb

2016-07-06 Thread Wojciechowicz, RobertX
Hi Ben,


> -Original Message-
> From: Ben Pfaff [mailto:b...@ovn.org]
> Sent: Tuesday, July 5, 2016 5:07 PM
> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Cc: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory
> in ovsdb
> 
> On Mon, Jul 04, 2016 at 07:22:40AM +, Wojciechowicz, RobertX wrote:
> > Hi,
> >
> > > -Original Message-
> > > From: Ben Pfaff [mailto:b...@ovn.org]
> > > Sent: Saturday, July 2, 2016 2:49 AM
> > > To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> > > Cc: dev@openvswitch.org
> > > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> directory
> > > in ovsdb
> > >
> > > On Mon, Jun 20, 2016 at 10:16:51AM +, Wojciechowicz, RobertX
> wrote:
> > > > Hi,
> > > >
> > > > > -Original Message-
> > > > > From: Ben Pfaff [mailto:b...@ovn.org]
> > > > > Sent: Wednesday, June 8, 2016 10:41 PM
> > > > > To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> > > > > Cc: dev@openvswitch.org
> > > > > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> > > directory
> > > > > in ovsdb
> > > > >
> > > > > On Thu, Jun 02, 2016 at 11:25:56AM +0100, Robert Wojciechowicz
> wrote:
> > > > > > In order to correctly interoperate with Openstack and ODL,
> > > > > > the vhost-user socket directory must be exposed from OVS via
> OVSDB.
> > > > > > Different distros may package OVS in different ways,
> > > > > > so the locations of these sockets may vary depending on how
> > > > > > ovs-vswitchd has been started. Some clients need information
> where
> > > > > > the sockets are located when instantiating Qemu virtual machines.
> > > > > > The full vhost-user socket directory is constructed from current
> > > > > > OVS working directory and optionally from specified subdirectory.
> > > > > > This patch exposes vhost-user socket directory in Open_vSwitch
> > > > > > table in other_config column in two following keys:
> > > > > > 1. ovs-run-dir- OVS working directory
> > > > > > 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be empty)
> > > > > >
> > > > > > Signed-off-by: Robert Wojciechowicz
> > > <robertx.wojciechow...@intel.com>
> > > > > >
> > > > > > v1->v2
> > > > > > - moving vswitch-idl.h dependency inside #ifdef block
> > > > > > - sock_dir_subcomponent initialization with ""
> > > > >
> > > > > Same comment as v1: architecturally, ovs-vswitchd only reads
> > > > > other-config columns, it never writes to them.  Please fix.
> > > >
> > > > If ovs-vswitchd cannot writes to other-config then the only place
> > > > for writing default values to this column I can think of is vswitch
> > > > startup script ovs-ctl.
> > > > Basically I tested in my environment the below solution
> > > > and it seems to solve our issue.
> > > > Is it acceptable approach?
> > >
> > > It looks like you're trying to use other-config to report something,
> > > instead of to configure something.  That's not what it's for.
> >
> > Actually I'm trying to add missing information to the OVSDB.
> > By default ovs-vswitchd is already configured that vhost-user
> > sockects are created in the rundir, but this information
> > is not available in the OVSDB. Third-party scripts, which need
> > this information are forced to take some guesses about this.
> > Basically this approach is very similar to storing hostname
> > in this patch:
> > http://openvswitch.org/pipermail/dev/2016-March/068511.html
> 
> There is a difference between external-ids and other-config.
> other-config is to configure the switch.  That patch uses external-ids.

[RW] Yes, of course, but my point is that the configuration
currently looks as follows:
1. start ovsdb
2. vhost-sock-dir is not configured
3. start ovs-vswitchd
4. ovs-vswitchd in the function dpdk_init__ configures vhost-sock-dir
from ovs_rundir() and sock_dir_subcomponent
5. vhost-sock-dir is now configured, but still there is no information in the 
ovsdb

Now the question is how the third-party scripts can find out where actually
vhost-user sockets are located?

Br,
Robert

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory in ovsdb

2016-07-06 Thread Wojciechowicz, RobertX
Hi Aaron,

> -Original Message-
> From: Aaron Conole [mailto:acon...@redhat.com]
> Sent: Tuesday, July 5, 2016 4:47 PM
> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Cc: Ben Pfaff <b...@ovn.org>; dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory
> in ovsdb
> 
> Hi Robert,
> 
> "Wojciechowicz, RobertX" <robertx.wojciechow...@intel.com> writes:
> 
> > Hi,
> >
> >> -Original Message-
> >> From: Ben Pfaff [mailto:b...@ovn.org]
> >> Sent: Saturday, July 2, 2016 2:49 AM
> >> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> >> Cc: dev@openvswitch.org
> >> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> directory
> >> in ovsdb
> >>
> >> On Mon, Jun 20, 2016 at 10:16:51AM +, Wojciechowicz, RobertX
> wrote:
> >> > Hi,
> >> >
> >> > > -Original Message-
> >> > > From: Ben Pfaff [mailto:b...@ovn.org]
> >> > > Sent: Wednesday, June 8, 2016 10:41 PM
> >> > > To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> >> > > Cc: dev@openvswitch.org
> >> > > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> >> directory
> >> > > in ovsdb
> >> > >
> >> > > On Thu, Jun 02, 2016 at 11:25:56AM +0100, Robert Wojciechowicz
> wrote:
> >> > > > In order to correctly interoperate with Openstack and ODL,
> >> > > > the vhost-user socket directory must be exposed from OVS via
> OVSDB.
> >> > > > Different distros may package OVS in different ways,
> >> > > > so the locations of these sockets may vary depending on how
> >> > > > ovs-vswitchd has been started. Some clients need information
> where
> >> > > > the sockets are located when instantiating Qemu virtual machines.
> >> > > > The full vhost-user socket directory is constructed from current
> >> > > > OVS working directory and optionally from specified subdirectory.
> >> > > > This patch exposes vhost-user socket directory in Open_vSwitch
> >> > > > table in other_config column in two following keys:
> >> > > > 1. ovs-run-dir- OVS working directory
> >> > > > 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be empty)
> >> > > >
> >> > > > Signed-off-by: Robert Wojciechowicz
> >> <robertx.wojciechow...@intel.com>
> >> > > >
> >> > > > v1->v2
> >> > > > - moving vswitch-idl.h dependency inside #ifdef block
> >> > > > - sock_dir_subcomponent initialization with ""
> >> > >
> >> > > Same comment as v1: architecturally, ovs-vswitchd only reads
> >> > > other-config columns, it never writes to them.  Please fix.
> >> >
> >> > If ovs-vswitchd cannot writes to other-config then the only place
> >> > for writing default values to this column I can think of is vswitch
> >> > startup script ovs-ctl.
> >> > Basically I tested in my environment the below solution
> >> > and it seems to solve our issue.
> >> > Is it acceptable approach?
> >>
> >> It looks like you're trying to use other-config to report something,
> >> instead of to configure something.  That's not what it's for.
> >
> > Actually I'm trying to add missing information to the OVSDB.
> > By default ovs-vswitchd is already configured that vhost-user
> > sockects are created in the rundir, but this information
> > is not available in the OVSDB. Third-party scripts, which need
> > this information are forced to take some guesses about this.
> > Basically this approach is very similar to storing hostname
> > in this patch:
> > http://openvswitch.org/pipermail/dev/2016-March/068511.html
> >
> > Br,
> > Robert
> 
> I think there might be another way to do this using appctl commands.  Is
> it possible for neutron to execute an appctl command against
> ovs-vswitchd / ovsdb-server and get the needed information?  If so, can
> you also add a flag whether DPDK was initialized?

[RW] I'm not sure I understand what you mean. Are you saying
that using appctl it is possible to somehow get the vhost_sock_dir value?
Basically I suggested to use just this command before starting vswitch:
$ ovs-vsctl --no-wait set Open_vSwitch . other_config:vhost-sock-dir=
but it is not an option for openstack guys.

> 
> Thanks,
> -Aaron

Br,
Robert
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH RFC] sflow: Export OVS PMD threads statistics via sFlow

2016-07-06 Thread Wojciechowicz, RobertX
Hi Neil,

many thanks for your comments.
My answers inline.

> -Original Message-
> From: Neil McKee [mailto:neil.mc...@inmon.com]
> Sent: Tuesday, July 5, 2016 7:36 PM
> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Cc: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH RFC] sflow: Export OVS PMD threads statistics
> via sFlow
> 
> Robert,
> 
> Two comments:
> 
> (1)  To add an sFlow extension like this you tag it with an
> IANA-assigned enterprise number from:
> 
> https://www.iana.org/assignments/enterprise-numbers/enterprise-
> numbers
> 
> The enterprise number goes in the high 20 bits, as described on page
> 25 of http://sflow.org/sflow_version_5.txt
> 
> So instead of :
> 
> SFLCOUNTERS_OVSPMD = 2208
> 
> You need something  like:
> 
> #define IANA_ENTERPRISE_VMWARE 6876
> SFLCOUNTERS_OVSPMD  = (IANA_ENTERPRISE_VMWARE << 12) + 2208
> 
> Or perhaps:
> 
> #define IANA_ENTERPRISE_INTEL 343
> SFLCOUNTERS_OVSPMD  = (IANA_ENTERPRISE_INTEL << 12) + 2208
> 
> And the "2208" could be "1" since this would be the first structure
> from that enterprise (I think).

[RW] Sure, I wanted to discuss the idea of exporting PMD statistics 
via sflow in the first place. I will prepare the correct counter type ID 
if this idea will be accepted.

> 
> (2) It would be better to export a summary instead.   For example:
> 
> struct dpif_pmd_stats {
>unsigned num_threads; /* Number of PMD threads */
>uint64_t cycles_polling; /* Number of PMD thread polling cycles */
>uint64_t cycles_processing;  /* Number of PMD thread processing cycles */
>uint64_t cycles_total; /* Number of all PMD thread cycles */
> };
> 
> This would make the data easier to digest and act upon downstream --
> remember,  there may be many thousands of agents sending this every 20
> seconds.   It would also avoid the potential problem of a large number
> of threads resulting in an MTU problem if a single counter-sample was
> ever more than 1500 bytes.  But of course the particular summary you
> choose depends on what decision-making you want to drive with this
> feed?

[RW] Right, I'm still thinking about this. I modeled it after 
"ovs-appctl pmd-stats-show", because it would be great to have information 
how much headroom we have on a particular pmd thread. In the future 
we could also add other metrics. But as you said for thousands of agents 
and large number of threads it might be too much.
Now I'm starting to think that average core utilization might
be enough for the analysis.

> 
> Neil
> 
> 
> 
> 
> On Tue, Jul 5, 2016 at 5:26 AM, Robert Wojciechowicz
> <robertx.wojciechow...@intel.com> wrote:
> > The OVS PMD threads utilization has been identified
> > as important metric when managing large deployments.
> > This patch exposes via sFlow PMD utilization metrics,
> > which are also available using ovs-appctl utility
> > (command: dpif-netdev/pmd-stats-show).
> >
> > Signed-off-by: Robert Wojciechowicz <robertx.wojciechow...@intel.com>
> > ---
> >  lib/dpif-netdev.c| 38 
> >  lib/dpif-netlink.c   |  1 +
> >  lib/dpif-provider.h  |  4 +++
> >  lib/dpif.c   | 12 
> >  lib/dpif.h   | 10 +++
> >  lib/sflow.h  | 20 -
> >  lib/sflow_receiver.c | 19 
> >  ofproto/ofproto-dpif-sflow.c | 70
> +++-
> >  8 files changed, 172 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> > index 119e169..48367ce 100644
> > --- a/lib/dpif-netdev.c
> > +++ b/lib/dpif-netdev.c
> > @@ -1100,6 +1100,43 @@ dpif_netdev_get_stats(const struct dpif *dpif,
> struct dpif_dp_stats *stats)
> >  return 0;
> >  }
> >
> > +/* Collect PMD and main thread statistics.
> > + * Modeled after the appctl utility (pmd-stats-show command).
> > + *
> > + * XXX: Dynamically allocates array for threads, which should be
> > + *   freed by caller.
> > + */
> > +static int
> > +dpif_netdev_get_pmd_stats(const struct dpif *dpif,
> > +  struct dpif_pmd_stats **stats)
> > +{
> > +struct dp_netdev *dp = get_dp_netdev(dpif);
> > +int ithr = 0, icyc = 0;
> > +struct dp_netdev_pmd_thread *pmd;
> > +
> > +size_t nthreads = cmap_count(>poll_threads);
> > +struct dpif_pmd_stats* pmd_stats = xmalloc(nthreads * sizeof
> *pmd_stats);
> > +memset(pmd_stats, 0, nth

Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory in ovsdb

2016-07-04 Thread Wojciechowicz, RobertX
Hi,

> -Original Message-
> From: Ben Pfaff [mailto:b...@ovn.org]
> Sent: Saturday, July 2, 2016 2:49 AM
> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Cc: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory
> in ovsdb
> 
> On Mon, Jun 20, 2016 at 10:16:51AM +, Wojciechowicz, RobertX wrote:
> > Hi,
> >
> > > -Original Message-
> > > From: Ben Pfaff [mailto:b...@ovn.org]
> > > Sent: Wednesday, June 8, 2016 10:41 PM
> > > To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> > > Cc: dev@openvswitch.org
> > > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> directory
> > > in ovsdb
> > >
> > > On Thu, Jun 02, 2016 at 11:25:56AM +0100, Robert Wojciechowicz wrote:
> > > > In order to correctly interoperate with Openstack and ODL,
> > > > the vhost-user socket directory must be exposed from OVS via OVSDB.
> > > > Different distros may package OVS in different ways,
> > > > so the locations of these sockets may vary depending on how
> > > > ovs-vswitchd has been started. Some clients need information where
> > > > the sockets are located when instantiating Qemu virtual machines.
> > > > The full vhost-user socket directory is constructed from current
> > > > OVS working directory and optionally from specified subdirectory.
> > > > This patch exposes vhost-user socket directory in Open_vSwitch
> > > > table in other_config column in two following keys:
> > > > 1. ovs-run-dir- OVS working directory
> > > > 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be empty)
> > > >
> > > > Signed-off-by: Robert Wojciechowicz
> <robertx.wojciechow...@intel.com>
> > > >
> > > > v1->v2
> > > > - moving vswitch-idl.h dependency inside #ifdef block
> > > > - sock_dir_subcomponent initialization with ""
> > >
> > > Same comment as v1: architecturally, ovs-vswitchd only reads
> > > other-config columns, it never writes to them.  Please fix.
> >
> > If ovs-vswitchd cannot writes to other-config then the only place
> > for writing default values to this column I can think of is vswitch
> > startup script ovs-ctl.
> > Basically I tested in my environment the below solution
> > and it seems to solve our issue.
> > Is it acceptable approach?
> 
> It looks like you're trying to use other-config to report something,
> instead of to configure something.  That's not what it's for.

Actually I'm trying to add missing information to the OVSDB.
By default ovs-vswitchd is already configured that vhost-user
sockects are created in the rundir, but this information
is not available in the OVSDB. Third-party scripts, which need
this information are forced to take some guesses about this.
Basically this approach is very similar to storing hostname
in this patch:
http://openvswitch.org/pipermail/dev/2016-March/068511.html

Br,
Robert





___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory in ovsdb

2016-06-28 Thread Wojciechowicz, RobertX
Hi,

any comments to this ovs-ctl solution?
Updating OVS DB in this way is OK from OVS point of view?

Br,
Robert

> -Original Message-
> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of
> Wojciechowicz, RobertX
> Sent: Monday, June 20, 2016 12:17 PM
> To: Ben Pfaff <b...@ovn.org>
> Cc: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory
> in ovsdb
> 
> Hi,
> 
> > -Original Message-
> > From: Ben Pfaff [mailto:b...@ovn.org]
> > Sent: Wednesday, June 8, 2016 10:41 PM
> > To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> > Cc: dev@openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> directory
> > in ovsdb
> >
> > On Thu, Jun 02, 2016 at 11:25:56AM +0100, Robert Wojciechowicz wrote:
> > > In order to correctly interoperate with Openstack and ODL,
> > > the vhost-user socket directory must be exposed from OVS via OVSDB.
> > > Different distros may package OVS in different ways,
> > > so the locations of these sockets may vary depending on how
> > > ovs-vswitchd has been started. Some clients need information where
> > > the sockets are located when instantiating Qemu virtual machines.
> > > The full vhost-user socket directory is constructed from current
> > > OVS working directory and optionally from specified subdirectory.
> > > This patch exposes vhost-user socket directory in Open_vSwitch
> > > table in other_config column in two following keys:
> > > 1. ovs-run-dir- OVS working directory
> > > 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be empty)
> > >
> > > Signed-off-by: Robert Wojciechowicz
> <robertx.wojciechow...@intel.com>
> > >
> > > v1->v2
> > > - moving vswitch-idl.h dependency inside #ifdef block
> > > - sock_dir_subcomponent initialization with ""
> >
> > Same comment as v1: architecturally, ovs-vswitchd only reads
> > other-config columns, it never writes to them.  Please fix.
> 
> If ovs-vswitchd cannot writes to other-config then the only place
> for writing default values to this column I can think of is vswitch
> startup script ovs-ctl.
> Basically I tested in my environment the below solution
> and it seems to solve our issue.
> Is it acceptable approach?
> 
> diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
> index 6bc7ced..8777f50 100755
> --- a/utilities/ovs-ctl.in
> +++ b/utilities/ovs-ctl.in
> @@ -110,6 +110,10 @@ set_system_ids () {
> 
>  set "$@" external-ids:hostname="\"$(hostname)\""
> 
> +set "$@" other-config:ovs-run-dir="\"$rundir\""
> +
> +set "$@" other-config:vhost-sock-dir="\"\""
> +
>  if test X"$SYSTEM_TYPE" != X; then
>  set "$@" system-type="\"$SYSTEM_TYPE\""
>  else
> 
> Br,
> Robert
> 
> ___
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory in ovsdb

2016-06-20 Thread Wojciechowicz, RobertX
Hi,

> -Original Message-
> From: Ben Pfaff [mailto:b...@ovn.org]
> Sent: Wednesday, June 8, 2016 10:41 PM
> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Cc: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory
> in ovsdb
> 
> On Thu, Jun 02, 2016 at 11:25:56AM +0100, Robert Wojciechowicz wrote:
> > In order to correctly interoperate with Openstack and ODL,
> > the vhost-user socket directory must be exposed from OVS via OVSDB.
> > Different distros may package OVS in different ways,
> > so the locations of these sockets may vary depending on how
> > ovs-vswitchd has been started. Some clients need information where
> > the sockets are located when instantiating Qemu virtual machines.
> > The full vhost-user socket directory is constructed from current
> > OVS working directory and optionally from specified subdirectory.
> > This patch exposes vhost-user socket directory in Open_vSwitch
> > table in other_config column in two following keys:
> > 1. ovs-run-dir- OVS working directory
> > 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be empty)
> >
> > Signed-off-by: Robert Wojciechowicz <robertx.wojciechow...@intel.com>
> >
> > v1->v2
> > - moving vswitch-idl.h dependency inside #ifdef block
> > - sock_dir_subcomponent initialization with ""
> 
> Same comment as v1: architecturally, ovs-vswitchd only reads
> other-config columns, it never writes to them.  Please fix.

If ovs-vswitchd cannot writes to other-config then the only place
for writing default values to this column I can think of is vswitch
startup script ovs-ctl.
Basically I tested in my environment the below solution
and it seems to solve our issue. 
Is it acceptable approach?

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 6bc7ced..8777f50 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -110,6 +110,10 @@ set_system_ids () {

 set "$@" external-ids:hostname="\"$(hostname)\""

+set "$@" other-config:ovs-run-dir="\"$rundir\""
+
+set "$@" other-config:vhost-sock-dir="\"\""
+
 if test X"$SYSTEM_TYPE" != X; then
 set "$@" system-type="\"$SYSTEM_TYPE\""
 else

Br,
Robert

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] OVS is failing while starting with DPDK

2016-06-01 Thread Wojciechowicz, RobertX


From: Mauricio Vásquez [mailto:mauricio.vasquezber...@studenti.polito.it]
Sent: Wednesday, June 1, 2016 11:47 AM
To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
Cc: Sheroo Pratap <sheroopratapresea...@gmail.com>; ovs dev 
<dev@openvswitch.org>
Subject: Re: [ovs-dev] OVS is failing while starting with DPDK

Hi RobertX,

On Wed, Jun 1, 2016 at 11:26 AM, Wojciechowicz, RobertX 
<robertx.wojciechow...@intel.com<mailto:robertx.wojciechow...@intel.com>> wrote:
Hi Sheroo,

my suggestions inline

> -Original Message-
> From: dev 
> [mailto:dev-boun...@openvswitch.org<mailto:dev-boun...@openvswitch.org>] On 
> Behalf Of Sheroo
> Pratap
> Sent: Wednesday, June 1, 2016 10:48 AM
> To: ovs dev <dev@openvswitch.org<mailto:dev@openvswitch.org>>
> Subject: [ovs-dev] OVS is failing while starting with DPDK
>
> Hi All,
>
>   I am trying to start OVS with DPDK but it is failing with below error.
>
> root@osboxes:/home/osboxes/ovs# ovs-vswitchd unix:$DB_SOCK --pidfile
> --detach
> 2016-06-01T08:25:32Z|1|ovs_numa|INFO|Discovered 1 CPU cores on
> NUMA
> node 0
> 2016-06-01T08:25:32Z|2|ovs_numa|INFO|Discovered 1 NUMA nodes
> and 1 CPU
> cores
> 2016-06-
> 01T08:25:32Z|3|reconnect|INFO|unix:/usr/local/var/run/openvswitch/
> db.sock:
> connecting...
> 2016-06-
> 01T08:25:32Z|4|reconnect|INFO|unix:/usr/local/var/run/openvswitch/
> db.sock:
> connected
> *2016-06-01T08:25:32Z|5|dpdk|ERR|DPDK not supported in this copy of
> Open vSwitch.*
> root@osboxes:/home/osboxes/ovs#
>
> Below is the steps is have followed so far.
>
> 1) My OVS version is master ovs i.e. 2.5.90, ubuntu 15.10 and kernel
> version is 4.6
> 2) DPDK version is 16.04  (as recommended in 
> INSTALL.DPDK.md<http://INSTALL.DPDK.md> of master
> ovs)
> 3) Following are the steps as have executed as mentioned in
> INSTALL.DPDK.md<http://INSTALL.DPDK.md>
> 1)  export DPDK_DIR=/usr/src/dpdk-16.04
> 2)  cd $DPDK_DIR
> 3) make install T=x86_64-native-linuxapp-gcc DESTDIR=install
> 4) export DPDK_BUILD=$DPDK_DIR/x86_64-native-linuxapp-gcc/
> 5) cd $(OVS_DIR)/
>6) ./boot.sh
>7) ./configure --with-dpdk=$DPDK_BUILD CFLAGS="-g -O2
> -Wno-cast-align"
>8) make CFLAGS='-O3 -march=native
>9)  added below line in /etc/default/grub
>default_hugepagesz=1GB hugepagesz=1G hugepages=1
>   Snapshot of grub
>  GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo
> Debian`
>  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash
> default_hugepagesz=1GB hugepagesz=1G hugepages=1"
>  GRUB_CMDLINE_LINUX=""
>  10) modprobe uio
>  11) insmod $DPDK_BUILD/kmod/igb_uio.ko
>  12) $DPDK_DIR/tools/dpdk_nic_bind.py --bind=igb_uio eth0
>  13) mount -t hugetlbfs -o pagesize=2MB none /dev/hugepages
>  14) mkdir -p /usr/local/etc/openvswitch
>  15) mkdir -p /usr/local/var/run/openvswitch
>  16) rm /usr/local/etc/openvswitch/conf.db
>  17) ovsdb-tool create /usr/local/etc/openvswitch/conf.db  \
>  /usr/local/share/openvswitch/vswitch.ovsschema
>
>  18) removed SSL certificates while configuraing ovsdb :
>   ovsdb-server
> --remote=punix:/usr/local/var/run/openvswitch/db.sock
> --remote=db:Open_vSwitch,Open_vSwitch,manager_options  --pidfile --
> detach
[RW] Make sure that ovsdb server started successfully

>  19) ovs-vsctl --no-wait init
>  20) export DB_SOCK=/usr/local/var/run/openvswitch/db.sock
>  21) ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true

[RW] Check in the database if dpdk-init value was written properly.
I saw situations where ovsdb server was not ready to work yet,
so writing to it was not possible. Waiting a few seconds before writing helped.

>
>
>
>
>
>
>
> * 22) faling here : ovs-vswitchd unix:$DB_SOCK --pidfile
> --detachroot@osboxes:/home/osboxes/ovs# ovs-vswitchd
> unix:$DB_SOCK --pidfile --detach
> 2016-06-01T08:25:32Z|1|ovs_numa|INFO|Discovered 1 CPU cores on
> NUMA
> node 02016-06-01T08:25:32Z|2|ovs_numa|INFO|Discovered 1
> NUMA nodes and 1 CPU cores
> 2016-06-
> 01T08:25:32Z|3|reconnect|INFO|unix:/usr/local/var/run/openvswitch/
> db.sock:
> connecting...
> 2016-06-
> 01T08:25:32Z|4|reconnect|INFO|unix:/usr/local/var/run/openvswitch/
> db.sock:
> connected2016-06-01T08:25:32Z|5|dpdk|ERR|DPDK not
> supported
> in this copy of Open vSwitch.*

[RW] This error message means that dpdk-init has not "true" value in db.

I am not pretty sure that the error message means that

Re: [ovs-dev] [PATCH] ovsdb: Expose vhost-user socket directory in ovsdb

2016-06-01 Thread Wojciechowicz, RobertX
Hi Aaron,

thank you for review.
I will address your suggestions and prepare the second version of this patch.

Br,
Robert

> -Original Message-
> From: Aaron Conole [mailto:acon...@redhat.com]
> Sent: Tuesday, May 31, 2016 8:32 PM
> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Cc: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH] ovsdb: Expose vhost-user socket directory in
> ovsdb
> 
> 
> Hi Robert,
> 
> Robert Wojciechowicz <robertx.wojciechow...@intel.com> writes:
> 
> > In order to correctly interoperate with Openstack and ODL,
> > the vhost-user socket directory must be exposed from OVS via OVSDB.
> > Different distros may package OVS in different ways,
> > so the locations of these sockets may vary depending on how
> > ovs-vswitchd has been started. Some clients need information where
> > the sockets are located when instantiating Qemu virtual machines.
> > The full vhost-user socket directory is constructed from current
> > OVS working directory and optionally from specified subdirectory.
> > This patch exposes vhost-user socket directory in Open_vSwitch
> > table in other_config column in two following keys:
> > 1. ovs-run-dir- OVS working directory
> > 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be empty)
> >
> > Signed-off-by: Robert Wojciechowicz <robertx.wojciechow...@intel.com>
> 
> I think this idea makes sense.  Neutron plugin would want to know this
> sort of thing.  I don't know much about the thinking w.r.t. putting
> these kinds of values in database responses, but it seems to be a good
> place for interop with other projects.
> 
> Just some nits below.
> 
> > ---
> >  lib/netdev-dpdk.c| 38 ++
> >  lib/netdev-dpdk.h|  9 +
> >  vswitchd/bridge.c|  2 ++
> >  vswitchd/vswitch.xml | 11 +++
> >  4 files changed, 56 insertions(+), 4 deletions(-)
> >
> > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> > index 9ffa7ff..4e68bd6 100644
> > --- a/lib/netdev-dpdk.c
> > +++ b/lib/netdev-dpdk.c
> > @@ -138,9 +138,13 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF /
> ROUND_DOWN_POW2(MAX_NB_MBUF/MIN_NB_MBUF))
> >
> >  #ifdef VHOST_CUSE
> >  static char *cuse_dev_name = NULL;/* Character device
> cuse_dev_name. */
> > +#else
> > +static char *sock_dir_subcomponent = NULL;   /* Subdir of OVS run dir
> > +for vhost-user sockets */
> >  #endif
> >  static char *vhost_sock_dir = NULL;   /* Location of vhost-user sockets */
> >
> > +
> >  /*
> >   * Maximum amount of time in micro seconds to try and enqueue to vhost.
> >   */
> > @@ -3086,9 +3090,6 @@ dpdk_init__(const struct smap
> *ovs_other_config)
> >  bool auto_determine = true;
> >  int err = 0;
> >  cpu_set_t cpuset;
> > -#ifndef VHOST_CUSE
> > -char *sock_dir_subcomponent;
> > -#endif
> >
> >  if (!smap_get_bool(ovs_other_config, "dpdk-init", false)) {
> >  VLOG_INFO("DPDK Disabled - to change this requires a restart.\n");
> > @@ -3119,10 +3120,11 @@ dpdk_init__(const struct smap
> *ovs_other_config)
> >  VLOG_ERR("vhost-user sock directory request '%s/%s' has 
> > invalid"
> >   "characters '..' - using %s instead.",
> >   ovs_rundir(), sock_dir_subcomponent, ovs_rundir());
> > +sock_dir_subcomponent = "";
> >  }
> > -free(sock_dir_subcomponent);
> >  } else {
> >  vhost_sock_dir = sock_dir_subcomponent;
> > +sock_dir_subcomponent = "";
> >  #endif
> >  }
> >
> > @@ -3244,6 +3246,34 @@ dpdk_init(const struct smap *ovs_other_config)
> >  }
> >  }
> >
> > +void
> > +dpdk_set_config(const struct ovsrec_open_vswitch *cfg)
> > +{
> > +struct smap dpdk_args;
> > +const struct ovsdb_datum *datum;
> > +size_t i;
> > +
> > +ovs_mutex_lock(_mutex);
> > +
> > +smap_init(_args);
> > +/* read current values from database */
> > +datum = ovsrec_open_vswitch_get_other_config(cfg,
> OVSDB_TYPE_STRING,
> > + OVSDB_TYPE_STRING);
> > +for (i = 0; i < datum->n; i++) {
> > +  smap_add(_args, datum->keys[i].string, datum-
> >values[i].string);
> > +}
> > +/* add default paths to the database */
> > +smap_add_format(

Re: [ovs-dev] OVS is failing while starting with DPDK

2016-06-01 Thread Wojciechowicz, RobertX
Hi Sheroo,

my suggestions inline

> -Original Message-
> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Sheroo
> Pratap
> Sent: Wednesday, June 1, 2016 10:48 AM
> To: ovs dev 
> Subject: [ovs-dev] OVS is failing while starting with DPDK
> 
> Hi All,
> 
>   I am trying to start OVS with DPDK but it is failing with below error.
> 
> root@osboxes:/home/osboxes/ovs# ovs-vswitchd unix:$DB_SOCK --pidfile
> --detach
> 2016-06-01T08:25:32Z|1|ovs_numa|INFO|Discovered 1 CPU cores on
> NUMA
> node 0
> 2016-06-01T08:25:32Z|2|ovs_numa|INFO|Discovered 1 NUMA nodes
> and 1 CPU
> cores
> 2016-06-
> 01T08:25:32Z|3|reconnect|INFO|unix:/usr/local/var/run/openvswitch/
> db.sock:
> connecting...
> 2016-06-
> 01T08:25:32Z|4|reconnect|INFO|unix:/usr/local/var/run/openvswitch/
> db.sock:
> connected
> *2016-06-01T08:25:32Z|5|dpdk|ERR|DPDK not supported in this copy of
> Open vSwitch.*
> root@osboxes:/home/osboxes/ovs#
> 
> Below is the steps is have followed so far.
> 
> 1) My OVS version is master ovs i.e. 2.5.90, ubuntu 15.10 and kernel
> version is 4.6
> 2) DPDK version is 16.04  (as recommended in INSTALL.DPDK.md of master
> ovs)
> 3) Following are the steps as have executed as mentioned in
> INSTALL.DPDK.md
> 1)  export DPDK_DIR=/usr/src/dpdk-16.04
> 2)  cd $DPDK_DIR
> 3) make install T=x86_64-native-linuxapp-gcc DESTDIR=install
> 4) export DPDK_BUILD=$DPDK_DIR/x86_64-native-linuxapp-gcc/
> 5) cd $(OVS_DIR)/
>6) ./boot.sh
>7) ./configure --with-dpdk=$DPDK_BUILD CFLAGS="-g -O2
> -Wno-cast-align"
>8) make CFLAGS='-O3 -march=native
>9)  added below line in /etc/default/grub
>default_hugepagesz=1GB hugepagesz=1G hugepages=1
>   Snapshot of grub
>  GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo
> Debian`
>  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash
> default_hugepagesz=1GB hugepagesz=1G hugepages=1"
>  GRUB_CMDLINE_LINUX=""
>  10) modprobe uio
>  11) insmod $DPDK_BUILD/kmod/igb_uio.ko
>  12) $DPDK_DIR/tools/dpdk_nic_bind.py --bind=igb_uio eth0
>  13) mount -t hugetlbfs -o pagesize=2MB none /dev/hugepages
>  14) mkdir -p /usr/local/etc/openvswitch
>  15) mkdir -p /usr/local/var/run/openvswitch
>  16) rm /usr/local/etc/openvswitch/conf.db
>  17) ovsdb-tool create /usr/local/etc/openvswitch/conf.db  \
>  /usr/local/share/openvswitch/vswitch.ovsschema
> 
>  18) removed SSL certificates while configuraing ovsdb :
>   ovsdb-server
> --remote=punix:/usr/local/var/run/openvswitch/db.sock
> --remote=db:Open_vSwitch,Open_vSwitch,manager_options  --pidfile --
> detach

[RW] Make sure that ovsdb server started successfully

>  19) ovs-vsctl --no-wait init
>  20) export DB_SOCK=/usr/local/var/run/openvswitch/db.sock
>  21) ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true

[RW] Check in the database if dpdk-init value was written properly.
I saw situations where ovsdb server was not ready to work yet,
so writing to it was not possible. Waiting a few seconds before writing helped.

> 
> 
> 
> 
> 
> 
> 
> * 22) faling here : ovs-vswitchd unix:$DB_SOCK --pidfile
> --detachroot@osboxes:/home/osboxes/ovs# ovs-vswitchd
> unix:$DB_SOCK --pidfile --detach
> 2016-06-01T08:25:32Z|1|ovs_numa|INFO|Discovered 1 CPU cores on
> NUMA
> node 02016-06-01T08:25:32Z|2|ovs_numa|INFO|Discovered 1
> NUMA nodes and 1 CPU cores
> 2016-06-
> 01T08:25:32Z|3|reconnect|INFO|unix:/usr/local/var/run/openvswitch/
> db.sock:
> connecting...
> 2016-06-
> 01T08:25:32Z|4|reconnect|INFO|unix:/usr/local/var/run/openvswitch/
> db.sock:
> connected2016-06-01T08:25:32Z|5|dpdk|ERR|DPDK not
> supported
> in this copy of Open vSwitch.*

[RW] This error message means that dpdk-init has not "true" value in db.

> 
> Please anyone can help, after executing step 22 getting error "DPDK not
> supported in this copy of Open vSwitch"
> 
> Thanks and Regards
>  S Pratap

Br,
Robert
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] ovsdb: Expose vhost-user socket directory in ovsdb

2016-05-30 Thread Wojciechowicz, RobertX
Hi,

did anyone by any chance have time to have a look at this patch?

Br,
Robert

> -Original Message-
> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of
> Wojciechowicz, RobertX
> Sent: Monday, May 23, 2016 12:45 PM
> To: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH] ovsdb: Expose vhost-user socket directory in
> ovsdb
> 
> Hi,
> 
> this patch is actually a supplement to the conversion of DPDK configuration
> from command line to DB (http://openvswitch.org/pipermail/dev/2016-
> April/070308.html).
> Currently the full vhost-user socket directory consists of two components:
> ovs_rundir and subdirectory for vhost-user sockets. Combining them user
> can
> determine the full vhost-sock directory.
> Currently the default vhost-sock directory is not available in OVSDB,
> so I exposed those components in this patch.
> 
> Br,
> Robert
> 
> > -Original Message-
> > From: Wojciechowicz, RobertX
> > Sent: Monday, May 23, 2016 12:29 PM
> > To: dev@openvswitch.org
> > Cc: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> > Subject: [PATCH] ovsdb: Expose vhost-user socket directory in ovsdb
> >
> > In order to correctly interoperate with Openstack and ODL,
> > the vhost-user socket directory must be exposed from OVS via OVSDB.
> > Different distros may package OVS in different ways,
> > so the locations of these sockets may vary depending on how
> > ovs-vswitchd has been started. Some clients need information where
> > the sockets are located when instantiating Qemu virtual machines.
> > The full vhost-user socket directory is constructed from current
> > OVS working directory and optionally from specified subdirectory.
> > This patch exposes vhost-user socket directory in Open_vSwitch
> > table in other_config column in two following keys:
> > 1. ovs-run-dir- OVS working directory
> > 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be empty)
> >
> > Signed-off-by: Robert Wojciechowicz <robertx.wojciechow...@intel.com>
> > ---
> >  lib/netdev-dpdk.c| 38 ++
> >  lib/netdev-dpdk.h|  9 +
> >  vswitchd/bridge.c|  2 ++
> >  vswitchd/vswitch.xml | 11 +++
> >  4 files changed, 56 insertions(+), 4 deletions(-)
> >
> > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> > index 9ffa7ff..4e68bd6 100644
> > --- a/lib/netdev-dpdk.c
> > +++ b/lib/netdev-dpdk.c
> > @@ -138,9 +138,13 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF /
> > ROUND_DOWN_POW2(MAX_NB_MBUF/MIN_NB_MBUF))
> >
> >  #ifdef VHOST_CUSE
> >  static char *cuse_dev_name = NULL;/* Character device
> cuse_dev_name.
> > */
> > +#else
> > +static char *sock_dir_subcomponent = NULL;   /* Subdir of OVS run dir
> > +for vhost-user sockets */
> >  #endif
> >  static char *vhost_sock_dir = NULL;   /* Location of vhost-user sockets */
> >
> > +
> >  /*
> >   * Maximum amount of time in micro seconds to try and enqueue to vhost.
> >   */
> > @@ -3086,9 +3090,6 @@ dpdk_init__(const struct smap
> *ovs_other_config)
> >  bool auto_determine = true;
> >  int err = 0;
> >  cpu_set_t cpuset;
> > -#ifndef VHOST_CUSE
> > -char *sock_dir_subcomponent;
> > -#endif
> >
> >  if (!smap_get_bool(ovs_other_config, "dpdk-init", false)) {
> >  VLOG_INFO("DPDK Disabled - to change this requires a restart.\n");
> > @@ -3119,10 +3120,11 @@ dpdk_init__(const struct smap
> > *ovs_other_config)
> >  VLOG_ERR("vhost-user sock directory request '%s/%s' has 
> > invalid"
> >   "characters '..' - using %s instead.",
> >   ovs_rundir(), sock_dir_subcomponent, ovs_rundir());
> > +sock_dir_subcomponent = "";
> >  }
> > -free(sock_dir_subcomponent);
> >  } else {
> >  vhost_sock_dir = sock_dir_subcomponent;
> > +sock_dir_subcomponent = "";
> >  #endif
> >  }
> >
> > @@ -3244,6 +3246,34 @@ dpdk_init(const struct smap *ovs_other_config)
> >  }
> >  }
> >
> > +void
> > +dpdk_set_config(const struct ovsrec_open_vswitch *cfg)
> > +{
> > +struct smap dpdk_args;
> > +const struct ovsdb_datum *datum;
> > +size_t i;
> > +
> > +ovs_mutex_lock(_mutex);
> > +
> > +smap_init(_args);
> > +/* read current values from database */
> > +

Re: [ovs-dev] [PATCH] ovsdb: Expose vhost-user socket directory in ovsdb

2016-05-23 Thread Wojciechowicz, RobertX
Hi,

this patch is actually a supplement to the conversion of DPDK configuration
from command line to DB 
(http://openvswitch.org/pipermail/dev/2016-April/070308.html).
Currently the full vhost-user socket directory consists of two components:
ovs_rundir and subdirectory for vhost-user sockets. Combining them user can
determine the full vhost-sock directory. 
Currently the default vhost-sock directory is not available in OVSDB,
so I exposed those components in this patch.

Br,
Robert

> -Original Message-
> From: Wojciechowicz, RobertX
> Sent: Monday, May 23, 2016 12:29 PM
> To: dev@openvswitch.org
> Cc: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Subject: [PATCH] ovsdb: Expose vhost-user socket directory in ovsdb
> 
> In order to correctly interoperate with Openstack and ODL,
> the vhost-user socket directory must be exposed from OVS via OVSDB.
> Different distros may package OVS in different ways,
> so the locations of these sockets may vary depending on how
> ovs-vswitchd has been started. Some clients need information where
> the sockets are located when instantiating Qemu virtual machines.
> The full vhost-user socket directory is constructed from current
> OVS working directory and optionally from specified subdirectory.
> This patch exposes vhost-user socket directory in Open_vSwitch
> table in other_config column in two following keys:
> 1. ovs-run-dir- OVS working directory
> 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be empty)
> 
> Signed-off-by: Robert Wojciechowicz <robertx.wojciechow...@intel.com>
> ---
>  lib/netdev-dpdk.c| 38 ++
>  lib/netdev-dpdk.h|  9 +
>  vswitchd/bridge.c|  2 ++
>  vswitchd/vswitch.xml | 11 +++
>  4 files changed, 56 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 9ffa7ff..4e68bd6 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -138,9 +138,13 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF /
> ROUND_DOWN_POW2(MAX_NB_MBUF/MIN_NB_MBUF))
> 
>  #ifdef VHOST_CUSE
>  static char *cuse_dev_name = NULL;/* Character device cuse_dev_name.
> */
> +#else
> +static char *sock_dir_subcomponent = NULL;   /* Subdir of OVS run dir
> +for vhost-user sockets */
>  #endif
>  static char *vhost_sock_dir = NULL;   /* Location of vhost-user sockets */
> 
> +
>  /*
>   * Maximum amount of time in micro seconds to try and enqueue to vhost.
>   */
> @@ -3086,9 +3090,6 @@ dpdk_init__(const struct smap *ovs_other_config)
>  bool auto_determine = true;
>  int err = 0;
>  cpu_set_t cpuset;
> -#ifndef VHOST_CUSE
> -char *sock_dir_subcomponent;
> -#endif
> 
>  if (!smap_get_bool(ovs_other_config, "dpdk-init", false)) {
>  VLOG_INFO("DPDK Disabled - to change this requires a restart.\n");
> @@ -3119,10 +3120,11 @@ dpdk_init__(const struct smap
> *ovs_other_config)
>  VLOG_ERR("vhost-user sock directory request '%s/%s' has invalid"
>   "characters '..' - using %s instead.",
>   ovs_rundir(), sock_dir_subcomponent, ovs_rundir());
> +sock_dir_subcomponent = "";
>  }
> -free(sock_dir_subcomponent);
>  } else {
>  vhost_sock_dir = sock_dir_subcomponent;
> +sock_dir_subcomponent = "";
>  #endif
>  }
> 
> @@ -3244,6 +3246,34 @@ dpdk_init(const struct smap *ovs_other_config)
>  }
>  }
> 
> +void
> +dpdk_set_config(const struct ovsrec_open_vswitch *cfg)
> +{
> +struct smap dpdk_args;
> +const struct ovsdb_datum *datum;
> +size_t i;
> +
> +ovs_mutex_lock(_mutex);
> +
> +smap_init(_args);
> +/* read current values from database */
> +datum = ovsrec_open_vswitch_get_other_config(cfg,
> OVSDB_TYPE_STRING,
> + OVSDB_TYPE_STRING);
> +for (i = 0; i < datum->n; i++) {
> +  smap_add(_args, datum->keys[i].string, datum->values[i].string);
> +}
> +/* add default paths to the database */
> +smap_add_format(_args, "ovs-run-dir", "%s", ovs_rundir());
> +if (sock_dir_subcomponent) {
> +  smap_add_format(_args, "vhost-sock-dir", "%s",
> +  sock_dir_subcomponent);
> +}
> +ovsrec_open_vswitch_set_other_config(cfg, _args);
> +smap_destroy(_args);
> +
> +ovs_mutex_unlock(_mutex);
> +}
> +
>  static const struct netdev_class dpdk_class =
>  NETDEV_DPDK_CLASS(
>  "dpdk",
> diff --git a/lib/netdev-dp

Re: [ovs-dev] [PATCH RFC] netdev-dpdk: Expand RSS hash calculation by MAC addresses

2016-04-13 Thread Wojciechowicz, RobertX
Hi,

> -Original Message-
> From: Jesse Gross [mailto:je...@kernel.org]
> Sent: Friday, March 25, 2016 7:57 PM
> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Cc: ovs dev <dev@openvswitch.org>
> Subject: Re: [ovs-dev] [PATCH RFC] netdev-dpdk: Expand RSS hash
> calculation by MAC addresses
> 
> On Fri, Mar 25, 2016 at 7:45 AM, Wojciechowicz, RobertX
> <robertx.wojciechow...@intel.com> wrote:
> > Hi Jesse,
> >
> > please find my answers inline.
> >
> >> -Original Message-
> >> From: Jesse Gross [mailto:je...@kernel.org]
> >> Sent: Thursday, March 24, 2016 11:20 PM
> >> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> >> Cc: ovs dev <dev@openvswitch.org>
> >> Subject: Re: [ovs-dev] [PATCH RFC] netdev-dpdk: Expand RSS hash
> >> calculation by MAC addresses
> >>
> >> On Thu, Mar 24, 2016 at 7:30 AM, Robert Wojciechowicz
> >> <robertx.wojciechow...@intel.com> wrote:
> >> > This patch configures RSS hash filter in DPDK in order to include
> >> > source and destination MAC addresses into RSS hash calculation.
> >> > This configuration considerably improves performance for flows
> >> > with overlapping IP address spaces and non-overlapping Ethernet
> >> > address spaces.
> >> > Here is the example test result (throughput in frames per second)
> >> > I have done for 16 flows (fixed IP addresses and changing source
> >> > MAC addresses) on X710 for 10GbE SFP+:
> >> >
> >> > 1. original hash calculation:4870667 fps
> >> > 2. expanded hash calculation (with this patch): 12740258 fps
> >> >
> >> > Signed-off-by: Robert Wojciechowicz
> <robertx.wojciechow...@intel.com>
> >>
> >> This is somewhat of an unusual configuration - I guess as evidenced by
> >> the fact that it is not supported by ixgbe.
> >>
> >> How much of a difference does this make in non-synthetic benchmarks? I
> >> would expect in most cases that the use of L4 ports would provide
> >> sufficient entropy even in cases where there are overlapping IP
> >> addresses.
> >>
> >
> > In most cases you're probably right, but there are use cases where
> > this overlapping exists. For example in openstack configurations
> > with many tenants.
> > The idea of this patch is to make this configuration possible
> > for people who really need it.
> 
> I understand that that there can be configurations where there are
> overlapping IP addresses, however, I'm not sure that really means that
> the L4 ports aren't able to still spread the load. Have you seen real
> world situations where this patch makes a difference in practice, as
> opposed to just in theory?
> 

We contacted our customer regarding this real world test, but unfortunately
we're still waiting for response. However synthetic benchmarks could be useful
also, e.g. for comparison with other vswitches.
I discussed this issue also with openstack team in more detail. 
It seems that overlapping ip and mac address spaces can happen for vlan 
or other tunnels they use a lot in openstack setups. So there is suggestion 
to expand this hash by tunnel id instead of mac addresses. 
I will try to test this scenario also.

> The reason why some of the RSS modes you are enabling here aren't on
> by default is usually because they can introduce reordering. So I'm
> not really eager to go down this path unless you can show that there
> are specific reasons why the assumptions behind the default
> configuration don't apply here.
> 

To be honest I'm not sure how expanding rss hash may introduce reordering.
My understanding is that hash filter is a mechanism to statistically distribute 
received 
packets into several receive queues. By default there is used 5-tuple (src_addr,
dst_addr, protocol, src_port, dst_port). This patch tries to expand
this tuple by mac or tunnel_id in order to reduce collisions for some traffic 
flows
and improve packets distribution into queues.
Could you please explain why it may introduce reordering?

> >> Two other concerns:
> >>  * This appears to enable hashing for a wide range of packets,
> >> including IP fragments, which would typically allow the possibility of
> >> reordering. I think we probably want to be a little more careful in
> >> considering what to include.
> >>  * I think we need to more gracefully handle NICs where this
> >> configuration is not supported. I don't like that we should what looks
> >> like an error message in normal conditions.
> >

Re: [ovs-dev] [PATCH v10 0/6] Convert DPDK configuration from command line to DB based

2016-03-29 Thread Wojciechowicz, RobertX
Hi Aaron,

just gentle reminder

> -Original Message-
> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Aaron
> Conole
> Sent: Monday, March 28, 2016 8:55 PM
> To: dev@openvswitch.org
> Cc: Flavio Leitner 
> Subject: Re: [ovs-dev] [PATCH v10 0/6] Convert DPDK configuration from
> command line to DB based
> 
> Hi (and apologies if the top posting is inappropriate),
> 
> Don't want to be a pest, but just pinging re: this series. What work
> remains? I want to try and close this out to do some additional
> vhostuser config work, so anything that might be gating this please let
> me know and I'll work on it.
> 

Please remember to add "vhost-sock-dir" to the database,
even if there will be used the default directory (no command line value).

> Thanks,
> -Aaron
> 

Thanks,
Robert

> Aaron Conole  writes:
> > Currently, configuration of DPDK parameters is done via the command line
> > through a --dpdk **OPTIONS** -- command line argument. This has a
> number of
> > challenges, including:
> > * It must be the first option passed to ovs-vswitchd
> > * It is the only datapath feature in OVS to be configured on the command
> line
> > * It requires specialized knowledge of sub-component command switches
> > * It also inteprets non-EAL arguments (confusing users)
> > * It is a broken model.
> >
> >
> > This series brings the following changes to openvswitch:
> > * All DPDK options are taken from the ovs database rather than the
> >   command line
> > * Non-EAL arguments also have separate database entries
> > * DPDK lcores are optionally auto-assigned to a single core based on the
> >   bridge coremask.
> > * DPDK options have default behaviors
> > * Updated documentation
> >
> > v2:
> > * Dropped the vhost-user socket configuration options. Those can be re-
> added
> >   as an extension
> > * Incorporated feedback from Kevin Traynor.
> >
> > v3:
> > * Went back to a global dpdk-init
> > * Language cleanup and various minor fixes
> >
> > v4:
> > * Added a way to pass arbitrary eal arguments
> >
> > v5:
> > * Restore the socket-mem default, and fix up the ovs-dev.py script, along
> >   with the manpage for ovsdb-server
> >
> > v6:
> > * Correct a documentation issue with INSTALL.DPDK.md
> > * Correct a non-dpdk enabled OVS incorrect warning variable
> > * Remove an excess whitespace
> >
> > v7:
> > * After testing by Christian with dpdk-alloc-mem
> >
> > v8:
> > * Confirmed ``make check`` operation with and without dpdk.
> >   Retested on live-host
> >
> > v9:
> > * Cleanup of comments
> > * Cleanup of one place where headers are specified
> > * Mark the dpdk coremask and numa config as optional
> > * Added 5/6 to scan the extras and warn the user when conflicting
> >   DB entries are present
> > * Acks given for all but patch 5/6
> >
> > v10:
> > * Rebased against latest upstream
> > * ACK or Tested-by for all patches
> > * Code cleanup on patch 2/6 (vhost-cuse warning)
> > * DB options documentation cleanup.
> >
> > Aaron Conole (6):
> >   netdev-dpdk: Restore thread affinity after DPDK init
> >   netdev-dpdk: Convert initialization from cmdline to db
> >   netdev-dpdk: Autofill lcore coremask if absent
> >   netdev-dpdk: Allow arbitrary eal arguments
> >   netdev-dpdk: Check dpdk-extra when reading db
> >   NEWS: Announce the DPDK EAL configuration change
> >
> >  FAQ.md |   6 +-
> >  INSTALL.DPDK.md|  86 +++---
> >  NEWS   |   3 +
> >  lib/netdev-dpdk.c  | 409
> +
> >  lib/netdev-dpdk.h  |  22 ++-
> >  tests/ofproto-macros.at|   3 +-
> >  utilities/ovs-dev.py   |   7 +-
> >  vswitchd/bridge.c  |   3 +
> >  vswitchd/ovs-vswitchd.8.in |   5 +-
> >  vswitchd/ovs-vswitchd.c|  25 +--
> >  vswitchd/vswitch.xml   | 142 +++-
> >  11 files changed, 581 insertions(+), 130 deletions(-)
> ___
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
--
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH RFC] netdev-dpdk: Expand RSS hash calculation by MAC addresses

2016-03-25 Thread Wojciechowicz, RobertX
Hi Jesse,

please find my answers inline.

> -Original Message-
> From: Jesse Gross [mailto:je...@kernel.org]
> Sent: Thursday, March 24, 2016 11:20 PM
> To: Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> Cc: ovs dev <dev@openvswitch.org>
> Subject: Re: [ovs-dev] [PATCH RFC] netdev-dpdk: Expand RSS hash
> calculation by MAC addresses
> 
> On Thu, Mar 24, 2016 at 7:30 AM, Robert Wojciechowicz
> <robertx.wojciechow...@intel.com> wrote:
> > This patch configures RSS hash filter in DPDK in order to include
> > source and destination MAC addresses into RSS hash calculation.
> > This configuration considerably improves performance for flows
> > with overlapping IP address spaces and non-overlapping Ethernet
> > address spaces.
> > Here is the example test result (throughput in frames per second)
> > I have done for 16 flows (fixed IP addresses and changing source
> > MAC addresses) on X710 for 10GbE SFP+:
> >
> > 1. original hash calculation:4870667 fps
> > 2. expanded hash calculation (with this patch): 12740258 fps
> >
> > Signed-off-by: Robert Wojciechowicz <robertx.wojciechow...@intel.com>
> 
> This is somewhat of an unusual configuration - I guess as evidenced by
> the fact that it is not supported by ixgbe.
> 
> How much of a difference does this make in non-synthetic benchmarks? I
> would expect in most cases that the use of L4 ports would provide
> sufficient entropy even in cases where there are overlapping IP
> addresses.
> 

In most cases you're probably right, but there are use cases where
this overlapping exists. For example in openstack configurations
with many tenants.
The idea of this patch is to make this configuration possible
for people who really need it.

> Two other concerns:
>  * This appears to enable hashing for a wide range of packets,
> including IP fragments, which would typically allow the possibility of
> reordering. I think we probably want to be a little more careful in
> considering what to include.
>  * I think we need to more gracefully handle NICs where this
> configuration is not supported. I don't like that we should what looks
> like an error message in normal conditions.

Unfortunately DPDK returns EINVAL error also for unsupported operations,
so I couldn't handle it in more reasonable way. I wanted to make it
minimally invasive for other hardware than XL710, so I report all errors
as info messages.
Basically I'm not sure if there is some recommended approach
for providing functionality to OVS, which is hardware specific?
If there is any I could of course reimplement this patch appropriately.

Br,
Robert

--
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH v7 0/5] Convert DPDK configuration from command line to DB based

2016-02-05 Thread Wojciechowicz, RobertX
> "Wojciechowicz, RobertX" <robertx.wojciechow...@intel.com> writes:
> > Hi,
> >
> > one question to the "vhost-sock-dir" database entry.
> > We received requirement to make sure that this entry will be available
> > in the database
> > even if there will be used the default vhost socket directory.
> > In my patch "dpdk_set_config" function was supposed to do that.
> > Is it possible to somehow meet this requirement?
> 
> Okay, it is. However, will it hold up this series? I have a follow up

No, I don't think so.

> patch to do additional vhost-user configuration changes, and will
> happily fold it into that, if it makes sense.

Ok, great.

> 
> Thanks,
> Aaron

Thanks,
Robert

> 
> > Br,
> > Robert
> >
> > -Original Message-
> > From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of
> Wojciechowicz, RobertX
> > Sent: Tuesday, February 2, 2016 11:32 AM
> > To: Aaron Conole <acon...@redhat.com>; Christian Ehrhardt
> > <christian.ehrha...@canonical.com>
> > Cc: <dev@openvswitch.org> <dev@openvswitch.org>; Flavio Leitner
> <f...@sysclose.org>
> > Subject: Re: [ovs-dev] [PATCH v7 0/5] Convert DPDK configuration from
> > command line to DB based
> >
> > Hi,
> >
> > in the meantime I tested this patch in my environment: "patches/ovs-dev-
> v7-2-5-netdev-dpdk-Convert-initialization-from-cmdline-to-db.patch"
> > and indeed it solves also the issue I tried to address in my patch:
> "http://openvswitch.org/pipermail/dev/2016-January/065186.html;.
> > This patch works for me perfectly and it makes my patch obsolete at this
> point.
> >
> > I have just one minor remark to this patch:
> >
> > --- a/lib/netdev-dpdk.c
> > +++ b/lib/netdev-dpdk.c
> > @@ -2207,7 +2207,7 @@ process_vhost_flags(char *flag, char
> *default_val, int size,
> >  val = smap_get(_cfg->other_config, flag);
> >
> >  /* Depending on which version of vhost is in use, process the vhost-
> specific
> > - * flag if it is provided on the vswitchd command line, otherwise 
> > resort to
> > + * flag if it is provided in the Open vSwitch database, otherwise 
> > resort to
> >   * a default value.
> >   *
> >   * For vhost-user: Process "-vhost_sock_dir" to set the custom location
> of
> >
> > Br,
> > Robert
> >
> > -Original Message-
> > From: Aaron Conole [mailto:acon...@redhat.com]
> > Sent: Thursday, January 28, 2016 3:52 PM
> > To: Christian Ehrhardt <christian.ehrha...@canonical.com>
> > Cc: <dev@openvswitch.org> <dev@openvswitch.org>; Flavio Leitner
> > <f...@sysclose.org>; Panu Matilainen <pmati...@redhat.com>; Traynor,
> > Kevin <kevin.tray...@intel.com>; Zoltan Kiss <zoltan.k...@linaro.org>;
> > Wojciechowicz, RobertX <robertx.wojciechow...@intel.com>
> > Subject: Re: [PATCH v7 0/5] Convert DPDK configuration from command
> > line to DB based
> >
> > Christian Ehrhardt <christian.ehrha...@canonical.com> writes:
> >> Hi Aaron
> >>
> >> I refreshed my stack that combines your current series with the vhost-
> user
> >> permission/ownership work of december.
> >>
> >> quilt applied
> >> patches/ovs-dev-v7-1-5-netdev-dpdk-Restore-thread-affinity-after-
> DPDK-init.patch
> >> patches/ovs-dev-v7-2-5-netdev-dpdk-Convert-initialization-from-
> cmdline-to-db.patch
> >> patches/ovs-dev-v7-3-5-netdev-dpdk-Autofill-lcore-coremask-if-
> absent.patch
> >> patches/ovs-dev-v7-4-5-netdev-dpdk-Allow-arbitrary-eal-
> arguments.patch
> >> patches/ovs-dev-v7-5-5-NEWS-Announce-the-DPDK-EAL-configuration-
> change.patch
> >> patches/ovs-dev-4-5-lib-daemon-Move-the-user-group-code-up-one-
> level.patch
> >> patches/ovs-dev-5-5-netdev-dpdk-Support-user-cfg-vhost-socket-
> perms.patch
> >>
> >> It passes all the tests I had yesterday
> >
> > That's great to know! :)
> >
> >> dpdk|INFO|User-provided vhost-sock-dir in use:
> /usr/local/var/run/openvswitch-vhost
> >> dpdk|INFO|User-provided vhost_sock_owners in use: :kvm
> >> dpdk|INFO|User-provided vhost_sock_permissions in use: 0660
> >> dpdk|INFO|Socket /usr/local/var/run/openvswitch-vhost/vhost-user-1
> created for vhost-user
> >> port vhost-user-1
> >> dpdk|INFO|Socket /usr/local/var/run/openvswitch-vhost/vhost-user-1
> changed permissions to
> >> 0660
> >> dpdk|INFO|Socket /usr/local/var/

Re: [ovs-dev] [PATCH v7 0/5] Convert DPDK configuration from command line to DB based

2016-02-03 Thread Wojciechowicz, RobertX
Hi,

one question to the "vhost-sock-dir" database entry.
We received requirement to make sure that this entry will be available in the 
database
even if there will be used the default vhost socket directory.
In my patch "dpdk_set_config" function was supposed to do that.
Is it possible to somehow meet this requirement?

Br,
Robert

-Original Message-
From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Wojciechowicz, 
RobertX
Sent: Tuesday, February 2, 2016 11:32 AM
To: Aaron Conole <acon...@redhat.com>; Christian Ehrhardt 
<christian.ehrha...@canonical.com>
Cc: <dev@openvswitch.org> <dev@openvswitch.org>; Flavio Leitner 
<f...@sysclose.org>
Subject: Re: [ovs-dev] [PATCH v7 0/5] Convert DPDK configuration from command 
line to DB based

Hi,

in the meantime I tested this patch in my environment: 
"patches/ovs-dev-v7-2-5-netdev-dpdk-Convert-initialization-from-cmdline-to-db.patch"
and indeed it solves also the issue I tried to address in my patch: 
"http://openvswitch.org/pipermail/dev/2016-January/065186.html;.
This patch works for me perfectly and it makes my patch obsolete at this point.

I have just one minor remark to this patch:

--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -2207,7 +2207,7 @@ process_vhost_flags(char *flag, char *default_val, int 
size,
 val = smap_get(_cfg->other_config, flag);

 /* Depending on which version of vhost is in use, process the 
vhost-specific
- * flag if it is provided on the vswitchd command line, otherwise resort to
+ * flag if it is provided in the Open vSwitch database, otherwise resort to
  * a default value.
  *
  * For vhost-user: Process "-vhost_sock_dir" to set the custom location of

Br,
Robert

-Original Message-
From: Aaron Conole [mailto:acon...@redhat.com] 
Sent: Thursday, January 28, 2016 3:52 PM
To: Christian Ehrhardt <christian.ehrha...@canonical.com>
Cc: <dev@openvswitch.org> <dev@openvswitch.org>; Flavio Leitner 
<f...@sysclose.org>; Panu Matilainen <pmati...@redhat.com>; Traynor, Kevin 
<kevin.tray...@intel.com>; Zoltan Kiss <zoltan.k...@linaro.org>; Wojciechowicz, 
RobertX <robertx.wojciechow...@intel.com>
Subject: Re: [PATCH v7 0/5] Convert DPDK configuration from command line to DB 
based

Christian Ehrhardt <christian.ehrha...@canonical.com> writes:
> Hi Aaron
>
> I refreshed my stack that combines your current series with the vhost-user
> permission/ownership work of december.
>
> quilt applied
> patches/ovs-dev-v7-1-5-netdev-dpdk-Restore-thread-affinity-after-DPDK-init.patch
> patches/ovs-dev-v7-2-5-netdev-dpdk-Convert-initialization-from-cmdline-to-db.patch
> patches/ovs-dev-v7-3-5-netdev-dpdk-Autofill-lcore-coremask-if-absent.patch
> patches/ovs-dev-v7-4-5-netdev-dpdk-Allow-arbitrary-eal-arguments.patch
> patches/ovs-dev-v7-5-5-NEWS-Announce-the-DPDK-EAL-configuration-change.patch
> patches/ovs-dev-4-5-lib-daemon-Move-the-user-group-code-up-one-level.patch
> patches/ovs-dev-5-5-netdev-dpdk-Support-user-cfg-vhost-socket-perms.patch
>
> It passes all the tests I had yesterday

That's great to know! :) 

> dpdk|INFO|User-provided vhost-sock-dir in use: 
> /usr/local/var/run/openvswitch-vhost
> dpdk|INFO|User-provided vhost_sock_owners in use: :kvm
> dpdk|INFO|User-provided vhost_sock_permissions in use: 0660
> dpdk|INFO|Socket /usr/local/var/run/openvswitch-vhost/vhost-user-1 created 
> for vhost-user
> port vhost-user-1
> dpdk|INFO|Socket /usr/local/var/run/openvswitch-vhost/vhost-user-1 changed 
> permissions to
> 0660
> dpdk|INFO|Socket /usr/local/var/run/openvswitch-vhost/vhost-user-1 changed 
> ownership to
> :kvm
>
> So the issue with dpdk-alloc-mem is fixed - thanks.

I guess I only use hugepages, so I never properly tested this. I've
added a few scripts, and will start work on a separate series of tests
to add to the testdir to do these kinds of tests.

> The remaining issue with the range check for the permissions doesn't belong 
> to this series
> :-)
> While I agree to the communities assessment in December that they should be 
> discussed
> split, so the second series doesn't stall the former one.
> I'd consider it great to submit them always together, but as two series. So 
> one 0/5 and one
> 0/2.

It's a bit of a chicken-egg problem, and there's really no good way of
doing it. I'd like to just prevent folks from trying to apply the second
series without the first (plus many times it's considered inappropriate
to submit a patch series which depends on an unaccepted series). I agree
though, it's confusing.

> That way we keep the people aware and avoid people doing the same work over 
> and over
> again (me and just today e.g. by Robert Wojciechowicz)
> It would simplify testing both, but still keep discussions as

Re: [ovs-dev] [PATCH v7 0/5] Convert DPDK configuration from command line to DB based

2016-02-02 Thread Wojciechowicz, RobertX
Hi,

in the meantime I tested this patch in my environment: 
"patches/ovs-dev-v7-2-5-netdev-dpdk-Convert-initialization-from-cmdline-to-db.patch"
and indeed it solves also the issue I tried to address in my patch: 
"http://openvswitch.org/pipermail/dev/2016-January/065186.html;.
This patch works for me perfectly and it makes my patch obsolete at this point.

I have just one minor remark to this patch:

--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -2207,7 +2207,7 @@ process_vhost_flags(char *flag, char *default_val, int 
size,
 val = smap_get(_cfg->other_config, flag);

 /* Depending on which version of vhost is in use, process the 
vhost-specific
- * flag if it is provided on the vswitchd command line, otherwise resort to
+ * flag if it is provided in the Open vSwitch database, otherwise resort to
  * a default value.
  *
  * For vhost-user: Process "-vhost_sock_dir" to set the custom location of

Br,
Robert

-Original Message-
From: Aaron Conole [mailto:acon...@redhat.com] 
Sent: Thursday, January 28, 2016 3:52 PM
To: Christian Ehrhardt <christian.ehrha...@canonical.com>
Cc: <dev@openvswitch.org> <dev@openvswitch.org>; Flavio Leitner 
<f...@sysclose.org>; Panu Matilainen <pmati...@redhat.com>; Traynor, Kevin 
<kevin.tray...@intel.com>; Zoltan Kiss <zoltan.k...@linaro.org>; Wojciechowicz, 
RobertX <robertx.wojciechow...@intel.com>
Subject: Re: [PATCH v7 0/5] Convert DPDK configuration from command line to DB 
based

Christian Ehrhardt <christian.ehrha...@canonical.com> writes:
> Hi Aaron
>
> I refreshed my stack that combines your current series with the vhost-user
> permission/ownership work of december.
>
> quilt applied
> patches/ovs-dev-v7-1-5-netdev-dpdk-Restore-thread-affinity-after-DPDK-init.patch
> patches/ovs-dev-v7-2-5-netdev-dpdk-Convert-initialization-from-cmdline-to-db.patch
> patches/ovs-dev-v7-3-5-netdev-dpdk-Autofill-lcore-coremask-if-absent.patch
> patches/ovs-dev-v7-4-5-netdev-dpdk-Allow-arbitrary-eal-arguments.patch
> patches/ovs-dev-v7-5-5-NEWS-Announce-the-DPDK-EAL-configuration-change.patch
> patches/ovs-dev-4-5-lib-daemon-Move-the-user-group-code-up-one-level.patch
> patches/ovs-dev-5-5-netdev-dpdk-Support-user-cfg-vhost-socket-perms.patch
>
> It passes all the tests I had yesterday

That's great to know! :) 

> dpdk|INFO|User-provided vhost-sock-dir in use: 
> /usr/local/var/run/openvswitch-vhost
> dpdk|INFO|User-provided vhost_sock_owners in use: :kvm
> dpdk|INFO|User-provided vhost_sock_permissions in use: 0660
> dpdk|INFO|Socket /usr/local/var/run/openvswitch-vhost/vhost-user-1 created 
> for vhost-user
> port vhost-user-1
> dpdk|INFO|Socket /usr/local/var/run/openvswitch-vhost/vhost-user-1 changed 
> permissions to
> 0660
> dpdk|INFO|Socket /usr/local/var/run/openvswitch-vhost/vhost-user-1 changed 
> ownership to
> :kvm
>
> So the issue with dpdk-alloc-mem is fixed - thanks.

I guess I only use hugepages, so I never properly tested this. I've
added a few scripts, and will start work on a separate series of tests
to add to the testdir to do these kinds of tests.

> The remaining issue with the range check for the permissions doesn't belong 
> to this series
> :-)
> While I agree to the communities assessment in December that they should be 
> discussed
> split, so the second series doesn't stall the former one.
> I'd consider it great to submit them always together, but as two series. So 
> one 0/5 and one
> 0/2.

It's a bit of a chicken-egg problem, and there's really no good way of
doing it. I'd like to just prevent folks from trying to apply the second
series without the first (plus many times it's considered inappropriate
to submit a patch series which depends on an unaccepted series). I agree
though, it's confusing.

> That way we keep the people aware and avoid people doing the same work over 
> and over
> again (me and just today e.g. by Robert Wojciechowicz)
> It would simplify testing both, but still keep discussions as separate as 
> needed.

It's not a problem for me. I have updated the second series to include
your note on the default permissions and the parsing, so I can post them
as RFC or with some other tag, if you want.

> I might seem to miss something obvious (feels that way), but fyi with the 
> series various
> parts of "make check" fail.
> After realizing this I more or less blindly ran a loop of "quilt push; make 
> -j12 && make check
> TESTSUITEFLAGS=-j12" to see which of the patches triggers this behavior.
> It is #2 
> "ovs-dev-v7-2-5-netdev-dpdk-Convert-initialization-from-cmdline-to-db.patch"
> A lot of tests report fail, and it keeps "hanging" since some seem no more to 
> end correctly.
> Here a log of my "make c