Re: [ovs-dev] [PATCH 06/10] netlink: Make nl_dump_next() thread-safe.

2014-01-15 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 02:10:07PM -0800, Joe Stringer wrote: > On 15 January 2014 09:48, Ben Pfaff wrote: > > > > In the latter case, it's a (probably unlikely) race, and it does not > > appear that it is too hard to avoid, so maybe we should avoidit. > > > > I agree. > > Here's a concept that

Re: [ovs-dev] [PATCH v5.2 3/5] ofproto: handle OFPMP_TABLE_FEATURES msgs and its lifecycle.

2014-01-15 Thread Alexander Wu
Hi Ben, Is this patch in the right format? Should I send all patches again? Thanks! Alexander Wu On 2014/1/10 15:04, Alexander Wu wrote: v5.2: Merge and solve conflicts while free table_features in oftable_destroy(). v5.1: Update mutex for get message, add some comments for get/set

[ovs-dev] [PATCH] datapath: Fix kernel panic on ovs_flow_free

2014-01-15 Thread Andy Zhou
Both mega flow mask's reference counter and per flow table mask list should only be accessed when holding ovs_mutex() lock. However this is not true with ovs_flow_table_flush(). The patch fixes this bug. Reported-by: Joe Stringer Signed-off-by: Andy Zhou --- v1->v2: Atomic ops can prote

Re: [ovs-dev] [ovs flow free panic v3] datapath: Fix kernel panic on ovs_flow_free

2014-01-15 Thread Andy Zhou
Thanks, I will send out V4 based on the comments. On Wed, Jan 15, 2014 at 2:27 PM, Jesse Gross wrote: > On Wed, Jan 15, 2014 at 1:06 PM, Andy Zhou wrote: > > diff --git a/datapath/datapath.c b/datapath/datapath.c > > index b42fd8b..6ae4ecf 100644 > > --- a/datapath/datapath.c > > +++ b/datapa

Re: [ovs-dev] const attributes for some kernel ovs functions ?

2014-01-15 Thread Luigi Rizzo
On Wed, Jan 15, 2014 at 03:10:35PM -0800, Jesse Gross wrote: > On Sat, Jan 11, 2014 at 4:33 PM, Luigi Rizzo wrote: > > Hi, > > in porting the ovs kernel code to the FreeBSD kernel, > > compiling with -Wcast-qual -Werror gives some > > > >warning: cast discards qualifiers from pointer target ty

Re: [ovs-dev] [PATCH] ofproto-dpif: Add more lock annotations.

2014-01-15 Thread YAMAMOTO Takashi
> This annotation would have caught the bug fixed by commit 491a67a0005347130 > (ofproto-dpif-xlate: Avoid recursive acquisition of xlate_rwlock.). looks good to me. unless there's a more generic way to detect recursive read-lock. (i don't know) YAMAMOTO Takashi > > Signed-off-by: Ben Pfaff >

Re: [ovs-dev] const attributes for some kernel ovs functions ?

2014-01-15 Thread Jesse Gross
On Sat, Jan 11, 2014 at 4:33 PM, Luigi Rizzo wrote: > Hi, > in porting the ovs kernel code to the FreeBSD kernel, > compiling with -Wcast-qual -Werror gives some > >warning: cast discards qualifiers from pointer target type > > due to 'const' being ignored. Another couple of warnings > are on

Re: [ovs-dev] [PATCH net-next v2] openvswitch: Pad OVS_PACKET_ATTR_PACKET if linear copy was performed

2014-01-15 Thread Jesse Gross
On Tue, Jan 14, 2014 at 7:03 PM, David Miller wrote: > From: Thomas Graf > Date: Tue, 14 Jan 2014 16:27:49 + > >> While the zerocopy method is correctly omitted if user space >> does not support unaligned Netlink messages. The attribute is >> still not padded correctly as skb_zerocopy() will

Re: [ovs-dev] [ovs flow free panic v3] datapath: Fix kernel panic on ovs_flow_free

