[ovs-dev] [PATCH 1/2] datapath-windows: define mcgroup IDs for VPORT and other families

2014-08-22 Thread Nithin Raju
dpif-linux.c makes a nl_lookup_genl_mcgroup(OVS_VPORT_FAMILY) that is not implemented yet on Windows yet. Multicast group is used currently to subscribe to events related to VPORTs. Whether the exact same mechanism would be used is unclear yet. In the interim, we can implement code to support nl_l

[ovs-dev] [PATCH 2/2] netlink-socket.c: add support for nl_lookup_genl_mcgroup()

2014-08-22 Thread Nithin Raju
While we work out whether nl_sock_join_mcgroup() will be the mechanism to support VPORT events, it is easy to add support for nl_lookup_genl_mcgroup() and make progress on the other commands. In this patch, we implement support for nl_lookup_genl_mcgroup() only for the VPORT family though, which i

Re: [ovs-dev] [PATCH] Create a NBL for each NB when required

2014-08-22 Thread Saurabh Shah
Hi Alin, Thanks for working on it! I am almost done reviewing the change. I have a few comments below. >ovs/ovs-issues#15 > >All NET_BUFFERs of a NET_BUFFER_LIST must go through >the pipeline: extract, find flow, execute. Previously, >only the first NET_BUFFER of a NET_BUFFER_LIST was going >thro

Re: [ovs-dev] [patch net-next RFC 03/12] net: introduce generic switch devices support

2014-08-22 Thread Florian Fainelli
2014-08-22 5:56 GMT-07:00 Jiri Pirko : > Fri, Aug 22, 2014 at 02:42:04PM CEST, j...@mojatatu.com wrote: >>On 08/21/14 13:05, Florian Fainelli wrote: >>>2014-08-21 9:18 GMT-07:00 Jiri Pirko : The goal of this is to provide a possibility to suport various switch chips. Drivers should implemen

Re: [ovs-dev] [PATCH v2] test-controller: Rename to ovs-testcontroller, again install.

2014-08-22 Thread Justin Pettit
On Fri, Aug 15, 2014 at 10:28 AM, Ben Pfaff wrote: > > > diff --git a/NEWS b/NEWS > index 1ea7bda..656f750 100644 > --- a/NEWS > +++ b/NEWS > @@ -17,6 +17,9 @@ Post-v2.3.0 > * OpenFlow 1.5 (draft) Copy-Field action is now supported. > * OpenFlow 1.3+ table features requests are now su

Re: [ovs-dev] [patch net-next RFC 03/12] net: introduce generic switch devices support

2014-08-22 Thread Scott Feldman
On Aug 22, 2014, at 12:14 PM, John Fastabend wrote: > On 08/22/2014 05:56 AM, Jiri Pirko wrote: >> Fri, Aug 22, 2014 at 02:42:04PM CEST, j...@mojatatu.com wrote: >>> On 08/21/14 13:05, Florian Fainelli wrote: 2014-08-21 9:18 GMT-07:00 Jiri Pirko : > The goal of this is to provide a poss

Re: [ovs-dev] [patch net-next RFC 10/12] openvswitch: add support for datapath hardware offload

2014-08-22 Thread Scott Feldman
On Aug 22, 2014, at 12:39 PM, John Fastabend wrote: > On 08/21/2014 09:19 AM, Jiri Pirko wrote: >> Benefit from the possibility to work with flows in switch devices and >> use the swdev api to offload flow datapath. > > we should add a description here on the strategy being used. > > If I read

[ovs-dev] [PATCH 1/4] ofproto-dpif-xlate: Only learn MAC addresses upon handling packets.

2014-08-22 Thread Ben Pfaff
MAC learning, like flow entry learning via the "learn" action, should only happen if a packet was actually received. Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif-xlate.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofpro

[ovs-dev] [PATCH 2/4] ofproto-dpif-xlate: Skip pushing stats if there are no packets to push.

2014-08-22 Thread Ben Pfaff
xlate_push_stats() mostly does nothing if 'stats->n_packets' is 0. This commit allows it to skip more complicated internal logic in that case. The one case I see in which xlate_push_stats() does do something if 'stats->n_packets' is 0 is in the case of a cached fin_timeout translation. That trans

