Re: [PATCH 2/2] openvswitch: Add eventmask support to CT action.

2017-04-21 Thread Jarno Rajahalme
Thanks Joe, I’ll issue a v2 with the comment fix and retain the acks, so it should be good to go. Jarno > On Apr 20, 2017, at 11:53 AM, Joe Stringer wrote: > > On 19 April 2017 at 18:49, Jarno Rajahalme wrote: >> Add a new optional conntrack action attribute OVS_CT_ATTR_EVEN

[PATCH net-next v2 2/2] openvswitch: Add eventmask support to CT action.

2017-04-21 Thread Jarno Rajahalme
. However, if the system is configured without support for events, the setting will be skipped due to extension not being found. Signed-off-by: Jarno Rajahalme Reviewed-by: Greg Rose Acked-by: Joe Stringer --- include/uapi/linux/openvswitch.h | 12 net/openvswitch/conntrack.c

[PATCH net-next v2 1/2] openvswitch: Typo fix.

2017-04-21 Thread Jarno Rajahalme
Fix typo in a comment. Signed-off-by: Jarno Rajahalme Acked-by: Greg Rose --- net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 7b2c2fc..58de4c2 100644 --- a/net/openvswitch

Re: [PATCH 1/2] openvswitch: Typo fix.

2017-04-19 Thread Jarno Rajahalme
Sorry for the chatter, forgot to include “net-next” in the title, sending again. Jarno > On Apr 19, 2017, at 6:49 PM, Jarno Rajahalme wrote: > > Fix typo in a comment. > > Signed-off-by: Jarno Rajahalme > --- > net/openvswitch/conntrack.c | 2 +- > 1 file changed, 1

[PATCH net-next 1/2] openvswitch: Typo fix.

2017-04-19 Thread Jarno Rajahalme
Fix typo in a comment. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 7b2c2fc..58de4c2 100644 --- a/net/openvswitch/conntrack.c +++ b/net

[PATCH 2/2] openvswitch: Add eventmask support to CT action.

2017-04-19 Thread Jarno Rajahalme
. However, if the system is configured without support for events, the setting will be skipped due to extension not being found. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/openvswitch.h | 12 net/openvswitch/conntrack.c | 27 +++ 2 files changed

[PATCH 1/2] openvswitch: Typo fix.

2017-04-19 Thread Jarno Rajahalme
Fix typo in a comment. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 7b2c2fc..58de4c2 100644 --- a/net/openvswitch/conntrack.c +++ b/net

[PATCH net-next 2/2] openvswitch: Add eventmask support to CT action.

2017-04-19 Thread Jarno Rajahalme
. However, if the system is configured without support for events, the setting will be skipped due to extension not being found. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/openvswitch.h | 12 net/openvswitch/conntrack.c | 27 +++ 2 files changed

[PATCH net] openvswitch: Fix refcount leak on force commit.

2017-03-28 Thread Jarno Rajahalme
ker_thread (a008592b) => kthread (a008bee2) => ret_from_fork (a071b67c) Fixes: dd41d33f0b03 ("openvswitch: Add force commit.") Reported-by: Yang Song Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[PATCH net-next 2/2] netfilter: nf_ct_expect: Change __nf_ct_expect_check() return value.

2017-02-21 Thread Jarno Rajahalme
turn value of __nf_ct_expect_check() to 0 on success. Signed-off-by: Jarno Rajahalme --- net/netfilter/nf_conntrack_expect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index d6ace69..4b2e1fb 10

[PATCH net-next 1/2] netfilter: nf_ct_expect: nf_ct_expect_related_report(): Return zero on success,

2017-02-21 Thread Jarno Rajahalme
he success code path. Fixes: 4dee62b1 ("netfilter: nf_ct_expect: nf_ct_expect_insert() returns void") Signed-off-by: Jarno Rajahalme --- net/netfilter/nf_conntrack_expect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_conntrack_expec

[PATCH net-next] openvswitch: Set event bit after initializing labels.

2017-02-17 Thread Jarno Rajahalme
conntrack events. Fixes: 193e30967897 ("openvswitch: Do not trigger events for unconfirmed connections.") Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net/openvswitch/conntrack.c b/net/o

[PATCH net-next] openvswitch: Set internal device max mtu to ETH_MAX_MTU.

2017-02-14 Thread Jarno Rajahalme
This patch fixes this by setting max_mtu to ETH_MAX_MTU after ether_setup() call. Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra") Signed-off-by: Jarno Rajahalme --- net/openvswitch/vport-internal_dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/n

Re: [PATCH v3 net-next 00/10] openvswitch: Conntrack integration improvements.

