RE: [PATCH net-next v2 2/3] dpaa2-eth: Support multiple traffic classes on Tx

2019-06-07 Thread Ioana Ciocoi Radulescu
> -Original Message- > From: David Miller > Sent: Thursday, June 6, 2019 9:03 PM > To: Ioana Ciocoi Radulescu > Cc: netdev@vger.kernel.org; Ioana Ciornei > Subject: Re: [PATCH net-next v2 2/3] dpaa2-eth: Support multiple traffic > classes on Tx > > From: Ioana Radulescu > Date: Thu, 6

Re: [PATCH v2 bpf-next 1/2] xdp: Add tracepoint for bulk XDP_TX

2019-06-07 Thread Jesper Dangaard Brouer
On Fri, 7 Jun 2019 11:22:00 +0900 Toshiaki Makita wrote: > On 2019/06/07 4:41, Jesper Dangaard Brouer wrote: > > On Thu, 6 Jun 2019 20:04:20 +0900 > > Toshiaki Makita wrote: > > > >> On 2019/06/05 16:59, Jesper Dangaard Brouer wrote: > >>> On Wed, 5 Jun 2019 14:36:12 +0900 > >>> Toshiaki M

Assalamu Alaikum//

2019-06-07 Thread fatima ibrahim
Assalamu Alaikum I will be happy if you can accepted my request I am sorry I don’t know you to discusses this with you on internet which I don’t like but just allow me to do this because of the condition I am in now . my name is Mrs. Fatima Ibrahim I am from Mauritius but I and family has bee

Re: DSA with MV88E6321 and imx28

2019-06-07 Thread Benjamin Beckmeyer
On 06.06.19 15:59, Andrew Lunn wrote: > On Thu, Jun 06, 2019 at 03:47:06PM +0200, Benjamin Beckmeyer wrote: >> On 06.06.19 15:35, Andrew Lunn wrote: >From our hardware developer I know now that we are using a "mini" SFF which has no i2c eeprom. >>> O.K. Does this mini SFF have LOS, TX

[PATCH iproute2] ip: reset netns after each command in batch mode

2019-06-07 Thread Matteo Croce
When creating a new netns or executing a program into an existing one, the unshare() or setns() calls will change the current netns. In batch mode, this can run commands on the wrong interfaces, as the ifindex value is meaningful only in the current netns. For example, this command fails because ve

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

2019-06-07 Thread Russell King - ARM Linux admin
On Thu, Jun 06, 2019 at 02:57:22PM -0600, Robert Hancock wrote: > It may also be helpful that the lock is now held for the subsequent code > in sfp_check_state that's comparing the previous and new states - it > seems like you could otherwise run into trouble if that function was > being concurrent

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

2019-06-07 Thread Russell King - ARM Linux admin
On Thu, Jun 06, 2019 at 02:57:22PM -0600, Robert Hancock wrote: > The idea there was to deal with the case where GPIO interrupts were > previously raised before shutdown and not yet handled by the threaded > interrupt handler by the time shutdown is called. After shutdown on the > SFP completes, th

[PATCH net] mpls: fix warning with multi-label encap

2019-06-07 Thread George Wilkie
If you configure a route with multiple labels, e.g. ip route add 10.10.3.0/24 encap mpls 16/100 via 10.10.2.2 dev ens4 A warning is logged: kernel: [ 130.561819] netlink: 'ip': attribute type 1 has an invalid length. This happens because mpls_iptunnel_policy has set the type of MPLS_IPTUNNE

Re: [PATCH V2] Fix memory leak in sctp_process_init

2019-06-07 Thread Neil Horman
On Thu, Jun 06, 2019 at 12:47:55PM -0300, Marcelo Ricardo Leitner wrote: > On Wed, Jun 05, 2019 at 07:20:10AM -0400, Neil Horman wrote: > > On Wed, Jun 05, 2019 at 04:16:24AM +0800, Xin Long wrote: > > > On Tue, Jun 4, 2019 at 4:34 AM Neil Horman wrote: > > > > > > > > syzbot found the following l

Re: [PATCH net-next 9/9] selftests: ptp: Add Physical Hardware Clock test

2019-06-07 Thread Vladimir Oltean
On Mon, 3 Jun 2019 at 15:25, Ido Schimmel wrote: > > From: Shalom Toledo > > Test the PTP Physical Hardware Clock functionality using the "phc_ctl" (a > part of "linuxptp"). > > The test contains three sub-tests: > * "settime" test > * "adjtime" test > * "adjfreq" test > > "settime" test: >

[PATCH net-next v2] cxgb4: Set initial IRQ affinity hints

