Re: [ovs-dev] band types

2013-07-18 Thread Ben Pfaff
On Fri, Jul 19, 2013 at 11:51:23AM +0900, YAMAMOTO Takashi wrote: > > On Wed, Jul 17, 2013 at 11:12:54AM +0900, YAMAMOTO Takashi wrote: > >> > On Tue, Jul 16, 2013 at 01:43:15PM +0900, YAMAMOTO Takashi wrote: > >> >> it seems that openflow implementations disagree about OFPMBT_ and > >> >> encoding

[ovs-dev] [PATCH] Interpret meter band types bitmap as 0-based rather than 1-based.

2013-07-18 Thread Ben Pfaff
OpenFlow 1.3 says that the band_types member of struct ofp_meter_features is a bitmap of OFPMBT_* values. The OFPMBT_* values are 1-based, so until now, to avoid wasting bit 0, OVS mapped an OFPMBT_* with value 1 to bit 0, value 2 to bit 1, and so on. However, according to http://openvswitch.org/

Re: [ovs-dev] [PATCH] datapath: set skb->pkt_type to PACKET_OUTGOING when sending encapsulated skb

2013-07-18 Thread Pravin Shelar
On Thu, Jul 18, 2013 at 6:47 PM, Isaku Yamahata wrote: > On Thu, Jul 18, 2013 at 10:02:52AM -0700, Jesse Gross wrote: >> On Tue, Jul 16, 2013 at 8:20 PM, Isaku Yamahata >> wrote: >> > diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c >> > index c74f5fc..604fe94 100644 >> > --- a/datapath/

Re: [ovs-dev] band types

2013-07-18 Thread YAMAMOTO Takashi
> On Wed, Jul 17, 2013 at 11:12:54AM +0900, YAMAMOTO Takashi wrote: >> > On Tue, Jul 16, 2013 at 01:43:15PM +0900, YAMAMOTO Takashi wrote: >> >> it seems that openflow implementations disagree about OFPMBT_ and >> >> encoding of ofp_meter_features.band_types. (see below) >> >> can anyone clarify w

Re: [ovs-dev] [PATCH] datapath: set skb->pkt_type to PACKET_OUTGOING when sending encapsulated skb

2013-07-18 Thread Isaku Yamahata
On Thu, Jul 18, 2013 at 10:02:52AM -0700, Jesse Gross wrote: > On Tue, Jul 16, 2013 at 8:20 PM, Isaku Yamahata > wrote: > > diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c > > index c74f5fc..604fe94 100644 > > --- a/datapath/vport-gre.c > > +++ b/datapath/vport-gre.c > > @@ -175,6 +175,7

[ovs-dev] [PATCH] Fully initialize data structures.

2013-07-18 Thread Linda Sun
Signed-off-by: Linda Sun --- lib/odp-util.c | 15 --- ofproto/ofproto-dpif-xlate.c | 10 +- ovsdb/ovsdb-client.c |9 +++-- ovsdb/ovsdb-tool.c |9 +++-- utilities/ovs-benchmark.c| 10 -- utilities/ovs-dpctl.c

Re: [ovs-dev] [PATCH net-next v4 1/2] datapath: Improve net-namespace compat code.

2013-07-18 Thread Jesse Gross
On Thu, Jul 18, 2013 at 4:55 PM, Pravin B Shelar wrote: > Following patch improves compat net-namespace code which is mostly > targeted for 2.6.32 kernel. upcoming vxlan restructuring patch > needs this patch. > > Signed-off-by: Pravin Shelar > --- > v3-v4: > - Defined DEFINE_COMPAT_PNET_REG_FUN

[ovs-dev] [PATCH net-next v4 1/2] datapath: Improve net-namespace compat code.

2013-07-18 Thread Pravin B Shelar
Following patch improves compat net-namespace code which is mostly targeted for 2.6.32 kernel. upcoming vxlan restructuring patch needs this patch. Signed-off-by: Pravin Shelar --- v3-v4: - Defined DEFINE_COMPAT_PNET_REG_FUNC for older kernel. - remove the 'gen' prefix. - Added back __net_init

Re: [ovs-dev] [PATCH net-next v3 2/2] datapath: Restructure vxlan tunneling.

