[PATCH bpf-next] bpf: make bpf_skb_ecn_set_ce callable from BPF_PROG_TYPE_SCHED_ACT

2019-03-20 Thread Peter Oskolkov
This helper is useful if a bpf tc filter sets skb->tstamp. Signed-off-by: Peter Oskolkov --- net/core/filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/core/filter.c b/net/core/filter.c index 647c63a7b25b..c6d016d9c4b8 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -5

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-20 Thread Phil Reid
On 20/03/2019 2:39 pm, Heiner Kallweit wrote: On 20.03.2019 06:16, Phil Reid wrote: On 20/03/2019 11:37 am, Florian Fainelli wrote: On 3/19/2019 7:34 PM, liweihang wrote: Hi all, I've met a similar issue and sent an email to discuss about it before: Question about setting speed and duplex f

[PATCH net-next 0/2] qed* enhancements.

2019-03-20 Thread Sudarsana Reddy Kalluru
The patch series adds couple of enhancements for qed/qede drivers. Please consider applying it to 'net-next' tree. Sudarsana Reddy Kalluru (2): qede: Populate mbi version in ethtool driver query data. qed: Define new MF bit for no_vlan config drivers/net/ethernet/qlogic/qed/qed.h |

[PATCH net-next 1/2] qede: Populate mbi version in ethtool driver query data.

2019-03-20 Thread Sudarsana Reddy Kalluru
The patch adds support to display MBI image version in 'ethtool -i' output. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 24 +++- 1 file changed, 19 insertions(+), 5 de

[PATCH net-next 2/2] qed: Define new MF bit for no_vlan config

2019-03-20 Thread Sudarsana Reddy Kalluru
The patch introduces a new Multi-Function bit for cases where firmware shouldn't perform the insertion of vlan-0 tag. The new bit is defined to abstract the implementation from the actual MF mode. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon -

Re: [PATCHv2 net] ipv6: make ip6_create_rt_rcu return ip6_null_entry instead of NULL

2019-03-20 Thread David Ahern
On 3/20/19 7:45 AM, Xin Long wrote: > Jianlin reported a crash: > > [ 381.484332] BUG: unable to handle kernel NULL pointer dereference at > 0068 > [ 381.619802] RIP: 0010:fib6_rule_lookup+0xa3/0x160 > [ 382.009615] Call Trace: > [ 382.020762] > [ 382.030174] ip6_rou

[PATCH net-next] fou: Support binding FoU socket

2019-03-20 Thread Kristian Evensen
An FoU socket is currently bound to the wildcard-address. While this works fine, there are several use-cases where the use of the wildcard-address is not desirable. For example, I use FoU on some multi-homed servers and would like to use FoU on only one of the interfaces. This commit adds support

[PATCH 2/2] tun: Remove unused first parameter of tun_get_iff()

2019-03-20 Thread Kirill Tkhai
Signed-off-by: Kirill Tkhai --- drivers/net/tun.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index b7137edff624..b834b0d168f9 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -2873,8 +2873,7 @@ static int tun_set_if

[PATCH 1/2] tun: Add ioctl() TUNGETDEVNETNS cmd to allow obtaining real net ns of tun device

2019-03-20 Thread Kirill Tkhai
In commit f2780d6d7475 "tun: Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device" it was missed that tun may change its net ns, while net ns of socket remains the same as it was created initially. SIOCGSKNS returns net ns of socket, so it is not suitable for obtaining net ns of device

[PATCH net-next v2 2/3] packet: rework packet_pick_tx_queue() to use common code selection

2019-03-20 Thread Paolo Abeni
Currently packet_pick_tx_queue() is the only caller of ndo_select_queue() using a fallback argument other than netdev_pick_tx. Leveraging rx queue, we can obtain a similar queue selection behavior using core helpers. After this change, ndo_select_queue() is always invoked with netdev_pick_tx() as

[PATCH net-next v2 3/3] net: remove 'fallback' argument from dev->ndo_select_queue()

2019-03-20 Thread Paolo Abeni
After the previous patch, all the callers of ndo_select_queue() provide as a 'fallback' argument netdev_pick_tx. The only exceptions are nested calls to ndo_select_queue(), which pass down the 'fallback' available in the current scope - still netdev_pick_tx. We can drop such argument and replace f

[PATCH net-next v2 0/3] net: refactor ndo_select_queue()

2019-03-20 Thread Paolo Abeni
Currently, on most devices implementing ndo_select_queue(), we get 2 indirect calls per xmit packet, at least in some scenarios. We can avoid one of such indirect calls refactoring the ndo_select_queue() usage so that we don't need anymore the 'fallback' argument. The first patch renames a helper

[PATCH net-next v2 1/3] net: dev: rename queue selection helpers.