[ovs-dev] [PATCH 3/4] ofproto-dpif-xlate: Drop 'may_learn' parameter from xlate_push_stats().

2014-08-22 Thread Ben Pfaff
Both existing callers calculated 'may_learn' as 'stats->n_packets > 0', so it was redundant. Because xlate_push_stats() is now entirely a no-op if 'stats->n_packets' is 0, we can now delete the tests entirely from the cases that previously only ran if 'may_learn'. Signed-off-by: Ben Pfaff --- o

[ovs-dev] [PATCH 4/4] ofproto-dpif-upcall: Attribute statistics to OpenFlow flows more precisely.

2014-08-22 Thread Ben Pfaff
OpenFlow packet and byte counters have always been something of an approximation in Open vSwitch. First, they are updated only periodically. Second, they can be misattributed because statistics collection does a retranslation and gives the statistics to whichever OpenFlow flow or flows they happen

Re: [ovs-dev] [PATCH 1/4] ofproto/xlate: Add xlate_lookup_ofproto().

2014-08-22 Thread Jarno Rajahalme
Series pushed, thanks for the reviews! Jarno On Aug 22, 2014, at 11:15 AM, Ben Pfaff wrote: > On Fri, Aug 15, 2014 at 04:38:46PM -0700, Jarno Rajahalme wrote: >> "xlate_receive" did not tell much about what it is used for. We have >> two users of it that only want the ofproto and the OF port

Re: [ovs-dev] [PATCH 1/4] ofproto/xlate: Add xlate_lookup_ofproto().

2014-08-22 Thread Jarno Rajahalme
On Aug 22, 2014, at 11:15 AM, Ben Pfaff wrote: > On Fri, Aug 15, 2014 at 04:38:46PM -0700, Jarno Rajahalme wrote: >> "xlate_receive" did not tell much about what it is used for. We have >> two users of it that only want the ofproto and the OF port number, use the >> new xlate_lookup_ofproto() f

Re: [ovs-dev] [PATCH 00/18] Use relaxed atomic operations when possible.

2014-08-22 Thread Jarno Rajahalme
On Aug 22, 2014, at 1:58 PM, Jarno Rajahalme wrote: > The default memory order for atomic operations is > memory_order_seq_cst, which synchronizes the whole system, i.e., locks > the memory bus, which is very expensive. memory_order_relaxed, on the > other hand, does not impose any kind of memo

[ovs-dev] [PATCH 18/18] ofproto/ofproto: Use relaxed atomics.

2014-08-22 Thread Jarno Rajahalme
Neither 'miss_config', 'n_missed', nor 'n_matched' is used to synchronize the state of any other variable, so we can use relaxed atomic operations on them. Signed-off-by: Jarno Rajahalme --- ofproto/ofproto-dpif.c | 10 ++ ofproto/ofproto.c | 12 +++- 2 files changed, 13

[ovs-dev] [PATCH 17/18] lib/timeval: Use relaxed atomics also when writing on 'slow_path'.