2013-07-18 Thread Jesse Gross
On Thu, Jul 18, 2013 at 3:22 PM, Pravin B Shelar wrote: > Following patch restructures vxlan tunneling so that it is more > in sync with upstream vxlan tunneling code. > > Signed-off-by: Pravin Shelar Acked-by: Jesse Gross X-CudaMail-Whitelist-To: dev@openvswitch.org ___

Re: [ovs-dev] [PATCH net-next v3 1/2] datapath: Improve net-namespace compat code.

2013-07-18 Thread Jesse Gross
On Thu, Jul 18, 2013 at 3:22 PM, Pravin B Shelar wrote: > diff --git a/datapath/datapath.c b/datapath/datapath.c > index 1de50c1..3b0b73d 100644 > --- a/datapath/datapath.c > +++ b/datapath/datapath.c > @@ -2459,6 +2459,8 @@ static struct pernet_operations ovs_net_ops = { > .size = sizeof(

[ovs-dev] [threads 23/23] vlog: Mark vlog_module_ptr_* as const.

2013-07-18 Thread Ben Pfaff
This makes them more obviously thread-safe. Signed-off-by: Ben Pfaff --- lib/vlog.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vlog.h b/lib/vlog.h index 9576687..c111ff6 100644 --- a/lib/vlog.h +++ b/lib/vlog.h @@ -88,8 +88,8 @@ struct vlog_module { #if USE_

[ovs-dev] [threads 17/23] ovsdb-idlc: Ensure that initialization occurs single-threaded.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- ovsdb/ovsdb-idlc.in |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in index 6d49dd6..ec1c655 100755 --- a/ovsdb/ovsdb-idlc.in +++ b/ovsdb/ovsdb-idlc.in @@ -187,6 +187,7 @@ def printCIDLSource(schemaFile

[ovs-dev] [threads 15/23] netdev-linux: Work on thread safety.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/netdev-linux.c | 38 ++ 1 files changed, 22 insertions(+), 16 deletions(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 05877c1..e1ad4c8 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -1340,11 +1340

[ovs-dev] [threads 22/23] fatal-signal: Make thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/fatal-signal.c | 56 +++ lib/fatal-signal.h |3 +- lib/ovs-thread.c |5 lib/ovs-thread.h |6 + 4 files changed, 60 insertions(+), 10 deletions(-) diff --git a/lib/fatal-signal.c b/lib/fata

[ovs-dev] [threads 20/23] netdev-vport: Make pid checking in set_tunnel_config() thread-safe

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/netdev-vport.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index 885bf5e..4214b38 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -413,13 +413,17 @@ set_tunnel_config(struct netdev

[ovs-dev] [threads 18/23] netdev-dummy: Make counter thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/netdev-dummy.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index a940df8..82473a1 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dummy.c @@ -241,8 +241,15 @@ static int netdev_dummy_

[ovs-dev] [threads 21/23] command-line: Make proctitle changing commands thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/command-line.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/command-line.c b/lib/command-line.c index 7800c0b..39b26da 100644 --- a/lib/command-line.c +++ b/lib/command-line.c @@ -97,6 +97,7 @@ run_command(int argc, char *argv[]

[ovs-dev] [threads 16/23] ofp-parse: Make parse_ofp_str() thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/ofp-parse.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index 618290b..4b8036d 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -34,6 +34,7 @@ #include "ofp-util.h" #include "ofpbuf.h" #inc

[ovs-dev] [threads 19/23] ofp-msgs: Make alloc_xid() thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/ofp-msgs.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/lib/ofp-msgs.c b/lib/ofp-msgs.c index 5e043d2..8bb1754 100644 --- a/lib/ofp-msgs.c +++ b/lib/ofp-msgs.c @@ -111,7 +111,14 @@ static ovs_be32 alloc_xid(void) { static

[ovs-dev] [threads 14/23] uuid: Make uuid_generate() thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/uuid.c | 21 + 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/uuid.c b/lib/uuid.c index cfaf0c5..7b03fe0 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2009, 2010, 2011 Nicira, Inc. +/* C

[ovs-dev] [threads 13/23] socket-util: Make get_max_fds() and get_null_fd() thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/socket-util.c | 18 +- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/socket-util.c b/lib/socket-util.c index fa55480..2ba0fd4 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -132,8 +132,10 @@ rlim_is_finite(rlim_t

[ovs-dev] [threads 12/23] packets: Make eth_addr_is_reserved() thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/packets.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/packets.c b/lib/packets.c index 7fe6513..9c30b95 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -27,6 +27,7 @@ #include "hmap.h" #include "dynamic-string.h" #incl

[ovs-dev] [threads 11/23] ovsdb-types: Make ovsdb_base_type_get_enum_type() thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/ovsdb-types.c | 24 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/ovsdb-types.c b/lib/ovsdb-types.c index b47bfad..83e6a56 100644 --- a/lib/ovsdb-types.c +++ b/lib/ovsdb-types.c @@ -1,4 +1,4 @@ -/* Copyright (c) 200

[ovs-dev] [threads 04/23] lockfile: Make thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/lockfile.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/lib/lockfile.c b/lib/lockfile.c index 14e553d..50a4e0c 100644 --- a/lib/lockfile.c +++ b/lib/lockfile.c @@ -27,6 +27,7 @@ #include "coverage.h" #include "hash.h" #inc

[ovs-dev] [threads 08/23] dirs: Make thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/dirs.c.in | 37 + 1 files changed, 29 insertions(+), 8 deletions(-) diff --git a/lib/dirs.c.in b/lib/dirs.c.in index 658a74b..85c49ee 100644 --- a/lib/dirs.c.in +++ b/lib/dirs.c.in @@ -1,6 +1,6 @@ #line 2 "@srcdir@/lib/dirs.

[ovs-dev] [threads 10/23] ovsdb-data: Make ovsdb_atom_default() thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/ovsdb-data.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ovsdb-data.c b/lib/ovsdb-data.c index 7ec7694..ade1971 100644 --- a/lib/ovsdb-data.c +++ b/lib/ovsdb-data.c @@ -24,6 +24,7 @@ #include "dynamic-string.h" #include "

[ovs-dev] [threads 09/23] dpif: Serialize initialization.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/dpif-linux.c |7 +-- lib/dpif.c |6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 958873c..831da3b 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -1440,9 +1440,10 @@ const

[ovs-dev] [threads 07/23] xenserver: Make thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- vswitchd/xenserver.c | 23 +++ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/vswitchd/xenserver.c b/vswitchd/xenserver.c index 1f26e0d..bc57f0e 100644 --- a/vswitchd/xenserver.c +++ b/vswitchd/xenserver.c @@ -17,6 +17,7 @@ #in

[ovs-dev] [threads 06/23] meta-flow: Make thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/meta-flow.c | 41 +++-- 1 files changed, 23 insertions(+), 18 deletions(-) diff --git a/lib/meta-flow.c b/lib/meta-flow.c index 6b3b5eb..8f67b94 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -27,6 +27,7 @@ #include "

[ovs-dev] [threads 02/23] ofp-msgs: Make thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/ofp-msgs.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/lib/ofp-msgs.c b/lib/ofp-msgs.c index af4178e..5e043d2 100644 --- a/lib/ofp-msgs.c +++ b/lib/ofp-msgs.c @@ -23,6 +23,7 @@ #include "ofpbuf.h" #include "openflow/nicira-ext.h

[ovs-dev] [threads 05/23] memory: Add note about threaded usage to comment.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/memory.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/lib/memory.c b/lib/memory.c index 1137390..6c97e19 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -51,7 +51,10 @@ static void memory_init(void); /* Runs the memory monitor.

[ovs-dev] [threads 03/23] jsonrpc: Make thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/jsonrpc.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c index b4bbc84..6c482c2 100644 --- a/lib/jsonrpc.c +++ b/lib/jsonrpc.c @@ -26,6 +26,7 @@ #include "json.h" #include "list.h" #include "of

[ovs-dev] [threads 01/23] dpif-netdev: Make 'max_mtu' a per-dp feature, for thread safety.

2013-07-18 Thread Ben Pfaff
This ensures that an external lock around a dpif_netdev will allow thread-safe access to it. Signed-off-by: Ben Pfaff --- lib/dpif-netdev.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index f7e3b1f..d21eb8d 100644 ---

[ovs-dev] [threads 00/23] more thread safety fixes

2013-07-18 Thread Ben Pfaff
Everything in this batch is really simple. Ben Pfaff (23): dpif-netdev: Make 'max_mtu' a per-dp feature, for thread safety. ofp-msgs: Make thread-safe. jsonrpc: Make thread-safe. lockfile: Make thread-safe. memory: Add note about threaded usage to comment. meta-flow: Make thread-safe.

Re: [ovs-dev] [PATCH net-next v3 1/2] datapath: Improve net-namespace compat code.

2013-07-18 Thread Jesse Gross
I noticed a couple more things: On Thu, Jul 18, 2013 at 3:22 PM, Pravin B Shelar wrote: > diff --git a/datapath/linux/compat/include/net/net_namespace.h > b/datapath/linux/compat/include/net/net_namespace.h > index 77f0a16..6d1f597 100644 > --- a/datapath/linux/compat/include/net/net_namespace.h

[ovs-dev] [PATCH] ovs-vswitchd: Document the ovs-appctl bfd/* commands.

2013-07-18 Thread Pavithra Ramesh
Added man-page entries for bfd/show and bfd/set-forwarding commands. Signed-off-by: Pavithra Ramesh --- vswitchd/ovs-vswitchd.8.in |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/vswitchd/ovs-vswitchd.8.in b/vswitchd/ovs-vswitchd.8.in index f17f873..37b32d0 10064

Re: [ovs-dev] [PATCH] ofp-util: Un-"inline" should_send_version_bitmap().

2013-07-18 Thread Ben Pfaff
Thanks, applied. On Thu, Jul 18, 2013 at 03:40:21PM -0700, Justin Pettit wrote: > Acked-by: Justin Pettit > > > > On Jul 18, 2013, at 3:35 PM, Ben Pfaff wrote: > > > There is no reason to mark this function as inline. Let the compiler do > > its job. > > > > Signed-off-by: Ben Pfaff > > -

Re: [ovs-dev] [PATCH] ofp-util: Un-"inline" should_send_version_bitmap().

2013-07-18 Thread Justin Pettit
Acked-by: Justin Pettit On Jul 18, 2013, at 3:35 PM, Ben Pfaff wrote: > There is no reason to mark this function as inline. Let the compiler do > its job. > > Signed-off-by: Ben Pfaff > --- > lib/ofp-util.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/lib/

[ovs-dev] [PATCH] ofp-util: Un-"inline" should_send_version_bitmap().

2013-07-18 Thread Ben Pfaff
There is no reason to mark this function as inline. Let the compiler do its job. Signed-off-by: Ben Pfaff --- lib/ofp-util.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 8921592..bc85797 100644 --- a/lib/ofp-util.c +++ b/lib/ofp

Re: [ovs-dev] [threads v2 10/13] async-append: New library to allow asynchronous appending to a log file.

2013-07-18 Thread Ben Pfaff
Thanks, I applied this to master. On Thu, Jul 18, 2013 at 03:09:35PM -0700, Alex Wang wrote: > Thanks Ben, it makes sense. > > I'm all good with this patch. > > > > > On Thu, Jul 18, 2013 at 3:00 PM, Ben Pfaff wrote: > > > On Thu, Jul 18, 2013 at 02:44:54PM -0700, Alex Wang wrote: > > > > >

[ovs-dev] [PATCH net-next v3 2/2] datapath: Restructure vxlan tunneling.

2013-07-18 Thread Pravin B Shelar
Following patch restructures vxlan tunneling so that it is more in sync with upstream vxlan tunneling code. Signed-off-by: Pravin Shelar --- v3-v2: - Moved kernel version in flow_dissector check to top. v1-v2: - Added create flag to vxlan-port add. - Moved rxhash functions to flow_dissector.c

[ovs-dev] [PATCH net-next v3 1/2] datapath: Improve net-namespace compat code.

2013-07-18 Thread Pravin B Shelar
Following patch improves compat net-namespace code which is mostly targeted for 2.6.32 kernel. upcoming vxlan restructuring patch needs this patch. Signed-off-by: Pravin Shelar --- v2-v3: - Removed inline - Moved compat function declaration to correct block. - simplified DEFINE_COMPAT_PNET_REG

Re: [ovs-dev] [threads v2 10/13] async-append: New library to allow asynchronous appending to a log file.

2013-07-18 Thread Alex Wang
Thanks Ben, it makes sense. I'm all good with this patch. On Thu, Jul 18, 2013 at 3:00 PM, Ben Pfaff wrote: > On Thu, Jul 18, 2013 at 02:44:54PM -0700, Alex Wang wrote: > > > > > > > > > > > > Is there requirement that the "* data_" must not be free'ed before > > > > asynchronously written t

Re: [ovs-dev] [threads v2 10/13] async-append: New library to allow asynchronous appending to a log file.

2013-07-18 Thread Ben Pfaff
On Thu, Jul 18, 2013 at 02:44:54PM -0700, Alex Wang wrote: > > > > > > > > > Is there requirement that the "* data_" must not be free'ed before > > > asynchronously written to 'fd'? > > > > That's right too. (Do you see a mistake here regarding that rule?) > > I didn't see any mistake, since this

Re: [ovs-dev] [PATCH net-next v2 2/2] datapath: Restructure vxlan tunneling.

2013-07-18 Thread Pravin Shelar
On Thu, Jul 18, 2013 at 2:47 PM, Jesse Gross wrote: > On Tue, Jul 16, 2013 at 9:06 AM, Pravin B Shelar wrote: >> diff --git a/datapath/linux/compat/flow_dissector.c >> b/datapath/linux/compat/flow_dissector.c >> new file mode 100644 >> index 000..f5fca26 >> --- /dev/null >> +++ b/datapath/li

Re: [ovs-dev] [PATCH] netlink: Avoid designated initializers because MSVC does not support them.

2013-07-18 Thread Ben Pfaff
Thanks for the review. I decided to just write NOT_REACHED() for those cases, because they should never be reached. On Thu, Jul 18, 2013 at 02:39:40PM -0700, Linda Sun wrote: > Looks good to me. > > I would return SIZE_MAX for N_NL_ATTR_TYPES and default, the same as > NL_A_NO_ATTR and NL_A_UNS

Re: [ovs-dev] [PATCH net-next v2 2/2] datapath: Restructure vxlan tunneling.

2013-07-18 Thread Jesse Gross
On Tue, Jul 16, 2013 at 9:06 AM, Pravin B Shelar wrote: > diff --git a/datapath/linux/compat/flow_dissector.c > b/datapath/linux/compat/flow_dissector.c > new file mode 100644 > index 000..f5fca26 > --- /dev/null > +++ b/datapath/linux/compat/flow_dissector.c > @@ -0,0 +1,202 @@ > + > +#inclu

Re: [ovs-dev] [threads v2 10/13] async-append: New library to allow asynchronous appending to a log file.

2013-07-18 Thread Alex Wang
> > > > > > Is there requirement that the "* data_" must not be free'ed before > > asynchronously written to 'fd'? > > That's right too. (Do you see a mistake here regarding that rule?) > I didn't see any mistake, since this has not been used. But would it make sense to state that in the comment

Re: [ovs-dev] [threads v2 10/13] async-append: New library to allow asynchronous appending to a log file.

2013-07-18 Thread Ben Pfaff
On Wed, Jul 17, 2013 at 03:33:38PM -0700, Alex Wang wrote: > few inline questions below, > > > +static bool > > +async_append_is_full(const struct async_append *ap) > > +{ > > +return (ap->aiocb_head - ap->aiocb_tail >= MAX_CBS > > +|| byteq_is_full(&ap->byteq)); > > +} > > > >

Re: [ovs-dev] [PATCH] netlink: Avoid designated initializers because MSVC does not support them.

2013-07-18 Thread Linda Sun
Looks good to me. I would return SIZE_MAX for N_NL_ATTR_TYPES and default, the same as NL_A_NO_ATTR and NL_A_UNSPEC. Thanks! Linda - Original Message - From: "Ben Pfaff" To: dev@openvswitch.org Cc: "Ben Pfaff" , "Linda Sun" Sent: Thursday, July 18, 2013 1:13:36 PM Subject: [PATCH] ne

Re: [ovs-dev] [threads v2 03/13] netlink-socket: Make thread-safe.

2013-07-18 Thread Ben Pfaff
On Wed, Jul 17, 2013 at 05:46:01PM -0700, Ansis Atteka wrote: > On Wed, Jul 17, 2013 at 5:03 PM, Ansis Atteka wrote: > > > > > > > > > On Fri, Jul 12, 2013 at 2:54 PM, Ben Pfaff wrote: > > > >> The uses of vlog in this module are not thread-safe, because vlog itself > >> is not yet thread-safe.

[ovs-dev] [PATCH 2/2] test-atomic: Re-enable atomic read-write-modify tests.

2013-07-18 Thread Ben Pfaff
This reverts commit 05d299e0ccca80736cd4438c3224540c5448a7d4 (test-atomic: Drop atomic read-modify-write tests for the moment.) because the test for detecting whether GCC support atomic operation built-ins has been fixed. Signed-off-by: Ben Pfaff --- tests/test-atomic.c | 27 ++

[ovs-dev] [PATCH 1/2] configure: Add configure-time check for GCC 4.0+ atomic built-ins.

2013-07-18 Thread Ben Pfaff
We found out earlier that GCC sometimes produces an error only at link time for atomic built-ins that are not supported on a platform. This actually tries the link at configure time and should thus reliably detect whether the atomic built-ins are really supported. Signed-off-by: Ben Pfaff --- I

Re: [ovs-dev] [PATCH net-next v2 1/2] datapath: Improve net-namespace compat code.

2013-07-18 Thread Pravin Shelar
On Thu, Jul 18, 2013 at 2:19 PM, Jesse Gross wrote: > On Thu, Jul 18, 2013 at 2:12 PM, Pravin Shelar wrote: >> On Thu, Jul 18, 2013 at 1:37 PM, Jesse Gross wrote: >>> On Tue, Jul 16, 2013 at 9:06 AM, Pravin B Shelar wrote: +#define DEFINE_COMPAT_PNET_REG_FUNC(PNET_TYPE) extern int __

Re: [ovs-dev] [PATCH net-next v2 1/2] datapath: Improve net-namespace compat code.

2013-07-18 Thread Jesse Gross
On Thu, Jul 18, 2013 at 2:12 PM, Pravin Shelar wrote: > On Thu, Jul 18, 2013 at 1:37 PM, Jesse Gross wrote: >> On Tue, Jul 16, 2013 at 9:06 AM, Pravin B Shelar wrote: >>> +#define DEFINE_COMPAT_PNET_REG_FUNC(PNET_TYPE) extern int >>> __dummy_##PNET_TYPE >> >> What is the goal with defining

Re: [ovs-dev] [PATCH net-next v2 1/2] datapath: Improve net-namespace compat code.

2013-07-18 Thread Pravin Shelar
On Thu, Jul 18, 2013 at 1:37 PM, Jesse Gross wrote: > On Tue, Jul 16, 2013 at 9:06 AM, Pravin B Shelar wrote: >> diff --git a/datapath/linux/compat/include/net/net_namespace.h >> b/datapath/linux/compat/include/net/net_namespace.h >> index 77f0a16..a46c5d0 100644 >> --- a/datapath/linux/compat/i

Re: [ovs-dev] [PATCH net-next v2 1/2] datapath: Improve net-namespace compat code.

2013-07-18 Thread Jesse Gross
On Tue, Jul 16, 2013 at 9:06 AM, Pravin B Shelar wrote: > diff --git a/datapath/linux/compat/include/net/net_namespace.h > b/datapath/linux/compat/include/net/net_namespace.h > index 77f0a16..a46c5d0 100644 > --- a/datapath/linux/compat/include/net/net_namespace.h > +++ b/datapath/linux/compat/in

[ovs-dev] [PATCH] netlink: Avoid designated initializers because MSVC does not support them.

2013-07-18 Thread Ben Pfaff
CC: Linda Sun Signed-off-by: Ben Pfaff --- lib/netlink.c | 50 +- 1 files changed, 37 insertions(+), 13 deletions(-) diff --git a/lib/netlink.c b/lib/netlink.c index 7e7884e..638c8bf 100644 --- a/lib/netlink.c +++ b/lib/netlink.c @@ -607,17 +607

Re: [ovs-dev] [PATCH] Fully initialize data structures.

2013-07-18 Thread Ben Pfaff
On Wed, Jul 17, 2013 at 04:45:32PM -0700, Linda Sun wrote: > Reference arrays after its definition. > > Signed-off-by: Linda Sun I have a different suggestion for netlink.c. I posted the patch here: http://openvswitch.org/pipermail/dev/2013-July/029752.html Will you review it, please?

Re: [ovs-dev] [PATCH] ovs-vswitchd: Document the ovs-appctl bfd/show command.

2013-07-18 Thread Gurucharan Shetty
There is another bfd command - "bfd/set-forwarding". Can you add it too? Thanks, Guru On Thu, Jul 18, 2013 at 12:46 PM, Pavithra Ramesh wrote: > Signed-off-by: Pavithra Ramesh > --- > vswitchd/ovs-vswitchd.8.in |5 + > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/v

Re: [ovs-dev] [groups RFC 1/2] ofp-msgs: Consistently include "STATS" in the names of stats messages.

2013-07-18 Thread Ben Pfaff
Thanks, applied to master. On Wed, Jul 17, 2013 at 05:04:18PM -0700, Alex Wang wrote: > Looks good to me, thanks > > > On Fri, Jun 28, 2013 at 2:45 PM, Ben Pfaff wrote: > > > This is the convention that I've meant to maintain, but missed a number of > > messages. This corrects them. > > > > S

[ovs-dev] [PATCH] ovs-vswitchd: Document the ovs-appctl bfd/show command.

2013-07-18 Thread Pavithra Ramesh
Signed-off-by: Pavithra Ramesh --- vswitchd/ovs-vswitchd.8.in |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/vswitchd/ovs-vswitchd.8.in b/vswitchd/ovs-vswitchd.8.in index f17f873..8476776 100644 --- a/vswitchd/ovs-vswitchd.8.in +++ b/vswitchd/ovs-vswitchd.8.in @@ -11

Re: [ovs-dev] [PATCH] netdev-linux: avoid negative value cast to non-negative in comparison

2013-07-18 Thread Ben Pfaff
On Thu, Jul 18, 2013 at 04:08:06PM +0800, ZhengLingyun wrote: > I am using a userspace OVS, there is a constant ERR message in log: > "dpif_netdev|ERR|error receiving data from ovs-netdev: Message too long" > Check the code and find there is a comparison between ssize_t and size_t type > in > netd

[ovs-dev] Enjoy High Speed Maxis fibre Internet 10mbps only at RM148/month!

2013-07-18 Thread Maxis Agent (Shanny)
Title: MAXIS HOME AND BUSINESS FIBRE INTERNET MAXIS HOME AND BUSINESS FIBRE INTERNET Fastest Fibre Broadband in Malaysia with lowest price 10Mbps, 20Mbps, & 30Mbps from only RM148

[ovs-dev] updated IPFIX exporter flow aggregation and caching

2013-07-18 Thread Romain Lenglet
Hi, I updated this patch to use the new OVS_PACKED macro for the new structs. Thanks, -- Romain Lenglet ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH] ipfix: implement flow caching and aggregation in exporter

2013-07-18 Thread Romain Lenglet
Implement a per-exporter flow cache with active timeout expiration. Add columns "cache_active_timeout" and "cache_max_flows" into table "IPFIX" to configure each cache. Add per-flow elements "octetDeltaSumOfSquares", "minimumIpTotalLength", and "maximumIpTotalLength" to replace "ethernetTotalLengt

Re: [ovs-dev] [PATCH] datapath: set skb->pkt_type to PACKET_OUTGOING when sending encapsulated skb

2013-07-18 Thread Jesse Gross
On Tue, Jul 16, 2013 at 8:20 PM, Isaku Yamahata wrote: > diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c > index c74f5fc..604fe94 100644 > --- a/datapath/vport-gre.c > +++ b/datapath/vport-gre.c > @@ -175,6 +175,7 @@ static int __send(struct vport *vport, struct sk_buff > *skb, > >

[ovs-dev] [PATCH] Out-of-order data packets in upcalls processing logic fixed

2013-07-18 Thread Dmitry Fleytman
From: Dmitry Fleytman User mode logic groups incoming packets by flows and then process flows in arbitrary order based on flow hash keys values. This behavior may lead to unexpected packets reordering. For example two packets that belong to the same "logical stream" and differ by ECN bit only pla

[ovs-dev] [PATCH] Out-of-order data packets in upcalls processing logic fixed

2013-07-18 Thread Dmitry Fleytman
From: Dmitry Fleytman Hello dev@openvswitch.org! We are working on Windows virtio network driver certification for virtual machines running "on top" of OpenVSwitch. The test suite used for Microsoft certification (HCK) contains tests that verify correct packet ordering for data flows between sy

[ovs-dev] [PATCH] netdev-linux: avoid negative value cast to non-negative in comparison

2013-07-18 Thread ZhengLingyun
I am using a userspace OVS, there is a constant ERR message in log: "dpif_netdev|ERR|error receiving data from ovs-netdev: Message too long" Check the code and find there is a comparison between ssize_t and size_t type in netdev_rx_linux_recv(). It makes the negative "retval" greater than the "size