[ovs-dev] [PATCH net-next] openvswitch: Remove unneeded ovs_netdev_get_ifindex()

2013-04-26 Thread Thomas Graf
The only user is get_dpifindex(), no need to redirect via the port operations. Signed-off-by: Thomas Graf --- net/openvswitch/datapath.c | 7 --- net/openvswitch/vport-internal_dev.c | 1 - net/openvswitch/vport-netdev.c | 7 --- net/openvswitch/vport-netdev.h | 1

[ovs-dev] [PATCH net-next v2] openvswitch: Remove unneeded ovs_netdev_get_ifindex()

2013-04-29 Thread Thomas Graf
The only user is get_dpifindex(), no need to redirect via the port operations. Signed-off-by: Thomas Graf --- V2 - Fix stylistic issue net/openvswitch/datapath.c | 3 ++- net/openvswitch/vport-internal_dev.c | 1 - net/openvswitch/vport-netdev.c | 7 --- net/openvswitch

[ovs-dev] [PATCH net-next 0/2] Open vSwitch zerocopy upcall

2013-05-24 Thread Thomas Graf
Posting this to netdev due to dependency on first patch. Thomas Graf (2): net: Export skb_zerocopy() to zerocopy from one skb to another openvswitch: Use zerocopy if applicable when performing the upcall include/linux/skbuff.h | 2 ++ net/core/skbuff.c| 46

[ovs-dev] [PATCH net-next 2/2] openvswitch: Use zerocopy if applicable when performing the upcall

2013-05-24 Thread Thomas Graf
From: Thomas Graf Avoids a memcpy() that is expensive for large packets: from: 4.51% [kernel] [k] memcpy to: 1.20% [kernel] [k] memcpy 1.01% [kernel] [k] skb_zerocopy Signed-off-by: Thomas Graf --- net/openvswitch

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

2013-05-24 Thread Thomas Graf
Make the skb zerocopy logic written for nfnetlink queue available for use by other modules. Signed-off-by: Thomas Graf --- include/linux/skbuff.h | 2 ++ net/core/skbuff.c| 46 +++ net/netfilter/nfnetlink_queue_core.c | 47

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

2013-05-24 Thread Thomas Graf
On 05/24/13 at 08:31am, Eric Dumazet wrote: > Hmm. Big warning here : In the nfnetlink case, we specifically made sure > that this path was taken only if skb->head_frag was set (all incoming > packets have this property, but not outgoing ones yet) > > This should be documented if we move it to net

Re: [ovs-dev] [PATCH net-next 2/2] openvswitch: Use zerocopy if applicable when performing the upcall

2013-05-25 Thread Thomas Graf
On 05/24/13 at 03:18pm, Jesse Gross wrote: > On Fri, May 24, 2013 at 2:57 PM, Eric Dumazet wrote: > >> My guess is that there isn't a real different for small packets since > >> everything will be in the cache but it seems worth checking given that > >> this is optimizing a rare case at the expens

Re: [ovs-dev] [PATCH net-next 2/2] openvswitch: Use zerocopy if applicable when performing the upcall

2013-06-07 Thread Thomas Graf
On 05/27/13 at 10:28am, Jesse Gross wrote: > On Saturday, May 25, 2013, Eric Dumazet wrote: > > > On Sat, 2013-05-25 at 08:02 +0100, Thomas Graf wrote: > > > > > I ran TCP_CRR to verify the SYN/ACK use case and I did not > > > observe a difference. If you ha

Re: [ovs-dev] openvswitch_handle_frame_hook

2013-06-28 Thread Thomas Graf
Jesse, On 06/29/2013 12:44 AM, Jesse Gross wrote: Pravin pointed out that the RHEL6 openvswitch_handle_frame_hook unregister is happening from the RCU callback, which means that we immediately free the vport after removing the handler. This seems racy. I also noticed that we have asymmetric use

[ovs-dev] [PATCH 0/3] RHEL Updates

2013-07-09 Thread Thomas Graf
Thomas Graf (3): datapath: Rename skb_network_protocol() to __skb_network_protocol() datapath: rhel: Account for RHEL specific backports datapath: rhel: Move RHEL OVS hook registration to netdev_rx_handler_register() backport acinclude.m4| 3

[ovs-dev] [PATCH 3/3] datapath: rhel: Move RHEL OVS hook registration to netdev_rx_handler_register() backport

2013-07-09 Thread Thomas Graf
is present which was removed under RTNL protection before the RCU callback. Signed-off-by: Thomas Graf --- datapath/linux/compat/include/linux/netdevice.h | 21 - datapath/vport-netdev.c | 17 + 2 files changed, 21 insertions(+), 17

