Re: [ovs-dev] [PATCH] poll-loop: windows poll_block implementation

2014-01-06 Thread Saurabh Shah
From: Linda Sun mailto:l...@vmware.com>> Date: Tuesday, January 7, 2014 3:27 AM To: Ben Pfaff mailto:b...@nicira.com>> Cc: "dev@openvswitch.org" mailto:dev@openvswitch.org>> Subject: Re: [ovs-dev] [PATCH] poll-loop: windows poll_block implementation - Original Mes

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

2014-01-06 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 --- v4 * First post --- lib/cfm.c| 2 +- lib/flow.c | 2 +- lib/odp-execute.c| 2 +- lib/packets.c| 4 ++-

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

2014-01-06 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 v4 2/4] netdev_class: Pass a struct ofpbuf * to rx_recv()

2014-01-06 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

[ovs-dev] [PATCH v4 1/4] netdev: Update rx_recv documentation for NULL case

2014-01-06 Thread Simon Horman
Replace truncated description of when rx_recv() may be NULL with text used for other fields of netdev_class. Signed-off-by: Simon Horman --- v4 * First post --- lib/netdev-provider.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/netdev-provider.h b/lib/netdev-provide

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

2014-01-06 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] ofproto-dpif-xlate: Correct check for MPLS LSE

2014-01-06 Thread Simon Horman
zero is a valid MPLS LSE so it is not valid check against that value for MPLS LSE presence. Instead, check against the flow's dl_type which should be an MPLS type if an LSE is present. This problem appears to have been introduced by b2dd70be133bf86c ("Native Set-Field action."). Cc: Jarno Rajahal

Re: [ovs-dev] [mpls v2 1/2] Implement OpenFlow support for MPLS, for up to 3 labels.

2014-01-06 Thread Simon Horman
On Thu, Jan 02, 2014 at 11:51:15AM -0500, Jesse Gross wrote: > On Sun, Dec 29, 2013 at 2:50 AM, Ben Pfaff wrote: > > I've been a little frustrated with the current approach to MPLS, because it > > seems quite difficult to understand. One particularly difficult bit for > > me is the variables used

Re: [ovs-dev] [GIT net-next] Open vSwitch

2014-01-06 Thread David Miller
From: Jesse Gross Date: Mon, 6 Jan 2014 16:15:59 -0800 > Open vSwitch changes for net-next/3.14. Highlights are: > * Performance improvements in the mechanism to get packets to userspace >using memory mapped netlink and skb zero copy where appropriate. > * Per-cpu flow stats in situations

Re: [ovs-dev] Query regarding (Open vSwitch) 2.0.0 version

2014-01-06 Thread hardik soni
Thanks Justin for giving the specific command. Thanks for L2 destination remark, I totally missed it. yes, I meant destination TCP/UDP port as destination transport. On 7 January 2014 01:03, Justin Pettit wrote: > If by "destination transport", you mean the TCP/UDP port, then you can do > what

[ovs-dev] [PATCH net-next 12/17] openvswitch: Allow user space to announce ability to accept unaligned Netlink messages

2014-01-06 Thread Jesse Gross
From: Thomas Graf Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann Signed-off-by: Jesse Gross --- include/uapi/linux/openvswitch.h | 4 net/openvswitch/datapath.c | 14 ++ net/openvswitch/datapath.h | 2 ++ 3 files changed, 20 insertions(+) diff --git a/

[ovs-dev] [PATCH net-next 14/17] openvswitch: Pass datapath into userspace queue functions

2014-01-06 Thread Jesse Gross
From: Thomas Graf Allows removing the net and dp_ifindex argument and simplify the code. Signed-off-by: Thomas Graf Signed-off-by: Jesse Gross --- net/openvswitch/datapath.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/net/openvswitc

[ovs-dev] [PATCH net-next 16/17] openvswitch: Compute checksum in skb_gso_segment() if needed

2014-01-06 Thread Jesse Gross
From: Thomas Graf The copy & csum optimization is no longer present with zerocopy enabled. Compute the checksum in skb_gso_segment() directly by dropping the HW CSUM capability from the features passed in. Signed-off-by: Thomas Graf Signed-off-by: Jesse Gross --- net/openvswitch/datapath.c |

[ovs-dev] [PATCH net-next 13/17] openvswitch: Drop user features if old user space attempted to create datapath

2014-01-06 Thread Jesse Gross
From: Thomas Graf Drop user features if an outdated user space instance that does not understand the concept of user_features attempted to create a new datapath. Signed-off-by: Thomas Graf Signed-off-by: Jesse Gross --- include/uapi/linux/openvswitch.h | 10 +- net/openvswitch/datapat

