[ovs-dev] Adding a Delay Queue in Datapath

2014-08-21 Thread Namwon An
Hello, everyone. I am modifying the datapath of ovs to queue incoming packets and delay the time of process of them. In datapath.c, I added codes creating a thread that inputs incoming packets to a queue, and process them later (in regular). Once ovs_dp_process_received_packet() is

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

2014-08-21 Thread Samuel Ghinet
Sorry for long delay here. I wanted to point out something about: "At a high level, the fraction of packets that make it to userspace should be very small. So it is not worth the optimization" If we have the port NORMAl (and perhaps, FLOOD) set, then the queuing of packets to userspace happens

[ovs-dev] Openflow2.0 support for open vSwitch

2014-08-21 Thread Akhil Pillai
Hi All, I have gone the research paper : P4: Programming protocol independent packet processors. Following is its link http://arxiv.org/pdf/1312.1719.pdf This paper takes about implementing Openflow2.0 . I am interested in contributing in making open vSwitch Openflow2.0 compliant. Do we have a pla

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

2014-08-21 Thread Ben Pfaff
On Thu, Aug 21, 2014 at 03:08:59PM +, Samuel Ghinet wrote: > I wanted to point out something about: > "At a high level, the fraction of packets that make it to userspace should be > very small. So it is not worth the optimization" > > If we have the port NORMAl (and perhaps, FLOOD) set, then

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

2014-08-21 Thread 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. - for work with flows. Note that user can use random port netdevice to access the switc

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

2014-08-21 Thread Jiri Pirko
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 --- include/uapi/linux/if_link.h | 1 + net/core/rtnetlink.c | 26 +- 2 fil

[ovs-dev] [patch net-next RFC 00/12] introduce rocker switch driver with openvswitch hardware accelerated datapath

2014-08-21 Thread Jiri Pirko
This patchset can be divided into 3 main sections: - introduce switchdev api for implementing switch drivers - add hardware acceleration bits into openvswitch datapath, This uses previously mentioned switchdev api - introduce rocker switch driver which implenets switchdev api More info in separa

[ovs-dev] [patch net-next RFC 01/12] openvswitch: split flow structures into ovs specific and generic ones

2014-08-21 Thread Jiri Pirko
After this, flow related structures can be used in other code. Signed-off-by: Jiri Pirko --- include/linux/sw_flow.h| 98 ++ net/openvswitch/actions.c | 3 +- net/openvswitch/datapath.c | 74 +- net/openvswitch/datapath

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

2014-08-21 Thread Jiri Pirko
Signed-off-by: Jiri Pirko --- net/dsa/Kconfig | 2 +- net/dsa/slave.c | 16 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig index f5eede1..66c445a 100644 --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig @@ -1,6 +1,6 @@ config HAVE_NET

[ovs-dev] [patch net-next RFC 05/12] net-sysfs: expose physical switch id for particular device

2014-08-21 Thread Jiri Pirko
Signed-off-by: Jiri Pirko --- net/core/net-sysfs.c | 24 1 file changed, 24 insertions(+) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 55dc4da..69e3d64 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -12,6 +12,7 @@ #include #include

[ovs-dev] [patch net-next RFC 08/12] net: introduce netdev_phys_item_ids_match helper

2014-08-21 Thread Jiri Pirko
Signed-off-by: Jiri Pirko Acked-by: Scott Feldman --- include/linux/netdevice.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8b5d14c..b48028d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -751,6

[ovs-dev] [patch net-next RFC 06/12] net: introduce dummy switch

2014-08-21 Thread Jiri Pirko
Dummy switch implementation using switchdev interface Signed-off-by: Jiri Pirko --- drivers/net/Kconfig | 7 +++ drivers/net/Makefile | 1 + drivers/net/dummyswitch.c| 131 +++ include/uapi/linux/if_link.h | 9 +++ 4 files change

[ovs-dev] [patch net-next RFC 11/12] sw_flow: add misc section to key with in_port_ifindex field

2014-08-21 Thread Jiri Pirko
Signed-off-by: Jiri Pirko --- include/linux/sw_flow.h | 3 +++ net/core/switchdev.c | 10 ++ net/openvswitch/hw_offload.c | 23 +++ 3 files changed, 36 insertions(+) diff --git a/include/linux/sw_flow.h b/include/linux/sw_flow.h index 079d065..e2ee54a 10

