Re: [ovs-dev] [PATCH v4] lib: Use a more accurate value for CPU count (sched_getaffinity).

2016-06-27 Thread Quentin Monnet
2016-06-23 (15:59 -0700) ~ Ben Pfaff > On Thu, Jun 09, 2016 at 11:52:49AM +0200, Quentin Monnet wrote: >> Signed-off-by: David Marchand >> Signed-off-by: Liu Xiaofeng >> Signed-off-by: Quentin Monnet > > Who is the author, and what are the roles of the others in t

Re: [ovs-dev] [PATCH v4] lib: Use a more accurate value for CPU count (sched_getaffinity).

2016-06-16 Thread Quentin Monnet
Hi Ryan, > > Other UNIX-like systems only use _SC_NPROCESSORS_ONLN. > > After double checking, I'm not *entirely* sure that's true, but it can > be updated in a follow-on patch > I meant “Other UNIX-like systems only use _SC_NPROCESSORS_ONLN *with this commit*”, I did not mean that there was no o

[ovs-dev] [PATCH v4] lib: Use a more accurate value for CPU count (sched_getaffinity).

2016-06-09 Thread Quentin Monnet
. Other UNIX-like systems only use _SC_NPROCESSORS_ONLN. Signed-off-by: David Marchand Signed-off-by: Liu Xiaofeng Signed-off-by: Quentin Monnet --- v4: sched_getaffinity() is specific to Linux, do not use it for other systems v3: Add `CPU_FREE(set);`, at the correct location v2: Add `CPU_FREE(set

[ovs-dev] [PATCH v3] lib: Use a more accurate value for CPU count (sched_getaffinity).

2016-06-02 Thread Quentin Monnet
Marchand Signed-off-by: Liu Xiaofeng Signed-off-by: Quentin Monnet --- Thank you Ryan for the feedback. Also, sorry for the noise with v2. v3: Add `CPU_FREE(set);`, at the correct location v2: Add `CPU_FREE(set);` Tests: on a VM with 3 cores: - OVS master: # taskset -c 1 ovs-vswitchd

[ovs-dev] [PATCH v2] lib: Use a more accurate value for CPU count (sched_getaffinity).

2016-06-02 Thread Quentin Monnet
Marchand Signed-off-by: Liu Xiaofeng Signed-off-by: Quentin Monnet --- v2: Add `CPU_FREE(set);` Tests: on a VM with 3 cores: - OVS master: # taskset -c 1 ovs-vswitchd --pidfile 2016-06-02T11:05:47Z|1|ovs_numa|INFO|Discovered 3 CPU cores on NUMA node 0 2016-06-02T11:05:47Z|2|ovs_numa

Re: [ovs-dev] [PATCH] lib: Use a more accurate value for CPU count (sched_getaffinity).

2016-06-01 Thread Quentin Monnet
Hi all, Does anyone have some feedback about this patch, please? Best regards, Quentin 2016-05-20 (11:20 +0200) ~ Quentin Monnet > From: David Marchand > > Relying on /proc/cpuinfo to count the number of available cores is not > the best option: > > - The code is x86-sp

Re: [ovs-dev] [PATCH] stp: Initialize mutex whenever we register unixctl command.

2016-05-20 Thread Quentin Monnet
@kaust.edu.sa > diff --git a/lib/stp.c b/lib/stp.c > index 0f92ed1..ecef012 100644 > […] This patch does address the issue of my previous email ( http://openvswitch.org/pipermail/dev/2016-May/071381.html ). Thanks! Test-by: Quentin Monnet ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH] ovs-vswitchd: Fix uninitialized ovs_mutex for `stp/tcn` command.

2016-05-20 Thread Quentin Monnet
only after `mutex` is initialized (and thus cannot be called at all if STP has not been enabled). Signed-off-by: Ding Zhi Signed-off-by: Liu Xiaofeng Signed-off-by: Quentin Monnet --- lib/stp.c | 3 ++- lib/stp.h | 1 - vswitchd/bridge.c | 1 - 3 files changed, 2 insertions(+), 3

[ovs-dev] [PATCH] lib: Use a more accurate value for CPU count (sched_getaffinity).

2016-05-20 Thread Quentin Monnet
Marchand Signed-off-by: Liu Xiaofeng Signed-off-by: Quentin Monnet --- lib/ovs-thread.c | 75 +--- 1 file changed, 12 insertions(+), 63 deletions(-) diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c index 3c065cf15fb7..f084ed1f72ad 100644

Re: [ovs-dev] [PATCH v3 0/7] Add color output to `ovs-ofctl dump-flows` command

2016-03-14 Thread Quentin Monnet
2016-03-02 15:56 GMT+01:00 Quentin Monnet : > Proposal: add an option to ovs-ofctl utility so as to obtain colorized > output > in tty, for easier reading. Currently, only the dump-flows command supports > colors. > > A new `--color` option has been added to ovs-ofctl so as to

[ovs-dev] [PATCH v3 7/7] NEWS: update (--color option for ovs-ofctl)

2016-03-02 Thread Quentin Monnet
Signed-off-by: Quentin Monnet --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index a968f4f92340..cb37eb6a0343 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ Post-v2.5.0 - ovs-ofctl: * queue-get-config command now allows a queue ID to be specified

[ovs-dev] [PATCH v3 6/7] ovs-ofctl: update manpage for --color option

2016-03-02 Thread Quentin Monnet
variable OVS_COLORS (used for user-defined colors) has been documented as well. Signed-off-by: Quentin Monnet --- lib/colors.man | 60 manpages.mk | 2 ++ utilities/ovs-ofctl.8.in | 1 + 3 files changed, 63 insertions

[ovs-dev] [PATCH v3 4/7] match: color output of match conditions for ovs-ofctl dump-flows

2016-03-02 Thread Quentin Monnet
Add color output for flow match conditions for ovs-ofctl dump-flows command utility, by inserting color markers in the functions responsible for printing those match condictions. Signed-off-by: Quentin Monnet --- lib/flow.c | 3 +- lib/match.c | 126

[ovs-dev] [PATCH v3 3/7] ovs-ofctl: add output colors for flow attributes

2016-03-02 Thread Quentin Monnet
This commit adds colors to the “left part” of printed flows (to flow properties that are always present: `cookie`, `table`, timeouts, etc.). Signed-off-by: Quentin Monnet --- lib/ofp-print.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a

[ovs-dev] [PATCH v3 5/7] ofp-actions: color output of flow actions for ovs-ofctl dump-flows

2016-03-02 Thread Quentin Monnet
Add color output for flow actions for ovs-ofctl dump-flows command utility, by inserting color markers in the functions responsible for printing those actions. Signed-off-by: Quentin Monnet --- lib/bundle.c | 13 ++-- lib/learn.c | 49 +++- lib/multipath.c | 9 ++- lib

[ovs-dev] [PATCH v3 2/7] ovs-ofctl: declare / set up colors for command output

2016-03-02 Thread Quentin Monnet
is used instead. As an example, setting OVS_COLORS to the following string is equivalent to using the default values: OVS_COLORS="ac:01;31:dr=34:le=31:pm=36:pr=35:sp=33:vl=32" Signed-off-by: Quentin Monnet --- lib/automake.mk | 2 + lib/colors.c

[ovs-dev] [PATCH v3 1/7] ovs-ofctl: add option for color output to dump-flows command

2016-03-02 Thread Quentin Monnet
: ovs-ofctl dump-flows br0 --color=never ovs-ofctl dump-flows br0 The result of this option is stored into a variable which is to be forwarded (in next commits) as a function argument until it reaches the functions that print the elements of the flows. Signed-off-by: Quentin Monnet --- lib

[ovs-dev] [PATCH v3 0/7] Add color output to `ovs-ofctl dump-flows` command

2016-03-02 Thread Quentin Monnet
another one yet, so there is still the issue of the `--color` option that is unused in the first two patches (meanwhile, it makes reviewing the code easier). Should I squash the first three patches? Quentin Monnet (7): ovs-ofctl: add option for color output to dump-flows command ovs-ofctl

Re: [ovs-dev] [PATCH v2 6/6] ofp-actions: color output of flow actions for ovs-ofctl dump-flows

2016-02-24 Thread Quentin Monnet
2016-02-24 1:01 GMT+01:00 Ben Pfaff : > On Mon, Feb 15, 2016 at 04:22:07PM +0100, Quentin Monnet wrote: > > Add color output for flow actions for ovs-ofctl dump-flows command > > utility > > > > Signed-off-by: Quentin Monnet > > At a skim, I'm OK with the

Re: [ovs-dev] [PATCH v2 0/6] Add color output to `ovs-ofctl dump-flows` command

2016-02-22 Thread Quentin Monnet
2016-02-15 16:19 GMT+01:00 Quentin Monnet : > Proposal: add an option to ovs-ofctl utility so as to obtain colorized > output > in tty, for easier reading. Currently, only the dump-flows command supports > colors. > > A new `--color` option has been added to ovs-ofctl so as to

[ovs-dev] [PATCH v2 5/6] match: color output of match conditions for ovs-ofctl dump-flows

2016-02-15 Thread Quentin Monnet
implemented, to be completed if colors are to be provided for other commands / tools). Signed-off-by: Quentin Monnet --- lib/dpif-netdev.c | 2 +- lib/flow.c | 7 +- lib/flow.h | 3 +- lib/match.c | 288

[ovs-dev] [PATCH v2 4/6] ovs-ofctl: add output colors for flow attributes

2016-02-15 Thread Quentin Monnet
This commit adds colors to the “left part” of printed flows (to flow properties that are always present: `cookie`, `table`, timeouts, etc.). It uses the functions previously defined in dynamic-string.{c,h} to insert color markers around the names of the properties. Signed-off-by: Quentin Monnet

[ovs-dev] [PATCH v2 6/6] ofp-actions: color output of flow actions for ovs-ofctl dump-flows

2016-02-15 Thread Quentin Monnet
implemented, to be completed if colors are to be provided for other commands / tools). Signed-off-by: Quentin Monnet --- lib/bundle.c | 19 +- lib/bundle.h | 3 +- lib/learn.c | 59 -- lib/learn.h | 3 +- lib/multipath.c

[ovs-dev] [PATCH v2 2/6] ovs-ofctl: declare / set up colors for command output

2016-02-15 Thread Quentin Monnet
is used instead. As an example, setting OVS_COLORS to the following string is equivalent to using the default values: OVS_COLORS="ac:01;31:dr=34:le=31:pm=36:pr=35:sp=33:vl=32" Signed-off-by: Quentin Monnet --- lib/automake.mk | 2 + lib/colors.c

[ovs-dev] [PATCH v2 3/6] dynamic-string: define functions to print colored output

2016-02-15 Thread Quentin Monnet
Define three functions, respectively used for: * printing a new color marker before text to colorize * printing end color marker * wrapping the two previous functions into a substitute to ds_put_format(), with colors Signed-off-by: Quentin Monnet --- lib/dynamic-string.c | 32

[ovs-dev] [PATCH v2 1/6] ovs-ofctl: add option for color output to dump-flows command

2016-02-15 Thread Quentin Monnet
: ovs-ofctl dump-flows br0 --color=never ovs-ofctl dump-flows br0 The result of this option is stored into a variable which is to be forwarded (in next commits) as a function argument until it reaches the functions that print the elements of the flows. Signed-off-by: Quentin Monnet

[ovs-dev] [PATCH v2 0/6] Add color output to `ovs-ofctl dump-flows` command

2016-02-15 Thread Quentin Monnet
more details. This version also splits the two patches of v1 into several smaller patches so as to ease comprehension and review. Quentin Monnet (6): ovs-ofctl: add option for color output to dump-flows command ovs-ofctl: declare / set up colors for command output dynamic-string: define

Re: [ovs-dev] [CudaMailTagged] [PATCH 0/2] Add color output to `ovs-ofctl dump-flows` command

2016-02-05 Thread Quentin Monnet
2016-02-02 19:14 GMT+01:00 Ben Pfaff : > On Tue, Feb 02, 2016 at 09:31:22AM +0100, Quentin Monnet wrote: > > 2016-02-01 18:14 GMT+01:00 Ben Pfaff : > > > > > On Mon, Feb 01, 2016 at 04:40:44PM -0800, Quentin Monnet wrote: > > > > Proposal: add an option

Re: [ovs-dev] [CudaMailTagged] [PATCH 0/2] Add color output to `ovs-ofctl dump-flows` command

2016-02-02 Thread Quentin Monnet
2016-02-01 18:14 GMT+01:00 Ben Pfaff : > On Mon, Feb 01, 2016 at 04:40:44PM -0800, Quentin Monnet wrote: > > Proposal: add an option to ovs-ofctl utility so as to obtain colorized > output > > in tty, for easier reading. Currently, only the dump-flows command > supports >

[ovs-dev] [PATCH 2/2] ovs-ofctl: complete color output for dump-flows command

2016-02-02 Thread Quentin Monnet
Add color output for flow match conditions and flow actions for ovs-ofctl dump-flows command utility. More fields get colorized, but the functioning of the `--color` option is left unchanged. Signed-off-by: Quentin Monnet --- lib/bundle.c | 18 +- lib/bundle.h

[ovs-dev] [PATCH 1/2] ovs-ofctl: add color output to dump-flows command

2016-02-02 Thread Quentin Monnet
the “left part” of printed flows (to flow properties that are always present: `cookie`, `table`, timeouts, etc.). Signed-off-by: Quentin Monnet --- lib/dynamic-string.c | 32 +++ lib/dynamic-string.h | 17 lib/learning-switch.c | 2 +- lib/ofp-print.c

[ovs-dev] [CudaMailTagged] [PATCH 0/2] Add color output to `ovs-ofctl dump-flows` command

2016-02-01 Thread Quentin Monnet
`always` (force colors), `never` (no colors) or `auto` (use colors only if output is a tty). If provided without any value, it is the same as `auto`. If the option is not provided at all, colors are disabled by default. Quentin Monnet (2): ovs-ofctl: add color output to dump-flows command ovs-ofctl