Re: [ovs-dev] [PATCH net-next 14/22] vxlan: Flow based tunneling

2015-07-21 Thread Alexei Starovoitov
On 7/21/15 1:43 AM, Thomas Graf wrote: This prepares the VXLAN device to be steered by the routing and other subsystems which allows to support encapsulation for a large number of tunnel endpoints and tunnel ids through a single net_device which improves the scalability. +1. looks very useful.

Re: [ovs-dev] [PATCH net-next 14/22] vxlan: Flow based tunneling

2015-07-17 Thread Alexei Starovoitov
On 7/17/15 5:55 AM, Thomas Graf wrote: @@ -2373,6 +2470,12 @@ static void vxlan_setup(struct net_device *dev) netif_keep_dst(dev); dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; + /* If in flow based mode, keep the dst including encapsulation +* instructions for vxlan_xmi

Re: [ovs-dev] [RFC: add openvswitch actions using BPF 2/2] openvswitch: implements the BPF_PROG action in datapath

2015-02-05 Thread Alexei Starovoitov
On Thu, Feb 5, 2015 at 11:34 AM, Andy Zhou wrote: >> >> I think it should be doable with BPF to have the verifier accept if >> a helper is called with less args than expected, to initialize those >> to 0. This would allow for helpers to support additional arguments. > I am not sure it is fundament

Re: [ovs-dev] [RFC: add openvswitch actions using BPF 5/9] bpf: add the first BPF program.

2015-02-05 Thread Alexei Starovoitov
On Thu, Feb 5, 2015 at 11:16 AM, Andy Zhou wrote: >>> +bpf/ovs-actions.bpf: $(srcdir)/bpf/ovs-actions.c $(DEP_FILES) >>> + $(AM_V_GEN)clang -DHAVE_CONFIG_H $(BPF_INCLUDES) $(NOSTDINC_FLAGS) \ >>> + $(AM_CFLAGS) $(EXTRA_CFLAGS) -Wno-unused-value >>> -Wno-pointer-sign \ >>> +

Re: [ovs-dev] [RFC: add openvswitch actions using BPF 1/2] BPF: add a new BPF program type BPF_PROG_TYPE_OPENVSWITCH

2015-02-05 Thread Alexei Starovoitov
On Thu, Feb 5, 2015 at 11:47 AM, Andy Zhou wrote: > On Thu, Feb 5, 2015 at 6:48 AM, Thomas Graf wrote: >> On 02/04/15 at 02:48pm, Andy Zhou wrote: >>> struct bpf_verifier_ops { >>> /* return eBPF function prototype for verification */ >>> - const struct bpf_func_proto *(*get_func_proto

Re: [ovs-dev] [PATCH 2/6] vxlan: Group Policy extension

2015-01-09 Thread Alexei Starovoitov
On Thu, Jan 8, 2015 at 2:47 PM, Thomas Graf wrote: > + > +struct vxlan_gbp { > +} __packed; empty struct ? seems unused. looks good to me otherwise. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 2/6] vxlan: Group Policy extension

2015-01-07 Thread Alexei Starovoitov
On Wed, Jan 7, 2015 at 3:27 PM, Thomas Graf wrote: > > Would you like something like this? yes. imo this version is much easier to read and reason about different bits in protocol. May be even use a flag mask on '__be32 vx_flags' instead of calling out 'gbp_present' as explicit bitfield. Then di

Re: [ovs-dev] [PATCH 2/6] vxlan: Group Policy extension

2015-01-07 Thread Alexei Starovoitov
On Wed, Jan 7, 2015 at 3:10 AM, Thomas Graf wrote: > On 01/06/15 at 07:37pm, Alexei Starovoitov wrote: >> Even it works ok, I think this struct layout is ugly. >> imo would be much easier to read if you replace >> the whole vxlanhdr with vxlanhdr_gbp >> or split vxlan

Re: [ovs-dev] [PATCH 2/6] vxlan: Group Policy extension