2017-02-09 Thread Jarno Rajahalme
> On Feb 9, 2017, at 8:44 AM, Pravin Shelar wrote: > > On Wed, Feb 8, 2017 at 5:30 PM, Jarno Rajahalme wrote: >> This series improves the conntrack integration code in the openvswitch >> module by fixing outdated comments (patch 1), bugs (patches 2, 3, and >> 7), cl

Re: [PATCH v2 net-next 3/9] openvswitch: Simplify labels length logic.

2017-02-09 Thread Jarno Rajahalme
> On Feb 8, 2017, at 2:47 PM, Joe Stringer wrote: > > On 8 February 2017 at 11:32, Jarno Rajahalme wrote: >> Since 23014011ba42 ("netfilter: conntrack: support a fixed size of 128 >> distinct labels"), the size of conntrack labels extension has fixed to >>

Re: [PATCH v2 net-next 8/9] openvswitch: Add force commit.

2017-02-09 Thread Jarno Rajahalme
> On Feb 8, 2017, at 3:53 PM, Joe Stringer wrote: > > On 8 February 2017 at 11:32, Jarno Rajahalme wrote: >> Stateful network admission policy may allow connections to one >> direction and reject connections initiated in the other direction. >> After policy change it

[PATCH v4 net-next 05/10] openvswitch: Simplify labels length logic.

2017-02-09 Thread Jarno Rajahalme
allows the conntrack labels size to be increased in the future without breaking the build. In the event of conntrack labels increasing in size OVS would still be able to deal with the 128 first label bits. Suggested-by: Joe Stringer Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar

[PATCH v4 net-next 01/10] openvswitch: Fix comments for skb->_nfct

2017-02-09 Thread Jarno Rajahalme
Fix comments referring to skb 'nfct' and 'nfctinfo' fields now that they are combined into '_nfct'. Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar --- net/openvswitch/conntrack.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-)

[PATCH v4 net-next 04/10] openvswitch: Unionize ovs_key_ct_label with a u32 array.

2017-02-09 Thread Jarno Rajahalme
Make the array of labels in struct ovs_key_ct_label an union, adding a u32 array of the same byte size as the existing u8 array. It is faster to loop through the labels 32 bits at the time, which is also the alignment of netlink attributes. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer

[PATCH v4 net-next 08/10] openvswitch: Add original direction conntrack tuple to sw_flow_key.

2017-02-09 Thread Jarno Rajahalme
we must be careful to never use the new key fields with ARP or ND packets. ARP is easy to distinguish and keep mutually exclusive based on the ethernet type, but ND being an ICMPv6 protocol requires a bit more attention. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Pravi

[PATCH v4 net-next 10/10] openvswitch: Pack struct sw_flow_key.

2017-02-09 Thread Jarno Rajahalme
struct sw_flow_key has two 16-bit holes. Move the most matched conntrack match fields there. In some typical cases this reduces the size of the key that needs to be hashed into half and into one cache line. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Pravin B Shelar

[PATCH v4 net-next 03/10] openvswitch: Do not trigger events for unconfirmed connections.

2017-02-09 Thread Jarno Rajahalme
ck mark") Fixes: c2ac66735870 ("openvswitch: Allow matching on conntrack label") Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Pravin B Shelar --- net/openvswitch/conntrack.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-)

[PATCH v4 net-next 00/10] openvswitch: Conntrack integration improvements.

2017-02-09 Thread Jarno Rajahalme
Joe. v3: Rebase to the current net-next, add the comment only changing patch 1 and reshuffle some of the patches as requested by Joe. Jarno Rajahalme (10): openvswitch: Fix comments for skb->_nfct openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted. openvswitch: Do

[PATCH v4 net-next 06/10] openvswitch: Refactor labels initialization.

2017-02-09 Thread Jarno Rajahalme
Refactoring conntrack labels initialization makes changes in later patches easier to review. Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar --- net/openvswitch/conntrack.c | 104 ++-- 1 file changed, 62 insertions(+), 42 deletions(-) diff

[PATCH v4 net-next 07/10] openvswitch: Inherit master's labels.

2017-02-09 Thread Jarno Rajahalme
32 bits in the connmark are not enough. Labels can still be set explicitly, so this change only affects the default values of the labels in presense of a master connection. Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar

[PATCH v4 net-next 09/10] openvswitch: Add force commit.

2017-02-09 Thread Jarno Rajahalme
rent packet, the existing conntrack entry is deleted and a new one is subsequently created in the correct direction. Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar --- include/uapi/linux/openvswitch.h | 5 + net/openvswitch/conntrack.c | 26 -- 2 files cha

[PATCH v4 net-next 02/10] openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted.

2017-02-09 Thread Jarno Rajahalme
from its input form as evidenced by one of the NAT flags being set in the conntrack state metadata. Fixes: 05752523e565 ("openvswitch: Interface with NAT.") Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Pravin B Shelar --- net/openvswitch/conntr