2014-01-15 Thread Jesse Gross
On Wed, Jan 15, 2014 at 1:06 PM, Andy Zhou wrote: > diff --git a/datapath/datapath.c b/datapath/datapath.c > index b42fd8b..6ae4ecf 100644 > --- a/datapath/datapath.c > +++ b/datapath/datapath.c > @@ -1305,10 +1306,13 @@ static void __dp_destroy(struct datapath *dp) > list_del_rcu(&dp->lis

Re: [ovs-dev] [PATCH 06/10] netlink: Make nl_dump_next() thread-safe.

2014-01-15 Thread Joe Stringer
On 15 January 2014 09:48, Ben Pfaff wrote: > > In the latter case, it's a (probably unlikely) race, and it does not > appear that it is too hard to avoid, so maybe we should avoidit. > I agree. Here's a concept that you could work from. It reflects what I have in > mind, and it compiles, but I

[ovs-dev] [ovs flow free panic v3] datapath: Fix kernel panic on ovs_flow_free

2014-01-15 Thread Andy Zhou
Both mega flow mask's reference counter and per flow table mask list should only be accessed when holding ovs_mutex() lock. However this is not true with ovs_flow_table_flush(). The patch fixes this bug. Signed-off-by: Andy Zhou --- datapath/datapath.c |8 +-- datapath/flow_table.c |

[ovs-dev] [PATCH] ofproto-dpif: Add more lock annotations.

2014-01-15 Thread Ben Pfaff
This annotation would have caught the bug fixed by commit 491a67a0005347130 (ofproto-dpif-xlate: Avoid recursive acquisition of xlate_rwlock.). Signed-off-by: Ben Pfaff CC: YAMAMOTO Takashi --- ofproto/ofproto-dpif-xlate.c |1 + ofproto/ofproto-dpif.h |8 ++-- 2 files changed,

Re: [ovs-dev] [PATCH 5/5] ofproto-dpif-xlate: Avoid recursive acquirement of xlate_rwlock

2014-01-15 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 12:41:24PM +0900, YAMAMOTO Takashi wrote: > Currently xlate_rwlock is recursively acquired. > (xlate_send_packet -> ofproto_dpif_execute_actions -> xlate_actions) > Due to writer-preference in rwlock implementations, this causes > deadlock if another thread tries to acquire

Re: [ovs-dev] [PATCH 2/5] fat-rwlock: Don't forget to destroy a mutex

2014-01-15 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 12:41:21PM +0900, YAMAMOTO Takashi wrote: > Signed-off-by: YAMAMOTO Takashi Thanks, applied to master and branch-2.1. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 3/5] ofproto-dpif-xlate: Fix a whitespace

2014-01-15 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 12:41:22PM +0900, YAMAMOTO Takashi wrote: > No functional changes. > > Signed-off-by: YAMAMOTO Takashi Thanks, applied to master and branch-2.1 (the latter only because it is a prereq for an actual bugfix in one of your later commits).

Re: [ovs-dev] [PATCH 4/5] bridge: Update a comment

2014-01-15 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 12:41:23PM +0900, YAMAMOTO Takashi wrote: > This looks like a leftover of commit 2a73b1d73d. > ("bridge: Reconfigure in single pass.") > > Signed-off-by: YAMAMOTO Takashi Thanks, applied to master. ___ dev mailing list dev@openv

Re: [ovs-dev] [PATCH 06/10] netlink: Make nl_dump_next() thread-safe.