[ovs-dev] [PATCH 1/3] datapath: Rename skb_network_protocol() to __skb_network_protocol()

2013-07-09 Thread Thomas Graf
The function skb_network_protocol() is already defined in upstream but not an exported symbol. Rename the OVS internal implementation to work around this. Signed-off-by: Thomas Graf --- datapath/linux/compat/gso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[ovs-dev] [PATCH 2/3] datapath: rhel: Account for RHEL specific backports

2013-07-09 Thread Thomas Graf
The following symbols have been backported to RHEL and the kernel version is no longer an accurate indicator for their presence: - skb_gso_segment - netif_skb_features - netif_needs_gso Signed-off-by: Thomas Graf --- acinclude.m4| 3 +++ datapath/linux

Re: [ovs-dev] [PATCH 1/3] datapath: Rename skb_network_protocol() to __skb_network_protocol()

2013-07-09 Thread Thomas Graf
On 07/09/2013 06:38 PM, Pravin Shelar wrote: On Tue, Jul 9, 2013 at 9:00 AM, Thomas Graf wrote: The function skb_network_protocol() is already defined in upstream but not an exported symbol. Rename the OVS internal implementation to work around this. Are you seeing problem with RHEL kernel

Re: [ovs-dev] [PATCH 3/3] datapath: rhel: Move RHEL OVS hook registration to netdev_rx_handler_register() backport

2013-07-09 Thread Thomas Graf
On 07/09/2013 08:06 PM, Jesse Gross wrote: On Tue, Jul 9, 2013 at 9:00 AM, Thomas Graf wrote: diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c index fe7e359..d043eae 100644 --- a/datapath/vport-netdev.c +++ b/datapath/vport-netdev.c @@ -46,9 +46,8 @@ MODULE_PARM_DESC(vlan_tso

[ovs-dev] [PATCH v2] datapath: rhel: Move RHEL OVS hook registration to netdev_rx_handler_register() backport

2013-07-09 Thread Thomas Graf
is present which was removed under RTNL protection before the RCU callback. Signed-off-by: Thomas Graf --- V2: - Move nr_bridges to compat/netdevice.c - Don't use atomic_t for nr_bridges datapath/linux/compat/include/linux/netdevice.h | 21 - datapath/linux/c

Re: [ovs-dev] [PATCH] datapath: Revert "datapath: rhel: Account for RHEL specific backports"

2013-07-16 Thread Thomas Graf
On 07/15/2013 09:54 PM, Jesse Gross wrote: On Mon, Jul 15, 2013 at 12:45 PM, Pravin B Shelar wrote: This reverts commit 752378e1cd1f133a8366fbacec3b281a45ff8268 (datapath: rhel: Account for RHEL specific backports). Change related to netif_needs_gso() is cuasing panic on RHEL and Xen platforms.

[ovs-dev] [PATCH net-next 0/2 v2] Open vSwitch zerocopy upcall

2013-07-25 Thread Thomas Graf
for CHECKSUM_PARTIAL tx case Thomas Graf (2): net: Export skb_zerocopy() to zerocopy from one skb to another openvswitch: Use skb_zerocopy() to prepare skb for upcall include/linux/skbuff.h | 3 ++ net/core/skbuff.c| 85

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

2013-07-25 Thread Thomas Graf
Make the skb zerocopy logic written for nfnetlink queue available for use by other modules. Signed-off-by: Thomas Graf --- include/linux/skbuff.h | 3 ++ net/core/skbuff.c| 85 net/netfilter/nfnetlink_queue_core.c | 59

[ovs-dev] [PATCH net-next 2/2] openvswitch: Use skb_zerocopy() to prepare skb for upcall

2013-07-25 Thread Thomas Graf
From: Thomas Graf Use of skb_zerocopy() avoids the expensive call to memcpy() when copying the packet data into the Netlink skb. Completes checksum through skb_checksum_help() if needed (typicall packet input from software device) which invalidates some of the gains again. Stock-RX - 38.30

Re: [ovs-dev] [PATCH net-next 2/2] openvswitch: Use skb_zerocopy() to prepare skb for upcall

2013-07-26 Thread Thomas Graf
On 07/25/13 at 06:39pm, Jesse Gross wrote: > On Thu, Jul 25, 2013 at 5:43 AM, Thomas Graf wrote: > > From: Thomas Graf > > > > Use of skb_zerocopy() avoids the expensive call to memcpy() when > > copying the packet data into the Netlink skb. Completes checksum > &g

Re: [ovs-dev] [PATCH] datapath: Fix RHEL compat for netdev_rx_handler_register

2013-08-15 Thread Thomas Graf
rx_handler_data rather than rx_handler. This was > introduced by commit "3e35fe3 datapath: rhel: Move RHEL OVS hook > registration to netdev_rx_handler_register() backport". > > Reported-by: Andrei Andone > Signed-off-by: Chris Wright > Cc: T

[ovs-dev] [PATCH] ovsdb: Do not leak error in ovsdb_server_compact()

2013-11-01 Thread Thomas Graf
Signed-off-by: Thomas Graf --- ovsdb/ovsdb-server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index ab44b3a..f64122e 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -983,6 +983,7 @@ ovsdb_server_compact(struct unixctl_conn

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

2013-11-08 Thread Thomas Graf
disabled) Signed-off-by: Thomas Graf --- net/openvswitch/datapath.c | 52 +++--- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 1408adc..3f170e3 100644 --- a/net/openvswitch

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

2013-11-08 Thread Thomas Graf
Make the skb zerocopy logic written for nfnetlink queue available for use by other modules. Signed-off-by: Thomas Graf --- include/linux/skbuff.h | 3 ++ net/core/skbuff.c| 85 net/netfilter/nfnetlink_queue_core.c | 59

[ovs-dev] [PATCH 0/2 v3] Open vSwitch zerocopy upcall

2013-11-08 Thread Thomas Graf
ist case - API documentation - performance data for CHECKSUM_PARTIAL tx case Thomas Graf (2): net: Export skb_zerocopy() to zerocopy from one skb to another openvswitch: Use skb_zerocopy() for upcall include/linux/skbuff.h | 3 ++ net/core/skbuff.c|

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

2013-11-08 Thread Thomas Graf
Make the skb zerocopy logic written for nfnetlink queue available for use by other modules. Signed-off-by: Thomas Graf --- include/linux/skbuff.h | 3 ++ net/core/skbuff.c| 85 net/netfilter/nfnetlink_queue_core.c | 59

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

2013-11-08 Thread Thomas Graf
disabled) Signed-off-by: Thomas Graf Cc: Jesse Gross Cc: Eric Dumazet --- net/openvswitch/datapath.c | 52 +++--- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 1408adc