Re: [PATCH v2 net-next 5/9] openvswitch: Refactor labels initialization.

2017-02-09 Thread Jarno Rajahalme
> On Feb 8, 2017, at 3:06 PM, Joe Stringer wrote: > > On 8 February 2017 at 11:32, Jarno Rajahalme wrote: >> Refactoring conntrack labels initialization makes chenges in later > > *changes > >> patches easier to review. >> >> Signed-off

Re: [PATCH v2 net-next 6/9] openvswitch: Inherit master's labels.

2017-02-09 Thread Jarno Rajahalme
> On Feb 8, 2017, at 3:25 PM, Joe Stringer wrote: > > On 8 February 2017 at 11:32, Jarno Rajahalme wrote: >> We avoid calling into nf_conntrack_in() for expected connections, as >> that would remove the expectation that we want to stick around until >> we are rea

[PATCH v3 net-next 10/10] openvswitch: Pack struct sw_flow_key.

2017-02-08 Thread Jarno Rajahalme
struct sw_flow_key has two 16-bit holes. Move the most matched conntrack match fields there. In some typical cases this reduces the size of the key that needs to be hashed into half and into one cache line. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c| 40

[PATCH v3 net-next 07/10] openvswitch: Inherit master's labels.

2017-02-08 Thread Jarno Rajahalme
32 bits in the connmark are not enough. Labels can still be set explicitly, so this change only affects the default values of the labels in presense of a master connection. Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") Signed-off-by: Jarno Rajahalme --- net/openvswi

[PATCH v3 net-next 04/10] openvswitch: Unionize ovs_key_ct_label with a u32 array.

2017-02-08 Thread Jarno Rajahalme
Make the array of labels in struct ovs_key_ct_label an union, adding a u32 array of the same byte size as the existing u8 array. It is faster to loop through the labels 32 bits at the time, which is also the alignment of netlink attributes. Signed-off-by: Jarno Rajahalme --- include/uapi/linux

[PATCH v3 net-next 01/10] openvswitch: Fix comments for skb->_nfct

2017-02-08 Thread Jarno Rajahalme
Fix comments referring to skb 'nfct' and 'nfctinfo' fields now that they are combined into '_nfct'. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/openvswitch

[PATCH v3 net-next 05/10] openvswitch: Simplify labels length logic.

2017-02-08 Thread Jarno Rajahalme
allows the conntrack labels size to be increased in the future without breaking the build. In the event of conntrack labels increasing in size OVS would still be able to deal with the 128 first label bits. Suggested-by: Joe Stringer Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntr

[PATCH v3 net-next 00/10] openvswitch: Conntrack integration improvements.

2017-02-08 Thread Jarno Rajahalme
policy to network configuration requested by user communities (patches 8 and 9). v3: Rebase to the current net-next, add the comment only changing patch 1 and reshuffle some of the patches as requested by Joe. Jarno Rajahalme (10): openvswitch: Fix comments for skb->_nfct openvswitch:

[PATCH v3 net-next 06/10] openvswitch: Refactor labels initialization.

2017-02-08 Thread Jarno Rajahalme
Refactoring conntrack labels initialization makes chenges in later patches easier to review. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 104 ++-- 1 file changed, 62 insertions(+), 42 deletions(-) diff --git a/net/openvswitch

[PATCH v3 net-next 03/10] openvswitch: Do not trigger events for unconfirmed connections.

2017-02-08 Thread Jarno Rajahalme
ck mark") Fixes: c2ac66735870 ("openvswitch: Allow matching on conntrack label") Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/net/openvswitch/conntrack.c b/net/openvsw

[PATCH v3 net-next 09/10] openvswitch: Add force commit.

2017-02-08 Thread Jarno Rajahalme
rent packet, the existing conntrack entry is deleted and a new one is subsequently created in the correct direction. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/openvswitch.h | 5 + net/openvswitch/conntrack.c | 26 -- 2 files changed, 29 insertions(+), 2

[PATCH v3 net-next 02/10] openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted.

2017-02-08 Thread Jarno Rajahalme
from its input form as evidenced by one of the NAT flags being set in the conntrack state metadata. Fixes: 05752523e565 ("openvswitch: Interface with NAT.") Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 24 ++-- 1 file changed, 22 insertions(+), 2

[PATCH v3 net-next 08/10] openvswitch: Add original direction conntrack tuple to sw_flow_key.

2017-02-08 Thread Jarno Rajahalme
we must be careful to never use the new key fields with ARP or ND packets. ARP is easy to distinguish and keep mutually exclusive based on the ethernet type, but ND being an ICMPv6 protocol requires a bit more attention. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/openvswitch.h | 20 +