2019-06-07 Thread Nirranjan Kirubaharan
Spread initial IRQ affinity hints across the device node CPUs, for nic queue and uld queue IRQs, to load balance and avoid all interrupts on CPU0. Signed-off-by: Nirranjan Kirubaharan --- v2: - Used post increment of msi_index instead of pre increment in request_msix_queue_irqs() during unwind.

Re: gue6 bad checksums in udp header

2019-06-07 Thread Arthur Skowronek
Sorry, I forgot to add the maintainers of this subsystem to the CC list. On 04.06.19 19:46, Arthur Skowronek wrote: Hello all, it appears that there is an issue with the content of the checksum field in udp packets which are transmitted through a gue encapsulated ipip tunnel over ipv6. I sp

Re: [PATCH] inet: frags: Remove unnecessary smp_store_release/READ_ONCE

2019-06-07 Thread Dmitry Vyukov
On Fri, May 31, 2019 at 7:11 PM Eric Dumazet wrote: > > On Fri, May 31, 2019 at 9:29 AM Andrea Parri > wrote: > > > > On Fri, May 31, 2019 at 08:45:47AM -0700, Eric Dumazet wrote: > > > On 5/31/19 7:45 AM, Herbert Xu wrote: > > > > > > In this case the code doesn't need them because an implicit >

[PATCH v3 net-next] net: fec_main: Use dev_err() instead of pr_err()

2019-06-07 Thread Fabio Estevam
dev_err() is more appropriate for printing error messages inside drivers, so switch to dev_err(). Signed-off-by: Fabio Estevam --- Changes since v2: - Use dev_err() instead of netdev_err() - Andy drivers/net/ethernet/freescale/fec_main.c | 9 + 1 file changed, 5 insertions(+), 4 deletio

Re: [RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-07 Thread Davide Caratti
On Wed, 2019-06-05 at 17:08 -0400, Lucas Bates wrote: > Apologies for the delay in getting this out. I've been busy > with other things and this change was a little trickier than > I expected. > > This patch restores the original behaviour for tdc prior to the > introduction of the plugin system,

Re: DSA with MV88E6321 and imx28

2019-06-07 Thread Andrew Lunn
> So all ports are now in forwarding mode (Switch port register 0x4 of all > ports > are 0x7f), but I don't reach it over ping. Hi The most common error for people new to DSA is forgetting to bring the master interface up. The second thing to understand is that by default, all interfaces are s

Re: [PATCH V2] Fix memory leak in sctp_process_init

2019-06-07 Thread Marcelo Ricardo Leitner
On Fri, Jun 07, 2019 at 06:56:39AM -0400, Neil Horman wrote: > On Thu, Jun 06, 2019 at 12:47:55PM -0300, Marcelo Ricardo Leitner wrote: > > On Wed, Jun 05, 2019 at 07:20:10AM -0400, Neil Horman wrote: > > > On Wed, Jun 05, 2019 at 04:16:24AM +0800, Xin Long wrote: > > > > On Tue, Jun 4, 2019 at 4:3

Re: [PATCH net v3] net: phy: rename Asix Electronics PHY driver

2019-06-07 Thread Andrew Lunn
On Fri, Jun 07, 2019 at 05:37:34PM +1200, Michael Schmitz wrote: > [Resent to net instead of net-next - may clash with Anders Roxell's patch > series addressing duplicate module names] > > Commit 31dd83b96641 ("net-next: phy: new Asix Electronics PHY driver") > introduced a new PHY driver drivers/

[PATCH next] nexthop: off by one in nexthop_mpath_select()

2019-06-07 Thread Dan Carpenter
The nhg->nh_entries[] array is allocated in nexthop_grp_alloc() and it has nhg->num_nh elements so this check should be >= instead of >. Fixes: f88d8ea67fbd ("ipv6: Plumb support for nexthop object in a fib6_info") Signed-off-by: Dan Carpenter --- include/net/nexthop.h | 2 +- 1 file changed, 1

Re: [PATCH next] nexthop: off by one in nexthop_mpath_select()

2019-06-07 Thread David Ahern
On 6/7/19 7:56 AM, Dan Carpenter wrote: > The nhg->nh_entries[] array is allocated in nexthop_grp_alloc() and it > has nhg->num_nh elements so this check should be >= instead of >. > > Fixes: f88d8ea67fbd ("ipv6: Plumb support for nexthop object in a fib6_info") Wrong fixes. The helper was added

[PATCH v2 net-next 12/20] ipv4: Optimization for fib_info lookup with nexthops

2019-06-07 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 v2 net-next 09/20] ipv6: Handle all fib6_nh in a nexthop in rt6_do_redirect

2019-06-07 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 v2 net-next 19/20] selftests: Add test with multiple prefixes using single nexthop