[ovs-dev] [patch net-next RFC 09/12] openvswitch: introduce vport_op get_netdev

2014-08-21 Thread Jiri Pirko
This will allow to query easily if the vport has netdev. Also it allows to unexpose netdev_vport_priv and struct netdev_vport. Signed-off-by: Jiri Pirko --- net/openvswitch/datapath.c | 2 +- net/openvswitch/dp_notify.c | 7 ++--- net/openvswitch/vport-internal_dev.c | 56 ++

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

2014-08-21 Thread Jiri Pirko
Benefit from the possibility to work with flows in switch devices and use the swdev api to offload flow datapath. Signed-off-by: Jiri Pirko --- include/linux/sw_flow.h| 14 +++ net/openvswitch/Makefile | 3 +- net/openvswitch/datapath.c | 33 ++ net/openvswitch/datapath

[ovs-dev] [patch net-next RFC 12/12] rocker: introduce rocker switch driver

2014-08-21 Thread Jiri Pirko
This patch introduces the first driver to benefit from the switchdev infrastructure and to implement newly introduced switch ndos. This is a driver for emulated switch chip implemented in qemu: https://github.com/sfeldma/qemu-rocker/ This patch is a result of joint work with Scott Feldman. Signed

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

2014-08-21 Thread Nithin Raju
Ankur, Thanks for working on this. I had the following overall comments. I have annotated the patch with specific comments as appropriate. I didn't realize initially that the Netlink.c, Netlink.h that you are introducing have major modifications compared to the userspace netlink.c and netlink.h

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

2014-08-21 Thread Nithin Raju
hi Ankur, Thanks for working on this. Looks good overall, but for the minor comments I had. On Aug 20, 2014, at 9:46 AM, Ankur Sharma wrote: > In this patch we incorporate the usage of netlink message > and the parsing APIs that were added in previous commit. > > Change-Id: If627ba5a10d78b9366

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

2014-08-21 Thread Nithin Raju
hi Ankur, Looks good, but for a few minor comments. On Aug 20, 2014, at 9:46 AM, 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. > > Change-Id: I281a0c6478e3de2e9b04c988be

[ovs-dev] Virtualization Software Users List

2014-08-21 Thread Camila Taylor
Hi, Would you be interested in *Virtualization Software Users *contact information in excel sheet for unlimited marketing usage? We provide Top Decision Makers information like Name, Email, Title, Phone and company details of *companies using Virtualization.* *Cloud* *Docker* *Big Data* *Had

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

2014-08-21 Thread Nithin Raju
hi Alin/Sam, Like I said earlier, this is a critical fix, and thanks for working on this. I started looking at OvsPacketIO.c, and you are right in using the OvsPartialCopyToMultipleNBLs() API. However, is it required to update many of the functions to process an NB instead of an NBL? From my und

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

2014-08-21 Thread Florian Fainelli
2014-08-21 9:19 GMT-07:00 Jiri Pirko : > Signed-off-by: Jiri Pirko > --- > net/dsa/Kconfig | 2 +- > net/dsa/slave.c | 16 > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig > index f5eede1..66c445a 100644 > --- a/net/dsa/Kconfi

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

2014-08-21 Thread Jiri Pirko
Thu, Aug 21, 2014 at 06:41:23PM CEST, b...@decadent.org.uk wrote: >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: >> -

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

2014-08-21 Thread Florian Fainelli
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. > - for work with flows. > > Note that us

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

2014-08-21 Thread 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 >> 2 files changed, 17 insertions(+), 1 deletion(-) >> >> diff --git a/net/dsa/Kconfi

Re: [ovs-dev] Cloning packets for "action: set field"

2014-08-21 Thread Samuel Ghinet
Hello Saurabh, Thanks for the clarifications! The param name "copySize" was very ambiguous. I did not debug this exact scenario, but you must be right: - Cloning an original NB that has DataOffset > 0 causes the clone to have DataOffset = 0 - NdisRetreatNetBufferDataStart doc says " DataOffsetDe

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

2014-08-21 Thread 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 >>> 2 files changed, 17 insertions(+),

Re: [ovs-dev] [patch net-next RFC 12/12] rocker: introduce rocker switch driver