[PATCH v2 net-next 3/9] openvswitch: Simplify labels length logic.

2017-02-08 Thread Jarno Rajahalme
allows the conntrack labels size to be increased in the future without breaking the build. In the event of conntrack labels increasing in size OVS would still be able to deal with the 128 first label bits. Suggested-by: Joe Stringer Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntr

[PATCH v2 net-next 4/9] openvswitch: Do not trigger events for unconfirmed connections.

2017-02-08 Thread Jarno Rajahalme
ck mark") Fixes: c2ac66735870 ("openvswitch: Allow matching on conntrack label") Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/conntrack.c b/net/openvsw

[PATCH v2 net-next 0/9] openvswitch: Conntrack integration improvements.

2017-02-08 Thread Jarno Rajahalme
requested by user communities (patches 7 and 8). Jarno Rajahalme (9): openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted. openvswitch: Unionize ovs_key_ct_label with a u32 array. openvswitch: Simplify labels length logic. openvswitch: Do not trigger events for unconfirmed

[PATCH v2 net-next 1/9] openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted.

2017-02-08 Thread Jarno Rajahalme
from its input form as evidenced by one of the NAT flags being set in the conntrack state metadata. Fixes: 05752523e565 ("openvswitch: Interface with NAT.") Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 24 ++-- 1 file changed, 22 insertions(+), 2

[PATCH v2 net-next 2/9] openvswitch: Unionize ovs_key_ct_label with a u32 array.

2017-02-08 Thread Jarno Rajahalme
Make the array of labels in struct ovs_key_ct_label an union, adding a u32 array of the same byte size as the existing u8 array. It is faster to loop through the labels 32 bits at the time, which is also the alignment of netlink attributes. Signed-off-by: Jarno Rajahalme --- include/uapi/linux

[PATCH v2 net-next 7/9] openvswitch: Add original direction conntrack tuple to sw_flow_key.

2017-02-08 Thread Jarno Rajahalme
we must be careful to never use the new key fields with ARP or ND packets. ARP is easy to distinguish and keep mutually exclusive based on the ethernet type, but ND being an ICMPv6 protocol requires a bit more attention. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/openvswitch.h | 20 +

[PATCH v2 net-next 9/9] openvswitch: Pack struct sw_flow_key.

2017-02-08 Thread Jarno Rajahalme
struct sw_flow_key has two 16-bit holes. Move the most matched conntrack match fields there. In some typical cases this reduces the size of the key that needs to be hashed into half and into one cache line. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c| 40

[PATCH v2 net-next 5/9] openvswitch: Refactor labels initialization.

2017-02-08 Thread Jarno Rajahalme
Refactoring conntrack labels initialization makes chenges in later patches easier to review. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 104 ++-- 1 file changed, 62 insertions(+), 42 deletions(-) diff --git a/net/openvswitch

[PATCH v2 net-next 6/9] openvswitch: Inherit master's labels.

2017-02-08 Thread Jarno Rajahalme
32 bits in the connmark are not enough. Labels can still be set explicitly, so this change only affects the default values of the labels in presense of a master connection. Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") Signed-off-by: Jarno Rajahalme --- net/openvswi

[PATCH v2 net-next 8/9] openvswitch: Add force commit.

2017-02-08 Thread Jarno Rajahalme
rent packet, the existing conntrack entry is deleted and a new one is subsequently created in the correct direction. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/openvswitch.h | 5 + net/openvswitch/conntrack.c | 27 +-- 2 files changed, 30 insertions(+), 2

Re: [PATCH net-next 7/7] openvswitch: Pack struct sw_flow_key.

2017-02-07 Thread Jarno Rajahalme
> On Feb 6, 2017, at 11:15 PM, Joe Stringer wrote: > > On 2 February 2017 at 17:10, Jarno Rajahalme wrote: >> struct sw_flow_key has two 16-bit holes. Move the most matched >> conntrack match fields there. In some typical cases this reduces the >> size of the key t

Re: [PATCH net-next 6/7] openvswitch: Add force commit.

2017-02-07 Thread Jarno Rajahalme
> On Feb 7, 2017, at 2:15 PM, Joe Stringer wrote: > > On 2 February 2017 at 17:10, Jarno Rajahalme wrote: >> Stateful network admission policy may allow connections to one >> direction and reject connections initiated in the other direction. >> After policy change it

Re: [PATCH net-next 4/7] openvswitch: Inherit master's labels.

2017-02-07 Thread Jarno Rajahalme
> On Feb 6, 2017, at 1:53 PM, Joe Stringer wrote: > > On 2 February 2017 at 17:10, Jarno Rajahalme wrote: >> We avoid calling into nf_conntrack_in() for expected connections, as >> that would remove the expectation that we want to stick around until >> we are rea