2014-01-15 Thread Ben Pfaff
On Tue, Jan 14, 2014 at 09:32:02AM -0800, Joe Stringer wrote: > On 13 January 2014 14:55, Ben Pfaff wrote: > > I have two concerns about nl_dump_next(). > > > > The first is that any nonzero status always overwrites the existing > > status. This means that EOF in one thread overwrites EPROTO (or

Re: [ovs-dev] [ovs-discuss] ICMP over NAT in Open vSwitch

2014-01-15 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 07:10:04PM +0200, Andrei Andone wrote: > Is there a routine of announcing whether someone is working on a > certain feature? I would like to announce you guys when I start if > nobody else will be working on it by then. It's best to mention it on ovs-dev. In fact, here's a

Re: [ovs-dev] Question about binding a virtual port to a physical port?

2014-01-15 Thread Justin Pettit
On 1/15/14, 8:29 AM, "Junguk Cho" wrote: >Hi, Can I bind a virtual port to a physical port? > >I mean if the packet enters a physical port, it will automatically go to >a virtual port without flow rule( ex) if the packet arrives at port >1(physical), it will be sent to port 2(virtial port) ). No

Re: [ovs-dev] Question about binding a virtual port to a physical port?

2014-01-15 Thread Ben Pfaff
No. That's what flows are for. On Jan 15, 2014 8:30 AM, "Junguk Cho" wrote: > Hi, Can I bind a virtual port to a physical port? > > I mean if the packet enters a physical port, it will automatically go to a > virtual port without flow rule( ex) if the packet arrives at port > 1(physical), it will

[ovs-dev] Question about binding a virtual port to a physical port?

2014-01-15 Thread Junguk Cho
Hi, Can I bind a virtual port to a physical port? I mean if the packet enters a physical port, it will automatically go to a virtual port without flow rule( ex) if the packet arrives at port 1(physical), it will be sent to port 2(virtial port) ). Thanks. __

[ovs-dev] Хит продаж 2013! Говорящий хомяк повторюшка. Лучший подарок детям. Распродажа!

2014-01-15 Thread Лучший подарок детям
Распродажа остатков, хомячков осталось всего 10 штук - Спешите!!! Хит продаж 2013 года - Говорящий Хомяк-Повторюшка? Лучшая интерактивная игрушка! Лучший подарок как для детей так и для взрослых! САЙТ: HOMKA-2014.COM ___ dev mailing list dev@openvswitch.

[ovs-dev] [PATCH v4 REPOST] ofproto: Honour Table Mod settings for table-miss handling

2014-01-15 Thread Simon Horman
This reworks lookup of rules for both table 0 and table action translation. The result is that Table Mod settings, which can alter the miss-behaviour of tables, including table 0, on a per-table basis may be honoured. Previous patches proposed by myself which build on earlier merged patches by And

[ovs-dev] [PATCH v5 3/3] netdev-linux: Read packet auxdata to obtain vlan_tid

2014-01-15 Thread Simon Horman
If VLAN acceleration is used when the kernel receives a packet then the outer-most VLAN tag will not be present in the packet when it is received by netdev-linux. Rather, it will be present in auxdata. This patch uses recvmsg() instead of recv() to read auxdata for each packet and if the vlan_tid

[ovs-dev] [PATCH v5 0/3] netdev-linux: Read packet auxdata to obtain vlan_tid and vlan_tpid

2014-01-15 Thread Simon Horman
If VLAN acceleration is used when the kernel receives a packet then the outer-most VLAN tag will not be present in the packet when it is received by netdev-linux. Rather, it will be present in auxdata. The purpose of this series is to obtain the vlan_tid and if available the vlan_tpid from auxdata

[ovs-dev] [PATCH v5 2/3] lib: Add tpid parameter to eth_push_vlan()

2014-01-15 Thread Simon Horman
This is in preparation for pushing vlan tags using the TPID provided by the kernel via auxdata. Signed-off-by: Simon Horman --- v5 * No change v4 * First post --- lib/cfm.c| 2 +- lib/flow.c | 2 +- lib/odp-execute.c| 2 +- lib/packets.c

[ovs-dev] [PATCH v5 1/3] netdev_class: Pass a struct ofpbuf * to rx_recv()

2014-01-15 Thread Simon Horman
Update the netdev_class so that struct ofpbuf * is passed to rx_recv() to provide both the data and size of the data to read a packet into. On success, update struct ofpbuf size inside netdev_class rx_recv implementation and return 0. This moves logic from the caller. On error a positive error cod