2015-01-06 Thread Alexei Starovoitov
On Tue, Jan 6, 2015 at 6:05 PM, Thomas Graf wrote: > +struct vxlan_gbp { > +#ifdef __LITTLE_ENDIAN_BITFIELD > + __u8reserved_flags1:3, ... > + __be16 policy_id; > +} __packed; are you sure that compiler will be smart enough to do single short load when you pack u8 + struct vxlan_g

Re: [ovs-dev] [PATCH] ovs: Turn vports with dependencies into separate modules

2014-10-28 Thread Alexei Starovoitov
On Tue, Oct 28, 2014 at 2:27 PM, David Miller wrote: >> >> it fails the build when lockdep is on: >> ERROR: "lockdep_ovsl_is_held" [net/openvswitch/vport-gre.ko] undefined! > > I've fixed it thusly: thanks! that was quick. the fix looks good. ___ dev ma

Re: [ovs-dev] [PATCH] ovs: Turn vports with dependencies into separate modules

2014-10-28 Thread Alexei Starovoitov
On Tue, Oct 28, 2014 at 11:43 AM, David Miller wrote: > From: Thomas Graf > Date: Wed, 22 Oct 2014 17:29:06 +0200 > >> The internal and netdev vport remain part of openvswitch.ko. Encap >> vports including vxlan, gre, and geneve can be built as separate >> modules and are loaded on demand. Module

Re: [ovs-dev] [patch net-next v2 8/9] switchdev: introduce Netlink API

2014-09-22 Thread Alexei Starovoitov
On Mon, Sep 22, 2014 at 7:16 PM, Tom Herbert wrote: > On Mon, Sep 22, 2014 at 6:54 PM, Alexei Starovoitov > wrote: >> On Mon, Sep 22, 2014 at 8:10 AM, Tom Herbert wrote: >>> On Mon, Sep 22, 2014 at 1:13 AM, Thomas Graf wrote: >>>> On 09/20/14 at 03:50pm, Alexei

Re: [ovs-dev] [patch net-next v2 8/9] switchdev: introduce Netlink API

2014-09-22 Thread Alexei Starovoitov
On Mon, Sep 22, 2014 at 8:10 AM, Tom Herbert wrote: > On Mon, Sep 22, 2014 at 1:13 AM, Thomas Graf wrote: >> On 09/20/14 at 03:50pm, Alexei Starovoitov wrote: >>> I think HW should not be limited by SW abstractions whether >>> these abstractions are called flow

Re: [ovs-dev] [patch net-next v2 8/9] switchdev: introduce Netlink API

2014-09-20 Thread Alexei Starovoitov
On Sat, Sep 20, 2014 at 3:53 AM, Thomas Graf wrote: > On 09/20/14 at 10:14am, Jiri Pirko wrote: >> Sat, Sep 20, 2014 at 12:12:12AM CEST, john.r.fastab...@intel.com wrote: >> >I was considering a slightly different approach where the >> >device would report via netlink the fields/actions it >> >sup

Re: [ovs-dev] [patch net-next 00/13] introduce rocker switch driver with openvswitch hardware accelerated datapath

2014-09-09 Thread Alexei Starovoitov
On Mon, Sep 08, 2014 at 02:54:13PM +0100, Thomas Graf wrote: > On 09/03/14 at 11:24am, Jiri Pirko wrote: > > 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 > >

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

2014-08-26 Thread Alexei Starovoitov
On Tue, Aug 26, 2014 at 9:19 AM, Thomas Graf wrote: > > Wait... I don't want to use OpenFlow to configure my laptop ;-) +1 > We should leave the controller out of this discussion though. A > controller is not required to run OVS at all. OpenStack Neutron > is a very good example for that. There

Re: [ovs-dev] [patch net-next RFC v2 2/6] skbuff: add "missed_flow" flag

2014-03-26 Thread Alexei Starovoitov
On Wed, Mar 26, 2014 at 9:31 AM, Jiri Pirko wrote: > This flag sets incoming switch device in order to let know that the flow > which the skb is part of is missed. Listener may react to it > appropriately, > > Signed-off-by: Jiri Pirko > --- > include/linux/filter.h | 1 + > include/linux/skbuf

Re: [ovs-dev] [PATCH] datapath: Optimize datapath struct for cacheline access.

2013-10-29 Thread Alexei Starovoitov
On Tue, Oct 29, 2013 at 5:56 PM, Jesse Gross wrote: > On Tue, Oct 29, 2013 at 3:57 PM, Alexei Starovoitov > wrote: >> On Tue, Oct 29, 2013 at 3:00 PM, Jesse Gross wrote: >>> On Tue, Oct 29, 2013 at 11:19 AM, Alexei Starovoitov >>> wrote: >>>> On Tu

Re: [ovs-dev] [PATCH] datapath: Optimize datapath struct for cacheline access.

2013-10-29 Thread Alexei Starovoitov
On Tue, Oct 29, 2013 at 3:00 PM, Jesse Gross wrote: > On Tue, Oct 29, 2013 at 11:19 AM, Alexei Starovoitov > wrote: >> On Tue, Oct 29, 2013 at 11:15 AM, Pravin Shelar wrote: >>> On Tue, Oct 29, 2013 at 10:24 AM, Andy Zhou wrote: >>>> This is not a review, but

Re: [ovs-dev] [PATCH] datapath: Optimize datapath struct for cacheline access.

2013-10-29 Thread Alexei Starovoitov
On Tue, Oct 29, 2013 at 11:15 AM, Pravin Shelar wrote: > On Tue, Oct 29, 2013 at 10:24 AM, Andy Zhou wrote: >> This is not a review, but it would be nice to add some code comments in >> proper data structure layout, so that the same logic can be followed in the >> future. >> > ok, I will add gene

[ovs-dev] [PATCH v4 net-next] openvswitch: fix vport-netdev unregister

2013-10-15 Thread Alexei Starovoitov
ill cause hang on missing dev_put. With this patch OVS will detach dev upon receiving netns move event. Signed-off-by: Alexei Starovoitov --- net/openvswitch/dp_notify.c|7 +-- net/openvswitch/vport-netdev.c | 16 +--- net/openvswitch/vport-netdev.h |1 + 3 files ch

Re: [ovs-dev] [PATCH v3 net-next] openvswitch: fix vport-netdev unregister

2013-10-15 Thread Alexei Starovoitov
On Tue, Oct 15, 2013 at 9:53 AM, Alexei Starovoitov wrote: > On Tue, Oct 15, 2013 at 8:31 AM, Jesse Gross wrote: >> On Sun, Oct 13, 2013 at 8:50 PM, Alexei Starovoitov >> wrote: >>> diff --git a/net/openvswitch/dp_notify.c b/net/openvswitch/dp_notify.c >>&

Re: [ovs-dev] [PATCH v3 net-next] openvswitch: fix vport-netdev unregister

2013-10-15 Thread Alexei Starovoitov
On Tue, Oct 15, 2013 at 8:31 AM, Jesse Gross wrote: > On Sun, Oct 13, 2013 at 8:50 PM, Alexei Starovoitov wrote: >> diff --git a/net/openvswitch/dp_notify.c b/net/openvswitch/dp_notify.c >> index c323567..ffa429a 100644 >> --- a/net/openvswitch/dp_notify.c >> +++ b/

[ovs-dev] [PATCH v3 net-next] openvswitch: fix vport-netdev unregister

2013-10-13 Thread Alexei Starovoitov
ill cause hang on missing dev_put. With this patch OVS will detach dev upon receiving netns move event. Signed-off-by: Alexei Starovoitov --- net/openvswitch/dp_notify.c| 12 +--- net/openvswitch/vport-netdev.c | 16 +--- net/openvswitch/vport-netdev.h |1 + 3

Re: [ovs-dev] [PATCH v2 net-next] openvswitch: fix vport-netdev unregister

2013-10-13 Thread Alexei Starovoitov
On Sun, Oct 13, 2013 at 2:22 PM, Cong Wang wrote: > On Sat, 12 Oct 2013 at 01:12 GMT, Alexei Starovoitov > wrote: >> @@ -87,7 +81,11 @@ static int dp_device_event(struct notifier_block *unused, >> unsigned long event, >> if (!vport) >> retu

[ovs-dev] [PATCH v2 net-next] openvswitch: fix vport-netdev unregister

2013-10-11 Thread Alexei Starovoitov
ill cause hang on missing dev_put. With this patch OVS will detach dev upon receiving netns move event. Signed-off-by: Alexei Starovoitov --- net/openvswitch/dp_notify.c| 14 ++ net/openvswitch/vport-netdev.c | 16 +--- net/openvswitch/vport-netdev.h |1 + 3

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-11 Thread Alexei Starovoitov
On Fri, Oct 11, 2013 at 3:02 PM, Jesse Gross wrote: > On Fri, Oct 11, 2013 at 1:03 PM, Alexei Starovoitov wrote: >> On Fri, Oct 11, 2013 at 11:11 AM, Jesse Gross wrote: >>> On Thu, Oct 10, 2013 at 9:48 PM, Alexei Starovoitov >>> wrote: >>>> On Thu, Oct

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-11 Thread Alexei Starovoitov
On Fri, Oct 11, 2013 at 11:11 AM, Jesse Gross wrote: > On Thu, Oct 10, 2013 at 9:48 PM, Alexei Starovoitov wrote: >> On Thu, Oct 10, 2013 at 8:56 PM, Jesse Gross wrote: >>> However, the check dev->reg_state in netdev_destroy() looks racy to >>> me, as it could alr

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-10 Thread Alexei Starovoitov
On Thu, Oct 10, 2013 at 8:56 PM, Jesse Gross wrote: > On Thu, Oct 10, 2013 at 5:47 PM, Alexei Starovoitov wrote: >> On Thu, Oct 10, 2013 at 3:38 PM, Pravin Shelar wrote: >>> On Thu, Oct 10, 2013 at 1:48 PM, Alexei Starovoitov >>> wrote: >>>> On Thu,

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-10 Thread Alexei Starovoitov
On Thu, Oct 10, 2013 at 3:38 PM, Pravin Shelar wrote: > On Thu, Oct 10, 2013 at 1:48 PM, Alexei Starovoitov wrote: >> On Thu, Oct 10, 2013 at 11:21 AM, Pravin Shelar wrote: >>> On Wed, Oct 9, 2013 at 11:26 PM, Alexei Starovoitov >>> wrote: >>>> On Wed,

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-10 Thread Alexei Starovoitov
On Thu, Oct 10, 2013 at 11:21 AM, Pravin Shelar wrote: > On Wed, Oct 9, 2013 at 11:26 PM, Alexei Starovoitov wrote: >> On Wed, Oct 9, 2013 at 11:07 PM, Pravin Shelar wrote: >>> On Wed, Oct 9, 2013 at 9:11 PM, Alexei Starovoitov >>> wrote: >>>> On Wed

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-09 Thread Alexei Starovoitov
On Wed, Oct 9, 2013 at 11:07 PM, Pravin Shelar wrote: > On Wed, Oct 9, 2013 at 9:11 PM, Alexei Starovoitov wrote: >> On Wed, Oct 9, 2013 at 8:02 PM, Pravin Shelar wrote: >>> On Tue, Oct 8, 2013 at 8:07 PM, Alexei Starovoitov >>> wrote: >>>> The comb

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-09 Thread Alexei Starovoitov
On Wed, Oct 9, 2013 at 8:02 PM, Pravin Shelar wrote: > On Tue, Oct 8, 2013 at 8:07 PM, Alexei Starovoitov wrote: >> The combination of two commits >> >> commit 8e4e1713e4 >> ("openvswitch: Simplify datapath locking.") >> >> and >> >&g

[ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-08 Thread Alexei Starovoitov
2e156ffd ]--- [ 62.769724] device tap1 left promiscuous mode Signed-off-by: Alexei Starovoitov --- net/openvswitch/dp_notify.c|5 + net/openvswitch/vport-netdev.c | 16 +--- net/openvswitch/vport-netdev.h |1 + 3 files changed, 19 insertions(+), 3 deletions(-) d

Re: [ovs-dev] [RFC PATCH v2 net-next 0/2] BPF and OVS extensions

2013-09-17 Thread Alexei Starovoitov
On Tue, Sep 17, 2013 at 1:40 AM, David Laight wrote: > > > Patch 1/2: generic BPF extension > > Original A and X 32-bit BPF registers are replaced with ten 64-bit > > registers. > > bpf opcode encoding kept the same. load/store were generalized to access > > stack, > > bpf_tables and bpf_context

[ovs-dev] [RFC PATCH v2 net-next 0/2] BPF and OVS extensions

2013-09-16 Thread Alexei Starovoitov
needs. Patch 2/2: extends OVS with network functions that use BPF as execution engine BPF backend for GCC is available at: https://github.com/iovisor/bpf_gcc Distributed bridge demo written in BPF: https://github.com/iovisor/iovisor Alexei Starovoitov (2): extended BPF extend OVS to use BPF