Re: [PATCH net-next 3/7] openvswitch: Do not trigger events for unconfirmed connection.

2017-02-07 Thread Jarno Rajahalme
Thanks for the review! Comments below, Jarno > On Feb 6, 2017, at 1:46 PM, Joe Stringer wrote: > > On 2 February 2017 at 17:10, Jarno Rajahalme wrote: >> Avoid triggering change events for setting conntrack mark or labels >> before the conntrack entry has been confi

Re: [PATCH net-next 5/7] openvswitch: Add original direction conntrack tuple to sw_flow_key.

2017-02-07 Thread Jarno Rajahalme
> On Feb 6, 2017, at 11:15 PM, Joe Stringer wrote: > > On 2 February 2017 at 17:10, Jarno Rajahalme wrote: >> Add the fields of the conntrack original direction 5-tuple to struct >> sw_flow_key. The new fields are initially zeroed, and are populated >> whenever a c

Re: [PATCH net-next 1/7] openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted.

2017-02-07 Thread Jarno Rajahalme
> On Feb 6, 2017, at 9:07 AM, Pravin Shelar wrote: > > On Thu, Feb 2, 2017 at 5:10 PM, Jarno Rajahalme wrote: >> When looking for an existing conntrack entry, the packet 5-tuple >> must be inverted if NAT has already been applied, as the current >> packet headers

Re: [PATCH net-next 7/7] openvswitch: Pack struct sw_flow_key.

2017-02-07 Thread Jarno Rajahalme
> On Feb 6, 2017, at 11:15 PM, Joe Stringer wrote: > > On 2 February 2017 at 17:10, Jarno Rajahalme wrote: >> struct sw_flow_key has two 16-bit holes. Move the most matched >> conntrack match fields there. In some typical cases this reduces the >> size of the key t

Re: [PATCH net-next 1/7] openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted.

2017-02-07 Thread Jarno Rajahalme
> On Feb 7, 2017, at 9:14 AM, Pravin Shelar wrote: > > On Mon, Feb 6, 2017 at 9:15 AM, David Miller wrote: >> From: Pravin Shelar >> Date: Mon, 6 Feb 2017 09:06:29 -0800 >> >>> On Sun, Feb 5, 2017 at 2:28 PM, David Miller wrote: >>>> From: Ja

[PATCH net-next 3/7] openvswitch: Do not trigger events for unconfirmed connection.

2017-02-02 Thread Jarno Rajahalme
ac66735870 ("openvswitch: Allow matching on conntrack label") Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 87 - 1 file changed, 63 insertions(+), 24 deletions(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/connt

[PATCH net-next 5/7] openvswitch: Add original direction conntrack tuple to sw_flow_key.

2017-02-02 Thread Jarno Rajahalme
er use the new key fields with ARP or ND packets. ARP is easy to distinguish and keep mutually exclusive based on the ethernet type, but ND being an ICMPv6 protocol requires a bit more attention. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/openvswitch.h | 20 - net/openvswitch

[PATCH net-next 2/7] openvswitch: Unionize ovs_key_ct_label with a u32 array.

2017-02-02 Thread Jarno Rajahalme
Make the array of labels in struct ovs_key_ct_label an union, adding a u32 array of the same byte size as the existing u8 array. It is faster to loop through the labels 32 bits at the time, which is also the alignment of netlink attributes. Signed-off-by: Jarno Rajahalme --- include/uapi/linux

[PATCH net-next 6/7] openvswitch: Add force commit.

2017-02-02 Thread Jarno Rajahalme
ting conntrack entry is deleted and a new one is subsequently created in the correct direction. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/openvswitch.h | 10 ++ net/openvswitch/conntrack.c | 27 +-- 2 files changed, 35 insertions(+), 2 deletions(

[PATCH net-next 4/7] openvswitch: Inherit master's labels.

2017-02-02 Thread Jarno Rajahalme
ill be set explicitly, so this change only affects the default values of the labels in presense of a master connection. Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 48 -

[PATCH net-next 1/7] openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted.

2017-02-02 Thread Jarno Rajahalme
verse direction tuple the direction of the packet must be reversed as well. Fixes: 05752523e565 ("openvswitch: Interface with NAT.") Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) d

[PATCH net-next 7/7] openvswitch: Pack struct sw_flow_key.

2017-02-02 Thread Jarno Rajahalme
struct sw_flow_key has two 16-bit holes. Move the most matched conntrack match fields there. In some typical cases this reduces the size of the key that needs to be hashed into half and into one cache line. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c| 42

Re: [net-next] openvswitch: Simplify do_execute_actions().

2017-01-26 Thread Jarno Rajahalme
Nice clean-up. Acked-by: Jarno Rajahalme > On Jan 25, 2017, at 9:24 PM, Andy Zhou wrote: > > do_execute_actions() implements a worthwhile optimization: in case > an output action is the last action in an action list, skb_clone() > can be avoided by outputing the current sk

Re: [PATCH net] openvswitch: Add a missing break statement.

2016-12-19 Thread Jarno Rajahalme
> On Dec 19, 2016, at 5:06 PM, Jarno Rajahalme wrote: > > Add a break statement to prevent fall-through from > OVS_KEY_ATTR_ETHERNET to OVS_KEY_ATTR_TUNNEL. Without the break > actions setting ethernet addresses fail to validate with log messages > complaining about invalid

Re: [PATCH v3 net-next 1/3] openvswitch: Add a missing break statement.

2016-12-19 Thread Jarno Rajahalme
> On Dec 13, 2016, at 9:07 PM, Pravin Shelar wrote: > > On Tue, Nov 29, 2016 at 3:30 PM, Jarno Rajahalme wrote: >> Add a break statement to prevent fall-through from >> OVS_KEY_ATTR_ETHERNET to OVS_KEY_ATTR_TUNNEL. Without the break >> actions setting ethernet addr

[PATCH net] openvswitch: Add a missing break statement.

2016-12-19 Thread Jarno Rajahalme
ckets") Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Acked-by: Jiri Benc --- net/openvswitch/flow_netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index d19044f..c87d359 100644 --- a/net/openvswitch/flow

Re: [PATCH v3 net-next 2/3] openvswitch: Use is_skb_forwardable() for length check.

2016-11-30 Thread Jarno Rajahalme
> On Nov 30, 2016, at 5:51 AM, Jiri Benc wrote: > > On Tue, 29 Nov 2016 15:30:52 -0800, Jarno Rajahalme wrote: >> @@ -504,11 +485,20 @@ void ovs_vport_send(struct vport *vport, struct >> sk_buff *skb, u8 mac_proto) >> goto drop; >> } >>

