[PATCH net-next] openvswitch: use after free in __ovs_ct_free_action()

2019-04-01 Thread Dan Carpenter
We free "ct_info->ct" and then use it on the next line when we pass it to nf_ct_destroy_timeout(). This patch swaps the order to avoid the use after free. Fixes: 06bd2bdf19d2 ("openvswitch: Add timeout support to ct action") Signed-off-by: Dan Carpenter --- net/openvswitch/conntrack.c | 2 +- 1

Re: Please merge IPv6 fix for drop fragment smaller than MTU

2019-04-01 Thread Greg Kroah-Hartman
On Mon, Apr 01, 2019 at 03:34:52PM -0600, Captain Wiggum wrote: > Hi Greg, > > An error was introduced in 4.9.134 (and the other LTS branches also). > This causes 18 test cases from the TAHI IPv6 test suite to fail. > I added you to the mail thread about this subject a month back. > It has been fi

Re: [patch net-next v2 00/12] net: extend devlink port attrs with switch ID

2019-04-01 Thread Jiri Pirko
Tue, Apr 02, 2019 at 03:33:52AM CEST, da...@davemloft.net wrote: >From: David Miller >Date: Mon, 01 Apr 2019 18:29:58 -0700 (PDT) > >> From: Jiri Pirko >> Date: Mon, 1 Apr 2019 11:40:14 +0200 >> >>> From: Jiri Pirko >>> >>> Extend devlink port attrs to contain switch ID and change drivers tha

[PATCH] net-gro: Fix GRO flush when receiving a GSO packet.

2019-04-01 Thread Steffen Klassert
Currently we may merge incorrectly a received GSO packet or a packet with frag_list into a packet sitting in the gro_hash list. skb_segment() may crash in this case because the assumptions on the skb layout are not met in this case. The correct behaviour would be to flush the packet in the gro_hash

[PATCH v2 bpf-next 03/10] bpf: improve verification speed by not remarking live_read

2019-04-01 Thread Alexei Starovoitov
With large verifier speed improvement brought by the previous patch mark_reg_read() becomes the hottest function during verification. On a typical program it consumes 40% of cpu. mark_reg_read() walks parentage chain of registers to mark parents as LIVE_READ. Once the register is marked there is no

[PATCH v2 bpf-next 09/10] selftests/bpf: add few verifier scale tests

2019-04-01 Thread Alexei Starovoitov
Add 3 basic tests that stress verifier scalability. test_verif_scale1.c calls non-inlined jhash() function 90 times on different position in the packet. This test simulates network packet parsing. jhash function is ~140 instructions and main program is ~1200 insns. test_verif_scale2.c force inlin

[PATCH v2 bpf-next 04/10] bpf: convert temp arrays to kvcalloc

2019-04-01 Thread Alexei Starovoitov
Temporary arrays used during program verification need to be vmalloc-ed to support large bpf programs. Signed-off-by: Alexei Starovoitov --- kernel/bpf/verifier.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c inde

[PATCH v2 bpf-next 02/10] bpf: improve verification speed by droping states

2019-04-01 Thread Alexei Starovoitov
Branch instructions, branch targets and calls in a bpf program are the places where the verifier remembers states that led to successful verification of the program. These states are used to prune brute force program analysis. For unprivileged programs there is a limit of 64 states per such 'branch

[PATCH v2 bpf-next 05/10] bpf: verbose jump offset overflow check

2019-04-01 Thread Alexei Starovoitov
Larger programs may trigger 16-bit jump offset overflow check during instruction patching. Make this error verbose otherwise users cannot decipher error code without printks in the verifier. Signed-off-by: Alexei Starovoitov --- kernel/bpf/core.c | 11 ++- kernel/bpf/verifier.c | 7

[PATCH v2 bpf-next 10/10] selftests/bpf: synthetic tests to push verifier limits

2019-04-01 Thread Alexei Starovoitov
Add a test to generate 1m ld_imm64 insns to stress the verifier. Bump the size of fill_ld_abs_vlan_push_pop test from 4k to 29k and jump_around_ld_abs from 4k to 5.5k. Larger sizes are not possible due to 16-bit offset encoding in jump instructions. Signed-off-by: Alexei Starovoitov --- tools/t

[PATCH v2 bpf-next 06/10] bpf: increase complexity limit and maximum program size