[ovs-dev] [PATCH net-next 17/17] ovs: make functions local

2014-01-06 Thread Jesse Gross
From: Stephen Hemminger Several functions and datastructures could be local Found with 'make namespacecheck' Signed-off-by: Stephen Hemminger Signed-off-by: Jesse Gross --- net/openvswitch/datapath.c | 4 ++-- net/openvswitch/datapath.h | 2 -- net/openvswitch/vport.c| 6 +- net/openv

[ovs-dev] [PATCH net-next 08/17] openvswitch: Per cpu flow stats.

2014-01-06 Thread Jesse Gross
From: Pravin B Shelar With mega flow implementation ovs flow can be shared between multiple CPUs which makes stats updates highly contended operation. This patch uses per-CPU stats in cases where a flow is likely to be shared (if there is a wildcard in the 5-tuple and therefore likely to be sprea

[ovs-dev] [PATCH net-next 11/17] net: Export skb_zerocopy() to zerocopy from one skb to another

2014-01-06 Thread Jesse Gross
From: Thomas Graf Make the skb zerocopy logic written for nfnetlink queue available for use by other modules. Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann Acked-by: David S. Miller Signed-off-by: Jesse Gross --- include/linux/skbuff.h | 3 ++ net/core/skbuff.c

[ovs-dev] [PATCH net-next 15/17] openvswitch: Use skb_zerocopy() for upcall

2014-01-06 Thread Jesse Gross
From: Thomas Graf Use of skb_zerocopy() can avoid the expensive call to memcpy() when copying the packet data into the Netlink skb. Completes checksum through skb_checksum_help() if not already done in GSO segmentation. Zerocopy is only performed if user space supported unaligned Netlink message

[ovs-dev] [PATCH net-next 01/17] openvswitch: Correct comment.

2014-01-06 Thread Jesse Gross
From: Ben Pfaff Signed-off-by: Ben Pfaff Signed-off-by: Jesse Gross --- net/openvswitch/flow_table.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c index e425427..f96ebd5 100644 --- a/net/openvswitch/flow_tab

[ovs-dev] [PATCH net-next 10/17] openvswitch: remove duplicated include from flow_table.c

2014-01-06 Thread Jesse Gross
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun Signed-off-by: Jesse Gross --- net/openvswitch/flow_table.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c index 099a1a9..51f6d7f 100644 --- a/net/openvswi

[ovs-dev] [PATCH net-next 05/17] genl: Add genlmsg_new_unicast() for unicast message allocation

2014-01-06 Thread Jesse Gross
From: Thomas Graf Allocates a new sk_buff large enough to cover the specified payload plus required Netlink headers. Will check receiving socket for memory mapped i/o capability and use it if enabled. Will fall back to non-mapped skb if message size exceeds the frame size of the ring. Signed-of-

[ovs-dev] [PATCH net-next 07/17] openvswitch: Enable memory mapped Netlink i/o

2014-01-06 Thread Jesse Gross
From: Thomas Graf Use memory mapped Netlink i/o for all unicast openvswitch communication if a ring has been set up. Benchmark * pktgen -> ovs internal port * 5M pkts, 5M flows * 4 threads, 8 cores Before: Result: OK: 67418743(c67108212+d310530) usec, 500 (9000byte,0frags) 74163pps

[ovs-dev] [GIT net-next] Open vSwitch

2014-01-06 Thread Jesse Gross
Open vSwitch changes for net-next/3.14. Highlights are: * Performance improvements in the mechanism to get packets to userspace using memory mapped netlink and skb zero copy where appropriate. * Per-cpu flow stats in situations where flows are likely to be shared across CPUs. Standard flow

[ovs-dev] [PATCH net-next 06/17] netlink: Avoid netlink mmap alloc if msg size exceeds frame size

2014-01-06 Thread Jesse Gross
From: Thomas Graf An insufficent ring frame size configuration can lead to an unnecessary skb allocation for every Netlink message. Check frame size before taking the queue lock and allocating the skb and re-check with lock to be safe. Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann Si

[ovs-dev] [PATCH net-next 09/17] net: ovs: use kfree_rcu instead of rcu_free_{sw_flow_mask_cb, acts_callback}

2014-01-06 Thread Jesse Gross
From: Daniel Borkmann As we're only doing a kfree() anyway in the RCU callback, we can simply use kfree_rcu, which does the same job, and remove the function rcu_free_sw_flow_mask_cb() and rcu_free_acts_callback(). Signed-off-by: Daniel Borkmann Signed-off-by: Jesse Gross --- net/openvswitch/

[ovs-dev] [PATCH net-next 03/17] openvswitch: Change ovs_flow_tbl_lookup_xx() APIs

2014-01-06 Thread Jesse Gross
From: Andy Zhou API changes only for code readability. No functional chnages. This patch removes the underscored version. Added a new API ovs_flow_tbl_lookup_stats() that returns the n_mask_hits. Reported by: Ben Pfaff Reviewed-by: Thomas Graf Signed-off-by: Andy Zhou Signed-off-by: Jesse Gr

[ovs-dev] [PATCH net-next 04/17] openvswitch: Silence RCU lockdep checks from flow lookup.

2014-01-06 Thread Jesse Gross
Flow lookup can happen either in packet processing context or userspace context but it was annotated as requiring RCU read lock to be held. This also allows OVS mutex to be held without causing warnings. Reported-by: Justin Pettit Signed-off-by: Jesse Gross Reviewed-by: Thomas Graf --- net/ope

[ovs-dev] [PATCH net-next 02/17] openvswitch: Shrink sw_flow_mask by 8 bytes (64-bit) or 4 bytes (32-bit).

2014-01-06 Thread Jesse Gross
From: Ben Pfaff We won't normally have a ton of flow masks but using a size_t to store values no bigger than sizeof(struct sw_flow_key) seems excessive. This reduces sw_flow_key_range and sw_flow_mask by 4 bytes on 32-bit systems. On 64-bit systems it shrinks sw_flow_key_range by 12 bytes but s

[ovs-dev] [PATCH] Add log when opstate changed on a tunnel

2014-01-06 Thread Shih-Hao Li
From: Shih-Hao Li Change-Id: I026f197a69799b6f1522d2c9e410d91158bb2663 Signed-off-by: Shih-Hao Li --- ovs-had/l3ha.c |4 1 file changed, 4 insertions(+) diff --git a/ovs-had/l3ha.c b/ovs-had/l3ha.c index 401c284..9db1f11 100644 --- a/ovs-had/l3ha.c +++ b/ovs-had/l3ha.c @@ -706,12 +706

Re: [ovs-dev] Query regarding (Open vSwitch) 2.0.0 version

2014-01-06 Thread Justin Pettit
If by "destination transport", you mean the TCP/UDP port, then you can do what you describe. It should be pretty clear how to do by reading the ovs-ofctl man page. Depending on where your new destination is, you may need to update the L2 destination address, too. --Justin On Mon, Jan 6, 2014

[ovs-dev] Query regarding (Open vSwitch) 2.0.0 version

2014-01-06 Thread hardik soni
Hi All, I am using Open vSwitch with version 2.0.0 with mininet simulator. I am trying to inject a flow which matches source IP and destination transport of the packet and on successful match switch should change destination IP and forward the packet to specified port. Does Open vSwitch support t

[ovs-dev] [PATCH] poll-loop: windows poll_block implementation

2014-01-06 Thread Linda Sun
Use WaitForMultipleObjects for polling on windows. This works on all kinds of objects, e.g. sockets, files, especially ioctl calls to the kernel. poll_fd_wait_event() is used if events need to be passed to pollfds. latch is signaled with event, to be waited/polled by WaitForMultipleObjects() as

[ovs-dev] [PATCH] syslog: Add LOG_LOCALX definitions.

2014-01-06 Thread Gurucharan Shetty
LOG_LOCAL0 is used in lib/vlog.c. Signed-off-by: Gurucharan Shetty --- include/windows/syslog.h |9 + 1 file changed, 9 insertions(+) diff --git a/include/windows/syslog.h b/include/windows/syslog.h index 484cd10..4a2f38b 100644 --- a/include/windows/syslog.h +++ b/include/windows/s

[ovs-dev] [PATCH] syslog: Provide stub functions for openlog and syslog.

2014-01-06 Thread Gurucharan Shetty
One option to implement openlog and syslog functionality in windows is to use windows event logger. But it looks like it involves changing registry settings and in general looks complicated. For the time being, do nothing for syslog. All the information needed for debugging will be present through

Re: [ovs-dev] [PATCH] poll-loop: windows poll_block implementation

2014-01-06 Thread Linda Sun
- Original Message - From: "Ben Pfaff" To: "Linda Sun" Cc: dev@openvswitch.org Sent: Monday, December 30, 2013 10:33:13 AM Subject: Re: [ovs-dev] [PATCH] poll-loop: windows poll_block implementation I don't think that it's safe to do the operations that latch_poll() and latch_set() do w

Re: [ovs-dev] [PATCH for comment only] Allow datapath to pass packets back to the kernel for non-OVS handling

2014-01-06 Thread Jesse Gross
On Mon, Jan 6, 2014 at 3:49 PM, Chris Luke wrote: > Jesse Gross wrote (on Mon 06 Jan, 2014 at 20:29 GMT): > >> On Fri, Jan 3, 2014 at 10:00 PM, Chris Luke wrote: >>> >>> Jesse Gross wrote (on Fri 03 Jan, 2014 at 23:48 GMT): >>> On Thu, Jan 2, 2014 at 8:33 PM, Chris Luke wrote: > > >

Re: [ovs-dev] [PATCH for comment only] Allow datapath to pass packets back to the kernel for non-OVS handling

2014-01-06 Thread Chris Luke
Jesse Gross wrote (on Mon 06 Jan, 2014 at 20:29 GMT): On Fri, Jan 3, 2014 at 10:00 PM, Chris Luke wrote: Jesse Gross wrote (on Fri 03 Jan, 2014 at 23:48 GMT): On Thu, Jan 2, 2014 at 8:33 PM, Chris Luke wrote: Jesse Gross wrote (on Fri 03 Jan, 2014 at 00:27 GMT): On Thu, Jan 2, 2014 at 6:

Re: [ovs-dev] [PATCH for comment only] Allow datapath to pass packets back to the kernel for non-OVS handling

2014-01-06 Thread Jesse Gross
On Fri, Jan 3, 2014 at 10:00 PM, Chris Luke wrote: > Jesse Gross wrote (on Fri 03 Jan, 2014 at 23:48 GMT): > >> On Thu, Jan 2, 2014 at 8:33 PM, Chris Luke wrote: >>> >>> Jesse Gross wrote (on Fri 03 Jan, 2014 at 00:27 GMT): >>> On Thu, Jan 2, 2014 at 6:01 PM, Chris Luke wrote: >> >>

Re: [ovs-dev] [PATCH v2 1/3] userspace: add support for pop_eth and push_eth actions

2014-01-06 Thread Jesse Gross
On Mon, Jan 6, 2014 at 2:14 PM, Lori Jakab wrote: > On 1/6/14 6:30 PM, Jesse Gross wrote: >> >> On Tue, Dec 24, 2013 at 9:02 AM, Lorand Jakab wrote: >>> >>> diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h >>> index 5137c2f..46b3634 100644 >>> --- a/include/linux/openvswitch

Re: [ovs-dev] [PATCH v2 1/3] userspace: add support for pop_eth and push_eth actions

2014-01-06 Thread Lori Jakab
On 12/30/13 8:56 PM, Ben Pfaff wrote: On Mon, Dec 30, 2013 at 10:38:40AM -0800, Ben Pfaff wrote: On Tue, Dec 24, 2013 at 04:02:34PM +0200, Lorand Jakab wrote: These actions will allow L2->L3 and L3->L2 switching, and are supposed to be added to flows installed in the datapath transparently by o

Re: [ovs-dev] [PATCH v2 1/3] userspace: add support for pop_eth and push_eth actions

2014-01-06 Thread Lori Jakab
On 1/6/14 6:30 PM, Jesse Gross wrote: On Tue, Dec 24, 2013 at 9:02 AM, Lorand Jakab wrote: diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h index 5137c2f..46b3634 100644 --- a/include/linux/openvswitch.h +++ b/include/linux/openvswitch.h * @OVS_ACTION_ATTR_OUTPUT: Outpu

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

2014-01-06 Thread Jesse Gross
On Tue, Dec 24, 2013 at 9:02 AM, Lorand Jakab wrote: > Implementation of the pop_eth and push_eth actions in the kernel, also > layer 3 flow support. Jesse Gross provided feedback on a previous > version of this RFC patch, all of those comments are resolved here. > > Signed-off-by: Lorand Jakab

[ovs-dev] [PATCH] util: Set program_name for windows correctly.

2014-01-06 Thread Gurucharan Shetty
Windows path uses backward slashes. Also, the executable name has a .exe extension in it. While creating log files, we use the program name to create log file names. It feels a little odd to have log file names like ovsdb-server.exe.log etc. Using _splitpath_s() is a way to have same log file names

Re: [ovs-dev] [PATCH v2 1/3] userspace: add support for pop_eth and push_eth actions

2014-01-06 Thread Jesse Gross
On Tue, Dec 24, 2013 at 9:02 AM, Lorand Jakab wrote: > diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h > index 5137c2f..46b3634 100644 > --- a/include/linux/openvswitch.h > +++ b/include/linux/openvswitch.h > * @OVS_ACTION_ATTR_OUTPUT: Output packet to port. > @@ -569,6 +5

[ovs-dev] LED tube vendor with UL, CE, FCC / Man Jia, Shenzhen (Carl)

2014-01-06 Thread Carl Zhou of ManJia