Re: [ovs-dev] [PATCH v2 0/4] Check size of packets before sending

2018-01-29 Thread Daniel Axtens
Eric Dumazet <eric.duma...@gmail.com> writes: > On Fri, 2018-01-26 at 00:44 +1100, Daniel Axtens wrote: >> Hi Eric, >> >> > May I ask which tree are you targeting ? >> > >> > ( Documentation/networking/netdev-FAQ.txt ) >> >> I have

Re: [ovs-dev] [PATCH v2 0/4] Check size of packets before sending

2018-01-25 Thread Daniel Axtens
Hi Eric, > May I ask which tree are you targeting ? > > ( Documentation/networking/netdev-FAQ.txt ) I have been targeting net-next, but I haven't pulled for about two weeks. I will rebase and if there are conflicts I will resend early next week. > Anything touching GSO is very risky and should

[ovs-dev] [PATCH v2 4/4] net: check the size of a packet in validate_xmit_skb

2018-01-24 Thread Daniel Axtens
-by: Daniel Axtens <d...@axtens.net> --- net/core/dev.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 6c96c26aadbf..f09eece2cd21 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1830,13 +1830,11 @@ static inlin

[ovs-dev] [PATCH v2 3/4] net: is_skb_forwardable: check the size of GSO segments

2018-01-24 Thread Daniel Axtens
that to check. Signed-off-by: Daniel Axtens <d...@axtens.net> --- include/linux/skbuff.h | 1 + net/core/dev.c | 7 +++--- net/core/skbuff.c | 67 +++--- 3 files changed, 57 insertions(+), 18 deletions(-) diff --git a/include/linux/skbuff.h b/i

[ovs-dev] [PATCH v2 2/4] net: move skb_gso_mac_seglen to skbuff.h

2018-01-24 Thread Daniel Axtens
We're about to use this elsewhere, so move it into the header with the other related functions like skb_gso_network_seglen(). Signed-off-by: Daniel Axtens <d...@axtens.net> --- include/linux/skbuff.h | 15 +++ net/sched/sch_tbf.c| 10 -- 2 files changed, 15 inse

[ovs-dev] [PATCH v2 1/4] net: rename skb_gso_validate_mtu -> skb_gso_validate_network_len

2018-01-24 Thread Daniel Axtens
of a split GSO skb (L2+L3+L4+payload), and the names get confusing, so rename skb_gso_validate_mtu to skb_gso_validate_network_len Signed-off-by: Daniel Axtens <d...@axtens.net> --- include/linux/skbuff.h | 2 +- net/core/skbuff.c | 9 + ne

[ovs-dev] [PATCH v2 0/4] Check size of packets before sending

2018-01-24 Thread Daniel Axtens
.@gmail.com> Cc: manish.cho...@cavium.com Cc: d...@openvswitch.org Daniel Axtens (4): net: rename skb_gso_validate_mtu -> skb_gso_validate_network_len net: move skb_gso_mac_seglen to skbuff.h net: is_skb_forwardable: check the size of GSO segments net: check the size of a packet

Re: [ovs-dev] [PATCH 0/3] Check gso_size of packets when forwarding

2018-01-19 Thread Daniel Axtens
Pravin Shelar <pshe...@ovn.org> writes: > On Thu, Jan 18, 2018 at 5:28 PM, Daniel Axtens <d...@axtens.net> wrote: >> Pravin Shelar <pshe...@ovn.org> writes: >> >>> On Thu, Jan 18, 2018 at 5:08 AM, Daniel Axtens <d...@axtens.net> wr

Re: [ovs-dev] [PATCH 0/3] Check gso_size of packets when forwarding

2018-01-18 Thread Daniel Axtens
Daniel Axtens <d...@axtens.net> writes: > Pravin Shelar <pshe...@ovn.org> writes: > >> On Thu, Jan 18, 2018 at 5:08 AM, Daniel Axtens <d...@axtens.net> wrote: >>> Pravin Shelar <pshe...@ovn.org> writes: >>> >>>> On Mon, Jan 15,

Re: [ovs-dev] [PATCH 0/3] Check gso_size of packets when forwarding

2018-01-18 Thread Daniel Axtens
Pravin Shelar <pshe...@ovn.org> writes: > On Thu, Jan 18, 2018 at 5:08 AM, Daniel Axtens <d...@axtens.net> wrote: >> Pravin Shelar <pshe...@ovn.org> writes: >> >>> On Mon, Jan 15, 2018 at 6:09 PM, Daniel Axtens <d...@axtens.net> wrote: >

Re: [ovs-dev] [PATCH 0/3] Check gso_size of packets when forwarding

2018-01-18 Thread Daniel Axtens
Daniel Axtens <d...@axtens.net> writes: > Jason Wang <jasow...@redhat.com> writes: > >> On 2018年01月18日 16:28, Pravin Shelar wrote: >>> On Mon, Jan 15, 2018 at 6:09 PM, Daniel Axtens <d...@axtens.net> wrote: >>>> When regular packets are for

[ovs-dev] [PATCH 3/3] openvswitch: drop GSO packets that are too large

2018-01-15 Thread Daniel Axtens
t. Signed-off-by: Daniel Axtens <d...@axtens.net> --- net/openvswitch/vport.c | 37 ++--- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index b6c8524032a0..290eeaa82344 100644 --- a/net/ope

[ovs-dev] [PATCH 2/3] net: is_skb_forwardable: validate length of GSO packet segments

2018-01-15 Thread Daniel Axtens
large by creating a skb_gso_validate_len() routine which is similar to skb_gso_validate_mtu(), but which considers L2 headers, and wire it up in is_skb_forwardable(). Signed-off-by: Daniel Axtens <d...@axtens.net> --- include/linux/skbuff.h | 1 + net/core/dev.c | 7 --- ne

[ovs-dev] [PATCH 1/3] net: move skb_gso_mac_seglen to skbuff.h

2018-01-15 Thread Daniel Axtens
We're about to use this elsewhere, so move it into the header with the other related functions like skb_gso_network_seglen(). Signed-off-by: Daniel Axtens <d...@axtens.net> --- include/linux/skbuff.h | 15 +++ net/sched/sch_tbf.c| 10 -- 2 files changed, 15 inse

[ovs-dev] [PATCH 0/3] Check gso_size of packets when forwarding

2018-01-15 Thread Daniel Axtens
specialised algorithm for checking lengths. Wire up checking for that in patch 3. [0]: https://patchwork.ozlabs.org/patch/859410/ Cc: manish.cho...@cavium.com Cc: d...@openvswitch.org Daniel Axtens (3): net: move skb_gso_mac_seglen to skbuff.h net: is_skb_forwardable: validate length of GSO packet

[ovs-dev] [PATCH] openvswitch: fix mis-ordered comment lines for ovs_skb_cb

2017-07-03 Thread Daniel Axtens
I was trying to wrap my head around meaning of mru, and realised that the second line of the comment defining it had somehow ended up after the line defining cutlen, leading to much confusion. Reorder the lines to make sense. Signed-off-by: Daniel Axtens <d...@axtens.net> --- net/openv