[PATCH bpf-next] selftests/bpf: add real-world BPF verifier scale test program

2019-05-31 Thread Andrii Nakryiko
This patch adds a new test program, based on real-world production application, for testing BPF verifier scalability w/ realistic complexity. Cc: Alexei Starovoitov Signed-off-by: Andrii Nakryiko --- .../bpf/prog_tests/bpf_verif_scale.c | 11 +- .../testing/selftests/bpf/progs/strobem

Re: pull-request: bpf-next 2019-05-31

2019-05-31 Thread David Miller
From: Alexei Starovoitov Date: Fri, 31 May 2019 20:38:13 -0700 > The following pull-request contains BPF updates for your *net-next* tree. > > Lots of exciting new features in the first PR of this developement cycle! > The main changes are: > > 1) misc verifier improvements, from Alexei. > > 2

Re: [PATCH V5 net-next 0/6] Peer to Peer One-Step time stamping

2019-05-31 Thread Richard Cochran
On Fri, May 31, 2019 at 05:13:09PM -0700, David Miller wrote: > This also does not build. > > Please do an allmodconfig build and save me from having to do this > another time. (Dons paper bag over head.) I have a good excuse... it was the bay area fog that made me do it! Sorry, Richard

pull-request: bpf-next 2019-05-31

2019-05-31 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net-next* tree. Lots of exciting new features in the first PR of this developement cycle! The main changes are: 1) misc verifier improvements, from Alexei. 2) bpftool can now convert btf to valid C, from Andrii. 3) verifier ca

[PATCH RFC net-next 01/27] ipv4: Use accessors for fib_info nexthop data

2019-05-31 Thread David Ahern
From: David Ahern Use helpers to access fib_nh and fib_nhs fields of a fib_info. Drop the fib_dev macro which is an alias for the first nexthop. Replacements: fi->fib_dev--> fib_info_nh(fi, 0)->fib_nh_dev fi->fib_nh --> fib_info_nh(fi, 0) fi->fib_nh[i] --> fib_info_nh(fi, i) fi-

[PATCH RFC net-next 00/27] nexthops: Final patches

2019-05-31 Thread David Ahern
From: David Ahern This is an RFC for no other reason than it exceeds the 20'ish patch limit. As with the development of this entire feature I have attempted to send these in sets and an order that is both reviewable and kinder to the reviewees. Patches 1-7 have been posted already. This is a re-

[PATCH RFC net-next 05/27] mlxsw: Fail attempts to use routes with nexthop objects

2019-05-31 Thread David Ahern
From: David Ahern Fail attempts to use nexthop objects with routes until support can be properly added. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/ne

[PATCH RFC net-next 09/27] ipv6: Handle all fib6_nh in a nexthop in fib6_drop_pcpu_from

2019-05-31 Thread David Ahern
From: David Ahern Use nexthop_for_each_fib6_nh to walk all fib6_nh in a nexthop when dropping 'from' reference in pcpu routes. Signed-off-by: David Ahern --- net/ipv6/ip6_fib.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/net/ipv6/ip6_fib

[PATCH RFC net-next 14/27] ipv6: Handle all fib6_nh in a nexthop in exception handling

2019-05-31 Thread David Ahern
From: David Ahern Add a hook in rt6_flush_exceptions, rt6_remove_exception_rt, rt6_update_exception_stamp_rt, and rt6_age_exceptions to handle nexthop struct in a fib6_info. Signed-off-by: David Ahern --- net/ipv6/route.c | 109 +-- 1 file ch

[PATCH RFC net-next 08/27] nexthops: Add ipv6 helper to walk all fib6_nh in a nexthop struct

2019-05-31 Thread David Ahern
From: David Ahern IPv6 has traditionally had a single fib6_nh per fib6_info. With nexthops we can have multiple fib6_nh associated with a fib6_info. Add a nexthop helper to invoke a callback for each fib6_nh in a 'struct nexthop'. If the callback returns non-0, the loop is stopped and the return

[PATCH RFC net-next 24/27] selftests: pmtu: Move route installs to a new function

2019-05-31 Thread David Ahern
From: David Ahern Move the route add commands to a new function called setup_routing_old. The '_old' refers to the classic way of installing routes. Signed-off-by: David Ahern --- tools/testing/selftests/net/pmtu.sh | 26 +++--- 1 file changed, 15 insertions(+), 11 deletion

[PATCH RFC net-next 19/27] ipv4: Optimization for fib_info lookup with nexthops

2019-05-31 Thread David Ahern
From: David Ahern Be optimistic about re-using a fib_info when nexthop id is given and the route does not use metrics. Avoids a memory allocation which in most cases is expected to be freed anyways. Signed-off-by: David Ahern --- net/ipv4/fib_semantics.c | 71 ++

[PATCH RFC net-next 22/27] selftests: Add test cases for nexthop objects

2019-05-31 Thread David Ahern
From: David Ahern Signed-off-by: David Ahern --- tools/testing/selftests/net/fib_nexthops.sh | 1026 +++ 1 file changed, 1026 insertions(+) create mode 100755 tools/testing/selftests/net/fib_nexthops.sh diff --git a/tools/testing/selftests/net/fib_nexthops.sh b/tools/