Re: [PATCH v2 net-next 2/2] openvswitch: Fix skb->protocol for vlan frames.

2016-11-29 Thread Jarno Rajahalme
> On Nov 28, 2016, at 11:21 PM, Pravin Shelar wrote: > > On Mon, Nov 28, 2016 at 6:41 PM, Jarno Rajahalme wrote: >> Do not set skb->protocol to be the ethertype of the L3 header, unless >> the packet only has the L3 header. For a non-hardware offloaded VLAN >> f

[PATCH v3 net-next 2/3] openvswitch: Use is_skb_forwardable() for length check.

2016-11-29 Thread Jarno Rajahalme
packets") Signed-off-by: Jarno Rajahalme --- v3: New patch suggested by Pravin. net/openvswitch/vport.c | 38 ++ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index b6c8524..076b39f 100

[PATCH v3 net-next 1/3] openvswitch: Add a missing break statement.

2016-11-29 Thread Jarno Rajahalme
ckets") Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Acked-by: Jiri Benc --- v3: No change. net/openvswitch/flow_netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index d19044f..c87d359 100644 --- a/net/o

[PATCH v3 net-next 3/3] openvswitch: Fix skb->protocol for vlan frames.

2016-11-29 Thread Jarno Rajahalme
ded by userspace are non-accelerated, as are double tagged VLAN packets. Fixes: 018c1dda5f ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes") Fixes: 5108bbaddc ("openvswitch: add processing of L3 packets") Signed-off-by: Jarno Rajahalme --- v3: Set skb-&

[PATCH v2 net-next 1/2] openvswitch: Add a missing break statement.

2016-11-28 Thread Jarno Rajahalme
ckets") Signed-off-by: Jarno Rajahalme Acked-by: Pravin B Shelar Acked-by: Jiri Benc --- v2: No change. net/openvswitch/flow_netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index d19044f..c87d359 100644 --- a/net/o

[PATCH v2 net-next 2/2] openvswitch: Fix skb->protocol for vlan frames.

2016-11-28 Thread Jarno Rajahalme
uot;) Signed-off-by: Jarno Rajahalme --- v2: Set skb->protocol when an ETH_P_TEB frame is received via ARPHRD_NONE interface. net/openvswitch/datapath.c | 1 - net/openvswitch/flow.c | 30 ++ 2 files changed, 22 insertions(+), 9 deletions(-) diff -

Re: [PATCH net-next 2/2] openvswitch: Fix skb->protocol for vlan frames.

2016-11-28 Thread Jarno Rajahalme
> On Nov 28, 2016, at 2:42 PM, Jiri Benc wrote: > > On Mon, 28 Nov 2016 14:29:39 -0800, Jarno Rajahalme wrote: >> I’m not sure what you suggest here. Obviously the kernel ABI can not >> be changed as existing userspace code expects upcalled packets to be >> non-acce