2019-04-01 Thread Alexei Starovoitov
Large verifier speed improvements allow to increase verifier complexity limit. Now regardless of the program composition and its size it takes little time for the verifier to hit insn_processed limit. On typical x86 machine non-debug kernel processes 1M instructions in 1/10 of a second. (before the

[PATCH v2 bpf-next 01/10] bpf: add verifier stats and log_level bit 2

2019-04-01 Thread Alexei Starovoitov
In order to understand the verifier bottlenecks add various stats and extend log_level: log_level 1 and 2 are kept as-is: bit 0 - level=1 - print every insn and verifier state at branch points bit 1 - level=2 - print every insn and verifier state at every insn bit 2 - level=4 - print verifier error

[PATCH v2 bpf-next 00/10] bpf: improve verifier scalability

2019-04-01 Thread Alexei Starovoitov
v1->v2: - fixed typo in patch 1 - added a patch to convert kcalloc to kvcalloc - added a patch to verbose 16-bit jump offset check - added a test with 1m insns This patch set is the first step to be able to accept large programs. The verifier still suffers from its brute force algorithm and large

[PATCH v2 bpf-next 07/10] bpf: increase verifier log limit

2019-04-01 Thread Alexei Starovoitov
The existing 16Mbyte verifier log limit is not enough for log_level=2 even for small programs. Increase it to 1Gbyte. Note it's not a kernel memory limit. It's an amount of memory user space provides to store the verifier log. The kernel populates it 1k at a time. Signed-off-by: Alexei Starovoitov

[PATCH v2 bpf-next 08/10] libbpf: teach libbpf about log_level bit 2

2019-04-01 Thread Alexei Starovoitov
Allow bpf_prog_load_xattr() to specify log_level for program loading. Teach libbpf to accept log_level with bit 2 set. Increase default BPF_LOG_BUF_SIZE from 256k to 16M. There is no downside to increase it to a maximum allowed by old kernels. Existing 256k limit caused ENOSPC errors and users we

Re: [PATCH net-next 0/2] sctp: fully support memory accounting

2019-04-01 Thread Marcelo Ricardo Leitner
On Mon, Apr 01, 2019 at 07:31:10AM -0400, Neil Horman wrote: > On Sun, Mar 31, 2019 at 04:53:45PM +0800, Xin Long wrote: > > sctp memory accounting is added in this patchset by using > > these kernel APIs on send side: > > > > - sk_mem_charge() > > - sk_mem_uncharge() > > - sk_wmem_schedule(

[PATCH v3 net-next 3/5] ipv4: Refactor nexthop attributes in fib_dump_info

2019-04-01 Thread David Ahern
From: David Ahern Similar to ipv6, move addition of nexthop attributes to dump message into helpers that are called for both single path and multipath routes. Align the new helpers to the IPv6 variant which most notably means computing the flags argument based on settings in nh_flags. The RTA_FL

[PATCH v3 net-next 2/5] ipv4: Add fib_nh_common to fib_result

2019-04-01 Thread David Ahern
From: David Ahern Most of the ipv4 code only needs data from fib_nh_common. Add fib_nh_common selection to fib_result and update users to use it. Right now, fib_nh_common in fib_result will point to a nexthop within a fib_info. Later, fib_nh can point to data with a nexthop struct. Signed-off-b

[PATCH v3 net-next 4/5] ipv4: Change fib_nexthop_info and fib_add_nexthop to take fib_nh_common

2019-04-01 Thread David Ahern
From: David Ahern With the exception of the nexthop weight, the nexthop attributes used by fib_nexthop_info and fib_add_nexthop come from the fib_nh_common struct. Update both to use it and change fib_nexthop_info to check the family as needed. nexthop weight comes from the common struct for exi

[PATCH v3 net-next 0/5] net: More movement to fib_nh_common

2019-04-01 Thread David Ahern
From: David Ahern Second set of three with the end goal of enabling IPv6 gateways with IPv4 routes. This set moves: - the ipv4 tracepoint to take a fib_nh_common and updates it to handle a v6 gateway. - consolidates route notifications to use the same fill functions for both ipv4 and ipv6 v

[PATCH v3 net-next 1/5] ipv4: Update fib_table_lookup tracepoint to take common nexthop

2019-04-01 Thread David Ahern
From: David Ahern Update fib_table_lookup tracepoint to take a fib_nh_common struct and dump the v6 gateway address if the nexthop uses it. Signed-off-by: David Ahern --- include/trace/events/fib.h | 45 ++--- net/ipv4/fib_trie.c| 2 +- 2 files

[PATCH v3 net-next 5/5] ipv6: Flip to fib_nexthop_info

2019-04-01 Thread David Ahern
From: David Ahern Export fib_nexthop_info and fib_add_nexthop for use by IPv6 code. Remove rt6_nexthop_info and rt6_add_nexthop in favor of the IPv4 versions. Update fib_nexthop_info for IPv6 linkdown check and RTA_GATEWAY for AF_INET6. Signed-off-by: David Ahern --- include/net/ip_fib.h |

Re: [PATCH bpf-next 0/2] bpf: Support variable offset stack access from helpers

2019-04-01 Thread Andrey Ignatov
Daniel Borkmann [Mon, 2019-04-01 11:58 -0700]: > On 04/01/2019 07:23 PM, Alexei Starovoitov wrote: > > On 4/1/19 9:09 AM, Daniel Borkmann wrote: > >> On 03/29/2019 08:10 PM, Alexei Starovoitov wrote: > >>> On Thu, Mar 28, 2019 at 6:02 PM Andrey Ignatov wrote: > > The patch set adds supp

[PATCH stable/5.0 0/2] nfp: flower: fix matching and pushing vlan CFI bit

2019-04-01 Thread Jakub Kicinski
This is a backport of d1b58fc60758 ("Merge branch 'nfp-flower-fix-matching-and-pushing-vlan-CFI-bit'") onto tag v5.0.5. Pieter Jansen van Vuuren (2): nfp: flower: replace CFI with vlan present nfp: flower: remove vlan CFI bit from push vlan action drivers/net/ethernet/netronome/nfp/flower/a

[PATCH stable/5.0 1/2] nfp: flower: replace CFI with vlan present

2019-04-01 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Replace vlan CFI bit with a vlan present bit that indicates the presence of a vlan tag. Previously the driver incorrectly assumed that an vlan id of 0 is not matchable, therefore we indicate vlan presence with a vlan present bit. Fixes: 5571e8c9f241 ("nfp: extend f

[PATCH stable/5.0 2/2] nfp: flower: remove vlan CFI bit from push vlan action

2019-04-01 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren We no longer set CFI when pushing vlan tags, therefore we remove the CFI bit from push vlan. Fixes: 1a1e586f54bf ("nfp: add basic action capabilities to flower offloads") Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Louis Peens --- drivers/net/ethernet

Re: [PATCH bpf-next 7/7] selftests/bpf: add few verifier scale tests

2019-04-01 Thread Alexei Starovoitov
On 4/1/19 9:35 AM, Daniel Borkmann wrote: > On 04/01/2019 04:17 PM, Daniel Borkmann wrote: >> On 03/30/2019 01:16 AM, Alexei Starovoitov wrote: >>> Add 3 basic tests that stress verifier scalability. >>> >>> test_verif_scale1.c calls non-inlined jhash() function 90 times on >>> different position i

Re: [PATCH net-next v2] macsec: add noinline tag to avoid a frame size warning

2019-04-01 Thread David Miller
From: Florian Westphal Date: Mon, 1 Apr 2019 22:59:09 +0200 > seen with debug config: > drivers/net/macsec.c: In function 'dump_secy': > drivers/net/macsec.c:2597: warning: the frame size of 2216 bytes is larger > than 2048 bytes [-Wframe-larger-than=] > > just mark it with noinline_for_stack,

Re: [PATCH net-next 0/5] net: move skb->xmit_more to percpu softnet data

2019-04-01 Thread David Miller
From: Florian Westphal Date: Mon, 1 Apr 2019 16:42:12 +0200 > Eric Dumazet mentioned we could place xmit_more hint in same > spot as device xmit recursion counter, instead of using > an sk_buff flag bit. > > This series places xmit_recursion counter and xmit_more hint > in softnet data, filling

Re: [patch net-next v2 00/12] net: extend devlink port attrs with switch ID

2019-04-01 Thread David Miller
From: David Miller Date: Mon, 01 Apr 2019 18:29:58 -0700 (PDT) > From: Jiri Pirko > Date: Mon, 1 Apr 2019 11:40:14 +0200 > >> From: Jiri Pirko >> >> Extend devlink port attrs to contain switch ID and change drivers that >> register devlink ports to use that. >> >> --- >> v1->v2: >> - adjust

Re: [PATCH net 0/2] nfp: flower: fix matching and pushing vlan CFI bit

2019-04-01 Thread David Miller
From: Jakub Kicinski Date: Mon, 1 Apr 2019 18:13:28 -0700 > How would we handle this? You can do the backport to say, 5.0, and post it to the list. I'll mark it "Not Applicable" in patchwork but add it to the stable bundle.

Re: [patch net-next v2 00/12] net: extend devlink port attrs with switch ID

2019-04-01 Thread David Miller
From: Jiri Pirko Date: Mon, 1 Apr 2019 11:40:14 +0200 > From: Jiri Pirko > > Extend devlink port attrs to contain switch ID and change drivers that > register devlink ports to use that. > > --- > v1->v2: > - adjusted cover letter Series applied, thanks Jiri.

Re: [PATCH net 0/2] nfp: flower: fix matching and pushing vlan CFI bit

2019-04-01 Thread Jakub Kicinski
On Mon, 01 Apr 2019 18:03:00 -0700 (PDT), David Miller wrote: > From: Jakub Kicinski > Date: Fri, 29 Mar 2019 19:04:42 -0700 > > > This patch clears up some confusion around the meaning of bit 12 > > for FW messages related to VLAN and flower offload. > > > > Pieter says: > > It fixes issues wit

Re: [PATCHv2 net-next] net: use rcu_dereference_protected to fetch sk_dst_cache in sk_destruct

2019-04-01 Thread David Miller
From: Xin Long Date: Sun, 31 Mar 2019 17:03:02 +0800 > As Eric noticed, in .sk_destruct, sk->sk_dst_cache update is prevented, and > no barrier is needed for this. So change to use rcu_dereference_protected() > instead of rcu_dereference_check() to fetch sk_dst_cache in there. > > v1->v2: > -

Re: [PATCH net] sctp: initialize _pad of sockaddr_in before copying to user memory

2019-04-01 Thread David Miller
From: Xin Long Date: Sun, 31 Mar 2019 16:58:15 +0800 > Syzbot report a kernel-infoleak: > > BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 > Call Trace: > _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 > copy_to_user include/linux/uaccess.h:174 [inline] >

Re: [PATCH net-next] net: phy: improve genphy_read_status

2019-04-01 Thread David Miller
From: Heiner Kallweit Date: Sat, 30 Mar 2019 10:22:45 +0100 > This patch improves few aspects of genphy_read_status(): > > - Don't initialize lpagb, it's not needed. > > - Move initializing phydev->speed et al before the if clause. > > - In auto-neg case, skip populating lp_advertising if we >

Re: [PATCH net-next 0/3] nfp: flower improvement and SFF module EEPROM

2019-04-01 Thread David Miller
From: Jakub Kicinski Date: Fri, 29 Mar 2019 19:24:40 -0700 > The first patch in this series from Pieter improves the > handling of mangle actions in TC flower offload. These > used to be sent down to the driver in groups, but after > Pablo N's patches they are split out causing suboptimal > expr

Re: [PATCH net 0/2] nfp: flower: fix matching and pushing vlan CFI bit

2019-04-01 Thread David Miller
From: Jakub Kicinski Date: Fri, 29 Mar 2019 19:04:42 -0700 > This patch clears up some confusion around the meaning of bit 12 > for FW messages related to VLAN and flower offload. > > Pieter says: > It fixes issues with matching, pushing and popping vlan tags. > We replace the vlan CFI bit with

Re: [PATCH] ipv4 ping: Fix __init* attributes

2019-04-01 Thread David Miller
From: Andi Kleen Date: Fri, 29 Mar 2019 17:46:00 -0700 > From: Andi Kleen > > ping_v4_net_ops references init functions, so needs to be __initdata. > ping_proc_exit is then referenced from __initdata, so also needs > to be __init. > > Signed-off-by: Andi Kleen How can you spin up new network

Re: [PATCH net-next] net: phy: aquantia: add suspend / resume callbacks for AQR107 family

2019-04-01 Thread David Miller
From: Heiner Kallweit Date: Fri, 29 Mar 2019 21:09:27 +0100 > Add suspend / resume callbacks for AQR107 family. Suspend powers down > the complete chip except MDIO and internal CPU. > > Signed-off-by: Heiner Kallweit Applied.

Re: [PATCH 1/2] net: enable IPv6 iff IPv4

2019-04-01 Thread David Miller
From: Florian Fainelli Date: Mon, 1 Apr 2019 14:37:25 -0700 > There are tons of systems where IPv6 will likely never be used, let's > face it, so why kill the ability to insmod the IPv6 stack since it > really does not come at the cost of trying to fix the unloading part > already? > > I am not

Re: Please merge IPv6 fix for drop fragment smaller than MTU

2019-04-01 Thread Captain Wiggum
Thank you for the feedback and the specific commits needed! On Mon, Apr 1, 2019 at 3:48 PM Florian Westphal wrote: > > Captain Wiggum wrote: > > An error was introduced in 4.9.134 (and the other LTS branches also). > > This causes 18 test cases from the TAHI IPv6 test suite to fail. > > I added

Re: [PATCH 1/2] net: enable IPv6 iff IPv4

2019-04-01 Thread Florian Fainelli
On 4/1/19 2:02 PM, Maciej Żenczykowski wrote: >> Things are modular because we don't unilaterally make decisions for >> people on this level. > > We do unilaterally make various decisions - some of them quite big in scope. > Although perhaps not this one. > >> This is why I'm very much not too mo

Re: [PATCH net 0/2] net: sched: fix stats accounting for child NOLOCK qdiscs

2019-04-01 Thread David Miller
From: Paolo Abeni Date: Thu, 28 Mar 2019 16:53:11 +0100 > Currently, stats accounting for NOLOCK qdisc enslaved to classful (lock) > qdiscs is buggy. Per CPU values are ignored in most places, as a result, > stats dump in the above scenario always report 0 length backlog and parent > backlog len

IPv6 unexpectedly changes MTU on wrong interface

2019-04-01 Thread Captain Wiggum
This bug exists in the LTS kernels, but has been fixed in mainline. My problem is I have no idea what to search for in git find the commit(s). Hopefully someone recognizes this issue and can give some tips to find it. Summary: Three TAHI IPv6 test cases fail on this: Two interface test: first inte

Re: Please merge IPv6 fix for drop fragment smaller than MTU

2019-04-01 Thread Florian Westphal
Captain Wiggum wrote: > An error was introduced in 4.9.134 (and the other LTS branches also). > This causes 18 test cases from the TAHI IPv6 test suite to fail. > I added you to the mail thread about this subject a month back. > It has been fixed in upstream for some time now, but not in the LTS b

Re: [PATCH net-next v2] macsec: add noinline tag to avoid a frame size warning

2019-04-01 Thread Sabrina Dubroca
2019-04-01, 22:59:09 +0200, Florian Westphal wrote: > seen with debug config: > drivers/net/macsec.c: In function 'dump_secy': > drivers/net/macsec.c:2597: warning: the frame size of 2216 bytes is larger > than 2048 bytes [-Wframe-larger-than=] > > just mark it with noinline_for_stack, this is net

Re: [PATCH 1/2] net: enable IPv6 iff IPv4

2019-04-01 Thread Florian Fainelli
On 4/1/19 12:44 PM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > IPv6 is 20 years old and IPv4 has run out of IP addresses > and is deprecated. > > It is time to make IPv6 a first class citizen. > > As such we remove the ability to compile IPv6 as a module, > and IPv4 support now

Please merge IPv6 fix for drop fragment smaller than MTU

2019-04-01 Thread Captain Wiggum
Hi Greg, An error was introduced in 4.9.134 (and the other LTS branches also). This causes 18 test cases from the TAHI IPv6 test suite to fail. I added you to the mail thread about this subject a month back. It has been fixed in upstream for some time now, but not in the LTS branches. Please merge

Re: [PATCH net-next] r8169: use netif_receive_skb_list batching

2019-04-01 Thread Eric Dumazet
On 04/01/2019 10:41 AM, David Miller wrote: > From: Jesper Dangaard Brouer >> >> As Eric says, this in-effect disables GRO for this driver. > > Really? __netif_receive_skb_list_core() does GRO. At least on current public trees, it can not do GRO, since we do not pass a napi context.

Re: [PATCH net] net/sched: fix ->get helper of the matchall cls

2019-04-01 Thread David Miller
From: Nicolas Dichtel Date: Thu, 28 Mar 2019 10:35:06 +0100 > It returned always NULL, thus it was never possible to get the filter. > > Example: > $ ip link add foo type dummy > $ ip link add bar type dummy > $ tc qdisc add dev foo clsact > $ tc filter add dev foo protocol all pref 1 ingress ha

Re: [PATCH 1/2] net: enable IPv6 iff IPv4

2019-04-01 Thread David Miller
From: Maciej Żenczykowski Date: Mon, 1 Apr 2019 14:02:09 -0700 > Why should the manufacturers be allowed to tell me how to run my > network? He isn't, unless he forced you to buy his device? This is like how various "internet pioneers" complain about how google products do DNS directly to 8.8.8

Re: [RFC net-next 0/1] net: sched: Introduce conntrack action

2019-04-01 Thread Cong Wang
On Mon, Apr 1, 2019 at 7:22 AM Paul Blakey wrote: > > > > > > > > >> On 1 Apr 2019, at 14:14, Marcelo Ricardo Leitner > >> wrote: > >> > >> Hi, > >> > >> On Fri, Mar 29, 2019 at 08:45:06PM +, Kevin 'ldir' Darbyshire-Bryant > >> wrote: > >>> Hi Cong, > >>> > >>> OK, so I've renamed conndscp

Re: [PATCH net] tcp: fix tcp_inet6_sk() for 32bit kernels

2019-04-01 Thread Julian Anastasov
Hello, On Mon, 1 Apr 2019, Eric Dumazet wrote: > It turns out that struct ipv6_pinfo is not located as we think. > > inet6_sk_generic() and tcp_inet6_sk() disagree on 32bit kernels by 4-bytes, > because struct tcp_sock has 8-bytes alignment, > but ipv6_pinfo size is not a multiple of 8

Re: [PATCH net] sctp: initialize _pad of sockaddr_in before copying to user memory

2019-04-01 Thread Neil Horman
On Sun, Mar 31, 2019 at 04:58:15PM +0800, Xin Long wrote: > Syzbot report a kernel-infoleak: > > BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 > Call Trace: > _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 > copy_to_user include/linux/uaccess.h:174 [inline] >

Re: [PATCH 1/2] net: enable IPv6 iff IPv4

2019-04-01 Thread Maciej Żenczykowski
> Things are modular because we don't unilaterally make decisions for > people on this level. We do unilaterally make various decisions - some of them quite big in scope. Although perhaps not this one. > This is why I'm very much not too motivated to integrate changes like > this, even though I u

[PATCH net-next v2] macsec: add noinline tag to avoid a frame size warning

2019-04-01 Thread Florian Westphal
seen with debug config: drivers/net/macsec.c: In function 'dump_secy': drivers/net/macsec.c:2597: warning: the frame size of 2216 bytes is larger than 2048 bytes [-Wframe-larger-than=] just mark it with noinline_for_stack, this is netlink dump code. v2: use 'static noinline_for_stack int' consist

[PATCH bpf 4/5] flow_dissector: allow access only to a subset of __sk_buff fields

2019-04-01 Thread Stanislav Fomichev
Use whitelist instead of a blacklist and allow only a small set of fields that might be relevant in the context of flow dissector: * data * data_end * flow_keys This is required for the eth_get_headlen case where we have only a chunk of data to dissect (i.e. trying to read the other skb fiel

[PATCH bpf 1/5] selftests/bpf: fix vlan handling in flow dissector program

2019-04-01 Thread Stanislav Fomichev
When we tail call PROG(VLAN) from parse_eth_proto we don't need to peek back to handle vlan proto because we didn't adjust nhoff/thoff yet. Use flow_keys->n_proto, that we set in parse_eth_proto instead and properly increment nhoff as well. Also, always use skb->protocol and don't look at skb->vla

[PATCH bpf 3/5] flow_dissector: fix clamping of BPF flow_keys for non-zero nhoff

2019-04-01 Thread Stanislav Fomichev
Don't allow BPF program to set flow_keys->nhoff to less than initial value. We currently don't read the value afterwards in anything but the tests, but it's still a good practice to return consistent values to the test programs. Signed-off-by: Stanislav Fomichev --- net/core/flow_dissector.c | 3

[PATCH bpf 2/5] net/flow_dissector: pass flow_keys->n_proto to BPF programs

2019-04-01 Thread Stanislav Fomichev
This is a preparation for the next commit that would prohibit access to the most fields of __sk_buff from the BPF programs. Instead of requiring BPF flow dissector programs to look into skb, pass all input data in the flow_keys. Signed-off-by: Stanislav Fomichev --- net/core/flow_dissector.c

[PATCH bpf 5/5] flow_dissector: document BPF flow dissector environment

2019-04-01 Thread Stanislav Fomichev
Short doc on what BPF flow dissector should expect in the input __sk_buff and flow_keys. Signed-off-by: Stanislav Fomichev --- .../networking/bpf_flow_dissector.txt | 115 ++ 1 file changed, 115 insertions(+) create mode 100644 Documentation/networking/bpf_flow_dissector

[PATCH bpf 0/5] flow_dissector: lay groundwork for calling BPF hook from eth_get_headlen

2019-04-01 Thread Stanislav Fomichev
This patch series fixes the existing BPF flow dissector API to support calling BPF progs from the eth_get_headlen context (the support itself will be added in bpf-next tree). The summary of the changes: * fix VLAN handling in bpf_flow.c, we don't need to peek back and look at skb->vlan_prese

Re: [PATCH net-next] macsec: add noinline tag to avoid a frame size warning

2019-04-01 Thread Sabrina Dubroca
2019-04-01, 11:37:50 +0200, Florian Westphal wrote: > seen with debug config: > drivers/net/macsec.c: In function 'dump_secy': > drivers/net/macsec.c:2597: warning: the frame size of 2216 bytes is larger > than 2048 bytes [-Wframe-larger-than=] > > just mark it with noinline_for_stack, this is net

Re: [PATCH 1/2] net: enable IPv6 iff IPv4

2019-04-01 Thread David Miller
From: Maciej Żenczykowski Date: Mon, 1 Apr 2019 12:44:58 -0700 > From: Maciej Żenczykowski > > IPv6 is 20 years old and IPv4 has run out of IP addresses > and is deprecated. > > It is time to make IPv6 a first class citizen. > > As such we remove the ability to compile IPv6 as a module, > an

Re: [PATCH v2 net-next 5/5] ipv6: Flip to fib_nexthop_info

2019-04-01 Thread David Ahern
On 4/1/19 2:15 PM, Martin Lau wrote: >> diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c >> index 6a8f8cd4d6db..7e8d5ed116fe 100644 >> --- a/net/ipv4/fib_semantics.c >> +++ b/net/ipv4/fib_semantics.c >> @@ -45,6 +45,7 @@ >> #include >> #include >> #include >> +#include >> >

Re: [PATCH v2 net-next 5/5] ipv6: Flip to fib_nexthop_info

2019-04-01 Thread Martin Lau
On Mon, Apr 01, 2019 at 09:26:03AM -0700, David Ahern wrote: > From: David Ahern > > Export fib_nexthop_info and fib_add_nexthop for use by IPv6 code. > Remove rt6_nexthop_info and rt6_add_nexthop in favor of the IPv4 > versions. Update fib_nexthop_info for IPv6 linkdown check and > RTA_GATEWAY f

[PATCH 2/2] net: configs - remove CONFIG_IPV6 references

2019-04-01 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Signed-off-by: Maciej Żenczykowski --- arch/alpha/defconfig | 1 - arch/arc/configs/axs101_defconfig | 1 - arch/arc/configs/axs103_defconfig | 1 - arch/arc/configs/axs103_smp_defconfig | 1 - ar

[PATCH 1/2] net: enable IPv6 iff IPv4

2019-04-01 Thread Maciej Żenczykowski
From: Maciej Żenczykowski IPv6 is 20 years old and IPv4 has run out of IP addresses and is deprecated. It is time to make IPv6 a first class citizen. As such we remove the ability to compile IPv6 as a module, and IPv4 support now implies IPv6 support. This has the nice benefit of allowing upco

Re: [PATCH] Add a 'start N' option when specifying the Rx flow hash indirection table.

2019-04-01 Thread Edward Cree
On 01/04/2019 19:42, Jonathan Lemon wrote: > When using more than one RSS table, specifying a starting queue for flow > distibution > makes it easier to specify the set of queues attached to the table. An > example: > > ethtool -X eth0 context 0 equal 14 # queues 0 .. 13 >

Re: [PATCH bpf-next 0/2] bpf: Support variable offset stack access from helpers

2019-04-01 Thread Daniel Borkmann
On 04/01/2019 07:23 PM, Alexei Starovoitov wrote: > On 4/1/19 9:09 AM, Daniel Borkmann wrote: >> On 03/29/2019 08:10 PM, Alexei Starovoitov wrote: >>> On Thu, Mar 28, 2019 at 6:02 PM Andrey Ignatov wrote: The patch set adds support for stack access with variable offset from helpers

Re: [PATCH v2 net-next 2/5] ipv4: Add fib_nh_common to fib_result

2019-04-01 Thread David Ahern
On 4/1/19 12:20 PM, Martin Lau wrote: >> diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h >> index 12a6d759cf57..5070bc531ca4 100644 >> --- a/include/net/ip_fib.h >> +++ b/include/net/ip_fib.h >> @@ -156,15 +156,16 @@ struct fib_rule; >> >> struct fib_table; >> struct fib_result { >> -

[PATCH] Add a 'start N' option when specifying the Rx flow hash indirection table.

2019-04-01 Thread Jonathan Lemon
When using more than one RSS table, specifying a starting queue for flow distibution makes it easier to specify the set of queues attached to the table. An example: ethtool -X eth0 context 0 equal 14# queues 0 .. 13 ethtool -X eth0 context 1 start 14 equal 42 #

[net 0/2][pull request] Intel Wired LAN Driver Fixes 2019-04-01

2019-04-01 Thread Jeff Kirsher
This series contains two fixes for XDP in the i40e driver. Björn provides both fixes, first moving a function out of the header and into the main.c file. Second fixes a regression introduced in an earlier patch that removed umem from the VSI. This caused an issue because the setup code would try

[net 1/2] i40e: move i40e_xsk_umem function

2019-04-01 Thread Jeff Kirsher
From: Björn Töpel The i40e_xsk_umem function was explicitly inlined in i40e.h. There is no reason for that, so move it to i40e_main.c instead. Signed-off-by: Björn Töpel Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e.h | 14 -- dr

[net 2/2] i40e: add tracking of AF_XDP ZC state for each queue pair

2019-04-01 Thread Jeff Kirsher
From: Björn Töpel In commit f3fef2b6e1cc ("i40e: Remove umem from VSI") a regression was introduced; When the VSI was reset, the setup code would try to enable AF_XDP ZC unconditionally (as long as there was a umem placed in the netdev._rx struct). Here, we add a bitmap to the VSI that tracks if

Re: [patch net-next v2 08/12] nfp: pass switch ID through devlink_port_attrs_set()

2019-04-01 Thread Jakub Kicinski
On Mon, 1 Apr 2019 11:40:22 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Pass the switch ID down the to devlink through devlink_port_attrs_set() > so it can be used by devlink_compat_switch_id_get(). > > Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski

Re: [patch net-next v2 09/12] nfp: remove ndo_get_port_parent_id implementation

2019-04-01 Thread Jakub Kicinski
On Mon, 1 Apr 2019 11:40:23 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Remove implementation of get_port_parent_id ndo and rely on core calling > into devlink for the information directly. > > Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski

Re: [patch net-next v2 01/12] net: devlink: convert devlink_port_attrs bools to bits

2019-04-01 Thread Jakub Kicinski
On Mon, 1 Apr 2019 11:40:15 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > In order to save space in the struct, convert bools to bits. > > Signed-off-by: Jiri Pirko > Reviewed-by: Florian Fainelli Reviewed-by: Jakub Kicinski

Re: [PATCH rdma-next 0/8] User space steering

2019-04-01 Thread Jakub Kicinski
On Mon, 1 Apr 2019 09:28:16 +0300, Leon Romanovsky wrote: > On Sun, Mar 31, 2019 at 02:06:33PM -0700, Jakub Kicinski wrote: > > On Sun, 31 Mar 2019 19:44:42 +0300, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > From Ariel, > > > > > > This series of patches adds user space manage

Re: [PATCH v2 net-next 2/5] ipv4: Add fib_nh_common to fib_result

2019-04-01 Thread Martin Lau
On Mon, Apr 01, 2019 at 09:26:00AM -0700, David Ahern wrote: > From: David Ahern > > Most of the ipv4 code only needs data from fib_nh_common. Add > fib_nh_common selection to fib_result and update users to use it. > > Right now, fib_nh_common in fib_result will point to a nexthop within > a fib

Re: [PATCH net-next] MAINTAINERS: Fix mellanox Innova IPsec

2019-04-01 Thread David Miller
From: Boris Pismenny Date: Fri, 29 Mar 2019 20:19:44 +0300 > The Innova IPsec driver is part of all Innova drivers, and its > maintainenece is covered by an existing entry in this file. > > Signed-off-by: Boris Pismenny Applied, thanks.

Re: [PATCH net-next v5] openvswitch: Make metadata_dst tunnel work in IP_TUNNEL_INFO_BRIDGE mode

2019-04-01 Thread David Miller
From: we...@ucloud.cn Date: Thu, 28 Mar 2019 12:43:23 +0800 > From: wenxu > > There is currently no support for the multicast/broadcast aspects > of VXLAN in ovs. In the datapath flow the tun_dst must specific. > But in the IP_TUNNEL_INFO_BRIDGE mode the tun_dst can not be specific. > And the pa

Re: [net-next, PATCH 1/2] net: page_pool: add helper funtion to retrieve dma addresses

2019-04-01 Thread David Miller
Please submit these patches alongside the first real user of these interfaces. Thanks.

Re: [PATCH net-next 0/3] net: phy: add and use new function genphy_read_abilities

2019-04-01 Thread David Miller
From: Heiner Kallweit Date: Wed, 27 Mar 2019 21:57:10 +0100 > Similar to genphy_c45_pma_read_abilities() add a function to dynamically > detect the abilities of a Clause 22 PHY. This is mainly copied from > genphy_config_init(). Main benefit is that PHY drivers no longer have > to specify whether

Re: [PATCH net-next] tcp: cleanup sk_tx_skb_cache before reuse

2019-04-01 Thread David Miller
From: Eric Dumazet Date: Fri, 29 Mar 2019 12:46:17 -0700 > TCP stack relies on the fact that a freshly allocated skb > has skb->cb[] and skb_shinfo(skb)->tx_flags cleared. > > When recycling tx skb, we must ensure these fields are cleared. > > Fixes: 472c2e07eef0 ("tcp: add one skb cache for tx

Re: [PATCH net,v2] vrf: check accept_source_route on the original netdevice

2019-04-01 Thread David Miller
From: Stephen Suryaputra Date: Wed, 27 Mar 2019 15:58:48 -0400 > Configuration check to accept source route IP options should be made on > the incoming netdevice when the skb->dev is an l3mdev master. The route > lookup for the source route next hop also needs the incoming netdev. > > Signed-off

Re: [PATCH net-next] cxgb4/cxgb4vf: Display advertised FEC in ethtool

2019-04-01 Thread David Miller
From: Vishal Kulkarni Date: Fri, 29 Mar 2019 18:24:03 +0530 > This patch advertises Forward Error Correction in ethtool > > Signed-off-by: Casey Leedom > Signed-off-by: Vishal Kulkarni Applied.

Re: [PATCH net] net: tls: prevent false connection termination with offload

2019-04-01 Thread David Miller
From: Jakub Kicinski Date: Thu, 28 Mar 2019 14:54:43 -0700 > Only decrypt_internal() performs zero copy on rx, all paths > which don't hit decrypt_internal() must set zc to false, > otherwise tls_sw_recvmsg() may return 0 causing the application > to believe that that connection got closed. > >

Re: [PATCH net-next] cxgb4: Update 1.23.3.0 as the latest firmware supported.

2019-04-01 Thread David Miller
From: Vishal Kulkarni Date: Fri, 29 Mar 2019 16:56:09 +0530 > Change t4fw_version.h to update latest firmware version > number to 1.23.3.0. > > Signed-off-by: Vishal Kulkarni Applied.

Re: [PATCH net-next] team: use netif_is_team_port()

2019-04-01 Thread David Miller
From: Julian Wiedmann Date: Fri, 29 Mar 2019 14:37:07 +0100 > Replace the team_port_exists() macro with its twin from netdevice.h > > CC: Jiri Pirko > Signed-off-by: Julian Wiedmann Applied.

Re: [PATCH hyperv-fixes,v3] hv_netvsc: Fix unwanted wakeup after tx_disable

2019-04-01 Thread David Miller
From: Haiyang Zhang Date: Thu, 28 Mar 2019 19:40:36 + > From: Haiyang Zhang > > After queue stopped, the wakeup mechanism may wake it up again > when ring buffer usage is lower than a threshold. This may cause > send path panic on NULL pointer when we stopped all tx queues in > netvsc_detac

Re: [PATCH net-next] net: bridge: use netif_is_bridge_port()

2019-04-01 Thread David Miller
From: Julian Wiedmann Date: Fri, 29 Mar 2019 14:38:19 +0100 > Replace the br_port_exists() macro with its twin from netdevice.h > > CC: Roopa Prabhu > CC: Nikolay Aleksandrov > Signed-off-by: Julian Wiedmann Applied.

Re: [PATCH][v2] net: ethtool: not call vzalloc for zero sized memory request

2019-04-01 Thread David Miller
From: Li RongQing Date: Fri, 29 Mar 2019 09:18:02 +0800 > NULL or ZERO_SIZE_PTR will be returned for zero sized memory > request, and derefencing them will lead to a segfault > > so it is unnecessory to call vzalloc for zero sized memory > request and not call functions which maybe derefence the

Re: [PATCH net-next] r8169: use netif_receive_skb_list batching

2019-04-01 Thread David Miller
From: Eric Dumazet Date: Mon, 1 Apr 2019 02:17:12 -0700 > This means no GRO at all I do not think that is true as the SKB list layer does queue up to GRO.

Re: [PATCH bpf-next 0/2] bpf: Support variable offset stack access from helpers

2019-04-01 Thread Alexei Starovoitov
On 4/1/19 9:09 AM, Daniel Borkmann wrote: > On 03/29/2019 08:10 PM, Alexei Starovoitov wrote: >> On Thu, Mar 28, 2019 at 6:02 PM Andrey Ignatov wrote: >>> >>> The patch set adds support for stack access with variable offset from >>> helpers. >>> >>> Patch 1 is the main patch in the set and provid

Re: [PATCH bpf-next 1/4] selftests_bpf: extend test_tc_tunnel for UDP encap

2019-04-01 Thread Willem de Bruijn
> In > > commit 868d523535c2 ("bpf: add bpf_skb_adjust_room encap flags") > > ...Willem introduced support to bpf_skb_adjust_room for GSO-friendly nit: please avoid unnecessary vertical whitespace. Explicit mention of author is also not very relevant. I suggest "Commit XXX ("..") introduced suppor

Re: [PATCH bpf-next 2/4] bpf: add layer 2 encap support to bpf_skb_adjust_room

2019-04-01 Thread Willem de Bruijn
On Mon, Apr 1, 2019 at 11:33 AM Alan Maguire wrote: > > In > > commit 868d523535c2 ("bpf: add bpf_skb_adjust_room encap flags") > > ...Willem introduced support to bpf_skb_adjust_room for GSO-friendly > GRE and UDP encapsulation. > > For GSO to work for skbs, the inner headers (mac and network) ne

Re: [PATCH net-next] r8169: use netif_receive_skb_list batching

2019-04-01 Thread Edward Cree
On 01/04/2019 18:14, David Miller wrote: > From: Eric Dumazet > Date: Mon, 1 Apr 2019 02:17:12 -0700 > >> This means no GRO at all > I do not think that is true as the SKB list layer does queue up to > GRO. No, Eric is right; the current list layer bypasses GRO completely. netif_receive_skb_list(

Re: [PATCH bpf-next 0/4] L2 encap support for bpf_skb_adjust_room

2019-04-01 Thread Willem de Bruijn
On Mon, Apr 1, 2019 at 11:33 AM Alan Maguire wrote: > > Extend bpf_skb_adjust_room growth to mark inner MAC header so that > L2 encapsulation can be used for tc tunnels. Perhaps superfluously, but I forgot to mention earlier during review: super useful extension! Thanks for working on this Alan.

  1   2   >