[PATCH RFC net-next 23/27] selftests: pmtu: Move running of test into a new function

2019-05-31 Thread David Ahern
From: David Ahern Move the block of code that runs a test and prints the verdict to a new function, run_test. Signed-off-by: David Ahern --- tools/testing/selftests/net/pmtu.sh | 63 + 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/tools/tes

[PATCH RFC net-next 13/27] ipv6: Handle all fib6_nh in a nexthop in fib6_info_uses_dev

2019-05-31 Thread David Ahern
From: David Ahern Add a hook in fib6_info_uses_dev to handle nexthop struct in a fib6_info. Signed-off-by: David Ahern --- net/ipv6/route.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0c9ba144b8d0..680d61b65647 100644 --- a/

[PATCH RFC net-next 03/27] ipv4: Plumb support for nexthop object in a fib_info

2019-05-31 Thread David Ahern
From: David Ahern Add 'struct nexthop' and nh_list list_head to fib_info. nh_list is the fib_info side of the nexthop <-> fib_info relationship. Add fi_list list_head to 'struct nexthop' to track fib_info entries using a nexthop instance. Add __remove_nexthop_fib and add it to __remove_nexthop t

[PATCH RFC net-next 16/27] ipv6: Handle all fib6_nh in a nexthop in rt6_do_redirect

2019-05-31 Thread David Ahern
From: David Ahern Use nexthop_for_each_fib6_nh and fib6_nh_find_match to find the fib6_nh in a nexthop that correlates to the device and gateway in the rt6_info. Signed-off-by: David Ahern --- net/ipv6/route.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --g

[PATCH RFC net-next 11/27] ipv6: Handle all fib6_nh in a nexthop in __find_rr_leaf

2019-05-31 Thread David Ahern
From: David Ahern Add a hook in __find_rr_leaf to handle nexthop struct in a fib6_info. nexthop_for_each_fib6_nh is used to walk each fib6_nh in a nexthop and call find_match. On a match, use the fib6_nh saved in the callback arg to setup fib6_result. Signed-off-by: David Ahern --- net/ipv6/ro

[PATCH RFC net-next 21/27] nexthops: add support for replace

2019-05-31 Thread David Ahern
From: David Ahern Add support for atomically upating a nexthop config. When updating a nexthop, walk the lists of associated fib entries and verify the new config is valid. After replace, bump the sequence counters for FIB entries to invalidate any dst entries. Signed-off-by: David Ahern ---

[PATCH RFC net-next 18/27] ipv4: Allow routes to use nexthop objects

2019-05-31 Thread David Ahern
From: David Ahern Add support for RTA_NH_ID attribute to allow a user to specify a nexthop id to use with a route. fc_nh_id is added to fib_config to hold the value passed in the RTA_NH_ID attribute. If a nexthop id is given, the gateway, device, encap and multipath attributes can not be set. Up

[PATCH RFC net-next 15/27] ipv6: Handle all fib6_nh in a nexthop in __ip6_route_redirect

2019-05-31 Thread David Ahern
From: David Ahern Add a hook in __ip6_route_redirect to handle a nexthop struct in a fib6_info. Use nexthop_for_each_fib6_nh and fib6_nh_redirect_match to call ip6_redirect_nh_match for each fib6_nh looking for a match. Signed-off-by: David Ahern --- net/ipv6/route.c | 39 +

[PATCH RFC net-next 02/27] ipv4: Prepare for fib6_nh from a nexthop object

2019-05-31 Thread David Ahern
From: David Ahern Convert more IPv4 code to use fib_nh_common over fib_nh to enable routes to use a fib6_nh based nexthop. In the end, only code not using a nexthop object in a fib_info should directly access fib_nh in a fib_info without checking the famiy and going through fib_nh_common. Those f

[PATCH RFC net-next 25/27] selftests: pmtu: Add support for routing via nexthop objects

2019-05-31 Thread David Ahern
From: David Ahern Add routing setup using nexthop objects and repeat tests with old and new routing. Signed-off-by: David Ahern --- tools/testing/selftests/net/pmtu.sh | 158 1 file changed, 126 insertions(+), 32 deletions(-) diff --git a/tools/testing/sel

[PATCH RFC net-next 26/27] selftests: icmp_redirect: Add support for routing via nexthop objects

2019-05-31 Thread David Ahern
From: David Ahern Add a second pass to icmp_redirect.sh to use nexthop objects for routes. Signed-off-by: David Ahern --- tools/testing/selftests/net/icmp_redirect.sh | 60 1 file changed, 60 insertions(+) diff --git a/tools/testing/selftests/net/icmp_redirect.sh

[PATCH RFC net-next 06/27] mlx5: Fail attempts to use routes with nexthop objects

2019-05-31 Thread David Ahern
From: David Ahern Fail attempts to use nexthop objects with routes until support can be properly added. Signed-off-by: David Ahern --- drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c b/dr

[PATCH RFC net-next 12/27] ipv6: Handle all fib6_nh in a nexthop in rt6_nlmsg_size

2019-05-31 Thread David Ahern
From: David Ahern Add a hook in rt6_nlmsg_size to handle nexthop struct in a fib6_info. rt6_nh_nlmsg_size is used to sum the space needed for all nexthops in the fib entry. Signed-off-by: David Ahern --- net/ipv6/route.c | 49 + 1 file changed, 3