2019-06-07 Thread David Ahern
From: David Ahern Add tests where multiple FIB entries use the same nexthop object. Generate per-cpu cached routes for each by running ping on each cpu, and then generate exceptions unique to each prefix (remote host) with different mtus. Signed-off-by: David Ahern --- .../selftests/net/fib_ne

[PATCH v2 net-next 03/20] ipv6: Handle all fib6_nh in a nexthop in rt6_device_match

2019-06-07 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

[PATCH v2 net-next 06/20] ipv6: Handle all fib6_nh in a nexthop in fib6_info_uses_dev

2019-06-07 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 8a21f63917bf..bdbd3f1f417a 100644 --- a/

[PATCH v2 net-next 17/20] selftests: pmtu: Add support for routing via nexthop objects

2019-06-07 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 v2 net-next 20/20] selftests: Add version of router_multipath.sh using nexthop objects

2019-06-07 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 mlxsw testing since it does not support nexthop objects yet. Signed-off-by: David Ahern --- .../selftests/net/forwarding/router_mpath_nh.sh

[PATCH v2 net-next 15/20] selftests: pmtu: Move running of test into a new function

2019-06-07 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 v2 net-next 14/20] nexthops: add support for replace

2019-06-07 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. Replace is done by swapping nh_info for single nexthops - new config is applied to old nexthop struct, and old config is mo

[PATCH v2 net-next 16/20] selftests: pmtu: Move route installs to a new function

2019-06-07 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 v2 net-next 18/20] selftests: icmp_redirect: Add support for routing via nexthop objects

2019-06-07 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 | 49 1 file changed, 49 insertions(+) diff --git a/tools/testing/selftests/net/icmp_redirect.sh

[PATCH v2 net-next 10/20] ipv6: Handle all fib6_nh in a nexthop in mtu updates

2019-06-07 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 v2 net-next 08/20] ipv6: Handle all fib6_nh in a nexthop in __ip6_route_redirect

2019-06-07 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 v2 net-next 07/20] ipv6: Handle all fib6_nh in a nexthop in exception handling

2019-06-07 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 v2 net-next 02/20] ipv6: Handle all fib6_nh in a nexthop in fib6_drop_pcpu_from

2019-06-07 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 v2 net-next 13/20] ipv6: Allow routes to use nexthop objects

2019-06-07 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 v2 net-next 11/20] ipv4: Allow routes to use nexthop objects

2019-06-07 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 v2 net-next 04/20] ipv6: Handle all fib6_nh in a nexthop in __find_rr_leaf

2019-06-07 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 v2 net-next 01/20] nexthops: Add ipv6 helper to walk all fib6_nh in a nexthop struct

2019-06-07 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 v2 net-next 00/20] net: Enable nexthop objects with IPv4 and IPv6 routes

2019-06-07 Thread David Ahern
From: David Ahern This is the final set of the initial nexthop object work. When I started this idea almost 2 years ago, it took 18 seconds to inject 700k+ IPv4 routes with 1 hop and about 28 seconds for 4-paths. Some of that time was due to inefficiencies in 'ip', but most of it was kernel side

[PATCH v2 net-next 05/20] ipv6: Handle all fib6_nh in a nexthop in rt6_nlmsg_size

2019-06-07 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

Fw: [Bug 203843] New: e1000e crash when ethernet is plugged in

2019-06-07 Thread Stephen Hemminger
Begin forwarded message: Date: Fri, 07 Jun 2019 10:09:19 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 203843] New: e1000e crash when ethernet is plugged in https://bugzilla.kernel.org/show_bug.cgi?id=203843 Bug ID: 203843

Re: [PATCH iproute2] ip: reset netns after each command in batch mode