2014-08-21 Thread Florian Fainelli
2014-08-21 9:19 GMT-07:00 Jiri Pirko : > This patch introduces the first driver to benefit from the switchdev > infrastructure and to implement newly introduced switch ndos. This is a > driver for emulated switch chip implemented in qemu: > https://github.com/sfeldma/qemu-rocker/ > > This patch is

Re: [ovs-dev] [PATCH v4 3/3] datapath: add layer 3 flow/port support

2014-08-21 Thread Lori Jakab
On 8/6/14 4:37 AM, Jesse Gross wrote: On 8/2/14, 4:11 AM, Jesse Gross wrote: On Fri, Aug 1, 2014 at 3:19 PM, Lori Jakab wrote: On 8/1/14, 3:25 AM, Jesse Gross wrote: On Thu, Jul 31, 2014 at 5:45 AM, Lori Jakab wrote: On 7/31/14, 10:09 AM, Jesse Gross wrote: Going further, what happens if p

[ovs-dev] [PATCH] datapath: remove flow member from struct ovs_skb_cb

2014-08-21 Thread Lorand Jakab
struct ovs_skb_cb is full on kernels < 3.11 due to compatibility code. This patch removes the 'flow' member in order to make room for data needed by layer 3 flow/port support that will be added in an upcoming patch. The 'flow' memeber was chosen for removal because it's only used in ovs_execute_ac

Re: [ovs-dev] [PATCH v4 3/3] datapath: add layer 3 flow/port support

2014-08-21 Thread Lori Jakab
On 8/2/14 4:11 AM, Jesse Gross wrote: On Fri, Aug 1, 2014 at 3:19 PM, Lori Jakab wrote: On 8/1/14, 3:25 AM, Jesse Gross wrote: On Thu, Jul 31, 2014 at 5:45 AM, Lori Jakab wrote: On 7/31/14, 10:09 AM, Jesse Gross wrote: On Fri, Jun 27, 2014 at 6:21 AM, Lorand Jakab wrote: diff --git a/dat

[ovs-dev] [PATCH 1/2] ofp-errors: Fix bugs in treatment of OpenFlow experimenter errors.

2014-08-21 Thread Ben Pfaff
OpenFlow 1.2 and later have "experimenter errors". The OVS implementation was buggy in a few ways. First, a bug in extract-ofp-errors prevented OF1.2+ experimenter errors from being properly decoded. Second, OF1.2+ experimenter errors have only a type, not a code, whereas all other types of erro

[ovs-dev] [PATCH 2/2] ofp-errors: Migrate EXT-444 errors to ONF experimenter ID.

2014-08-21 Thread Ben Pfaff
From: Jean Tourrilhes Signed-off-by: Jean Tourrilhes [b...@nicira.com removed the definitions of these errors in OF1.1 and OF1.2] Signed-off-by: Ben Pfaff --- lib/ofp-errors.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ofp-errors.h b/lib/ofp-errors.h

Re: [ovs-dev] [PATCH 01/15] datapath-windows: Update CodingStyle

2014-08-21 Thread Samuel Ghinet
Thanks Nithin for your opinions on coding style! [QUOTE] The guideline is fine. It seems to be a rewording of the existing guideline, but it is ok to do it. [/QUOTE] Except, the current coding style says: "For types, use all upper case for all letters with words separated by '_'. If camel casin

Re: [ovs-dev] [PATCH 11/15] datapath-windows: Add RefCount.h

2014-08-21 Thread Samuel Ghinet
Hello Nithin, The part where I am trying to save a lock is in "4. Process the packet using the flow" Also, I believe that, when ref count = 0, it should mean that the data is "unsafe" (i.e. you need to lock to access / write to it). When ref count = 0, it shouldn't mean that the flow must be del

Re: [ovs-dev] [PATCH 10/15] datapath-windows: Compile as C by default

2014-08-21 Thread Samuel Ghinet
Sorry, I'll remake the commit. Sam From: Nithin Raju [nit...@vmware.com] Sent: Saturday, August 16, 2014 9:34 AM To: Samuel Ghinet Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH 10/15] datapath-windows: Compile as C by default hi Sam, I don't unders

Re: [ovs-dev] [PATCH 07/15] datapath-windows: Replace Types.h