[PATCH RFC net-next 07/27] rocker: Fail attempts to use routes with nexthop objects

2019-05-31 Thread David Ahern
From: David Ahern Fail attempts to use nexthop objects with routes until support can be properly added. Signed-off-by: David Ahern --- drivers/net/ethernet/rocker/rocker_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethe

[PATCH RFC net-next 27/27] selftests: Add version of router_multipath.sh using nexthop objects

2019-05-31 Thread David Ahern
From: David Ahern Add a version of router_multipath.sh that uses nexthop objects for routes. Ido requested a version that does not cause regressions with their testing since mlxsw does not support nexthop objects yet. Signed-off-by: David Ahern --- .../selftests/net/forwarding/router_mpath_nh.

[PATCH RFC net-next 04/27] ipv6: Plumb support for nexthop object in a fib6_info

2019-05-31 Thread David Ahern
From: David Ahern Add struct nexthop and nh_list list_head to fib6_info. nh_list is the fib6_info side of the nexthop <-> fib_info relationship. Since a fib6_info referencing a nexthop object can not have 'sibling' entries (the old way of doing multipath routes), the nh_list is a union with fib6_

[PATCH RFC net-next 20/27] ipv6: Allow routes to use nexthop objects

2019-05-31 Thread David Ahern
From: David Ahern Add support for RTA_NH_ID attribute to allow a user to specify a nexthop id to use with a route. fc_nh_id is added to fib6_config to hold the value passed in the RTA_NH_ID attribute. If a nexthop id is given, the gateway, device, encap and multipath attributes can not be set. U

[PATCH RFC net-next 17/27] ipv6: Handle all fib6_nh in a nexthop in mtu updates

2019-05-31 Thread David Ahern
From: David Ahern Use nexthop_for_each_fib6_nh to call fib6_nh_mtu_change for each fib6_nh in a nexthop for rt6_mtu_change_route. For __ip6_rt_update_pmtu, we need to find the nexthop that correlates to the device and gateway in the rt6_info. Signed-off-by: David Ahern --- net/ipv6/route.c | 2

[PATCH RFC net-next 10/27] ipv6: Handle all fib6_nh in a nexthop in rt6_device_match

2019-05-31 Thread David Ahern
From: David Ahern Add a hook in rt6_device_match to handle nexthop struct in a fib6_info. The new rt6_nh_dev_match uses nexthop_for_each_fib6_nh to walk each fib6_nh in a nexthop and call __rt6_device_match. On match, rt6_nh_dev_match returns the fib6_nh and rt6_device_match uses it to setup fib6

Re: [PATCH net-next] net: phy: Ensure scheduled work is cancelled during removal

2019-05-31 Thread hancock
> On 31.05.2019 22:54, Andrew Lunn wrote: >>> It is possible that scheduled work started by the PHY driver is still >>> outstanding when phy_device_remove is called if the PHY was initially >>> started but never connected, and therefore phy_disconnect is never >>> called. phy_stop does not guarante

[PATCH net 1/2] Revert "net/tls: avoid NULL-deref on resync during device removal"

2019-05-31 Thread Jakub Kicinski
This reverts commit 38030d7cb77963ba84cdbe034806e2b81245339f. Unfortunately the RX resync may get called from soft IRQ, so we can't take the rwsem to protect from the device disappearing. Signed-off-by: Jakub Kicinski --- net/tls/tls_device.c | 15 +-- 1 file changed, 5 insertions(+)

[PATCH net 2/2] net/tls: replace the sleeping lock around RX resync with a bit lock

2019-05-31 Thread Jakub Kicinski
Commit 38030d7cb779 ("net/tls: avoid NULL-deref on resync during device removal") tried to fix a potential NULL-dereference by taking the context rwsem. Unfortunately the RX resync may get called from soft IRQ, so we can't use the rwsem to protect from the device disappearing. Because we are gua

[PATCH net 0/2] net/tls: redo the RX resync locking

2019-05-31 Thread Jakub Kicinski
Hi! Take two of making sure we don't use a NULL netdev pointer for RX resync. This time using a bit and an open coded wait loop. Posting as revert + new patch, hopefully this will make it easier to backport to stable (unless third time is the charm, and this one is buggy as well :(). Jakub Kici