Re: [PATCH net-next 2/2] openvswitch: Fix skb->protocol for vlan frames.

2016-11-28 Thread Jarno Rajahalme
> On Nov 24, 2016, at 8:10 AM, Jiri Benc wrote: > > On Tue, 22 Nov 2016 20:09:34 -0800, Jarno Rajahalme wrote: >> Do not set skb->protocol to be the ethertype of the L3 header, unless >> the packet only has the L3 header. For a non-hardware offloaded VLAN >> frame

[PATCH net-next 1/2] openvswitch: Add a missing break statement.

2016-11-22 Thread Jarno Rajahalme
ckets") Signed-off-by: Jarno Rajahalme --- net/openvswitch/flow_netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index d19044f..c87d359 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c

[PATCH net-next 2/2] openvswitch: Fix skb->protocol for vlan frames.

2016-11-22 Thread Jarno Rajahalme
envswitch: add processing of L3 packets") Signed-off-by: Jarno Rajahalme --- net/openvswitch/datapath.c | 1 - net/openvswitch/flow.c | 20 +++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 2d4c

Re: Long delays creating a netns after deleting one (possibly RCU related)

2016-11-18 Thread Jarno Rajahalme
cells, i); > > __skb_queue_head_init(&cell->napi_skbs); > + > + set_bit(NAPI_STATE_NO_BUSY_POLL, &cell->napi.state); > + > netif_napi_add(dev, &cell->napi, gro_cell_poll, 64); > napi_enable(&cell->napi); > } > > > > > This fixes the problem for me, so for whatever it’s worth: Tested-by: Jarno Rajahalme

[PATCH net-next v2 3/5] virtio_net: Do not clear memory for struct virtio_net_hdr twice.

2016-11-18 Thread Jarno Rajahalme
virtio_net_hdr_from_skb() clears the memory for the header, so there is no point for the callers to do the same. Signed-off-by: Jarno Rajahalme --- drivers/net/tun.c | 3 +-- include/linux/virtio_net.h | 2 +- net/packet/af_packet.c | 2 -- 3 files changed, 2 insertions(+), 5

[PATCH net-next v2 4/5] af_packet: Use virtio_net_hdr_to_skb().

2016-11-18 Thread Jarno Rajahalme
skb notion of gso_type is zero when there is no gso. Fixes: fd2a0437dc ("virtio_net: introduce virtio_net_hdr_{from,to}_skb") Signed-off-by: Jarno Rajahalme --- net/packet/af_packet.c | 51 +++--- 1 file changed, 3 insertions(+), 48 deletio

[PATCH net-next v2 2/5] virtio_net.h: Fix comment.

2016-11-18 Thread Jarno Rajahalme
Fix incorrent comment after the final #endif. Signed-off-by: Jarno Rajahalme --- include/linux/virtio_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 1c912f8..74f1e33 100644 --- a/include/linux/virtio_net.h

[PATCH net-next v2 5/5] af_packet: Use virtio_net_hdr_from_skb() directly.

2016-11-18 Thread Jarno Rajahalme
-off-by: Jarno Rajahalme --- net/packet/af_packet.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 1816b77..fab9bbf 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1967,15 +1967,6

[PATCH net-next v2 1/5] virtio_net: Simplify call sites for virtio_net_hdr_{from,to}_skb().

2016-11-18 Thread Jarno Rajahalme
No point storing the return value of virtio_net_hdr_to_skb() or virtio_net_hdr_from_skb() to a variable when the value is used only once as a boolean in an immediately following if statement. Signed-off-by: Jarno Rajahalme --- drivers/net/macvtap.c | 5 ++--- drivers/net/tun.c | 8

Re: [net-next] af_packet: Use virtio_net_hdr_to_skb().

2016-11-18 Thread Jarno Rajahalme
Sorry for my transgressions and wasting your time. I’ll send a v2 in a moment. Jarno > On Nov 18, 2016, at 8:35 AM, David Miller wrote: > > From: Jarno Rajahalme > Date: Wed, 16 Nov 2016 18:06:42 -0800 > >> Use the common virtio_net_hdr_to_skb() instead of open cod

Re: Long delays creating a netns after deleting one (possibly RCU related)

2016-11-17 Thread Jarno Rajahalme
> On Nov 14, 2016, at 3:09 PM, Eric Dumazet wrote: > > On Mon, 2016-11-14 at 14:46 -0800, Eric Dumazet wrote: >> On Mon, 2016-11-14 at 16:12 -0600, Eric W. Biederman wrote: >> >>> synchronize_rcu_expidited is not enough if you have multiple network >>> devices in play. >>> >>> Looking at the c

Re: Virtio_net support vxlan encapsulation package TSO offload discuss