2019-03-20 Thread Paolo Abeni
With the following patches, we are going to use __netdev_pick_tx() in many modules. Rename it to netdev_pick_tx(), to make it clear is a public API. Also rename the existing netdev_pick_tx() to netdev_core_pick_tx(), to avoid name clashes. Suggested-by: Eric Dumazet Suggested-by: David Miller S

Re: [PATCH net] sctp: use memdup_user instead of vmemdup_user

2019-03-20 Thread Neil Horman
On Wed, Mar 20, 2019 at 02:49:38PM +0800, Xin Long wrote: > In sctp_setsockopt_bindx()/__sctp_setsockopt_connectx(), it allocates > memory with addrs_size which is passed from userspace. We used flag > GFP_USER to put some more restrictions on it in Commit cacc06215271 > ("sctp: use GFP_USER for us

RE: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-20 Thread liweihang
> -Original Message- > From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Wednesday, March 20, 2019 11:37 AM > To: liweihang ; Phil Reid > ; netdev@vger.kernel.org > Cc: Andrew Lunn ; David S. Miller > ; dongsheng.w...@hxt-semitech.com; > cphe...@gmail.com; clemens.gru...@pqgrub

[PATCH bpf] libbpf: Check if map names are not NULL

2019-03-20 Thread Michal Rostecki
BPF maps do not have to be named, so map names can be NULL. Map name pointers should be checked before doing any operations which cannot be done on NULL pointers. This issue was detected by the following errors coming from bpftool built with AddressSanitizer: bpf.c:256:2: runtime error: null poin

[PATCHv2 bpf-next 2/3] bpf, tests: drop unused __bpf_constant_foo defines

2019-03-20 Thread Sergey Senozhatsky
Additionally, simplify bpf_ntohs/bpf_ntohl/bpf_htons/bpf_htonl by switching to UAPI swab(). Signed-off-by: Sergey Senozhatsky --- tools/testing/selftests/bpf/bpf_endian.h | 37 +--- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/tools/testing/selftests/bpf/bpf

[PATCHv2 bpf-next 3/3] bpf, tests: don't use __bpf_constant_htons()

2019-03-20 Thread Sergey Senozhatsky
Prefer bpf_htons() instead. Signed-off-by: Sergey Senozhatsky --- tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 4 ++-- tools/testing/selftests/bpf/test_progs.c| 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/bpf/pro

[PATCHv2 bpf-next 1/3] bpf, tests: tweak endianness selection

2019-03-20 Thread Sergey Senozhatsky
Not all compilers have __builtin_bswap16() and __builtin_bswap32(), thus not all compilers are able to compile the following code: (__builtin_constant_p(x) ? \ ___constant_swab16(x) : __builtin_bswap16(x)) That's the reason why bpf_ntohl() doesn't work on GCC < 4.8, for in

Re: [PATCHv2 bpf-next 3/3] bpf, tests: don't use __bpf_constant_htons()

2019-03-20 Thread Sergey Senozhatsky
Yikes... This is actually - 2/3 -ss

Re: [PATCHv2 bpf-next 2/3] bpf, tests: drop unused __bpf_constant_foo defines

2019-03-20 Thread Sergey Senozhatsky
And this one is the last one - 3/3. -ss

[PATCH bpf-next 0/2] bpf: remove incorrect 'verifier bug' warning

2019-03-20 Thread Paul Chaignon
The BPF verifier checks the maximum number of call stack frames twice, first in the main CFG traversal (do_check) and then in a subsequent traversal (check_max_stack_depth). If the second check fails, it logs a 'verifier bug' warning and errors out, as the number of call stack frames should have b

[PATCH bpf-next 1/2] bpf: remove incorrect 'verifier bug' warning

2019-03-20 Thread Paul Chaignon
The BPF verifier checks the maximum number of call stack frames twice, first in the main CFG traversal (do_check) and then in a subsequent traversal (check_max_stack_depth). If the second check fails, it logs a 'verifier bug' warning and errors out, as the number of call stack frames should have b

[PATCH bpf-next 2/2] selftests/bpf: test case for invalid call stack in dead code

2019-03-20 Thread Paul Chaignon
This patch adds a test case with an excessive number of call stack frames in dead code. Signed-off-by: Paul Chaignon Tested-by: Xiao Han --- tools/testing/selftests/bpf/verifier/calls.c | 38 1 file changed, 38 insertions(+) diff --git a/tools/testing/selftests/bpf/verifie

Re: [PATCH bpf-next v2] tools/bpf: generate pkg-config file for libbpf

2019-03-20 Thread Luca Boccassi
On Tue, 2019-03-19 at 16:17 -0700, Stanislav Fomichev wrote: > On 03/19, Luca Boccassi wrote: > > Generate a libbpf.pc file at build time so that users can rely > > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > > > Signed-off-by: Luca Boccassi > > --- > > v2: use QUIET_GEN instea

[PATCH bpf-next v3] tools/bpf: generate pkg-config file for libbpf

2019-03-20 Thread luca . boccassi
From: Luca Boccassi Generate a libbpf.pc file at build time so that users can rely on pkg-config to find the library, its CFLAGS and LDFLAGS. Signed-off-by: Luca Boccassi --- v2: use QUIET_GEN instead of QUIET_LINK to generate pc file, save kernel version in its own variable instead of call

Re: [PATCH bpf-next v2] tools/bpf: generate pkg-config file for libbpf

2019-03-20 Thread Luca Boccassi
On Wed, 2019-03-20 at 13:22 +, Luca Boccassi wrote: > On Tue, 2019-03-19 at 16:17 -0700, Stanislav Fomichev wrote: > > On 03/19, Luca Boccassi wrote: > > > Generate a libbpf.pc file at build time so that users can rely > > > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > > > >

[PATCH net v2 00/18] net/sched: validate the control action with all the other parameters

2019-03-20 Thread Davide Caratti
currently, the kernel checks for bad values of the control action in tcf_action_init_1(), after a successful call to the action's init() function. When the control action is 'goto chain', this causes two undesired behaviors: 1. "misconfigured action after replace that causes kernel crash": if

[PATCH net v2 02/18] net/sched: act_bpf: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc filter add dev crash0 egress matchall \ > action bpf bytecode '1,6 0 0 4294967295' pass index 90 # tc actions replace action bpf \ > bytecode '1,6 0 0 4294967295' goto chain 42 index 90 cookie c1a0c1a0 # tc action show action bpf had the following output: Error:

[PATCH net v2 04/18] net/sched: act_gact: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action gact pass index 90 # tc actions replace action gact \ > goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action gact had the following output: Error: Failed to init TC acti

[PATCH net v2 01/18] net/sched: prepare TC actions to properly validate the control action

2019-03-20 Thread Davide Caratti
- pass a pointer to struct tcf_proto in each actions's init() handler, to allow validating the control action, checking whether the chain exists and (eventually) refcounting it. - remove code that validates the control action after a successful call to the action's init() handler, and replace

[PATCH net v2 06/18] net/sched: act_mirred: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action mirred ingress mirror dev lo pass # tc actions replace action mirred \ > ingress mirror dev lo goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action mirred had the followin

[PATCH net v2 08/18] net/sched: act_nat: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action nat ingress 1.18.1.1 1.18.2.2 pass index 90 # tc actions replace action nat \ > ingress 1.18.1.1 1.18.2.2 goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action nat had the

[PATCH net v2 10/18] net/sched: act_police: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action police rate 3mbit burst 250k pass index 90 # tc actions replace action police \ > rate 3mbit burst 250k goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action police rate 3mb

[PATCH net v2 11/18] net/sched: act_sample: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action sample rate 1024 group 4 pass index 90 # tc actions replace action sample \ > rate 1024 group 4 goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action sample had the followi

[PATCH net v2 13/18] net/sched: act_skbedit: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action skbedit ptype host pass index 90 # tc actions replace action skbedit \ > ptype host goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action skbedit had the following output:

[PATCH net v2 09/18] net/sched: act_pedit: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc filter add dev crash0 egress matchall \ > action pedit ex munge ip ttl set 10 pass index 90 # tc actions replace action pedit \ > ex munge ip ttl set 10 goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action pedit had the following output: Error: Failed

[PATCH net v2 07/18] net/sched: act_connmark: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action connmark pass index 90 # tc actions replace action connmark \ > goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action connmark had the following output: Error: Failed to

[PATCH net v2 03/18] net/sched: act_csum: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall action csum icmp pass index 90 # tc actions replace action csum icmp goto chain 42 index 90 \ > cookie c1a0c1a0 # tc actions show action csum had the following output: Error: Failed to init TC

[PATCH net v2 05/18] net/sched: act_ife: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action ife encode allow mark pass index 90 # tc actions replace action ife \ > encode allow mark goto chain 42 index 90 cookie c1a0c1a0 # tc action show action ife had the following output:

[PATCH net v2 12/18] net/sched: act_simple: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action simple sdata hello pass index 90 # tc actions replace action simple \ > sdata world goto chain 42 index 90 cookie c1a0c1a0 # tc action show action simple had the following output:

[PATCH net v2 18/18] net/sched: let actions use RCU to access 'goto_chain'

2019-03-20 Thread Davide Caratti
use RCU when accessing the action chain, to avoid use after free in the traffic path when 'goto chain' is replaced on existing TC actions (see script below). Since the control action is read in the traffic path without holding the action spinlock, we need to explicitly ensure that a->goto_chain is

[PATCH net v2 15/18] net/sched: act_tunnel_key: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.2 dst_port 3128 \ > nocsum id 1 pass index 90 # tc actions replace action tunnel_key \ > set src_ip 10.10.10.1 dst_ip 20.20.2 dst_port 31

[PATCH net v2 17/18] net/sched: don't dereference a->goto_chain to read the chain index

2019-03-20 Thread Davide Caratti
callers of tcf_gact_goto_chain_index() can potentially read an old value of the chain index, or even dereference a NULL 'goto_chain' pointer, because 'goto_chain' and 'tcfa_action' are read in the traffic path without caring of concurrent write in the control path. The most recent value of chain in

[PATCH net v2 16/18] net/sched: act_vlan: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action vlan pop pass index 90 # tc actions replace action vlan \ > pop goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action vlan had the following output: Error: Failed to init

[PATCH net v2 14/18] net/sched: act_skbmod: validate the control action inside init()

2019-03-20 Thread Davide Caratti
the following script: # tc qdisc add dev crash0 clsact # tc filter add dev crash0 egress matchall \ > action skbmod set smac 00:c1:a0:c1:a0:00 pass index 90 # tc actions replace action skbmod \ > set smac 00:c1:a0:c1:a0:00 goto chain 42 index 90 cookie c1a0c1a0 # tc actions show action skbmo

[PATCH 6/6] net: ks8851: Deduplicate register macros

2019-03-20 Thread Lukas Wunner
The ks8851 chip is sold either with an SPI interface (KSZ8851SNL) or with a so-called non-PCI interface (KSZ8851-16MLL). When the driver for the latter was introduced with commit a55c0a0ed415 ("drivers/net: ks8851_mll ethernet network driver"), it duplicated the register macros introduced by the d

[PATCH net] dpaa2-eth: Fix possible access beyond end of array

2019-03-20 Thread Ioana Ciocoi Radulescu
Make sure we don't try to enqueue XDP_REDIRECT frames to an inexistent FQ. While it is guaranteed not to have more than one queue per core, having fewer queues than CPUs on an interface is a valid configuration. Fixes: d678be1dc1ec ("dpaa2-eth: add XDP_REDIRECT support") Reported-by: Jesper Danga

[PATCH 0/6] ks8851 fixes & cleanups

2019-03-20 Thread Lukas Wunner
Four fixes and two cleanups for the Microchip (formerly Micrel) KSZ8851 SPI Ethernet driver. Some of the fixes might even pass as stable material, but I haven't marked them as such for cautiousness: Doesn't hurt letting them bake in linux-next for a few weeks to raise the confidence, even though w

[PATCH 1/6] net: ks8851: Dequeue RX packets explicitly

2019-03-20 Thread Lukas Wunner
The ks8851 driver lets the chip auto-dequeue received packets once they have been read in full. It achieves that by setting the ADRFE flag in the RXQCR register ("Auto-Dequeue RXQ Frame Enable"). However if allocation of a packet's socket buffer or retrieval of the packet over the SPI bus fails, t

[PATCH 2/6] net: ks8851: Reassert reset pin if chip ID check fails

2019-03-20 Thread Lukas Wunner
Commit 73fdeb82e963 ("net: ks8851: Add optional vdd_io regulator and reset gpio") amended the ks8851 driver to briefly assert the chip's reset pin on probe. It also amended the probe routine's error path to reassert the reset pin if a subsequent initialization step fails. However the commit mispla

[PATCH 3/6] net: ks8851: Delay requesting IRQ until opened

2019-03-20 Thread Lukas Wunner
The ks8851 driver currently requests the IRQ before registering the net_device. Because the net_device name is used as IRQ name and is still "eth%d" when the IRQ is requested, it's impossibe to tell IRQs apart if multiple ks8851 chips are present. Most other drivers delay requesting the IRQ until

[PATCH 4/6] net: ks8851: Set initial carrier state to down

2019-03-20 Thread Lukas Wunner
The ks8851 chip's initial carrier state is down. A Link Change Interrupt is signaled once interrupts are enabled if the carrier is up. The ks8851 driver has it backwards by assuming that the initial carrier state is up. The state is therefore misrepresented if the interface is opened with no cable

[PATCH 5/6] net: ks8851: Fix register macro misnomers

2019-03-20 Thread Lukas Wunner
In the header file accompanying the ks8851 driver, the P1SCLMD register macros are misnamed, they actually pertain to the P1CR register. The P1CR macros in turn pertain to the P1SR register, see pages 65 to 68 of the spec: http://www.hqchip.com/uploads/pdf/201703/47c98946d6c97a4766e14db3f24955f2.p

[PATCH net-next] ipv6: Add icmp_echo_ignore_anycast for ICMPv6

2019-03-20 Thread Stephen Suryaputra
In addition to icmp_echo_ignore_multicast, there is a need to also prevent responding to pings to anycast addresses for security. Signed-off-by: Stephen Suryaputra --- Documentation/networking/ip-sysctl.txt | 5 + include/net/netns/ipv6.h | 1 + net/ipv6/af_inet6.c

[PATCH bpf-next 01/13] bpf: in bpf_skb_adjust_room avoid copy in tx fast path

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn bpf_skb_adjust_room calls skb_cow on grow. This expensive operation can be avoided in the fast path when the only other clone has released the header. This is the common case for TCP, where one headerless clone is kept on the retransmit queue. It is safe to do so even whe

[PATCH bpf-next 05/13] selftests/bpf: extend bpf tunnel test with gre

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn GRE is a commonly used protocol. Add GRE cases for both IPv4 and IPv6. It also inserts different sized headers, which can expose some unexpected edge cases. Signed-off-by: Willem de Bruijn --- .../selftests/bpf/progs/test_tc_tunnel.c | 148 +- tools

[PATCH bpf-next 03/13] selftests/bpf: expand bpf tunnel test with decap

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn The bpf tunnel test encapsulates using bpf, then decapsulates using a standard tunnel device to verify correctness. Once encap is verified, also test decap, by replacing the tunnel device on decap with another bpf program. Signed-off-by: Willem de Bruijn --- .../selftes

[PATCH bpf-next 00/13] bpf tc tunneling

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn BPF allows for dynamic tunneling, choosing the tunnel destination and features on-demand. Extend bpf_skb_adjust_room to allow for efficient tunneling at the TC hooks. Patch 1 is a performance optimization, avoiding an unnecessary unclone for the TCP hot path. Patches

[PATCH bpf-next 08/13] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_FIXED_GSO

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn bpf_skb_adjust_room adjusts gso_size of gso packets to account for the pushed or popped header room. This is not allowed with UDP, where gso_size delineates datagrams. Add an option to avoid these updates and allow this call for datagrams. It can also be used with TCP, wh

[PATCH bpf-next 02/13] selftests/bpf: bpf tunnel encap test

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn Validate basic tunnel encapsulation using ipip. Set up two namespaces connected by veth. Connect a client and server. Do this with and without bpf encap. Signed-off-by: Willem de Bruijn --- tools/testing/selftests/bpf/Makefile | 3 +- .../selftests/bpf/progs/t

[PATCH bpf-next 12/13] selftests/bpf: convert bpf tunnel test to BPF_F_ADJ_ROOM_FIXED_GSO

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn Lower route MTU to ensure packets fit in device MTU after encap, then skip the gso_size changes. Signed-off-by: Willem de Bruijn --- tools/testing/selftests/bpf/progs/test_tc_tunnel.c | 11 --- tools/testing/selftests/bpf/test_tc_tunnel.sh | 6 ++ 2 fil

[PATCH bpf-next 13/13] selftests/bpf: convert bpf tunnel test to encap modes

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn Make the tests correctly annotate skbs with tunnel metadata. This makes the gso tests succeed. Enable them. Signed-off-by: Willem de Bruijn --- .../selftests/bpf/progs/test_tc_tunnel.c | 19 +++ tools/testing/selftests/bpf/test_tc_tunnel.sh | 10 +++

[PATCH bpf-next 10/13] bpf: Sync bpf.h to tools

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn Sync include/uapi/linux/bpf.h with tools/ Signed-off-by: Willem de Bruijn --- tools/include/uapi/linux/bpf.h | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 9

[PATCH bpf-next 11/13] selftests/bpf: convert bpf tunnel test to BPF_ADJ_ROOM_MAC

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn Avoid moving the network layer header when prefixing tunnel headers. This avoids an explicit call to bpf_skb_store_bytes and an implicit move of the network header bytes in bpf_skb_adjust_room. Signed-off-by: Willem de Bruijn --- .../selftests/bpf/progs/test_tc_tunnel.c

[PATCH bpf-next 06/13] selftests/bpf: extend bpf tunnel test with tso

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn Segmentation offload takes a longer path. Verify that the feature works with large packets. The test succeeds if not setting dodgy in bpf_skb_adjust_room, as veth TSO is permissive. If not setting SKB_GSO_DODGY, this enables tunneled TSO offload on supporting NICs. The f

[PATCH bpf-next 04/13] selftests/bpf: expand bpf tunnel test to ipv6

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn The test only uses ipv4 so far, expand to ipv6. This is mostly a boilerplate near copy of the ipv4 path. Signed-off-by: Willem de Bruijn --- tools/testing/selftests/bpf/config| 2 + .../selftests/bpf/progs/test_tc_tunnel.c | 116 +++--- too

[PATCH bpf-next 07/13] bpf: add bpf_skb_adjust_room mode BPF_ADJ_ROOM_MAC

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn bpf_skb_adjust_room net allows inserting room in an skb. Existing mode BPF_ADJ_ROOM_NET inserts room after the network header by pulling the skb, moving the network header forward and zeroing the new space. Add new mode BPF_ADJUST_ROOM_MAC that inserts room after the mac

[PATCH bpf-next 09/13] bpf: add bpf_skb_adjust_room encap flags

2019-03-20 Thread Willem de Bruijn
From: Willem de Bruijn When pushing tunnel headers, annotate skbs in the same way as tunnel devices. For GSO packets, the network stack requires certain fields set to segment packets with tunnel headers. gro_gse_segment depends on transport and inner mac header, for instance. Add an option to p

Re: [PATCH bpf-next 10/13] bpf: Sync bpf.h to tools

2019-03-20 Thread Soheil Hassas Yeganeh
On Wed, Mar 20, 2019 at 10:50 AM Willem de Bruijn wrote: > > From: Willem de Bruijn > > Sync include/uapi/linux/bpf.h with tools/ > > Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh > --- > tools/include/uapi/linux/bpf.h | 22 +- > 1 file changed, 21 inser

Re: [PATCH bpf-next 09/13] bpf: add bpf_skb_adjust_room encap flags

2019-03-20 Thread Alan Maguire
On Wed, 20 Mar 2019, Willem de Bruijn wrote: > From: Willem de Bruijn > > When pushing tunnel headers, annotate skbs in the same way as tunnel > devices. > This is great stuff Willem! > For GSO packets, the network stack requires certain fields set to > segment packets with tunnel headers. gro

[PATCH net-next] ipv4: Allow amount of dirty memory from fib resizing to be controllable

2019-03-20 Thread David Ahern
From: David Ahern fib_trie implementation calls synchronize_rcu when a certain amount of pages are dirty from freed entries. The number of pages was determined experimentally in 2009 (commit c3059477fce2d). At the current setting, synchronize_rcu is called often -- 51 times in a second in one te

[PATCH net-next] ipv6: Remove fallback argument from ip6_hold_safe

2019-03-20 Thread David Ahern
From: David Ahern net and null_fallback are redundant. Remove null_fallback in favor of !net check. Signed-off-by: David Ahern --- net/ipv6/route.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 4ef4bbdb49d4..c9a2f0f2

Re: [PATCH net-next] Revert "RDS: IB: split the mr registration and invalidation path"

2019-03-20 Thread santosh.shilim...@oracle.com
On 11/6/18 4:52 PM, Gerd Rausch wrote: This reverts commit 56012459310a1dbcc55c2dbf5500a9f7571402cb. Subject: rds_ib_post_reg_frmr spins and spins and spins RDS kept spinning inside function "rds_ib_post_reg_frmr", waiting for "i_fastreg_wrs" to become incremented: while (atomic_dec_re

Re: [RFC bpf-next v2 2/9] net: introduce skb_net helper

2019-03-20 Thread Stanislav Fomichev
On 03/19, Willem de Bruijn wrote: > On Tue, Mar 19, 2019 at 6:20 PM Stanislav Fomichev wrote: > > > > skb_net returns network namespace from the associated device or socket. > > > > This will be used in the next commit. > > > > I tried to inline it in skbuff.h, but I don't think it's feasible. >

[PATCH v3 bpf-next 1/3] BPF: helpers: New helper to obtain namespace data from current task

2019-03-20 Thread Carlos Antonio Neira Bustos
This is a series of patches to introduce a new helper called bpf_get_current_pidns_info, this change has been splitted into the following patches: 1- Feature introduction 2- Update tools/.../bpf.h 3- Self tests and samples >From 852a65906122b05b4d1a23af868b2c245d240402 Mon Sep 17 00:00:00 200

[PATCH net-next 0/3] net: broadcom: Remove print of base address

2019-03-20 Thread Florian Fainelli
Hi, Some broadcom MDIO/switch/Ethernet MAC drivers insist on printing the base register virtual address which has little value. Florian Fainelli (3): net: phy: mdio-bcm-unimac: Remove print of base address net: dsa: bcm_sf2: Remove print of base address net: systemport: Remove print of b

[PATCH net-next 2/3] net: dsa: bcm_sf2: Remove print of base address

2019-03-20 Thread Florian Fainelli
Since commit ad67b74d2469 ("printk: hash addresses printed with %p") pointers are being hashed when printed. Displaying the virtual memory at bootup time is not helpful, we use a dev_info() print which already displays the platform device's address. Signed-off-by: Florian Fainelli --- drivers/ne

Re: [PATCHv2 net] ipv6: make ip6_create_rt_rcu return ip6_null_entry instead of NULL

2019-03-20 Thread Wei Wang
On Tue, Mar 19, 2019 at 11:45 PM Xin Long wrote: > > Jianlin reported a crash: > > [ 381.484332] BUG: unable to handle kernel NULL pointer dereference at > 0068 > [ 381.619802] RIP: 0010:fib6_rule_lookup+0xa3/0x160 > [ 382.009615] Call Trace: > [ 382.020762] > [ 382.0

Re: [PATCH v3 bpf-next 2/3] BPF: helpers: New helper to obtain namespace data from current task

2019-03-20 Thread Carlos Antonio Neira Bustos
>From b7f5af5c1513b6e89fc5b68ddb1ad65e4fbede02 Mon Sep 17 00:00:00 2001 From: Carlos Date: Mon, 18 Mar 2019 13:09:35 -0300 Subject: [PATCH] [PATCH bpf-next 2/3] BPF: New helper to obtain namespace data from current task This helper obtains the active namespace from current and returns pid, tgi

Re: [PATCH v3 bpf-next 3/3] BPF: helpers: New helper to obtain namespace data from current task

2019-03-20 Thread Carlos Antonio Neira Bustos
>From 7b7759029fb2bbf6d65a6ac26bb78121e91a30f1 Mon Sep 17 00:00:00 2001 From: Carlos Date: Tue, 19 Mar 2019 18:00:56 -0300 Subject: [PATCH] [PATCH bpf-next 3/3] BPF: New helper to obtain namespace data from current task This helper obtains the active namespace from current and returns pid, tgid,

Re: [PATCH net-next] ipv6: Remove fallback argument from ip6_hold_safe

2019-03-20 Thread Wei Wang
On Wed, Mar 20, 2019 at 9:24 AM David Ahern wrote: > > From: David Ahern > > net and null_fallback are redundant. Remove null_fallback in favor of > !net check. > > Signed-off-by: David Ahern > --- Acked-by: Wei Wang > net/ipv6/route.c | 13 ++--- > 1 file changed, 6 insertions(+), 7

Re: [RFC bpf-next v2 7/9] bpf: when doing BPF_PROG_TEST_RUN for flow dissector use no-skb mode

2019-03-20 Thread Stanislav Fomichev
On 03/19, Willem de Bruijn wrote: > On Tue, Mar 19, 2019 at 6:21 PM Stanislav Fomichev wrote: > > > > Now that we have __flow_bpf_dissect which works on raw data (by > > constructing temporary on-stack skb), use it when doing > > BPF_PROG_TEST_RUN for flow dissector. > > > > This should help us ca

Re: [PATCHv2 bpf-next 1/3] bpf, tests: tweak endianness selection

2019-03-20 Thread Stanislav Fomichev
On 03/20, Sergey Senozhatsky wrote: > Not all compilers have __builtin_bswap16() and __builtin_bswap32(), > thus not all compilers are able to compile the following code: > > (__builtin_constant_p(x) ? \ > ___constant_swab16(x) : __builtin_bswap16(x)) > > That's the reason

Re: [net-next 00/10][pull request] 1GbE Intel Wired LAN Driver Updates 2019-03-19

2019-03-20 Thread David Miller
From: Jeff Kirsher Date: Tue, 19 Mar 2019 15:36:09 -0700 > This series contains updates to e100, e1000, e1000e, igb, igc and > ixgbe. > > Serhey Popovych fixes the return value for several of our older > drivers for netdev_update_features() to notify of changes applied. > > Kai-Heng Feng fixes

Re: [net-next 00/11][pull request] 100GbE Intel Wired LAN Driver Updates 2019-03-19

2019-03-20 Thread David Miller
From: Jeff Kirsher Date: Tue, 19 Mar 2019 17:52:16 -0700 > This series contains updates to ice driver only. ... Also pulled, thanks Jeff.

Re: [PATCH bpf-next v2] tools/bpf: generate pkg-config file for libbpf

2019-03-20 Thread Stanislav Fomichev
On 03/20, Luca Boccassi wrote: > On Wed, 2019-03-20 at 13:22 +, Luca Boccassi wrote: > > On Tue, 2019-03-19 at 16:17 -0700, Stanislav Fomichev wrote: > > > On 03/19, Luca Boccassi wrote: > > > > Generate a libbpf.pc file at build time so that users can rely > > > > on pkg-config to find the lib

Re: Remove tasklet_hrtimer

2019-03-20 Thread Sebastian Andrzej Siewior
On 2019-03-01 23:48:18 [+0100], To netdev@vger.kernel.org wrote: > I just noticed that we still have the tasklet_hrtimer infastructure in tree. A > while ago we tried to remove it. > I digged the old patches up and it seems they did not apply and nobody > followed > up. So here they are again. Las

Re: [PATCH 0/6] ks8851 fixes & cleanups

2019-03-20 Thread Ben Dooks
On 20/03/2019 14:02, Lukas Wunner wrote: Four fixes and two cleanups for the Microchip (formerly Micrel) KSZ8851 SPI Ethernet driver. Some of the fixes might even pass as stable material, but I haven't marked them as such for cautiousness: Doesn't hurt letting them bake in linux-next for a few w

RE: [PATCH net-next 2/8] devlink: add PF and VF port flavours

2019-03-20 Thread Abodunrin, Akeem G
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Jiri Pirko > Sent: Sunday, March 03, 2019 11:30 PM > To: Parav Pandit > Cc: Jakub Kicinski ; da...@davemloft.net; > oss-driv...@netronome.com; netdev@vger.kernel.org > Subject:

Re: Remove tasklet_hrtimer

2019-03-20 Thread David Miller
From: Sebastian Andrzej Siewior Date: Wed, 20 Mar 2019 18:24:14 +0100 > On 2019-03-01 23:48:18 [+0100], To netdev@vger.kernel.org wrote: >> I just noticed that we still have the tasklet_hrtimer infastructure in tree. >> A >> while ago we tried to remove it. >> I digged the old patches up and it

Re: [PATCH net] net/packet: Set __GFP_NOWARN upon allocation in alloc_pg_vec

2019-03-20 Thread David Miller
From: Christoph Paasch Date: Mon, 18 Mar 2019 23:14:52 -0700 > Since commit fc62814d690c ("net/packet: fix 4gb buffer limit due to overflow > check") > one can now allocate packet ring buffers >= UINT_MAX. However, syzkaller > found that that triggers a warning: ... > We should allocate with __

Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver

2019-03-20 Thread David Miller
Paul, please format your patch properly. The Subject line should be of the form: [PATCH vX] $subsystem-prefix: Description. Also please provide an accurate and proper Fixes: tag. Thank you.

Re: [PATCH net-next] net: phy: improve handling link_change_notify callback

2019-03-20 Thread David Miller
From: Heiner Kallweit Date: Tue, 19 Mar 2019 19:56:51 +0100 > Currently the Phy driver's link_change_notify callback is called > whenever the state machine is run (every second if polling), no matter > whether the state changed or not. This isn't needed and may confuse > users considering the nam

Re: [PATCH v3 3/3] net: dsa: qca8k: extend slave-bus implementations

2019-03-20 Thread David Miller
From: Christian Lamparter Date: Tue, 19 Mar 2019 20:54:19 +0100 > This patch implements accessors for the QCA8337 MDIO access > through the MDIO_MASTER register, which makes it possible to > access the PHYs on slave-bus through the switch. In cases > where the switch ports are already mapped via

Re: Remove tasklet_hrtimer

2019-03-20 Thread Sebastian Andrzej Siewior
On 2019-03-20 10:45:41 [-0700], David Miller wrote: > > tglx can take them, feel free to add my: > > Acked-by: David S. Miller Thank you. Sebastian

Re: [PATCH net-next 0/2] net: phy: aquantia: add interface mode handling

2019-03-20 Thread David Miller
From: Heiner Kallweit Date: Tue, 19 Mar 2019 23:02:22 +0100 > These two patches add interface mode handling for the AQR107/AQCS109. Series applied, thanks Heiner.

Re: [PATCH net-next v2] net/tls: Add support of AES128-CCM based ciphers

2019-03-20 Thread David Miller
From: Vakul Garg Date: Wed, 20 Mar 2019 02:03:36 + > Added support for AES128-CCM based record encryption. AES128-CCM is > similar to AES128-GCM. Both of them have same salt/iv/mac size. The > notable difference between the two is that while invoking AES128-CCM > operation, the salt||nonce (w

Re: [PATCH v3 1/3] dt-bindings: net: dsa: qca8k: fix example

2019-03-20 Thread Florian Fainelli
On 3/19/19 12:54 PM, Christian Lamparter wrote: > In the example, the phy at phy@0 is clashing with > the switch0@0 at the same address. Usually, the switches > are accessible through pseudo PHYs which in case of the > qca8k are located at 0x10 - 0x18. > > Signed-off-by: Christian Lamparter Revi

Re: [PATCH v3 2/3] dt-bindings: net: dsa: qca8k: support internal mdio-bus

2019-03-20 Thread Florian Fainelli
On 3/19/19 12:54 PM, Christian Lamparter wrote: > This patch updates the qca8k's binding to document to the > approach for using the internal mdio-bus of the supported > qca8k switches. > > Signed-off-by: Christian Lamparter Reviewed-by: Florian Fainelli -- Florian

  1   2   >