2014-08-22 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/timeval.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/timeval.c b/lib/timeval.c index 66732b6..9d90f1b 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -147,7 +147,7 @@ time_timespec__(struct clock *c, struct timespec *t

[ovs-dev] [PATCH 14/18] lib/netdev-linux: Use atomic_count for 'miimon_cnt'.

2014-08-22 Thread Jarno Rajahalme
'miimon_cnt' and the actual device miimon configuration is only loosely coupled, so we can use the relaxed atomic_count for it. Signed-off-by: Jarno Rajahalme --- lib/netdev-linux.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/netdev-linux.c b/

[ovs-dev] [PATCH 11/18] lib/dpif-linux: Use relaxed atomics for 'dump->status'.

2014-08-22 Thread Jarno Rajahalme
'dump->status' does not syncronize the state of any other variable, so we can use relaxed atomics on it. Signed-off-by: Jarno Rajahalme --- lib/dpif-linux.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index e5067ba..2c387ed 10

[ovs-dev] [PATCH 15/18] ofproto/netflow: Use atomic_count for 'netflow_count'.

2014-08-22 Thread Jarno Rajahalme
'netflow_count' and the existence of actual netflow objects is not tightly synchronized, so we can use the relaxed atomic_count for it. Signed-off-by: Jarno Rajahalme --- ofproto/netflow.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/ofproto/netflow.

[ovs-dev] [PATCH 12/18] lib/netdev: Do not use atomics when not needed.

2014-08-22 Thread Jarno Rajahalme
All access to struct netdev_registered_class ref_cnt member was done with netdev_class_mutex held, so it does not need to be an atomic variable. Signed-off-by: Jarno Rajahalme --- lib/netdev.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/ne

[ovs-dev] [PATCH 16/18] ofproto/ofproto-dpif-upcall: Use relaxed atomic operations.

2014-08-22 Thread Jarno Rajahalme
Neither 'enable_megaflows', 'udpif->flow_limit', 'udpif->n_flows', nor 'udpif->n_flows_timestamp' are used to synchronize the state of any other variables, so we can use relaxed atomic operations to access them. Move the atomic read operation of 'enable_megaflows' outside the loop in handle_upcall

[ovs-dev] [PATCH 13/18] lib/netdev-dummy: Use relaxed atomics for a trivial counter.

2014-08-22 Thread Jarno Rajahalme
Even though there is no need to optimize netdev-dummy, it might be good to do this right, in case it serves as an inspiration for something else later. Signed-off-by: Jarno Rajahalme --- lib/netdev-dummy.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dumm

[ovs-dev] [PATCH 04/18] lib/ovs-atomic: Add atomic_count.

2014-08-22 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/ovs-atomic.h | 57 ++ 1 file changed, 57 insertions(+) diff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h index b1c7b22..0f52c5f 100644 --- a/lib/ovs-atomic.h +++ b/lib/ovs-atomic.h @@ -412,6 +412,63 @@ ty

[ovs-dev] [PATCH 10/18] lib/cfm: Use relaxed atomics and optimize cfm_should_process_flow().

2014-08-22 Thread Jarno Rajahalme
The atomics here do not synchronize the state of any other variables, so we can use relaxed atomics. cfm_should_process_flow() is rearranged to set the megaflow mask bits only if necessary, and to avoid the atomic operation on non-BFD packets. Signed-off-by: Jarno Rajahalme --- lib/cfm.c | 42

[ovs-dev] [PATCH 02/18] lib/ovs-atomic: Clarified comments on ovs_refcount_unref().

2014-08-22 Thread Jarno Rajahalme
ovs_refcount_unref() needs to syncronize with the other instances of itself rather than with ovs_refcount_ref(). Signed-off-by: Jarno Rajahalme --- lib/ovs-atomic.h |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h index 8e83411..9

[ovs-dev] [PATCH 06/18] lib/ovs-thread: Use atomic_count.

2014-08-22 Thread Jarno Rajahalme
barrier->count is used as a simple counter and is not expected the synchronize the state of any other variable, so we can use atomic_count, which uses relaxed atomics. Ditto for the 'next_id' within ovsthread_wrapper(). Signed-off-by: Jarno Rajahalme --- lib/ovs-thread.c | 10 +- lib/

[ovs-dev] [PATCH 07/18] lib/ovs-thread: Avoid atomic read in ovsthread_once_start().

2014-08-22 Thread Jarno Rajahalme
Avoiding the atomic read may help if a function using ovsthread_once_start() is ever called in a loop, as the new 'maybe_not_done' can be kept in a register. The atomic read will still be done as long as 'maybe_not_done' is true. Since 'maybe_not_done' is not an atomic variable, whis may happen i

[ovs-dev] [PATCH 08/18] lib/jsonrpc, lib/ofp-msgs, lib/ofp-parse: Use atomic_count.

2014-08-22 Thread Jarno Rajahalme
Trivial ID counters do not synchronize anything, therefore can use atomic_count. Signed-off-by: Jarno Rajahalme --- lib/jsonrpc.c |4 ++-- lib/ofp-msgs.c |6 ++ lib/ofp-parse.c |4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/jsonrpc.c b/lib/jsonrpc.

[ovs-dev] [PATCH 00/18] Use relaxed atomic operations when possible.

2014-08-22 Thread Jarno Rajahalme
The default memory order for atomic operations is memory_order_seq_cst, which synchronizes the whole system, i.e., locks the memory bus, which is very expensive. memory_order_relaxed, on the other hand, does not impose any kind of memory barrier (not even a compiler barrier), which allows for bett

[ovs-dev] [PATCH 01/18] lib/ovs-atomic: Add missing macro argument parentheses.

2014-08-22 Thread Jarno Rajahalme
Otherwise the dereference operator could target a portion of a ternary expression, for example. Also minor style fixes. Signed-off-by: Jarno Rajahalme --- lib/ovs-atomic-gcc4+.h |8 lib/ovs-atomic-i586.h | 32 lib/ovs-atomic-x86_64.h | 14 +++

[ovs-dev] [PATCH 03/18] lib/ovs-atomic: Add helpers for relaxed atomic access.

2014-08-22 Thread Jarno Rajahalme
When an atomic variable is not serving to synchronize threads about the state of other (atomic or non-atomic) variables, no memory barrier is needed with the atomic operation. However, the default memory order for an atomic operation is memory_order_seq_cst, which always causes a system-wide locki

[ovs-dev] [PATCH 09/18] lib/bfd: Used relaxed atomics and optimize bfd_should_process_flow().

2014-08-22 Thread Jarno Rajahalme
The atomics here do not synchronize the state of any other variables, so we can use atomic_count and relaxed atomics. bfd_should_process_flow() is rearranged to set the megaflow mask bits only if necessary, and to avoid the atomic operation on non-BFD packets. Signed-off-by: Jarno Rajahalme ---

[ovs-dev] [PATCH 05/18] lib: Use shorter form of relaxed atomic access.

2014-08-22 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/dpif-netdev.c |4 ++-- lib/ovs-thread.h |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 7401293..17da3dd 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -617,7 +617,7 @@ dp_

Re: [ovs-dev] [PATCH 1/3 v2] datapath-windows: add netlink message parsing APIs

2014-08-22 Thread Ankur Sharma
Hi Saurabh, I took i am fine with the change as an ack. I'll wait for explicit ack next time. Regads, Ankur From: Saurabh Shah Sent: Friday, August 22, 2014 1:35 PM To: Ankur Sharma; dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH 1/3 v2] datapath-window

Re: [ovs-dev] [PATCH 1/3 v2] datapath-windows: add netlink message parsing APIs

2014-08-22 Thread Saurabh Shah
Hey Ankur, Something to be careful of in future. You should wait for the reviewers to give an actual 'Acked-by' for a patch. If its a private Ack, it would be a good idea to mention it and then put an Ack for them. For example, Nithin & Samuel reviewed your V1 patch and gave comments, but that doe

Re: [ovs-dev] [RFC 06/14] upcall: Rename dump_op -> ukey_op.

2014-08-22 Thread Ben Pfaff
On Thu, Aug 21, 2014 at 05:42:01PM +1200, Joe Stringer wrote: > Future patches will make use of the 'struct dump_op' in a broader sense, > so this patch renames it to make things a bit clearer. > > Signed-off-by: Joe Stringer Acked-by: Ben Pfaff ___ d

Re: [ovs-dev] [RFC 04/14] revalidator: Protect ukeys with a mutex.

2014-08-22 Thread Ben Pfaff
On Thu, Aug 21, 2014 at 05:41:59PM +1200, Joe Stringer wrote: > Currently, ukeys are protected during revalidator_sweep__() as only one > thread accesses the ukey at a time. This is ensured using barriers: > all revalidators will be in the GC phase, so they will only access their > own ukey collect

Re: [ovs-dev] [RFC 05/14] udpif: Separate ukey maps from revalidators.

2014-08-22 Thread Ben Pfaff
On Thu, Aug 21, 2014 at 05:42:00PM +1200, Joe Stringer wrote: > An upcoming patch will change the access patterns for ukey maps to > increase the number of writers, and shift write-access from revalidator > threads to upcall handler threads. As such, it no longer makes sense to > tie these maps to

Re: [ovs-dev] [patch net-next RFC 10/12] openvswitch: add support for datapath hardware offload

2014-08-22 Thread John Fastabend
On 08/21/2014 09:19 AM, Jiri Pirko wrote: Benefit from the possibility to work with flows in switch devices and use the swdev api to offload flow datapath. we should add a description here on the strategy being used. If I read this correctly this will try to add any flow to the hardware along

Re: [ovs-dev] [PATCH] net/openvswitch/flow.c: Replace rcu_dereference() with rcu_access_pointer()

2014-08-22 Thread David Miller
From: Andreea-Cristina Bernat Date: Sun, 17 Aug 2014 16:29:43 +0300 > The "rcu_dereference()" call is used directly in a condition. > Since its return value is never dereferenced it is recommended to use > "rcu_access_pointer()" instead of "rcu_dereference()". > Therefore, this patch makes the re

Re: [ovs-dev] [patch net-next RFC 03/12] net: introduce generic switch devices support

2014-08-22 Thread John Fastabend
On 08/22/2014 05:56 AM, Jiri Pirko wrote: Fri, Aug 22, 2014 at 02:42:04PM CEST, j...@mojatatu.com wrote: On 08/21/14 13:05, Florian Fainelli wrote: 2014-08-21 9:18 GMT-07:00 Jiri Pirko : The goal of this is to provide a possibility to suport various switch chips. Drivers should implement relev

Re: [ovs-dev] [patch net-next RFC 04/12] rtnl: expose physical switch id for particular device

2014-08-22 Thread John Fastabend
On 08/21/2014 09:18 AM, Jiri Pirko wrote: The netdevice represents a port in a switch, it will expose IFLA_PHYS_SWITCH_ID value via rtnl. Two netdevices with the same value belong to one physical switch. Signed-off-by: Jiri Pirko What is the relation between phys_port_id and phys_switch_id?

Re: [ovs-dev] [RFC 03/14] revalidator: Use 'cmap' for storing ukeys.

2014-08-22 Thread Ben Pfaff
On Thu, Aug 21, 2014 at 05:41:58PM +1200, Joe Stringer wrote: > Signed-off-by: Joe Stringer As of this patch, there isn't an advantage to using a cmap yet, right? Here, I'd be inclined to add the ovsrcu_quiesce() call outside the 'if' statement, unconditionally, because otherwise it's just a mat

Re: [ovs-dev] [RFC 02/14] dpif: Zero flow before dpif_flow_get().

2014-08-22 Thread Ben Pfaff
On Thu, Aug 21, 2014 at 05:41:57PM +1200, Joe Stringer wrote: > Signed-off-by: Joe Stringer My reading of the code is that this is redundant because dpif_operate() always fills in the flow. ___ dev mailing list dev@openvswitch.org http://openvswitch.org

Re: [ovs-dev] [RFC 01/14] tests: Fix race conditions.

2014-08-22 Thread Ben Pfaff
On Thu, Aug 21, 2014 at 05:41:56PM +1200, Joe Stringer wrote: > These tests had the potential to fail due to statistics not updating > before the test script retrieves them. Fix them by waiting until the > next revalidation cycle. > > Signed-off-by: Joe Stringer Acked-by: Ben Pfaff

Re: [ovs-dev] [PATCH net] openvswitch: fix panic with multiple vlan headers

2014-08-22 Thread David Miller
From: Jiri Benc Date: Thu, 21 Aug 2014 21:33:44 +0200 > When there are multiple vlan headers present in a received frame, the first > one is put into vlan_tci and protocol is set to ETH_P_8021Q. Anything in the > skb beyond the VLAN TPID may be still non-linear, including the inner TCI > and ethe

Re: [ovs-dev] [PATCH 4/4] ofproto-dpif-xlate: Rename xlate_receive() as xlate_lookup().

2014-08-22 Thread Ben Pfaff
On Fri, Aug 15, 2014 at 04:38:49PM -0700, Jarno Rajahalme wrote: > Seems better as we no longer modify the flow. > > Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/de

Re: [ovs-dev] [PATCH 3/4] ofproto-dpif-xlate: Do not take references in xlate_receive().

2014-08-22 Thread Ben Pfaff
On Fri, Aug 15, 2014 at 04:38:48PM -0700, Jarno Rajahalme wrote: > xlate configuration (via xcfg) is already holding the references, so > the callers of xlate_receive() can safely use the returned pointers > upto the point when they quiesce. If the objects are needed for > longer term, the callers

Re: [ovs-dev] [PATCH 2/4] ofproto-dpif-upcall: Remove struct upcall netflow member.

2014-08-22 Thread Ben Pfaff
On Fri, Aug 15, 2014 at 04:38:47PM -0700, Jarno Rajahalme wrote: > The netflow member was not used for anything, so it can be removed. > > Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.o

Re: [ovs-dev] [PATCH 1/4] ofproto/xlate: Add xlate_lookup_ofproto().

2014-08-22 Thread Ben Pfaff
On Fri, Aug 15, 2014 at 04:38:46PM -0700, Jarno Rajahalme wrote: > "xlate_receive" did not tell much about what it is used for. We have > two users of it that only want the ofproto and the OF port number, use the > new xlate_lookup_ofproto() for those. > > Fix the comments of xlate_receive() as w

Re: [ovs-dev] [PATCH v3] datapath-windows: Use OVS_DEFAULT_PORT_NO instead of 0 in a few places

2014-08-22 Thread Ben Pfaff
Applied, thanks! On Wed, Aug 20, 2014 at 01:38:45PM +, Saurabh Shah wrote: > > Acked-by: Saurabh Shah > > From: Nithin Raju > Date: Thursday, August 14, 2014 at 9:02 PM > To: "dev@openvswitch.org" > Subject: [ovs-dev] [PATCH v3] datapath-windows: Use > OVS_DEFAULT_PORT_NO instead of

Re: [ovs-dev] [PATCH 3/3 v2] datapath-windows: remove reference to OvsNetlink.h

2014-08-22 Thread Ben Pfaff
On Fri, Aug 22, 2014 at 10:00:29AM -0700, Ankur Sharma wrote: > In this patch we remove reference to OvsNetlink.h. > Since we do not refer to lib/netlink-protocol.h anymore, > hence removed the WIN_DP based check as well. > > Signed-off-by: Ankur Sharma > Reported-at: https://github.com/openvswit

Re: [ovs-dev] [PATCH 2/3 v2] datapath-windows: Using windows kernel netlink parsing APIs.

2014-08-22 Thread Ben Pfaff
On Fri, Aug 22, 2014 at 10:00:13AM -0700, Ankur Sharma wrote: > In this patch we incorporate the usage of netlink message > and the parsing APIs that were added in previous commit. > > Signed-off-by: Ankur Sharma > Reported-at: https://github.com/openvswitch/ovs-issues/issues/18 > Acked-by: Nithi

Re: [ovs-dev] [patch net-next RFC 03/12] net: introduce generic switch devices support

2014-08-22 Thread Ben Hutchings
On Thu, 2014-08-21 at 18:18 +0200, Jiri Pirko wrote: > The goal of this is to provide a possibility to suport various switch > chips. Drivers should implement relevant ndos to do so. Now there is a > couple of ndos defines: > - for getting physical switch id is in place. > - for work with flows. >

Re: [ovs-dev] [patch net-next RFC 07/12] dsa: implement ndo_swdev_get_id

2014-08-22 Thread Ben Hutchings
On Thu, 2014-08-21 at 18:19 +0200, Jiri Pirko wrote: [...] > --- a/net/dsa/slave.c > +++ b/net/dsa/slave.c > @@ -171,6 +171,19 @@ static int dsa_slave_ioctl(struct net_device *dev, > struct ifreq *ifr, int cmd) > return -EOPNOTSUPP; > } > > +static int dsa_slave_swdev_get_id(struct net_de

Re: [ovs-dev] netlink-socket.c: add support for do_lookup_genl_family on Windows

2014-08-22 Thread Ben Pfaff
On Fri, Aug 22, 2014 at 01:16:44AM -0700, Nithin Raju wrote: > In this patch, we add support for querying the genl family id for any > family supported by the OVS kernel datapath. On platforms that support > netlink natively, the operating system assigns a family ID, and the > OS netlink infrastruc

[ovs-dev] [PATCH 1/3 v2] datapath-windows: add netlink message parsing APIs

2014-08-22 Thread Ankur Sharma
In this change we introduce Netlink.c, Netlink.h and NetlinkProto.h in datapath-windows. These files will provide netlink message data structures and parsing APIs. Changes are on similar lines to userspace netlink code. We have mapped the userspace APIs and data structures to kernel coding conve

Re: [ovs-dev] Agenda for IRC neeting for 8/13 (Nithin Raju)

2014-08-22 Thread Ben Pfaff
On Fri, Aug 22, 2014 at 04:27:01PM +, Samuel Ghinet wrote: > [QUOTE] > OVS 1.9.3 needed a trip to userspace for every new microflow. But OVS > 1.11 introduced megaflows, so that in many cases that is no longer > necessary. > [/QUOTE] > Yeah, the microflow is the kernel flow I was trying to say

[ovs-dev] [PATCH 3/3 v2] datapath-windows: remove reference to OvsNetlink.h

2014-08-22 Thread Ankur Sharma
In this patch we remove reference to OvsNetlink.h. Since we do not refer to lib/netlink-protocol.h anymore, hence removed the WIN_DP based check as well. Signed-off-by: Ankur Sharma Reported-at: https://github.com/openvswitch/ovs-issues/issues/18 Acked-by: Nithin Raju --- datapath-windows/autom

[ovs-dev] [PATCH 2/3 v2] datapath-windows: Using windows kernel netlink parsing APIs.

2014-08-22 Thread Ankur Sharma
In this patch we incorporate the usage of netlink message and the parsing APIs that were added in previous commit. Signed-off-by: Ankur Sharma Reported-at: https://github.com/openvswitch/ovs-issues/issues/18 Acked-by: Nithin Raju --- datapath-windows/automake.mk | 5 ++- datapath-win

Re: [ovs-dev] Agenda for IRC neeting for 8/13 (Nithin Raju)

2014-08-22 Thread Samuel Ghinet
[QUOTE] OVS 1.9.3 needed a trip to userspace for every new microflow. But OVS 1.11 introduced megaflows, so that in many cases that is no longer necessary. [/QUOTE] Yeah, the microflow is the kernel flow I was trying to say. We can get to have quite many microflows created, for all kinds of cases

Re: [ovs-dev] [PATCH] Create a NBL for each NB when required

2014-08-22 Thread Samuel Ghinet
Nithin, Regarding "is it required to update many of the functions to process an NB instead of an NBL" I could try to preserve NBL wherever it was a NBL, even though the functionality requires an NB only. The worry I have here is, having the parameter "NET_BUFFER_LIST" gives no assurance that it

Re: [ovs-dev] [PATCH] Create a NBL for each NB when required

2014-08-22 Thread Nithin Raju
Hi Sam, Thanks for the clarification about the need to update the pipeline to handle NBs. I'll review the patch and get back. I don't think it is necessary to spin up a v2 patch. You can do that with any review comments I have. I'll get back early next week. I'm on vacation today. Just wanted to

Re: [ovs-dev] Agenda for IRC neeting for 8/13 (Nithin Raju)

2014-08-22 Thread Ben Pfaff
On Fri, Aug 22, 2014 at 03:24:47PM +, Samuel Ghinet wrote: > What I was testing against was ovs 1.9.3 and ovs 1.11 OVS 1.9.3 needed a trip to userspace for every new microflow. But OVS 1.11 introduced megaflows, so that in many cases that is no longer necessary. > The fact is that, even for

Re: [ovs-dev] [RFC] Proposal for enhanced select groups

2014-08-22 Thread Ben Pfaff
On Fri, Aug 22, 2014 at 09:19:41PM +0900, Simon Horman wrote: > I have been working with Netronome on examining the possibilities of > providing (richer) load balancing facilities in Open vSwitch. > > It seems to us that the current select group provides for some load > balancing functionality. An

Re: [ovs-dev] Agenda for IRC neeting for 8/13 (Nithin Raju)

2014-08-22 Thread Samuel Ghinet
What I was testing against was ovs 1.9.3 and ovs 1.11 The fact is that, even for the latest version of ovs, there is no kernel port type = NORMAL or FLOOD (see enum ovs_vport_type). OFPP_NORMAL and OFPP_FLOOD exist in userspace only. Therefore, you cannot have exactly the same handling of a flow

Re: [ovs-dev] Openflow 1.4: Eviction mechanism implementation

2014-08-22 Thread Ben Pfaff
On Fri, Aug 22, 2014 at 05:17:32PM +0530, Saloni Jain wrote: > Kindly validate following approach for implementation of eviction > mechanism and vacancy events as specified in openflow specification > 1.4. According to specification eviction and vacancy events are set > through table_mod messages.

Re: [ovs-dev] [PATCH 1/3] datapath-windows: add netlink message parsing APIs (Ankur Sharma)

2014-08-22 Thread Samuel Ghinet
Ankur, About 1: From my side, it's ok. And if you / we will do it in a later commit, perhaps you / we can rename the userspace enum as well? (enum: nl_attr_type -> nl_attr_policy_type) Sam From: Ankur Sharma [ankursha...@vmware.com] Sent: Friday, August 2

[ovs-dev] [PATCH v4 1/1] netdev-dpdk: add dpdk vhost ports

2014-08-22 Thread maryam.tahhan
This patch implements the vhost-net offload API. It adds support for a new port type to userspace datapath called dpdkvhost. This allows KVM (QEMU) to offload the servicing of virtio-net devices to it's associated dpdkvhost port. Instructions for use are in INSTALL.DPDK. This has been tested on I

Re: [ovs-dev] [RFC 00/14] Revalidate flows with unique identifiers.

2014-08-22 Thread Joe Stringer
Hi Jarno, There's been a few iterations. The previous 64-bit version was using a 32-bit hash combined with a thread ID. The 128-bit hash was based on a suggestion to have sufficient bits to randomly generate the identifiers, however I've since shifted to using the hash of the flow key---This allo

Re: [ovs-dev] [patch net-next RFC 03/12] net: introduce generic switch devices support

2014-08-22 Thread Jiri Pirko
Fri, Aug 22, 2014 at 02:42:04PM CEST, j...@mojatatu.com wrote: >On 08/21/14 13:05, Florian Fainelli wrote: >>2014-08-21 9:18 GMT-07:00 Jiri Pirko : >>>The goal of this is to provide a possibility to suport various switch >>>chips. Drivers should implement relevant ndos to do so. Now there is a >>>c

Re: [ovs-dev] [patch net-next RFC 03/12] net: introduce generic switch devices support

2014-08-22 Thread Jamal Hadi Salim
On 08/21/14 13:05, Florian Fainelli wrote: 2014-08-21 9:18 GMT-07:00 Jiri Pirko : The goal of this is to provide a possibility to suport various switch chips. Drivers should implement relevant ndos to do so. Now there is a couple of ndos defines: - for getting physical switch id is in place. - f

[ovs-dev] [RFC] Proposal for enhanced select groups

2014-08-22 Thread Simon Horman
Hi, I have been working with Netronome on examining the possibilities of providing (richer) load balancing facilities in Open vSwitch. It seems to us that the current select group provides for some load balancing functionality. And that in particular the way that it is implemented in Open vSwitch

Re: [ovs-dev] Openflow 1.4: Eviction mechanism implementation

2014-08-22 Thread Saloni Jain
Thanks Ben for your reply. Dear Ben/Team, Kindly validate following approach for implementation of eviction mechanism and vacancy events as specified in openflow specification 1.4. According to specification eviction and vacancy events are set through table_mod messages. Based on this scene

Re: [ovs-dev] [patch net-next RFC 07/12] dsa: implement ndo_swdev_get_id

2014-08-22 Thread David Laight
From: Florian Fainelli > 2014-08-21 10:06 GMT-07:00 Jiri Pirko : > > Thu, Aug 21, 2014 at 06:56:13PM CEST, f.faine...@gmail.com wrote: > >>2014-08-21 9:19 GMT-07:00 Jiri Pirko : > >>> Signed-off-by: Jiri Pirko > >>> --- > >>> net/dsa/Kconfig | 2 +- > >>> net/dsa/slave.c | 16 >

[ovs-dev] datapath-windows: define a version number in DP extensions

2014-08-22 Thread Nithin Raju
We need a version number for the datapath interface extensions that we can leverage at some point. Signed-off-by: Nithin Raju --- datapath-windows/include/OvsDpInterfaceExt.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/datapath-windows/include/OvsDpInterfaceExt.h

[ovs-dev] netlink-socket.c: add support for do_lookup_genl_family on Windows

2014-08-22 Thread Nithin Raju
In this patch, we add support for querying the genl family id for any family supported by the OVS kernel datapath. On platforms that support netlink natively, the operating system assigns a family ID, and the OS netlink infrastructure supports querying the family ID by name. In case of Windows, si