[ovs-dev] [PATCH 0/2 v4] Open vSwitch zerocopy upcall

2013-11-08 Thread Thomas Graf
calculate headroom of destination buffer. This also takes care of the from->head_frag issue. - Attribute alignment for frag_list case - API documentation - performance data for CHECKSUM_PARTIAL tx case Thomas Graf (2): net: Export skb_zerocopy() to zerocopy from one skb

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

2013-11-10 Thread Thomas Graf
On 11/09/13 at 10:02pm, Ben Hutchings wrote: > On Fri, 2013-11-08 at 10:15 +0100, Thomas Graf wrote: > > Use of skb_zerocopy() avoids the expensive call to memcpy() when > > copying the packet data into the Netlink skb. Completes checksum > > through skb_checksum_help() if nee

[ovs-dev] [PATCH] netlink: Do not enforce alignment of last Netlink attribute

2013-11-11 Thread Thomas Graf
There is no reason to enforce padding after the last attribute. Dropping this enforcement will ease efforts to implement zerocopy upcall. Signed-off-by: Thomas Graf --- lib/netlink.h | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/netlink.h b/lib

[ovs-dev] [PATCH] linux: Signal datapath that unaligned Netlink message can be received

2013-11-11 Thread Thomas Graf
Following commit (''netlink: Do not enforce alignment of last Netlink attribute''), signal the ability to receive unaligned Netlink messages to the datapath to enable utilization of zerocopy optimizations. Signed-off-by: Thomas Graf --- include/linux/openvswitch.h | 4 ++

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

2013-11-11 Thread Thomas Graf
Make the skb zerocopy logic written for nfnetlink queue available for use by other modules. Signed-off-by: Thomas Graf --- include/linux/skbuff.h | 3 ++ net/core/skbuff.c| 85 net/netfilter/nfnetlink_queue_core.c | 59

[ovs-dev] [PATCH 0/3 v5] Open vSwitch zerocopy upcall

2013-11-11 Thread Thomas Graf
sue. - Attribute alignment for frag_list case - API documentation - performance data for CHECKSUM_PARTIAL tx case Thomas Graf (3): net: Export skb_zerocopy() to zerocopy from one skb to another openvswitch: Allow user space to announce ability to accept unaligned Netlink messa

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