2019-06-07 Thread Stephen Hemminger
On Fri, 7 Jun 2019 12:13:13 +0200 Matteo Croce wrote: > +void netns_restore(void) > +{ > + if (saved_netns != -1) { If saved_netns is -1 then it is a program bug becase no save was done? then do something? > + if (!setns(saved_netns, CLONE_NEWNET)) { > + cl

Re: [PATCH next] nexthop: off by one in nexthop_mpath_select()

2019-06-07 Thread Dan Carpenter
On Fri, Jun 07, 2019 at 08:54:33AM -0600, David Ahern wrote: > On 6/7/19 7:56 AM, Dan Carpenter wrote: > > The nhg->nh_entries[] array is allocated in nexthop_grp_alloc() and it > > has nhg->num_nh elements so this check should be >= instead of >. > > > > Fixes: f88d8ea67fbd ("ipv6: Plumb support

[PATCH v2 next] nexthop: off by one in nexthop_mpath_select()

2019-06-07 Thread Dan Carpenter
The nhg->nh_entries[] array is allocated in nexthop_grp_alloc() and it has nhg->num_nh elements so this check should be >= instead of >. Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Signed-off-by: Dan Carpenter Reviewed-by: David Ahern --- v2: Use the correct Fixes tag inclu

Re: [PATCH net] mpls: fix warning with multi-label encap

2019-06-07 Thread David Ahern
On 6/7/19 9:49 AM, David Ahern wrote: > On 6/7/19 4:49 AM, George Wilkie wrote: >> If you configure a route with multiple labels, e.g. >> ip route add 10.10.3.0/24 encap mpls 16/100 via 10.10.2.2 dev ens4 >> A warning is logged: >> kernel: [ 130.561819] netlink: 'ip': attribute type 1 has an i

Re: [PATCH net] mpls: fix warning with multi-label encap

2019-06-07 Thread David Ahern
On 6/7/19 4:49 AM, George Wilkie wrote: > If you configure a route with multiple labels, e.g. > ip route add 10.10.3.0/24 encap mpls 16/100 via 10.10.2.2 dev ens4 > A warning is logged: > kernel: [ 130.561819] netlink: 'ip': attribute type 1 has an invalid > length. > > This happens because

Re: [PATCH bpf-next v2 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-07 Thread Stanislav Fomichev
On 06/07, Martin Lau wrote: > On Thu, Jun 06, 2019 at 10:51:39AM -0700, Stanislav Fomichev wrote: > > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and > > BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. > > > > BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. > > BPF_CGRO

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

2019-06-07 Thread Robert Hancock
On 2019-06-07 4:42 a.m., Russell King - ARM Linux admin wrote: > On Thu, Jun 06, 2019 at 02:57:22PM -0600, Robert Hancock wrote: >> The idea there was to deal with the case where GPIO interrupts were >> previously raised before shutdown and not yet handled by the threaded >> interrupt handler by th

Re: [RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-07 Thread Lucas Bates
On Fri, Jun 7, 2019 at 8:18 AM Davide Caratti wrote: > From what I see, it is a fix for the reported problem (e.g. tests failing > because of 'nsPlugin' uninstalled). And, I want to followup fixing the > bpf.json in tc-actions, so that > > # ./tdc.py -l -c bpf | grep eBPF > e939: (actions, bpf)

Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-06-07 Thread netdev
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

[PATCH bpf-next v3 0/8] bpf: getsockopt and setsockopt hooks

2019-06-07 Thread Stanislav Fomichev
This series implements two new per-cgroup hooks: getsockopt and setsockopt along with a new sockopt program type. The idea is pretty similar to recently introduced cgroup sysctl hooks, but implementation is simpler (no need to convert to/from strings). What this can be applied to: * move business

[PATCH bpf-next v3 3/8] libbpf: support sockopt hooks

2019-06-07 Thread Stanislav Fomichev
Make libbpf aware of new sockopt hooks so it can derive prog type and hook point from the section names. Signed-off-by: Stanislav Fomichev --- tools/lib/bpf/libbpf.c| 5 + tools/lib/bpf/libbpf_probes.c | 1 + 2 files changed, 6 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/too

[PATCH bpf-next v3 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-07 Thread Stanislav Fomichev
Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. BPF_CGROUP_GETSOCKOPT can modify the supplied buffer. Both of them reuse existing PTR_TO_PACKET{,_END} infrastructure. The bu

[PATCH bpf-next v3 2/8] bpf: sync bpf.h to tools/

2019-06-07 Thread Stanislav Fomichev
Export new prog type and hook points to the libbpf. Signed-off-by: Stanislav Fomichev --- tools/include/uapi/linux/bpf.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 7c6aef253173..174136aa6906 100644 ---

[PATCH bpf-next v3 4/8] selftests/bpf: test sockopt section name

2019-06-07 Thread Stanislav Fomichev
Add tests that make sure libbpf section detection works. Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/test_section_names.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/testing/selftests/bpf/test_section_names.c b/tools/testing/selftests/bpf/test_sec

[PATCH bpf-next v3 7/8] bpf: add sockopt documentation

2019-06-07 Thread Stanislav Fomichev
Provide user documentation about sockopt prog type and cgroup hooks. v2: * use return code 2 for kernel bypass Signed-off-by: Stanislav Fomichev --- Documentation/bpf/index.rst | 1 + Documentation/bpf/prog_cgroup_sockopt.rst | 39 +++ 2 files changed, 40 inse

[PATCH bpf-next v3 6/8] selftests/bpf: add sockopt test that exercises sk helpers

2019-06-07 Thread Stanislav Fomichev
socktop test that introduces new SOL_CUSTOM sockopt level and stores whatever users sets in sk storage. Whenever getsockopt is called, the original value is retrieved. v3: * drop (__u8 *)(long) casts for optval{,_end} v2: * new test Signed-off-by: Stanislav Fomichev --- tools/testing/selftests

[PATCH bpf-next v3 8/8] bpftool: support cgroup sockopt

2019-06-07 Thread Stanislav Fomichev
Support sockopt prog type and cgroup hooks in the bpftool. Acked-by: Jakub Kicinski Signed-off-by: Stanislav Fomichev --- tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 7 +-- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 2 +- tools/bpf/bpftool/bash-completion/bpftool

[PATCH bpf-next v3 5/8] selftests/bpf: add sockopt test

2019-06-07 Thread Stanislav Fomichev
Add sockopt selftests: * require proper expected_attach_type * enforce context field read/write access * test bpf_sockopt_handled handler * test EPERM * test limiting optlen from getsockopt * test out-of-bounds access v3: * use DW for optval{,_end} loads v2: * use return code 2 for kernel bypass

[PATCH v4 bpf-next 1/2] bpf: add a new API libbpf_num_possible_cpus()

2019-06-07 Thread Hechao Li
Adding a new API libbpf_num_possible_cpus() that helps user with per-CPU map operations. Signed-off-by: Hechao Li Acked-by: Song Liu --- tools/lib/bpf/libbpf.c | 57 tools/lib/bpf/libbpf.h | 16 +++ tools/lib/bpf/libbpf.map | 1 + 3 files ch

[PATCH v4 bpf-next 2/2] bpf: use libbpf_num_possible_cpus in bpftool and selftests

2019-06-07 Thread Hechao Li
Use the newly added bpf_num_possible_cpus() in bpftool and selftests and remove duplicate implementations. Signed-off-by: Hechao Li Acked-by: Song Liu --- tools/bpf/bpftool/common.c | 53 +++--- tools/testing/selftests/bpf/bpf_util.h | 37 +++--- 2 fi

[PATCH v4 bpf-next 0/2] bpf: Add a new API libbpf_num_possible_cpus()

2019-06-07 Thread Hechao Li
Getting number of possible CPUs is commonly used for per-CPU BPF maps and perf_event_maps. Add a new API libbpf_num_possible_cpus() that helps user with per-CPU related operations and remove duplicate implementations in bpftool and selftests. v4: Fixed error code when reading 0 bytes from possible

Re: [PATCH iproute2] ip: reset netns after each command in batch mode

2019-06-07 Thread Matteo Croce
On Fri, Jun 7, 2019 at 5:25 PM Stephen Hemminger wrote: > > On Fri, 7 Jun 2019 12:13:13 +0200 > Matteo Croce wrote: > > > +void netns_restore(void) > > +{ > > + if (saved_netns != -1) { > > If saved_netns is -1 then it is a program bug becase > no save was done? then do something? > saved_n

[PATCH net-next 0/2] SFP polling fixes

2019-06-07 Thread Robert Hancock
This has an updated version of an earlier patch to ensure that SFP operations are stopped during shutdown, and another patch suggested by Russell King to address a potential concurrency issue with SFP state checks. Robert Hancock (2): net: sfp: Stop SFP polling and interrupt handling during shut

[PATCH net-next 1/2 v2] net: sfp: Stop SFP polling and interrupt handling during shutdown

2019-06-07 Thread Robert Hancock
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 seen on the iMX6 platform with PCIe devices, where accessing the device after the bus is shut down causes a hang. Free any acquired GPIO i

[PATCH net-next 2/2] net: sfp: add mutex to prevent concurrent state checks

2019-06-07 Thread Robert Hancock
sfp_check_state can potentially be called by both a threaded IRQ handler and delayed work. If it is concurrently called, it could result in incorrect state management. Add a st_mutex to protect the state - this lock gets taken outside of code that checks and handle state changes, and the existing s

[PATCH bpf-next] samples: bpf: don't run probes at the local make stage

2019-06-07 Thread Jakub Kicinski
Quentin reports that commit 07c3bbdb1a9b ("samples: bpf: print a warning about headers_install") is producing the false positive when make is invoked locally, from the samples/bpf/ directory. When make is run locally it hits the "all" target, which will recursively invoke make through the full bui

[PATCH] sis900: re-enable high throughput

2019-06-07 Thread Sergej Benilov
Since commit 605ad7f184b60cfaacbc038aa6c55ee68dee3c89 "tcp: refine TSO autosizing", the TSQ limit is computed as the smaller of sysctl_tcp_limit_output_bytes and max(2 * skb->truesize, sk->sk_pacing_rate >> 10). For some connections this approach sets a low limit, reducing throughput dramaticall

RE: [net-next 06/15] ixgbe: fix PTP SDP pin setup on X540 hardware

2019-06-07 Thread Keller, Jacob E
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] On > Behalf Of Richard Cochran > Sent: Thursday, June 06, 2019 8:35 PM > To: Keller, Jacob E > Cc: Kirsher, Jeffrey T ; da...@davemloft.net; > netdev@vger.kernel.org; nhor...@redhat.com; sassm..

Re: [PATCH] sis900: re-enable high throughput

2019-06-07 Thread Sergej Benilov
On Fri, 7 Jun 2019 at 19:26, Sergej Benilov wrote: > > Since commit 605ad7f184b60cfaacbc038aa6c55ee68dee3c89 "tcp: refine TSO > autosizing", > the TSQ limit is computed as the smaller of > sysctl_tcp_limit_output_bytes and max(2 * skb->truesize, sk->sk_pacing_rate > >> 10). > For some connection

Re: [PATCH v4 bpf-next 0/2] bpf: Add a new API libbpf_num_possible_cpus()

2019-06-07 Thread Andrii Nakryiko
On Fri, Jun 7, 2019 at 9:38 AM Hechao Li wrote: > > Getting number of possible CPUs is commonly used for per-CPU BPF maps > and perf_event_maps. Add a new API libbpf_num_possible_cpus() that > helps user with per-CPU related operations and remove duplicate > implementations in bpftool and selftest

Re: [PATCH net-next v2 3/3] net/mlx5e: use indirect calls wrapper for the rx packet handler

2019-06-07 Thread Saeed Mahameed
On Thu, 2019-06-06 at 23:56 +0200, Paolo Abeni wrote: > We can avoid another indirect call per packet wrapping the rx > handler call with the proper helper. > > To ensure that even the last listed direct call experience > measurable gain, despite the additional conditionals we must > traverse befo

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

2019-06-07 Thread Robert Hancock
On 2019-06-02 9:15 a.m., Russell King - ARM Linux admin wrote: > On Fri, May 31, 2019 at 06:17:51PM -0600, Robert Hancock wrote: >> Our device is mainly intended for fiber modules, which is why 1000BaseX >> is being used. The variant of fiber modules we are using (for example, >> Finisar FCLF8520P2

Re: [pull request][for-next 0/9] Generic DIM lib for netdev and RDMA

2019-06-07 Thread Saeed Mahameed
On Thu, 2019-06-06 at 13:07 +, Jason Gunthorpe wrote: > On Thu, Jun 06, 2019 at 10:19:41AM +0300, Max Gurtovoy wrote: > > > > Solution: > > > > - Common logic is declared in include/linux/dim.h and > > > > implemented in > > > >lib/dim/dim.c > > > > - Net DIM (existing) logic is declared in

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

2019-06-07 Thread Robert Hancock
On 2019-06-01 2:10 p.m., Russell King - ARM Linux admin wrote: >>> Sorry, I'm having a hard time following this description. Please draw >>> an ASCII diagram of the setup you have - a picture is worth 1000 words, >>> and I think that is very much the case here. >>> >>> We do have boards where the

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

2019-06-07 Thread Davide Caratti
On Wed, 2019-06-05 at 18:42 -0700, Cong Wang wrote: > On Tue, Jun 4, 2019 at 11:19 AM Eli Britstein wrote: hello Cong and Eli, and thanks for all the thoughts. > > On 6/4/2019 8:55 PM, Cong Wang wrote: > > > On Sat, Jun 1, 2019 at 9:22 PM Eli Britstein wrote: > > > > I think that's because Qin

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

2019-06-07 Thread Russell King - ARM Linux admin
On Fri, Jun 07, 2019 at 12:10:57PM -0600, Robert Hancock wrote: > On 2019-06-02 9:15 a.m., Russell King - ARM Linux admin wrote: > > On Fri, May 31, 2019 at 06:17:51PM -0600, Robert Hancock wrote: > >> Our device is mainly intended for fiber modules, which is why 1000BaseX > >> is being used. The v

Re: [PATCH net-next v1 5/7] taprio: Add support for txtime offload mode.

2019-06-07 Thread Murali Karicheri
On 06/04/2019 04:06 PM, Patel, Vedang wrote: Hi Murali, On Jun 3, 2019, at 7:15 AM, Murali Karicheri wrote: Hi Vedang, On 05/28/2019 01:46 PM, Vedang Patel wrote: Currently, we are seeing non-critical packets being transmitted outside of their timeslice. We can confirm that the packets are

[RFC v2 PATCH 0/5] seg6: Segment routing fixes

2019-06-07 Thread Tom Herbert
This patch set includes fixes to bring the segment routing implementation into conformance with the latest version of the draft (draft-ietf-6man-segment-routing-header-19). Also, segment routing receive function calls ip6_parse to properly parse TLVs in parsing loop. Changes include: - Update T

[RFC v2 PATCH 2/5] seg6: Obsolete unused SRH flags

2019-06-07 Thread Tom Herbert
Currently no flags are defined for segment routing in draft-ietf-6man-segment-routing-header-19. Mark them as being obsolete. The HMAC flag is the only one used by the stack. This needs additional consideration. Rewrite sr_has_hmac in uapi/linux/seg6.h to properly parse a segment routing header as

[RFC v2 PATCH 1/5] seg6: Fix TLV definitions

2019-06-07 Thread Tom Herbert
The definitions of TLVs in uapi/linux/seg6.h are out of date and incomplete. Fix this. TLV constants are defined for PAD1, PADN, and HMAC (the three defined in draft-ietf-6man-segment-routing-header-19). The other TLV are unused and and are marked as obsoleted. Signed-off-by: Tom Herbert --- in

[PATCH v3 05/20] docs: bpf: get rid of two warnings

2019-06-07 Thread Mauro Carvalho Chehab
Documentation/bpf/btf.rst:154: WARNING: Unexpected indentation. Documentation/bpf/btf.rst:163: WARNING: Unexpected indentation. Signed-off-by: Mauro Carvalho Chehab Acked-by: Song Liu --- Documentation/bpf/btf.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/bpf/btf.rst b

[RFC v2 PATCH 3/5] ipv6: Paramterize TLV parsing

2019-06-07 Thread Tom Herbert
Add parameters to ip6_parse_tlv that will allow leveraging the function for parsing segment routing TLVs. The new parameters are offset of TLVs, length of the TLV block, and a function that is called in the case of an unrecognized option. Signed-off-by: Tom Herbert --- net/ipv6/exthdrs.c | 35 ++

[RFC v2 PATCH 5/5] seg6: Leverage ip6_parse_tlv

2019-06-07 Thread Tom Herbert
Call ip6_parse_tlv from segment routing receive function to properly parse TLVs and to leverage to existing implementation that already parses Destination and Hop-by-Hop Options. This includes applying the denial of service mitigations and limits to processing segment routing TLVs. Signed-off-by:

[RFC v2 PATCH 4/5] seg6: Add sysctl limits for segment routing header

2019-06-07 Thread Tom Herbert
These are analoguous to the sysctls that were defined for IPv6 Destination and Hop-by-Hop Options. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 31 ++- include/net/netns/ipv6.h | 2 ++ net/ipv6/af_inet6.c| 2 ++ net/ipv6/sysctl_net_ipv6.c |

Re: [pull request][for-next 0/9] Generic DIM lib for netdev and RDMA

2019-06-07 Thread Jason Gunthorpe
On Fri, Jun 07, 2019 at 06:14:11PM +, Saeed Mahameed wrote: > On Thu, 2019-06-06 at 13:07 +, Jason Gunthorpe wrote: > > On Thu, Jun 06, 2019 at 10:19:41AM +0300, Max Gurtovoy wrote: > > > > > Solution: > > > > > - Common logic is declared in include/linux/dim.h and > > > > > implemented in

Re: [PATCH] sis900: re-enable high throughput

2019-06-07 Thread Eric Dumazet
On 6/7/19 10:31 AM, Sergej Benilov wrote: > On Fri, 7 Jun 2019 at 19:26, Sergej Benilov > wrote: >> >> Since commit 605ad7f184b60cfaacbc038aa6c55ee68dee3c89 "tcp: refine TSO >> autosizing", >> the TSQ limit is computed as the smaller of >> sysctl_tcp_limit_output_bytes and max(2 * skb->truesiz

[PATCH v2 net-next 0/7] Avoid local_irq_save() and use napi_alloc_frag() where possible

2019-06-07 Thread Sebastian Andrzej Siewior
The first two patches remove local_irq_save() around `netdev_alloc_cache' which does not work on -RT. Besides helping -RT it whould benefit the users of the function since they can avoid disabling interrupts and save a few cycles. The remaining patches are from a time when I tried to remove `netdev

[PATCH v2 net-next 7/7] net: hwbm: Make the hwbm_pool lock a mutex

2019-06-07 Thread Sebastian Andrzej Siewior
Based on review, `lock' is only acquired in hwbm_pool_add() which is invoked via ->probe(), ->resume() and ->ndo_change_mtu(). Based on this the lock can become a mutex and there is no need to disable interrupts during the procedure. Now that the lock is a mutex, hwbm_pool_add() no longer invokes h

[PATCH v2 net-next 1/7] net: Don't disable interrupts in napi_alloc_frag()

2019-06-07 Thread Sebastian Andrzej Siewior
netdev_alloc_frag() can be used from any context and is used by NAPI and non-NAPI drivers. Non-NAPI drivers use it in interrupt context and NAPI drivers use it during initial allocation (->ndo_open() or ->ndo_change_mtu()). Some NAPI drivers share the same function for the initial allocation and th

[PATCH v2 net-next 5/7] bnx2x: Use napi_alloc_frag()

2019-06-07 Thread Sebastian Andrzej Siewior
SKB allocation via bnx2x_frag_alloc() is always performed in NAPI context. Preemptible context passes GFP_KERNEL and bnx2x_frag_alloc() uses then __get_free_page() for the allocation. Use napi_alloc_frag() for memory allocation. Cc: Ariel Elior Cc: Sudarsana Kalluru Cc: gr-everest-linux...@marv

[PATCH v2 net-next 6/7] tg3: Use napi_alloc_frag()

2019-06-07 Thread Sebastian Andrzej Siewior
tg3_alloc_rx_data() uses netdev_alloc_frag() for skb allocation. All callers of tg3_alloc_rx_data() either hold tp->lock (which is held with BH disabled) or run in NAPI context. Use napi_alloc_frag() for skb allocations. Cc: Siva Reddy Kallam Cc: Prashant Sreedharan Cc: Michael Chan Signed-off

[PATCH v2 net-next 4/7] dpaa2-eth: Use napi_alloc_frag()

2019-06-07 Thread Sebastian Andrzej Siewior
The driver is using netdev_alloc_frag() for allocation in the ->ndo_start_xmit() path. That one is always invoked in a BH disabled region so we could also use napi_alloc_frag(). Use napi_alloc_frag() for skb allocation. Cc: Ioana Radulescu Acked-by: Ioana Radulescu Signed-off-by: Sebastian Andr

[PATCH v2 net-next 3/7] dpaa2-eth: Remove preempt_disable() from seed_pool()

2019-06-07 Thread Sebastian Andrzej Siewior
According to the comment, the preempt_disable() statement is required due to synchronisation in napi_alloc_frag(). The awful truth is that local_bh_disable() is required because otherwise the NAPI poll callback can be invoked while the open function setup buffers. This isn't unlikely since the dpaa

[PATCH v2 net-next 2/7] net: Don't disable interrupts in __netdev_alloc_skb()

2019-06-07 Thread Sebastian Andrzej Siewior
__netdev_alloc_skb() can be used from any context and is used by NAPI and non-NAPI drivers. Non-NAPI drivers use it in interrupt context and NAPI drivers use it during initial allocation (->ndo_open() or ->ndo_change_mtu()). Some NAPI drivers share the same function for the initial allocation and t

[PATCH net-next 1/1] ipv6: tcp: fix potential NULL deref in tcp_v6_send_reset()

2019-06-07 Thread Eric Dumazet
syzbot found a crash in tcp_v6_send_reset() caused by my latest change. Problem is that if an skb has been queued to socket prequeue, skb_dst(skb)->dev can not anymore point to the device. Fortunately in this case the socket pointer is not NULL. A similar issue has been fixed in commit 0f85feae6

Re: EoGRE sends undersized frames without padding

2019-06-07 Thread Cong Wang
On Thu, Jun 6, 2019 at 12:36 AM Steinar H. Gunderson wrote: > > On Wed, Jun 05, 2019 at 06:17:51PM -0700, Cong Wang wrote: > > Hmm, sounds like openvswitch should pad the packets in this scenario, > > like hardware switches padding those on real wires. > > Well, openvswitch say that they just thro

Re: EoGRE sends undersized frames without padding

2019-06-07 Thread Steinar H. Gunderson
On Fri, Jun 07, 2019 at 12:57:57PM -0700, Cong Wang wrote: >> Well, openvswitch say that they just throw packets around and assume they're >> valid... :-) > _If_ the hardware switch has to pad them (according to what you said), > why software switch doesn't? Trust me, I'm telling them they have to

[PATCH iproute2 v2] ip: reset netns after each command in batch mode

2019-06-07 Thread Matteo Croce
When creating a new netns or executing a program into an existing one, the unshare() or setns() calls will change the current netns. In batch mode, this can run commands on the wrong interfaces, as the ifindex value is meaningful only in the current netns. For example, this command fails because ve

  1   2   >