Re: [PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-31 Thread Alexei Starovoitov
On Fri, May 31, 2019 at 7:59 PM David Ahern wrote: > > On 5/31/19 8:51 PM, Alexei Starovoitov wrote: > > From single sentence of commit log it's not clear at all > > whether they're related to this thread. > > Will they fail if run w/o this set? > > > > New code in this set (if (fi->nh) {}) can no

Re: [PATCH net-next 01/13] net: axienet: Fixed 64-bit compile, enable build on X86 and ARM

2019-05-31 Thread Andrew Lunn
On Fri, May 31, 2019 at 05:28:45PM -0600, Robert Hancock wrote: > On 2019-05-31 3:10 p.m., Andrew Lunn wrote: > >> static inline u32 axienet_ior(struct axienet_local *lp, off_t offset) > >> { > >> - return in_be32(lp->regs + offset); > >> +#ifdef CONFIG_MICROBLAZE > >> + return __raw_readl(lp->

Re: [PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-31 Thread David Ahern
On 5/31/19 8:51 PM, Alexei Starovoitov wrote: > From single sentence of commit log it's not clear at all > whether they're related to this thread. > Will they fail if run w/o this set? > New code in this set (if (fi->nh) {}) can not be tested yet. It can not be tested until the final patch that w

Re: [PATCH bpf-next v5] selftests/bpf: measure RTT from xdp using xdping

2019-05-31 Thread Alexei Starovoitov
On Fri, May 31, 2019 at 6:37 PM Song Liu wrote: > > > > > On May 31, 2019, at 10:47 AM, Alan Maguire wrote: > > > > xdping allows us to get latency estimates from XDP. Output looks > > like this: > > > > ./xdping -I eth4 192.168.55.8 > > Setting up XDP for eth4, please wait... > > XDP setup disr

Re: [PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-31 Thread Alexei Starovoitov
On Fri, May 31, 2019 at 2:38 PM David Ahern wrote: > > On 5/31/19 3:29 PM, David Miller wrote: > > David, can you add some supplementary information to your cover letter > > et al. which seems to be part of what Alexei is asking for and seems > > quite reasonable? > > > > It is not clear to me wh

Re: [PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-31 Thread Eric Dumazet
On 5/31/19 7:34 PM, Eric Dumazet wrote: > > > On 5/31/19 7:29 PM, David Ahern wrote: >> On 5/31/19 7:04 PM, Eric Dumazet wrote: >>> >>> I have a bunch (about 15 ) of syzbot reports, probably caused to your >>> latest patch series. >>> >>> Do we want to stabilize first, or do you expect this n

Re: [PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-31 Thread Eric Dumazet
On 5/31/19 7:29 PM, David Ahern wrote: > On 5/31/19 7:04 PM, Eric Dumazet wrote: >> >> I have a bunch (about 15 ) of syzbot reports, probably caused to your latest >> patch series. >> >> Do we want to stabilize first, or do you expect this new patch series to fix >> these issues ? >> > > Pleas

Re: [PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-31 Thread David Ahern
On 5/31/19 7:04 PM, Eric Dumazet wrote: > > I have a bunch (about 15 ) of syzbot reports, probably caused to your latest > patch series. > > Do we want to stabilize first, or do you expect this new patch series to fix > these issues ? > Please forward. I will take a look.

[PATCH net-next] tcp: use this_cpu_read(*X) instead of *this_cpu_ptr(X)

2019-05-31 Thread Eric Dumazet
this_cpu_read(*X) is slightly faster than *this_cpu_ptr(X) Signed-off-by: Eric Dumazet --- net/ipv4/tcp_ipv4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index af81e4a6a8d8eac9aad551a129384ff6b1bf2f6c..59b7edd8719c33d747169b

[PATCH net-next] ipv4: icmp: use this_cpu_read() in icmp_sk()

2019-05-31 Thread Eric Dumazet
this_cpu_read(*X) is faster than *this_cpu_ptr(X) Signed-off-by: Eric Dumazet --- net/ipv4/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index f3a5893b1e8619716f19f85dc77f2e1e12284b4d..49d6b037b113e85877f8e689e690f1c0d3427386 10064

Re: [PATCH net] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied

2019-05-31 Thread Maciej Żenczykowski
FYI, this userspace visible change in behaviour breaks Android. We rely on being able to add a rule and either have a dup be created (in which case we'll remove it later) or have it fail with EEXIST (in which case we won't remove it later). Returning 0 makes atomically changing a rule difficult.

Re: [PATCH bpf-next v5] selftests/bpf: measure RTT from xdp using xdping

2019-05-31 Thread Song Liu
> On May 31, 2019, at 10:47 AM, Alan Maguire wrote: > > xdping allows us to get latency estimates from XDP. Output looks > like this: > > ./xdping -I eth4 192.168.55.8 > Setting up XDP for eth4, please wait... > XDP setup disrupts network connectivity, hit Ctrl+C to quit > > Normal ping RTT

[PATCH net-next] ipv6: use this_cpu_read() in rt6_get_pcpu_route()

2019-05-31 Thread Eric Dumazet
this_cpu_read(*X) is faster than *this_cpu_ptr(X) Signed-off-by: Eric Dumazet --- net/ipv6/route.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index fada5a13bcb2a286bb20a350c1873b1b16dc866a..a72d01010cb6a734b2c4ee2dd865390d88e6a3b

Re: [PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-31 Thread Eric Dumazet
On 5/31/19 2:38 PM, David Ahern wrote: > On 5/31/19 3:29 PM, David Miller wrote: >> David, can you add some supplementary information to your cover letter >> et al. which seems to be part of what Alexei is asking for and seems >> quite reasonable? >> > > It is not clear to me what more is want

Re: [PATCH net-next] net: phy: phylink: support using device PHY in fixed or 802.3z mode

2019-05-31 Thread Robert Hancock
On 2019-05-31 2:31 p.m., Russell King - ARM Linux admin wrote: > On Fri, May 31, 2019 at 01:18:05PM -0600, Robert Hancock wrote: >> The Xilinx AXI Ethernet controller supports SFP modules in 1000BaseX >> mode in a somewhat unusual manner: it still exposes a PHY device which >> needs some PHY-level

Re: [net-next 00/13][pull request] Intel Wired LAN Driver Updates 2019-05-31

2019-05-31 Thread Jeff Kirsher
On Fri, 2019-05-31 at 17:02 -0700, David Miller wrote: > From: Jeff Kirsher > Date: Fri, 31 May 2019 01:15:05 -0700 > > > This series contains updates to the iavf driver. > > Pulled, thanks Jeff. > > I do agree with Joe that the debug logging macro can be improved. > Please take a look at his f

Re: [PATCH nf-next] netfilter: add support for matching IPv4 options

2019-05-31 Thread Pablo Neira Ayuso
On Fri, May 31, 2019 at 03:35:58PM -0400, Stephen Suryaputra wrote: > On Fri, May 31, 2019 at 07:11:01PM +0200, Pablo Neira Ayuso wrote: > > > +/* find the offset to specified option or the header beyond the options > > > + * if target < 0. > > > + * > > > + * Note that *offset is used as input/out

Re: [PATCH net-next] net: phy: phylink: add fallback from SGMII to 1000BaseX

2019-05-31 Thread Robert Hancock
On 2019-05-31 2:18 p.m., Russell King - ARM Linux admin wrote: > On Fri, May 31, 2019 at 01:18:04PM -0600, Robert Hancock wrote: >> Some copper SFP modules support both SGMII and 1000BaseX, > > The situation is way worse than that. Some copper SFP modules are > programmed to support SGMII only.

Re: [PATCH V5 net-next 0/6] Peer to Peer One-Step time stamping

2019-05-31 Thread David Miller
From: David Miller Date: Fri, 31 May 2019 14:54:56 -0700 (PDT) > From: Richard Cochran > Date: Thu, 30 May 2019 22:56:20 -0700 > >> This series adds support for PTP (IEEE 1588) P2P one-step time >> stamping along with a driver for a hardware device that supports this. > ... > > Series applied

[PATCH net-next v1 6/6] arm64: dts: mt7622: Enlarge the SGMII register range

2019-05-31 Thread sean.wang
From: Sean Wang Enlarge the SGMII register range and using 2.5G force mode on default. Signed-off-by: Sean Wang --- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/med

Re: [PATCH v2 bpf-next] bpf: doc: update answer for 32-bit subregister question

2019-05-31 Thread Alexei Starovoitov
On Thu, May 30, 2019 at 1:42 PM Song Liu wrote: > > On Thu, May 30, 2019 at 1:23 PM Jiong Wang wrote: > > > > There has been quite a few progress around the two steps mentioned in the > > answer to the following question: > > > > Q: BPF 32-bit subregister requirements > > > > This patch updates

Re: [net-next 00/13][pull request] Intel Wired LAN Driver Updates 2019-05-31

2019-05-31 Thread David Miller
From: Jeff Kirsher Date: Fri, 31 May 2019 01:15:05 -0700 > This series contains updates to the iavf driver. Pulled, thanks Jeff. I do agree with Joe that the debug logging macro can be improved. Please take a look at his feedback. Thanks.

Re: [PATCH net-next 1/4] net: use indirect calls helpers for ptype hook

2019-05-31 Thread Eric Dumazet
On 5/3/19 8:01 AM, Paolo Abeni wrote: > This avoids an indirect call per RX IPv6/IPv4 packet. > Note that we don't want to use the indirect calls helper for taps. > > Signed-off-by: Paolo Abeni > --- > net/core/dev.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --gi

Re: [PATCH v4 bpf-next 0/6] bpf: Propagate cn to TCP

2019-05-31 Thread Alexei Starovoitov
On Fri, May 31, 2019 at 11:13 AM Martin Lau wrote: > > On Tue, May 28, 2019 at 04:59:34PM -0700, brakmo wrote: > > This patchset adds support for propagating congestion notifications (cn) > > to TCP from cgroup inet skb egress BPF programs. > Acked-by: Martin KaFai Lau Applied. Thanks

Re: [PATCH net-next 01/13] net: axienet: Fixed 64-bit compile, enable build on X86 and ARM

2019-05-31 Thread Robert Hancock
On 2019-05-31 3:10 p.m., Andrew Lunn wrote: >> static inline u32 axienet_ior(struct axienet_local *lp, off_t offset) >> { >> -return in_be32(lp->regs + offset); >> +#ifdef CONFIG_MICROBLAZE >> +return __raw_readl(lp->regs + offset); >> +#else >> +return ioread32(lp->regs + offset); >>

[PATCH net] ethtool: fix potential userspace buffer overflow

2019-05-31 Thread Vivien Didelot
ethtool_get_regs() allocates a buffer of size ops->get_regs_len(), and pass it to the kernel driver via ops->get_regs() for filling. There is no restriction about what the kernel drivers can or cannot do with the open ethtool_regs structure. They usually set regs->version and ignore regs->len or s

Re: [PATCH net] vrf: Increment Icmp6InMsgs on the original netdev

2019-05-31 Thread David Ahern
On 5/29/19 11:08 PM, Stephen Suryaputra wrote: > diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c > index 1a832f5e190b..9b365c345c34 100644 > --- a/net/ipv6/reassembly.c > +++ b/net/ipv6/reassembly.c > @@ -260,6 +260,9 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct > sk_buff

Re: [RFC PATCH bpf-next 6/8] libbpf: allow specifying map definitions using BTF

2019-05-31 Thread Andrii Nakryiko
On Fri, May 31, 2019 at 2:28 PM Stanislav Fomichev wrote: > > On 05/31, Andrii Nakryiko wrote: > > This patch adds support for a new way to define BPF maps. It relies on > > BTF to describe mandatory and optional attributes of a map, as well as > > captures type information of key and value natura

Re: [PATCH net v3 1/3] net/sched: act_csum: pull all VLAN headers before checksumming

2019-05-31 Thread Cong Wang
On Fri, May 31, 2019 at 3:01 PM Davide Caratti wrote: > > Please note: this loop was here also before this patch (the 'goto again;' > line is only patch context). It has been introduced with commit > 2ecba2d1e45b ("net: sched: act_csum: Fix csum calc for tagged packets"). > This is exactly why I

Re: [PATCH net-next] net: sfp: Stop SFP polling during shutdown

2019-05-31 Thread Robert Hancock
On 2019-05-31 2:12 p.m., Russell King - ARM Linux admin wrote: > On Fri, May 31, 2019 at 01:18:02PM -0600, Robert Hancock wrote: >> SFP device polling can cause problems during the shutdown process if the >> parent devices of the network controller have been shut down already. >> This problem was s

Re: [PATCH V1 net-next 02/11] net: ena: ethtool: add extra properties retrieval via get_priv_flags

2019-05-31 Thread Michal Kubecek
On Fri, May 31, 2019 at 09:57:51PM +, Machulsky, Zorik wrote: > > > > +int ena_com_extra_properties_strings_init(struct ena_com_dev *ena_dev) > > +{ > > + struct ena_admin_get_feat_resp resp; > > + struct ena_extra_properties_strings *extra_properties_strings =

Re: [PATCH net v3 0/3] net/sched: fix actions reading the network header in case of QinQ packets

2019-05-31 Thread Cong Wang
On Fri, May 31, 2019 at 3:01 PM Davide Caratti wrote: > > On Fri, 2019-05-31 at 11:42 -0700, Cong Wang wrote: > > On Fri, May 31, 2019 at 10:26 AM Davide Caratti wrote: > > > 'act_csum' was recently fixed to mangle the IPv4/IPv6 header if a packet > > > having one or more VLAN headers was process

[PATCH bpf 0/2] bpf: udp: A few reuseport's bpf_prog for udp lookup

2019-05-31 Thread Martin KaFai Lau
This series has fixes when running reuseport's bpf_prog for udp lookup. If there is reuseport's bpf_prog, the common issue is the reuseport code path expects skb->data pointing to the transport header (udphdr here). A couple of commits broke this expectation. The issue is specific to running bpf_p

[PATCH bpf 1/2] bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err

2019-05-31 Thread Martin KaFai Lau
__udp6_lib_err() may be called when handling icmpv6 message. For example, the icmpv6 toobig(type=2). __udp6_lib_lookup() is then called which may call reuseport_select_sock(). reuseport_select_sock() will call into a bpf_prog (if there is one). reuseport_select_sock() is expecting the skb->data

[PATCH bpf 2/2] bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro

2019-05-31 Thread Martin KaFai Lau
When the commit a6024562ffd7 ("udp: Add GRO functions to UDP socket") added udp[46]_lib_lookup_skb to the udp_gro code path, it broke the reuseport_select_sock() assumption that skb->data is pointing to the transport header. This patch follows an earlier __udp6_lib_err() fix by passing a NULL skb

[PATCH net-next] ipv6: icmp: use this_cpu_read() in icmpv6_sk()

2019-05-31 Thread Eric Dumazet
In general, this_cpu_read(*X) is faster than *this_cpu_ptr(X) Also remove the inline attibute, totally useless. Signed-off-by: Eric Dumazet Cc: Kefeng Wang --- net/ipv6/icmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index afb91

Re: [PATCH iproute2-next v1 2/4] rdma: Add man pages for rdma system commands

2019-05-31 Thread David Ahern
On 5/30/19 9:11 PM, Parav Pandit wrote: > + > +.SH SEE ALSO > +.BR rdma (8), > +.BR rdma-link (8), > +.BR rdma-resource (8), > +.BR network_namespaces(7), > +.BR namespaces(7), Added the missing space before (7) and applied all of them to iproute2-next.

Re: [PATCH net v3 0/3] net/sched: fix actions reading the network header in case of QinQ packets

2019-05-31 Thread Davide Caratti
On Fri, 2019-05-31 at 11:42 -0700, Cong Wang wrote: > On Fri, May 31, 2019 at 10:26 AM Davide Caratti wrote: > > 'act_csum' was recently fixed to mangle the IPv4/IPv6 header if a packet > > having one or more VLAN headers was processed: patch #1 ensures that all > > VLAN headers are in the linear

Re: [PATCH net v3 1/3] net/sched: act_csum: pull all VLAN headers before checksumming

2019-05-31 Thread Davide Caratti
On Fri, 2019-05-31 at 11:38 -0700, Cong Wang wrote: > On Fri, May 31, 2019 at 10:26 AM Davide Caratti wrote: > > diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c > > index 14bb525e355e..e8308ddcae9d 100644 > > --- a/net/sched/act_csum.c > > +++ b/net/sched/act_csum.c > > @@ -574,7 +574,6 @

Re: [PATCH V1 net-next 02/11] net: ena: ethtool: add extra properties retrieval via get_priv_flags

2019-05-31 Thread Machulsky, Zorik
Hi Michal, Thanks for your comments. On 5/31/19, 1:20 AM, "Michal Kubecek" wrote: On Wed, May 29, 2019 at 12:49:55PM +0300, same...@amazon.com wrote: > From: Arthur Kiyanovski > > This commit adds a mechanism for exposing different driver > properties via ethtool's priv_fl

Re: Bad XDP performance with mlx5

2019-05-31 Thread Jesper Dangaard Brouer
On Fri, 31 May 2019 18:06:01 + Saeed Mahameed wrote: > On Fri, 2019-05-31 at 18:18 +0200, Jesper Dangaard Brouer wrote: [...] > > > > To understand why this is happening, you first have to know that the > > difference is between the two RX-memory modes used by mlx5 for non- > > XDP vs XDP.

Re: support for popping multiple MPLS labels with iproute2?

2019-05-31 Thread David Ahern
On 5/31/19 6:24 AM, Alan Maguire wrote: > I was wondering if there is a way to pop multiple MPLS labels at > once for local delivery using iproute2? > > Adding multiple labels for encapsulation is supported via > label1/label2/... syntax, but I can't find a way to do the same > for popping multipl

Re: [PATCH bpf-next v3 00/16] AF_XDP infrastructure improvements and mlx5e support

2019-05-31 Thread Saeed Mahameed
On Fri, 2019-05-24 at 12:18 +0200, Björn Töpel wrote: > On 2019-05-24 11:35, Maxim Mikityanskiy wrote: > > This series contains improvements to the AF_XDP kernel > > infrastructure > > and AF_XDP support in mlx5e. The infrastructure improvements are > > required for mlx5e, but also some of them ben

Re: [PATCH V5 net-next 0/6] Peer to Peer One-Step time stamping

2019-05-31 Thread David Miller
From: Richard Cochran Date: Thu, 30 May 2019 22:56:20 -0700 > This series adds support for PTP (IEEE 1588) P2P one-step time > stamping along with a driver for a hardware device that supports this. ... Series applied, will push out after build testing :-) Thanks.

[PATCH net-next] flow_offload: include linux/kernel.h from flow_offload.h

2019-05-31 Thread Edward Cree
flow_stats_update() uses max_t, so ensure we have that defined. Signed-off-by: Edward Cree --- include/net/flow_offload.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h index ae7cf27cd5e3..7554e88581d2 100644 --- a/include/net/flow_off

Re: [PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-31 Thread David Ahern
On 5/31/19 3:29 PM, David Miller wrote: > David, can you add some supplementary information to your cover letter > et al. which seems to be part of what Alexei is asking for and seems > quite reasonable? > It is not clear to me what more is wanted in the cover letter. His complaints were on lack

Re: [PATCH net] vrf: Increment Icmp6InMsgs on the original netdev

2019-05-31 Thread David Miller
From: Stephen Suryaputra Date: Thu, 30 May 2019 01:08:15 -0400 > Get the ingress interface and increment ICMP counters based on that > instead of skb->dev when the the dev is a VRF device. > > This is a follow up on the following message: > https://www.spinics.net/lists/netdev/msg560268.html >

Re: [PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-31 Thread David Miller
David, can you add some supplementary information to your cover letter et al. which seems to be part of what Alexei is asking for and seems quite reasonable? Thanks.

Re: [RFC PATCH bpf-next 6/8] libbpf: allow specifying map definitions using BTF

2019-05-31 Thread Stanislav Fomichev
On 05/31, Andrii Nakryiko wrote: > This patch adds support for a new way to define BPF maps. It relies on > BTF to describe mandatory and optional attributes of a map, as well as > captures type information of key and value naturally. This eliminates > the need for BPF_ANNOTATE_KV_PAIR hack and ens

Re: [PATCH net 1/1] net: dsa: sja1105: Don't store frame type in skb->cb

2019-05-31 Thread David Miller
From: Vladimir Oltean Date: Thu, 30 May 2019 00:51:26 +0300 > Due to a confusion I thought that eth_type_trans() was called by the > network stack whereas it can actually be called by network drivers to > figure out the skb protocol and next packet_type handlers. > > In light of the above, it is

Re: [PATCH net-next] net: phy: Ensure scheduled work is cancelled during removal

2019-05-31 Thread Heiner Kallweit
On 31.05.2019 22:54, Andrew Lunn wrote: > Robert > > Please make sure you Cc: PHY patches to the PHY maintainers. > > Heiner, this one is for you. > > Andrew > > On Fri, May 31, 2019 at 01:15:50PM -0600, Robert Hancock wrote: >> It is possible that scheduled work started by the PHY driver

Re: [net-next PATCH] net: rtnetlink: Enslave device before bringing it up

2019-05-31 Thread David Miller
From: Phil Sutter Date: Wed, 29 May 2019 15:51:20 +0200 > Unlike with bridges, one can't add an interface to a bond and set it up > at the same time: > > | # ip link set dummy0 down > | # ip link set dummy0 master bond0 up > | Error: Device can not be enslaved while up. > > Of all drivers with

Re: [PATCH net-next 09/13] net: axienet: Make missing MAC address non-fatal

2019-05-31 Thread Andrew Lunn
On Fri, May 31, 2019 at 12:15:41PM -0600, Robert Hancock wrote: > Failing initialization on a missing MAC address property is excessive. > We can just fall back to using a random MAC instead, which at least > leaves the interface in a functioning state. > > Signed-off-by: Robert Hancock Reviewed

Re: [PATCH net-next 02/13] net: axienet: clean up MDIO handling

2019-05-31 Thread Andrew Lunn
On Fri, May 31, 2019 at 12:15:34PM -0600, Robert Hancock wrote: > -Allow specifying the MDIO clock divisor explicitly in the device tree, > rather than always detecting it from the CPU clock which only works on > the MicroBlaze platform. > > -Centralize all MDIO handling in xilinx_axienet_mdio.c >

Re: [PATCH net-next] net: phy: xilinx: add Xilinx PHY driver

2019-05-31 Thread Florian Fainelli
On 5/31/19 12:15 PM, Robert Hancock wrote: > This adds a driver for the PHY device implemented in the Xilinx PCS/PMA > Core logic. Aside from being a generic gigabit PHY, it includes an > important register setting to disable the PHY isolation bit, which is > required for the PHY to operate in 1000

Re: [PATCH net-next 01/13] net: axienet: Fixed 64-bit compile, enable build on X86 and ARM

2019-05-31 Thread Andrew Lunn
Hi Robert I think you can split this into three patches, in order to make it easier to review: IO accessors skb in the control block MDIO changes. > static inline u32 axienet_ior(struct axienet_local *lp, off_t offset) > { > - return in_be32(lp->regs + offset); > +#ifdef CONFIG_MICROBLAZE

[PATCH net-next] flow_dissector: remove unused FLOW_DISSECTOR_F_STOP_AT_L3 flag

2019-05-31 Thread Stanislav Fomichev
This flag is not used by any caller, remove it. Signed-off-by: Stanislav Fomichev --- include/net/flow_dissector.h | 5 ++--- net/core/flow_dissector.c| 10 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h

Re: [PATCH net-next] net: phy: Ensure scheduled work is cancelled during removal

2019-05-31 Thread Andrew Lunn
Robert Please make sure you Cc: PHY patches to the PHY maintainers. Heiner, this one is for you. Andrew On Fri, May 31, 2019 at 01:15:50PM -0600, Robert Hancock wrote: > It is possible that scheduled work started by the PHY driver is still > outstanding when phy_device_remove is called

Re: [PATCH net-next] net: phy: xilinx: add Xilinx PHY driver

2019-05-31 Thread Andrew Lunn
On Fri, May 31, 2019 at 01:15:49PM -0600, Robert Hancock wrote: > This adds a driver for the PHY device implemented in the Xilinx PCS/PMA > Core logic. Aside from being a generic gigabit PHY, it includes an > important register setting to disable the PHY isolation bit, which is > required for the P

Re: [PATCH net-next] net: phy: phylink: support using device PHY in fixed or 802.3z mode

2019-05-31 Thread Russell King - ARM Linux admin
On Fri, May 31, 2019 at 01:18:05PM -0600, Robert Hancock wrote: > The Xilinx AXI Ethernet controller supports SFP modules in 1000BaseX > mode in a somewhat unusual manner: it still exposes a PHY device which > needs some PHY-level initialization for the PCS/PMA layer to work properly, > and which p

[RFC PATCH bpf-next 3/8] libbpf: refactor map initialization

2019-05-31 Thread Andrii Nakryiko
User and global data maps initialization has gotten pretty complicated and unnecessarily convoluted. This patch splits out the logic for global data map and user-defined map initialization. It also removes the restriction of pre-calculating how many maps will be initialized, instead allowing to kee

[RFC PATCH bpf-next 8/8] selftests/bpf: switch tests to BTF-defined map definitions

2019-05-31 Thread Andrii Nakryiko
Switch test map definition to new BTF-defined format. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/progs/bpf_flow.c | 18 +++-- .../selftests/bpf/progs/get_cgroup_id_kern.c | 18 +++-- .../testing/selftests/bpf/progs/netcnt_prog.c | 22 +++--- .../selftests/bpf/progs/sample_m

Re: [PATCH V5 net-next 6/6] ptp: Add a driver for InES time stamping IP core.

2019-05-31 Thread kbuild test robot
Hi Richard, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Richard-Cochran/Peer-to-Peer-One-Step-time-stamping/20190531-200348 reproduce: # apt-get install sparse # sparse version

[RFC PATCH] ptp: ines_ptp_probe_channel() can be static

2019-05-31 Thread kbuild test robot
Fixes: 49268f31cc1f ("ptp: Add a driver for InES time stamping IP core.") Signed-off-by: kbuild test robot --- ptp_ines.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ptp/ptp_ines.c b/drivers/ptp/ptp_ines.c index 59cb3f1..52c1e85 100644 --- a/drivers/ptp/

  1   2   3   >