2014-08-21 Thread Samuel Ghinet
Okay, got it! Thanks! Sam From: Nithin Raju [nit...@vmware.com] Sent: Saturday, August 16, 2014 9:38 AM To: Samuel Ghinet Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH 07/15] datapath-windows: Replace Types.h On Aug 6, 2014, at 9:11 AM, Samuel Ghin

Re: [ovs-dev] [PATCH 09/15] datapath-windows: Add macros in Debug.h

2014-08-21 Thread Samuel Ghinet
Hello Nithin, [QUOTE] I don't think we need two separate definitions. If ASSERT() is defined debug only, then it would be a no-op in 'OVS_USE_ASSERTS'. [/QUOTE] The more complex assert-based macros would be useful if we would want to do a more 'proper' cleanup in release mode, for a bug. e.g. i

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

2014-08-21 Thread Jiri Benc
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 ethertype. While ovs_flow_extract takes care of IP and IPv6 headers,

Re: [ovs-dev] [PATCH 01/15] datapath-windows: Update CodingStyle

2014-08-21 Thread Samuel Ghinet
Also, I think it would be cleaner & would improve code readability if we would use a max 1 goto Label, e.g. a "Cleanup". Rather than using multiple labels per func. A "Cleanup" would be something like cleanup in case something went wrong - the all-ok part means reaching the end of the function n

Re: [ovs-dev] [PATCH 12/15] datapath-windows: Add FixedSizedArray

2014-08-21 Thread Samuel Ghinet
Hello Nithin, [QUOTE] Is this a pre-cursor for implementing the persistent ports feature that the cloudbase repo had implemented. [/QUOTE] Yes. I think it is better to drop the "persistent port" term. When I had designed it long ago, I chose the name "persistent" because it "persists" during hy

Re: [ovs-dev] [PATCH 13/15] datapath-windows: Add Core.h

2014-08-21 Thread Samuel Ghinet
I have just asked on osronline. Even though it is not critical now, it will be useful to know for sure :) [QUOTE] We an add an additional API like OvsAllocateMemory() which also zeros the memory. [/QUOTE] I would sincerely prefer something shorter than an OvsAllocateZeroedMemory :) Memory alloca

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

2014-08-21 Thread Jarno Rajahalme
Joe, What was the reason to go from 64-bit hash to 128-bit hash? Jarno > On Aug 20, 2014, at 10:41 PM, Joe Stringer wrote: > > One of the current bottlenecks for revalidation performance is the cost of > assembling flow keys, masks and actions in the (linux) datapath. This series > seeks to

Re: [ovs-dev] OvsIpHelper vs the ARP method

2014-08-21 Thread Samuel Ghinet
Hello Nithin, Thanks for the clarifications! Some notes: - AFAIK, RARP is long since obsolete, so I don't know if we actually need to take it into account. - When you say GARP, you mean the Gratuitous Address Resolution Protocol, right? not the Generic Attribute Registration Protocol. If it's t

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

2014-08-21 Thread Samuel Ghinet
Port "NORMAL" in userspace means: - when a packet is coming from dp port1, its eth address, ethAddr1 is saved for the dp port. - when another packet is coming from dp port2, and has dest eth address = ethAddr1, a kernel flow must be created that says "if packet has all frames like this, send to

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

2014-08-21 Thread Samuel Ghinet
I have also looked upon the patch. It's good to see the netlink protocol being implemented! There would be a few minor issues: Netlink.h: [PATCH] /* Netlink attribute types. */ typedef enum { NL_A_NO_ATTR = 0, NL_A_UNSPEC, NL_A_U8, NL_A_U16, NL_A_BE16 = NL_A_U16, NL_A_U32,

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

2014-08-21 Thread Ankur Sharma
Hi Sam, Thanks a lot for the review. 1. Rename NL_ATTR_TYPE: [Ankur]: Agreed that it should be renamed. Will it be fine if i do it in a followup checkin (will create an issue on github to make sure that this suggestion is not missed out)? 2. Use MAXUINT64 [Ankur]: My bad i missed this macro.

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

2014-08-21 Thread Ben Pfaff
On Fri, Aug 22, 2014 at 01:55:13AM +, Samuel Ghinet wrote: > port NORMAL and port FLOOD, unlike physical (i.e. ports corresponding to > specific VMs or to external) or logical (GRE / VXLAN / etc.) are a userspace > concept only. > This means that, when a "ovs-ofctl add-flow br0 actions=normal