2016-11-17 Thread Jarno Rajahalme
I worked on the same issue a few months back. I rebased my proof-of-concept code to the current net-next and posted an RFC patch a moment ago. I have zero experience on QEMU feature negotiation or extending the virtio_net spec. Since the virtio_net handling code is now all done using shared code

[RFC PATCH net-next] virtio_net: Support UDP Tunnel offloads.

2016-11-17 Thread Jarno Rajahalme
offset) also needs to be passed as a new field. Control plane (QEMU) also needs to be updated. All testing was done using Geneve, but this should work for all UDP tunnels the same. Signed-off-by: Jarno Rajahalme --- drivers/net/tun.c | 7 - drivers/net/virtio_net.c| 16

[PATCH net-next] af_packet: Use virtio_net_hdr_to_skb().

2016-11-16 Thread Jarno Rajahalme
oduce virtio_net_hdr_{from,to}_skb") Signed-off-by: Jarno Rajahalme --- drivers/net/macvtap.c | 5 ++--- drivers/net/tun.c | 12 include/linux/virtio_net.h | 2 +- net/packet/af_packet.c | 44 +--- 4 files changed, 8 inserti

[net-next] af_packet: Use virtio_net_hdr_to_skb().

2016-11-16 Thread Jarno Rajahalme
oduce virtio_net_hdr_{from,to}_skb") Signed-off-by: Jarno Rajahalme --- drivers/net/macvtap.c | 5 ++--- drivers/net/tun.c | 12 include/linux/virtio_net.h | 2 +- net/packet/af_packet.c | 44 +--- 4 files changed, 8 inserti

[PATCH net] openvswitch: Remove incorrect WARN_ONCE().

2016-08-01 Thread Jarno Rajahalme
somewhat confusing kernel log messages. This patch removes this check and warning. Fixes: 289f2253 ("openvswitch: Find existing conntrack entry after upcall.") Suggested-by: Joe Stringer Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 8 +--- 1 file changed, 1

Re: [ovs-dev] [PATCH net-next] openvswitch: Only set mark and labels when commiting a connection.

2016-06-21 Thread Jarno Rajahalme
Thanks for the review! > On Jun 21, 2016, at 1:57 PM, Joe Stringer wrote: > > On 20 June 2016 at 17:19, Jarno Rajahalme wrote: >> Only allow setting conntrack mark or labels when the commit flag is >> specified. This makes sure we can not set them before the connection

[PATCH net v2 1/2] openvswitch: Set mark and labels before confirming.

2016-06-21 Thread Jarno Rajahalme
Set conntrack mark and labels right before committing so that the initial conntrack NEW event has the mark and labels. Signed-off-by: Jarno Rajahalme --- v2: Separate Kernel API change to an RFC patch (2/2). net/openvswitch/conntrack.c | 33 ++--- 1 file changed, 14

[RFC PATCH net v2 2/2] openvswitch: Only set mark and labels with a commit flag.

2016-06-21 Thread Jarno Rajahalme
ct_mark and/or ct_labels. Validate for this in the kernel API. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 76 ++--- 1 file changed, 51 insertions(+), 25 deletions(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch

[PATCH net-next] openvswitch: Only set mark and labels when commiting a connection.

2016-06-20 Thread Jarno Rajahalme
accept setting ct_mark and/or ct_labels. Validate for this on the kernel API. Finally, set conntrack mark and labels right before committing so that the initial conntrack NEW event has the mark and labels. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 72

Re: [PATCH net-next] openvswitch: Only set mark and labels when commiting a connection.

2016-06-20 Thread Jarno Rajahalme
The title should have been: openvswitch: Only set mark and labels with a commit flag. This reflects the fact that modifying the mark and/or labels of an existing connection is allowed. The commit flag is still required to do that, though. Jarno > On Jun 20, 2016, at 5:19 PM, Jarno Rajaha

Re: [PATCH net] openvswitch: Fix cached ct with helper.

2016-05-10 Thread Jarno Rajahalme
This would result in inconsistent helper assignment if a first CT action assigns a helper and a further CT action tries to assign a different helper; Typically the second helper assignment would be ignored, but if the unconfirmed conntrack entry is lost due to an upcall the second helper assignm

[PATCH net v3 1/2] udp_tunnel: Remove redundant udp_tunnel_gro_complete().

2016-05-03 Thread Jarno Rajahalme
The setting of the UDP tunnel GSO type is already performed by udp[46]_gro_complete(). Signed-off-by: Jarno Rajahalme --- drivers/net/geneve.c | 2 -- drivers/net/vxlan.c | 2 -- include/net/udp_tunnel.h | 9 - net/ipv4/fou.c | 2 -- 4 files changed, 15 deletions

  1   2   3   >