2013-11-11 Thread Thomas Graf
Signed-off-by: Thomas Graf --- include/uapi/linux/openvswitch.h | 4 net/openvswitch/datapath.c | 4 net/openvswitch/datapath.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index d120f9f..07ef2c3

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

2013-11-11 Thread Thomas Graf
+ 2.81% vhost-8471 [k] csum_partial_copy_generic to: + 5.72% ovs-vswitchd [k] memcpy + 3.32% vhost-5153 [k] memcpy + 0.68% vhost-5153 [k] skb_zerocopy (megaflows disabled) Signed-off-by: Thomas Graf --- net/openvswitch/datapath.c | 54

Re: [ovs-dev] [PATCH] linux: Signal datapath that unaligned Netlink message can be received

2013-11-11 Thread Thomas Graf
On 11/11/2013 04:50 PM, Ben Pfaff wrote: On Mon, Nov 11, 2013 at 04:36:24PM +0100, Thomas Graf wrote: Following commit (''netlink: Do not enforce alignment of last Netlink attribute''), signal the ability to receive unaligned Netlink messages to the datapath to enable uti

Re: [ovs-dev] [PATCH] linux: Signal datapath that unaligned Netlink message can be received

2013-11-13 Thread Thomas Graf
On 11/13/2013 07:11 AM, Jesse Gross wrote: On Mon, Nov 11, 2013 at 11:53 PM, Thomas Graf wrote: On 11/11/2013 04:50 PM, Ben Pfaff wrote: On Mon, Nov 11, 2013 at 04:36:24PM +0100, Thomas Graf wrote: Following commit (''netlink: Do not enforce alignment of last Netlink attribute&

Re: [ovs-dev] [PATCH] linux: Signal datapath that unaligned Netlink message can be received

2013-11-15 Thread Thomas Graf
On 11/15/2013 10:32 AM, Jesse Gross wrote: On Wed, Nov 13, 2013 at 5:46 PM, Thomas Graf wrote: On 11/13/2013 07:11 AM, Jesse Gross wrote: On Mon, Nov 11, 2013 at 11:53 PM, Thomas Graf wrote: On 11/11/2013 04:50 PM, Ben Pfaff wrote: On Mon, Nov 11, 2013 at 04:36:24PM +0100, Thomas Graf

[ovs-dev] [PATCH] dpif-linux: Fix minor typo OVS_DP_ATTR_UPCALL_PID

2013-11-18 Thread Thomas Graf
Signed-off-by: Thomas Graf --- lib/dpif-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 42958d3..0442f77 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -72,7 +72,7 @@ struct dpif_linux_dp { /* Attributes

Re: [ovs-dev] [PATCH v3] ofproto-dpif: add support for layer 3 ports

2013-11-19 Thread Thomas Graf
ned-off-by: Lorand Jakab Reviewed-by: Thomas Graf ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH V2] datapath: Change ovs_flow_tbl_lookup_xx() APIs

2013-11-19 Thread Thomas Graf
;v2: Add more content to the commit message. Reviewed-by: Thomas Graf ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 2/3] datapath: Add compile time check for rxhash

2013-11-20 Thread Thomas Graf
On 11/19/2013 10:50 PM, Pravin B Shelar wrote: Some distribution kernel has backported skb->rxhash (e.g. RHEL) Following patch allows use precalculated rxhash. Signed-off-by: Pravin B Shelar Reviewed-by: Thomas Graf ___ dev mailing list

Re: [ovs-dev] [PATCH 3/3] datapath: lisp: Use skb rxhash for source port.

2013-11-20 Thread Thomas Graf
On 11/19/2013 10:50 PM, Pravin B Shelar wrote: Rather than using complete flow hash, we can use skb->rxhash for calculating source port. Similar calculation is done by vxlan. Signed-off-by: Pravin B Shelar --- datapath/vport-lisp.c |9 +++-- 1 files changed, 3 insertions(+), 6 deleti

Re: [ovs-dev] [PATCH 1/3] datapath: Improve compat rxhash functionality.

2013-11-20 Thread Thomas Graf
: Pravin B Shelar Reviewed-by: Thomas Graf ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 3/3] datapath: lisp: Use skb rxhash for source port.

2013-11-20 Thread Thomas Graf
On 11/20/2013 10:14 AM, Jesse Gross wrote: On Wed, Nov 20, 2013 at 1:08 AM, Thomas Graf wrote: On 11/19/2013 10:50 PM, Pravin B Shelar wrote: Rather than using complete flow hash, we can use skb->rxhash for calculating source port. Similar calculation is done by vxlan. Signed-off-by: Pra

Re: [ovs-dev] [PATCH 3/3] datapath: lisp: Use skb rxhash for source port.

2013-11-20 Thread Thomas Graf
On 11/21/2013 01:40 AM, Jesse Gross wrote: On Wed, Nov 20, 2013 at 1:43 AM, Thomas Graf wrote: On 11/20/2013 10:14 AM, Jesse Gross wrote: On Wed, Nov 20, 2013 at 1:08 AM, Thomas Graf wrote: I might be missing something but what about the rxhash == 0 case? VXLAN does: hash

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

2013-11-21 Thread Thomas Graf
On 11/21/13 at 06:23pm, Ben Hutchings wrote: > On Thu, 2013-11-21 at 19:13 +0100, Thomas Graf wrote: > > + > > +/** > > + * V2: > > This is not kernel-doc format so don't use '/**'. I was hoping kernel-doc would pick it up but it doesn't. I&#x

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

2013-11-21 Thread Thomas Graf
% vhost-5153 [k] skb_zerocopy (megaflows disabled) Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- net/openvswitch/datapath.c | 54 +++--- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/net/openvswitch/datapath.c b/net

[ovs-dev] [PATCH net-next 6/8] openvswitch: Allow update of dp with OVS_DP_CMD_NEW if NLM_F_REPLACE is set

2013-11-21 Thread Thomas Graf
Consolidates ovs_dp_cmd_new() and ovs_dp_cmd_set() to simplify handling and avoid code duplication. Allows user space to specify NLM_F_REPLACE with OVS_DP_CMD_NEW and overwrite the settings such as the user features of an existing datapath. Signed-off-by: Thomas Graf Reviewed-by: Daniel

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

2013-11-21 Thread 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-by: Thomas Graf

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

2013-11-21 Thread Thomas Graf
Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- include/uapi/linux/openvswitch.h | 4 net/openvswitch/datapath.c | 14 ++ net/openvswitch/datapath.h | 2 ++ 3 files changed, 20 insertions(+) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi

[ovs-dev] [PATCH net-next 0/8 v6] Open vSwitch upcall optimiziations

2013-11-21 Thread Thomas Graf
ist case - API documentation - performance data for CHECKSUM_PARTIAL tx case Thomas Graf (8): genl: Add genlmsg_new_unicast() for unicast message allocation netlink: Avoid netlink mmap alloc if msg size exceeds frame size openvswitch: Enable memory mapped Netlink i/o net: Export skb_zeroc

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

2013-11-21 Thread 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 --- include/linux/skbuff.h | 3 ++ net/core/skbuff.c| 85 net/netfilter

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

2013-11-21 Thread 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 --- net/netlink

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

2013-11-21 Thread Thomas Graf
cpy + 1.09% kpktgend_1 [k] memcpy + 1.04% kpktgend_3 [k] memcpy + 0.96% ovs-vswitchd [k] copy_user_generic_string Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- net/openvswitch/datapath.c | 56 -- 1 f

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

2013-11-21 Thread 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 Reviewed-by: Daniel Borkmann --- include/uapi/linux/openvswitch.h | 11 ++- net/openvswitch/datapath.c | 10

[ovs-dev] [PATCH openvswitch] linux: Signal datapath that unaligned Netlink message can be received

2013-11-21 Thread Thomas Graf
Following commit (''netlink: Do not enforce alignment of last Netlink attribute''), signal the ability to receive unaligned Netlink messages to the datapath to enable utilization of zerocopy optimizations. Signed-off-by: Thomas Graf --- include/linux/openvswitch.h | 15 +

[ovs-dev] [PATCH openvswitch] netlink: Implement & enable memory mapped netlink i/o

2013-11-21 Thread Thomas Graf
hus avoids copying. The functionality is enabled on sockets used for unicast traffic. Further optimizations are possible by avoiding the copy into the ofpbuf after reading. Cc: Cong Wang Signed-off-by: Thomas Graf --- AUTHORS| 1 + lib/dpif-linux.c | 6 +- lib/netd

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

2013-11-22 Thread 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 --- include/linux/skbuff.h | 3 ++ net/core/skbuff.c| 85 net/netfilter

[ovs-dev] [PATCH net-next 0/8 v7] Open vSwitch upcall optimiziations

2013-11-22 Thread Thomas Graf
tination buffer. This also takes care of the from->head_frag issue. - Attribute alignment for frag_list case - API documentation - performance data for CHECKSUM_PARTIAL tx case Thomas Graf (8): genl: Add genlmsg_new_unicast() for unicast message allocation netlink: Avoid netlink mm

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

2013-11-22 Thread 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-by: Thomas Graf

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

2013-11-22 Thread 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 --- net/netlink

[ovs-dev] [PATCH net-next 6/8] openvswitch: Allow update of dp with OVS_DP_CMD_NEW if NLM_F_REPLACE is set

2013-11-22 Thread Thomas Graf
Consolidates ovs_dp_cmd_new() and ovs_dp_cmd_set() to simplify handling and avoid code duplication. Allows user space to specify NLM_F_REPLACE with OVS_DP_CMD_NEW and overwrite the settings such as the user features of an existing datapath. Signed-off-by: Thomas Graf Reviewed-by: Daniel

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

2013-11-22 Thread Thomas Graf
Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- include/uapi/linux/openvswitch.h | 4 net/openvswitch/datapath.c | 14 ++ net/openvswitch/datapath.h | 2 ++ 3 files changed, 20 insertions(+) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi

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

2013-11-22 Thread 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 Reviewed-by: Daniel Borkmann --- include/uapi/linux/openvswitch.h | 10 +- net/openvswitch/datapath.c | 9

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

2013-11-22 Thread Thomas Graf
% vhost-5153 [k] skb_zerocopy (megaflows disabled) Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- net/openvswitch/datapath.c | 54 +++--- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/net/openvswitch/datapath.c b/net

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

2013-11-22 Thread Thomas Graf
cpy + 1.09% kpktgend_1 [k] memcpy + 1.04% kpktgend_3 [k] memcpy + 0.96% ovs-vswitchd [k] copy_user_generic_string Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- net/openvswitch/datapath.c | 56 -- 1 f

Re: [ovs-dev] [PATCH v2] datapath: rhel: Move RHEL OVS hook registration to netdev_rx_handler_register() backport

2013-11-22 Thread Thomas Graf
evice refcnt since netdev private data (dev1->ax25_ptr) is NULL. --- Therefore I have pushed his patch to branch-1.10. The following is also needed: commit 0d1d26db42b5d206ebb75cc6dc93507f4e5b6a8a Author: Chris Wright Date: Tue Aug 13 18:02:48 2013 -0700 On Tue, Jul 9, 2013 at 11:36

Re: [ovs-dev] [PATCH net-next 6/8] openvswitch: Allow update of dp with OVS_DP_CMD_NEW if NLM_F_REPLACE is set

2013-11-27 Thread Thomas Graf
On 11/25/13 at 01:23pm, Jesse Gross wrote: > On Fri, Nov 22, 2013 at 8:56 AM, Thomas Graf wrote: > > diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c > > index 95d4424..3f1fb87 100644 > > --- a/net/openvswitch/datapath.c > > +++ b/net/openvswitch/d

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

2013-11-27 Thread Thomas Graf
On 11/25/13 at 03:40pm, Jesse Gross wrote: > On Fri, Nov 22, 2013 at 8:56 AM, Thomas Graf wrote: > > diff --git a/include/uapi/linux/openvswitch.h > > b/include/uapi/linux/openvswitch.h > > index 07ef2c3..a6863e2 100644 > > --- a/include/uapi/linux/openvswitch.h &

Re: [ovs-dev] [PATCH openvswitch] linux: Signal datapath that unaligned Netlink message can be received

2013-11-27 Thread Thomas Graf
On 11/26/2013 12:41 AM, Jesse Gross wrote: On Thu, Nov 21, 2013 at 10:15 AM, Thomas Graf wrote: diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 1dcf321..5c952bc 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -232,6 +233,7 @@ dpif_linux_open(const struct dpif_class *class

Re: [ovs-dev] [PATCH openvswitch] netlink: Implement & enable memory mapped netlink i/o

2013-11-27 Thread Thomas Graf
On 11/26/2013 12:02 AM, Ben Pfaff wrote: On Thu, Nov 21, 2013 at 07:16:54PM +0100, Thomas Graf wrote: Based on the initial patch by Cong Wang posted a couple of months ago. This is the user space counterpart needed for the kernel patch '[PATCH net-next 3/8] openvswitch: Enable memory m

Re: [ovs-dev] [PATCH openvswitch] netlink: Implement & enable memory mapped netlink i/o

2013-11-28 Thread Thomas Graf
On 11/28/2013 08:24 PM, Ben Pfaff wrote: On Wed, Nov 27, 2013 at 11:51:20PM +0100, Thomas Graf wrote: On 11/26/2013 12:02 AM, Ben Pfaff wrote: On Thu, Nov 21, 2013 at 07:16:54PM +0100, Thomas Graf wrote: Based on the initial patch by Cong Wang posted a couple of months ago. This is the user

[ovs-dev] [net-next 1/7] genl: Add genlmsg_new_unicast() for unicast message allocation

2013-11-30 Thread 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-by: Thomas Graf

[ovs-dev] [net-next 2/7] netlink: Avoid netlink mmap alloc if msg size exceeds frame size

2013-11-30 Thread 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 --- net/netlink

[ovs-dev] [net-next 4/7] net: Export skb_zerocopy() to zerocopy from one skb to another

2013-11-30 Thread 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 --- include/linux/skbuff.h | 3 ++ net/core/skbuff.c| 85 net/netfilter

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

2013-11-30 Thread Thomas Graf
% vhost-5153 [k] skb_zerocopy (megaflows disabled) Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- net/openvswitch/datapath.c | 54 +++--- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/net/openvswitch/datapath.c b/net

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

2013-11-30 Thread 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 Reviewed-by: Daniel Borkmann --- include/uapi/linux/openvswitch.h | 10 +- net/openvswitch/datapath.c | 21

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

2013-11-30 Thread Thomas Graf
Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- include/uapi/linux/openvswitch.h | 4 net/openvswitch/datapath.c | 14 ++ net/openvswitch/datapath.h | 2 ++ 3 files changed, 20 insertions(+) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi

[ovs-dev] [PATCH net-next 0/8 v8] Open vSwitch upcall optimiziations

2013-11-30 Thread Thomas Graf
g_list case - API documentation - performance data for CHECKSUM_PARTIAL tx case Thomas Graf (7): genl: Add genlmsg_new_unicast() for unicast message allocation netlink: Avoid netlink mmap alloc if msg size exceeds frame size openvswitch: Enable memory mapped Netlink i/o net: Exp

[ovs-dev] [net-next 3/7] openvswitch: Enable memory mapped Netlink i/o

2013-11-30 Thread Thomas Graf
cpy + 1.09% kpktgend_1 [k] memcpy + 1.04% kpktgend_3 [k] memcpy + 0.96% ovs-vswitchd [k] copy_user_generic_string Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- net/openvswitch/datapath.c | 56 -- 1 f

[ovs-dev] [PATCH v2] linux: Signal datapath that unaligned Netlink message can be received

2013-11-30 Thread Thomas Graf
Following commit (''netlink: Do not enforce alignment of last Netlink attribute''), signal the ability to receive unaligned Netlink messages to the datapath to enable utilization of zerocopy optimizations. Signed-off-by: Thomas Graf --- V2: - Only provide OVS_DP_A

[ovs-dev] [PATCH openvswitch v2] netlink: Implement & enable memory mapped netlink i/o

2013-11-30 Thread Thomas Graf
hus avoids copying. The functionality is enabled on sockets used for unicast traffic. Further optimizations are possible by avoiding the copy into the ofpbuf after reading. Signed-off-by: Thomas Graf --- V2: - Provide required definitions in netlink-protocol.h if does not contain them.

Re: [ovs-dev] [net-next 3/7] openvswitch: Enable memory mapped Netlink i/o

2013-11-30 Thread Thomas Graf
On 11/30/13 at 01:35pm, Florian Westphal wrote: > Thomas Graf wrote: > > Benchmark > > * pktgen -> ovs internal port > > * 5M pkts, 5M flows > > * 4 threads, 8 cores > > > > Before: > > Result: OK: 67418743(c67108212+d310530) usec, 500

Re: [ovs-dev] [PATCH openvswitch v2] netlink: Implement & enable memory mapped netlink i/o

2013-12-02 Thread Thomas Graf
On 12/02/2013 10:23 PM, Ben Pfaff wrote: On Sat, Nov 30, 2013 at 01:27:33PM +0100, Thomas Graf wrote: Based on the initial patch by Cong Wang posted a couple of months ago. This is the user space counterpart needed for the kernel patch '[PATCH net-next 3/8] openvswitch: Enable memory m

Re: [ovs-dev] [PATCH] datapath: Silence RCU lockdep checks from flow lookup.

2013-12-03 Thread Thomas Graf
Gross Reviewed-by: Thomas Graf ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH openvswitch v3] netlink: Implement & enable memory mapped netlink i/o

2013-12-03 Thread Thomas Graf
hus avoids copying. The functionality is enabled on sockets used for unicast traffic. Further optimizations are possible by avoiding the copy into the ofpbuf after reading. Signed-off-by: Thomas Graf --- V3: - Provide __ALIGN_KERNEL in case is not available - Silence Clang alignment problem fals

Re: [ovs-dev] 答复: [PATCH openvswitch v3] netlink: Implement & enable memory mapped netlink i/o

2013-12-04 Thread Thomas Graf
On 12/04/2013 02:54 AM, Zhuangyuxin wrote: > In this patch, each frame takes 16k mem. For sockets used for upcall, does it > make more sense to calculate frame size based on MTU of the netdev on the > port? I assume you mean max(MTU) over all ports? We would have to replace the ring after each M

Re: [ovs-dev] [PATCH openvswitch v3] netlink: Implement & enable memory mapped netlink i/o

2013-12-04 Thread Thomas Graf
On 12/04/2013 05:33 PM, Ben Pfaff wrote: If I'm doing the calculations correctly, this mmaps 8 MB per ring-based Netlink socket on a system with 4 kB pages. OVS currently creates one Netlink socket for each datapath port. With 1000 ports (a moderate number; we sometimes test with more), that is

Re: [ovs-dev] [PATCH openvswitch v3] netlink: Implement & enable memory mapped netlink i/o

2013-12-04 Thread Thomas Graf
On 12/04/2013 07:08 PM, Ben Pfaff wrote: On Wed, Dec 04, 2013 at 06:20:53PM +0100, Thomas Graf wrote: How about we limit the number of mmaped sockets to a configurable maximum that defaults to 16 or 32? Maybe you mean that we should only mmap some of the sockets that we create. If so, this

Re: [ovs-dev] [net-next 7/7] openvswitch: Use skb_zerocopy() for upcall

2013-12-05 Thread Thomas Graf
On 12/03/13 at 09:43pm, Jesse Gross wrote: Thanks for merging a first set of patches > On Sat, Nov 30, 2013 at 4:21 AM, Thomas Graf wrote: > > diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c > > index 8eaa39a..867edf1 100644 > > --- a/net/openvswitch

Re: [ovs-dev] [PATCH openvswitch v3] netlink: Implement & enable memory mapped netlink i/o

2013-12-05 Thread Thomas Graf
On 12/04/2013 11:20 PM, Jesse Gross wrote: If enabling rings on demand can be done cleanly that might be best solution. To me, it seems difficult to generalize the upcall characteristics based on port type. It would require to reopen sockets but I don't see that as a major obstacle. 16K ports

Re: [ovs-dev] [PATCH net-next] net: ovs: use CRC32 accelerated flow hash if available

2013-12-10 Thread Thomas Graf
On 12/10/2013 08:36 PM, David Miller wrote: From: Jesse Gross Date: Tue, 10 Dec 2013 11:28:08 -0800 I think this is definitely a good optimization to do given that so much of the work that OVS does is hashing. However, isn't there a library where there would be a more appropriate place to put

[ovs-dev] [PATCH net-next 0/6 v9] Open vSwitch zercopy upcall optimiziation

2013-12-13 Thread Thomas Graf
Series implementing a zerocopy method for OVS upcall messages. Based on top of commit: (''openvswitch: Enable memory mapped Netlink i/o'') Thomas Graf (6): net: Export skb_zerocopy() to zerocopy from one skb to another openvswitch: Allow user space to announce ability

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

2013-12-13 Thread 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 --- include/uapi/linux/openvswitch.h | 10 +- net/openvswitch/datapath.c | 21 + 2 files

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

2013-12-13 Thread 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 --- net/openvswitch/datapath.c | 2 +- 1 file changed, 1 insertion(+

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

2013-12-13 Thread Thomas Graf
Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- include/uapi/linux/openvswitch.h | 4 net/openvswitch/datapath.c | 14 ++ net/openvswitch/datapath.h | 2 ++ 3 files changed, 20 insertions(+) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi

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

2013-12-13 Thread Thomas Graf
% vhost-5153 [k] memcpy + 0.68% vhost-5153 [k] skb_zerocopy (megaflows disabled) Signed-off-by: Thomas Graf --- net/openvswitch/datapath.c | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch

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

2013-12-13 Thread Thomas Graf
Allows removing the net and dp_ifindex argument and simplify the code. Signed-off-by: Thomas Graf --- net/openvswitch/datapath.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index

<    5   6   7   8   9   10   11   >