[PATCHv3 net-next] sched: add dualpi2 scheduler module

2019-03-28 Thread Olga Albisser
DUALPI2 provides extremely low latency & loss to traffic that uses a scalable congestion controller (e.g. L4S, DCTCP) without degrading the performance of 'classic' traffic (e.g. Reno, Cubic etc.). It is intended to be the reference implementation of the IETF's DualQ Coupled AQM. The qdisc provide

Re: [PATCH v3 net-next 03/13] ipv4: Create init helper for fib_nh

2019-03-28 Thread Ido Schimmel
On Wed, Mar 27, 2019 at 08:53:48PM -0700, David Ahern wrote: > From: David Ahern > > Consolidate the fib_nh initialization which is duplicated between > fib_create_info for single path and fib_get_nhs for multipath. > Export the helper to allow for use with nexthop objects in the > future. > > S

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

2019-03-28 Thread Michal Kubecek
On Thu, Mar 28, 2019 at 02:01:09PM +0800, Li RongQing wrote: > NULL or ZERO_SIZE_PTR will be returned for zero sized memory > request, and derefencing them will lead to a segfault > > so it is unnecessory to call vzalloc for zero sized memory > request and not call __ethtool_get_strings which alwa

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

2019-03-28 Thread Nicolas Dichtel
It returned always NULL, thus it was never possible to get the filter. Example: $ ip link add foo type dummy $ ip link add bar type dummy $ tc qdisc add dev foo clsact $ tc filter add dev foo protocol all pref 1 ingress handle 1234 \ matchall action mirred ingress mirror dev bar Before th

Re: [PATCHv3 net-next] sched: add dualpi2 scheduler module

2019-03-28 Thread Eric Dumazet
On 03/28/2019 01:12 AM, Olga Albisser wrote: > DUALPI2 provides extremely low latency & loss to traffic that uses a > scalable congestion controller (e.g. L4S, DCTCP) without degrading the > performance of 'classic' traffic (e.g. Reno, Cubic etc.). It is intended > to be the reference implementa

RE: New xdpsock sample

2019-03-28 Thread Maxim Mikityanskiy
> -Original Message- > From: Magnus Karlsson > Sent: 27 March, 2019 16:19 > To: Björn Töpel > Cc: Maxim Mikityanskiy ; Magnus Karlsson > ; Jonathan Lemon ; > netdev@vger.kernel.org; Björn Töpel ; Daniel Borkmann > ; Eran Ben Elisha ; Tariq Toukan > ; Saeed Mahameed > Subject: Re: New xdp

答复: [PATCH] net: ethtool: not call vzalloc for zero sized memory request

2019-03-28 Thread Li,Rongqing
> -邮件原件- > 发件人: Michal Kubecek [mailto:mkube...@suse.cz] > 发送时间: 2019年3月28日 17:09 > 收件人: Li,Rongqing > 抄送: netdev@vger.kernel.org > 主题: Re: [PATCH] net: ethtool: not call vzalloc for zero sized memory request > > On Thu, Mar 28, 2019 at 02:01:09PM +0800, Li RongQing wrote: > > NULL or Z

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

2019-03-28 Thread Michal Kubecek
On Thu, Mar 28, 2019 at 09:51:56AM +, Li,Rongqing wrote: > > -邮件原件- > > 发件人: Michal Kubecek [mailto:mkube...@suse.cz] > > 发送时间: 2019年3月28日 17:09 > > 收件人: Li,Rongqing > > 抄送: netdev@vger.kernel.org > > 主题: Re: [PATCH] net: ethtool: not call vzalloc for zero sized memory request > > > >

Re: [PATCH ipsec-next 04/11] xfrm: remove output indirection from xfrm_mode

2019-03-28 Thread Sabrina Dubroca
Hi Florian, 2019-03-27, 18:31:33 +0100, Florian Westphal wrote: > diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c > index 9333153bafda..01eb142ba6d0 100644 > --- a/net/xfrm/xfrm_output.c > +++ b/net/xfrm/xfrm_output.c [snip] > +static int xfrm4_prepare_output(struct xfrm_state *x, str

答复: 答复: [PATCH] net: ethtool: not call vzalloc for zero sized memory request

2019-03-28 Thread Li,Rongqing
> -邮件原件- > 发件人: Michal Kubecek [mailto:mkube...@suse.cz] > 发送时间: 2019年3月28日 18:26 > 收件人: Li,Rongqing > 抄送: netdev@vger.kernel.org > 主题: Re: 答复: [PATCH] net: ethtool: not call vzalloc for zero sized memory > request > > On Thu, Mar 28, 2019 at 09:51:56AM +, Li,Rongqing wrote: > > > -

Re: [PATCH v3 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-28 Thread Ido Schimmel
On Wed, Mar 27, 2019 at 08:53:50PM -0700, David Ahern wrote: > From: David Ahern > > Similar to IPv4, consolidate the fib6_nh initialization into a helper. > As a new standalone function, add a cleanup path to put lwtstate on > error. > > To avoid modifying fib6_config flags, move the reject che

Re: [PATCH v3 net-next 06/13] ipv6: Create cleanup helper for fib6_nh

2019-03-28 Thread Ido Schimmel
On Wed, Mar 27, 2019 at 08:53:51PM -0700, David Ahern wrote: > From: David Ahern > > Move the fib6_nh cleanup code to a new helper, fib6_nh_release. > > Signed-off-by: David Ahern Reviewed-by: Ido Schimmel

Re: [PATCH v3 net-next 07/13] ipv6: Move gateway checks to a fib6_nh setting

2019-03-28 Thread Ido Schimmel
On Wed, Mar 27, 2019 at 08:53:52PM -0700, David Ahern wrote: > From: David Ahern > > The gateway setting is not per fib6_info entry but per-fib6_nh. Add a new > fib_nh_has_gw flag to fib6_nh and convert references to RTF_GATEWAY to > the new flag. For IPv6 address the flag is cheaper than checkin

Re: [PATCH v3 net-next 12/13] net: Add fib_nh_common and update fib_nh and fib6_nh

2019-03-28 Thread Ido Schimmel
On Wed, Mar 27, 2019 at 08:53:57PM -0700, David Ahern wrote: > From: David Ahern > > Add fib_nh_common struct with common nexthop attributes. Convert > fib_nh and fib6_nh to use it. Use macros to move existing > fib_nh_* references to the new nh_common.nhc_*. > > Signed-off-by: David Ahern Rev

Re: [PATCH v3 net-next 13/13] net: Use common nexthop init and release helpers

2019-03-28 Thread Ido Schimmel
On Wed, Mar 27, 2019 at 08:53:58PM -0700, David Ahern wrote: > From: David Ahern > > With fib_nh_common in place, move common initialization and release > code into helpers used by both ipv4 and ipv6. For the moment, the init > is just the lwt encap and the release is both the netdev reference an

Re: [PATCH ipsec-next 04/11] xfrm: remove output indirection from xfrm_mode

2019-03-28 Thread Florian Westphal
Sabrina Dubroca wrote: > Hi Florian, > > 2019-03-27, 18:31:33 +0100, Florian Westphal wrote: > > diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c > > index 9333153bafda..01eb142ba6d0 100644 > > --- a/net/xfrm/xfrm_output.c > > +++ b/net/xfrm/xfrm_output.c > [snip] > > +static int xfrm

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

2019-03-28 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 Acked-by: Andrey Ignatov --- v2: use QUIET_GEN instead of QUIET_LINK to generate pc file, save kernel version in its ow

Re: [PATCH ipsec-next 04/11] xfrm: remove output indirection from xfrm_mode

2019-03-28 Thread Sabrina Dubroca
2019-03-28, 12:27:18 +0100, Florian Westphal wrote: > Sabrina Dubroca wrote: > > Hi Florian, > > > > 2019-03-27, 18:31:33 +0100, Florian Westphal wrote: > > > diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c > > > index 9333153bafda..01eb142ba6d0 100644 > > > --- a/net/xfrm/xfrm_outpu

Re: linux-next: manual merge of the bpf-next tree with the net tree

2019-03-28 Thread Luca Boccassi
On Wed, 2019-03-27 at 18:53 -0700, Alexei Starovoitov wrote: > On Wed, Mar 27, 2019 at 8:15 AM Alexei Starovoitov > < > alexei.starovoi...@gmail.com > > wrote: > > then get propagated into net-next and then bpf-next will get them > > as well. > > Now it's done. > Luca, > could you please rebase on

Kernel BUG in mm/sub.c:294 while forwarding fragmented IPv4 multicast traffic

2019-03-28 Thread Henning Rogge
Hi, we encountered a reproducable kernel bug while forwarding small amounts (<10 packets) of fragmented (2500 bytes original size) IPv4 UDP multicast. Non-fragmented traffic does not trigger the behavior. We are using Debian Buster on virtual machine (VMWare ESXI). We are using smcroute to se

Re: [BUG] net: core: netif_receive_skb_list() crash on non-standard ptypes forwarding

2019-03-28 Thread Edward Cree
On 28/03/2019 10:03, Alexander Lobakin wrote: > Here's a working possible fix for that, not sure if it can break anything > though. > > diff --git a/net/core/dev.c b/net/core/dev.c > index 2b67f2aa59dd..fdcff29df915 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -5014,8 +5014,10 @@ stati

Re: [PATCH ipsec-next 03/11] xfrm: remove input indirection from xfrm_mode

2019-03-28 Thread Sabrina Dubroca
2019-03-27, 18:31:32 +0100, Florian Westphal wrote: > diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c > index ea5ac053c15d..e3c7edd11e77 100644 > --- a/net/xfrm/xfrm_input.c > +++ b/net/xfrm/xfrm_input.c > @@ -186,6 +186,74 @@ int xfrm_prepare_input(struct xfrm_state *x, struct > sk_buf

Re: [PATCH ipsec-next 00/11] xfrm: remove xfrm_mode indirections

2019-03-28 Thread Benedict Wong
Hi Florian, I ran the Android unit tests on these patches, based off ipsec-next, and am encountering some new errors. I'll take another look to try and isolate which patches might be causing the failures. Best Regards, Benedict Wong On Wed, Mar 27, 2019 at 6:30 PM Florian Westphal wrote: > > T

Re: [PATCH ipsec-next 03/11] xfrm: remove input indirection from xfrm_mode

2019-03-28 Thread Florian Westphal
Sabrina Dubroca wrote: > 2019-03-27, 18:31:32 +0100, Florian Westphal wrote: > > diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c > > index ea5ac053c15d..e3c7edd11e77 100644 > > --- a/net/xfrm/xfrm_input.c > > +++ b/net/xfrm/xfrm_input.c > > @@ -186,6 +186,74 @@ int xfrm_prepare_input(st

Re: [PATCH ipsec-next 00/11] xfrm: remove xfrm_mode indirections

2019-03-28 Thread Florian Westphal
Benedict Wong wrote: > Hi Florian, > > I ran the Android unit tests on these patches, based off ipsec-next, > and am encountering some new errors. I'll take another look to try and > isolate which patches might be causing the failures. Thanks a lot, but you can hold off for v1, Sabrina already f

[PATCH net-next 0/9] selftests: forwarding: Add new test cases

2019-03-28 Thread Ido Schimmel
This patchset mainly adds new forwarding test cases and performs small changes in existing infrastructure. Patches #1-#3 add new test cases for multicast RPF check, PCP and VLAN matching using flower and tc VLAN modify action. The rest of the patches are from Petr who says: In patches #4 and #5,

[PATCH net-next 2/9] selftests: forwarding: Add PCP match and VLAN match tests

2019-03-28 Thread Ido Schimmel
From: Amit Cohen Send packets with VLAN and PCP set and check that TC flower filters can match on these keys. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/tc_flower.sh | 59 ++- 1 file changed, 58 insertions(+), 1 deletion(-) diff

[PATCH net-next 8/9] selftests: mlxsw: Add qos_lib.sh

2019-03-28 Thread Ido Schimmel
From: Petr Machata Extract reusable code from qos_mc_aware.sh and put into a new library. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../selftests/drivers/net/mlxsw/qos_lib.sh| 98 + .../drivers/net/mlxsw/qos_mc_aware.sh | 103 ++

[PATCH net-next 3/9] selftests: forwarding: Test action VLAN modify

2019-03-28 Thread Ido Schimmel
From: Danielle Ratson Construct a basic topology consisting of two hosts connected using a VLAN-aware bridge. Put each port in a different VLAN and test that ping fails. Add ingress and egress filters with a VLAN modify action and test that ping passes. Signed-off-by: Danielle Ratson Signed-of

[PATCH net-next 4/9] selftests: forwarding: devlink_lib: Avoid double sourcing of lib.sh

2019-03-28 Thread Ido Schimmel
From: Petr Machata Don't source lib.sh twice and make the script work with ifnames passed on the command line. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../drivers/net/mlxsw/spectrum-2/tc_flower.sh | 1 + .../drivers/net/mlxsw/spectrum/devlink_resources.sh| 3

[PATCH net-next 6/9] selftests: forwarding: devlink_lib: Add shared buffer helpers

2019-03-28 Thread Ido Schimmel
From: Petr Machata Add helpers to obtain, set, and restore a pool size, and a port-pool and tc-pool threshold. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/devlink_lib.sh | 95 +++ 1 file changed, 95 insertions(+) diff --git a/too

[PATCH net-next 7/9] selftests: mlxsw: qos_mc_aware: Configure shared buffers

2019-03-28 Thread Ido Schimmel
From: Petr Machata This test runs two streams of traffic from two independent ports to create congestion on one egress port. It is necessary to configure the shared buffer thresholds correctly, to make sure that there is traffic from both streams in the shared buffer. Only then can the test actua

[PATCH net-next 1/9] selftests: forwarding: Add reverse path forwarding (RPF) test cases

2019-03-28 Thread Ido Schimmel
In case a packet is routed using a multicast route whose specified ingress interface does not match the interface from which the packet was received, the packet is dropped. Add IPv4 and IPv6 test cases for above mentioned scenario. Signed-off-by: Ido Schimmel --- .../net/forwarding/router_multi

[PATCH net-next 9/9] selftests: mlxsw: Add a new test for strict priority

2019-03-28 Thread Ido Schimmel
From: Petr Machata Test that when strict priority is configured on a system, the higher-priority traffic does actually win all the available bandwidth. The test uses a similar approach to qos_mc_aware.sh to run and account the traffic. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --

[PATCH net-next 5/9] selftests: forwarding: devlink_lib: Simplify deduction of DEVLINK_DEV

2019-03-28 Thread Ido Schimmel
From: Petr Machata Use devlink -j and jq for more accurate querying. Use cut -f-2 instead of rev-cut-rev combo. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/devlink_lib.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --

Re: New xdpsock sample

2019-03-28 Thread Björn Töpel
On Thu, 28 Mar 2019 at 10:48, Maxim Mikityanskiy wrote: > [...] > > > Thanks for the good input, Max! The rationale for making the sample > > > simpler, was that most people was just C&Ping from it and used it in > > > their own code, so we aimed for a simple "fits-most-people" sample. > > I don't

[patch net-next v4 07/12] bnxt: implement ndo_get_devlink_port

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko In order for devlink compat functions to work, implement ndo_get_devlink_port. Legacy slaves does not have devlink port instances created for themselves. Signed-off-by: Jiri Pirko --- v1->v2: - new patch --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 +- 1 file cha

[patch net-next v4 02/12] net: replace ndo_get_devlink with ndo_get_devlink_port

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Follow-up patch is going to need a devlink port instance according to a netdev. Devlink port instance should be always available when devlink is used. So change the recently introduced ndo_get_devlink to ndo_get_devlink_port. With that, adjust the wrapper for the only user to get

[patch net-next v4 03/12] net: devlink: introduce devlink_compat_phys_port_name_get()

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Introduce devlink_compat_phys_port_name_get() helper that gets the physical port name for specified netdevice according to devlink port attributes. Call this helper from dev_get_phys_port_name() in case ndo_get_phys_port_name is not defined. Signed-off-by: Jiri Pirko Reviewed-b

[patch net-next v4 08/12] bnxt: remove ndo_get_phys_port_name implementation

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Rely on the previously introduced fallback and let the core call devlink in order to get the physical port name. Signed-off-by: Jiri Pirko --- v1->v2: - new patch --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 18 -- 1 file changed, 18 deletions(-) diff --git

[patch net-next v4 05/12] mlxsw: Remove ndo_get_phys_port_name implementation

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Rely on the previously introduced fallback and let the core call devlink directly in order to get the physical port name. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski --- v1->v2: - adjusted patch description --- drivers/net/ethernet/mellanox/mlxsw/core.c | 10 ---

[patch net-next v4 10/12] dsa: do not support ndo_get_phys_port_name for non-legacy ports

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Since each non-legacy slave has its own devlink port instance correctly set, rely on devlink core to generate correct phys port name. Signed-off-by: Jiri Pirko --- v3->v4: - changed to return -EOPNOTSUPP for non-legacy ports v1->v2: - new patch --- net/dsa/slave.c | 7 +++

[patch net-next v4 00/12] net: call for phys_port_name into devlink directly if possible

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko phys_port_name may be assembled by a helper in devlink. It is currently the case only for mlxsw driver. Benefit from the get_devlink_port ndo and call into devlink directly from dev_get_phys_port_name(). That saves the trip to the driver, simplifies the code and makes it similar

[patch net-next v4 01/12] nfp: register devlink port before netdev

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Change the init/fini flow and register devlink port instance before netdev. Now it is needed for correct behavior of phys_port_name generation, but in general it makes sense to register devlink port first. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski --- v1->v2: - new

[patch net-next v4 09/12] dsa: implement ndo_get_devlink_port

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko In order for devlink compat functions to work, implement ndo_get_devlink_port. Legacy slaves does not have devlink port instances created for themselves. Signed-off-by: Jiri Pirko --- v3->v4: - return null for legacy instead of separate set of ndos v1->v2: - new patch --- net/

[patch net-next v4 12/12] net: devlink: add warning for ndo_get_phys_port_name set when not needed

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Currently if the driver registers devlink port instance, it should set the devlink port attributes as well. Then the devlink core is able to obtain physical port name itself, no need for driver to implement the ndo. Once all drivers will implement devlink port registration, this

[patch net-next v4 11/12] nfp: do not handle nn->port defined case in nfp_net_get_phys_port_name()

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko If nn->port is defined it means that devlink_port has been registered for this port as well. Devlink core is handling the port name formatting. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski --- v1->v2: - new patch --- drivers/net/ethernet/netronome/nfp/nfp_net_common.

[patch net-next v4 06/12] net: devlink: remove unused devlink_port_get_phys_port_name() function

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko Now it is unused, remove it. Signed-off-by: Jiri Pirko --- v1->v2: - rebase --- include/net/devlink.h | 2 -- net/core/devlink.c| 7 --- 2 files changed, 9 deletions(-) diff --git a/include/net/devlink.h b/include/net/devlink.h index 85e577d6ec3b..31d5cec4d06b 100644

[patch net-next v4 04/12] mlxsw: Implement ndo_get_devlink_port

2019-03-28 Thread Jiri Pirko
From: Jiri Pirko In order for devlink compat functions to work, implement ndo_get_devlink_port. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c | 12 drivers/net/ethernet/mellanox/mlxsw/core.h | 3 +++ drivers/net/ethernet/mellanox/mlxsw/minimal.c

Re: [RFC bpf-next v3 6/8] flow_dissector: handle no-skb use case

2019-03-28 Thread Willem de Bruijn
> > > > > > > > > If skb_vlan_tag_present(skb) returns true, we set proto to > > > > > > > > > skb->protocol > > > > > > > > > and move on. > > > > > > > > > > > > > > > > > > But, we would need vlan_proto/present/tci in the flow_keys in > > > > > > > > > the future. > > > > > > > > > We don't cu

[PATCH mlx5-next 01/12] net/mlx5: E-Switch, don't use hardcoded values for FDB prios

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch When creating the FDB prios, use the enum values already defined and not the hardcoded values. Signed-off-by: Mark Bloch Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 - drivers/net/ethernet/m

[PATCH rdma-next 00/12] Move IB representors to single IB device multiple ports

2019-03-28 Thread Leon Romanovsky
From: Leon Romanovsky >From Mark, Hi, This series starts from two refactoring patches performed in mlx5_core and they are part of a larger series intended to expose the ability to insert FDB steering rules by the RDMA side. They are followed by patches which move IB representors to single IB d

[PATCH rdma-next 03/12] RDMA/mlx5: Move netdev info into the port struct

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Netdev info is stored in a separate array and holds data relevant on a per port basis, move it to be part of the port struct. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c| 30 ++-- drivers/infiniban

[PATCH rdma-next 04/12] RDMA/mlx5: Free IB device on remove

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Simplify the code and move the deallocation of the IB device into the remove function. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c | 5 + drivers/infiniband/hw/mlx5/main.c | 4 ++-- 2 files changed, 3 insertions(+), 6

[PATCH mlx5-next 02/12] net/mlx5: E-Switch, add a new prio to be used by the RDMA side

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Create a new prio in the FDB, it will be used when inserting steering rules into the FDB from the RDMA side. We create a new PRIO so rules from the net side and rules from the RDMA side won't be inserted to the same PRIO, each side has it's own sandbox to play in. Signed-off-by:

[PATCH rdma-next 05/12] RDMA/mlx5: Move ports allocation to outside of INIT stage

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch In downstream patches we will need access to the ports before doing any stages, in order to set net device per representor. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c | 12 ++-- drivers/infiniband/hw/mlx5/main.c

[PATCH rdma-next 06/12] RDMA/mlx5: Use correct size for device resources

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch On allocation we use the array size and on destruction num_ports, use the array size of destruction as well, in this context the array corresponds to the native/actual ports on the NIC so no need to adjust this logic for representors. Signed-off-by: Mark Bloch Signed-off-by: Le

[PATCH rdma-next 10/12] RDMA/mlx5: Move SMI caps logic

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch We store the SMI information in the core device's struct, make sure we set that information only once (and not per port), while here make the for loop based on the actual size of the array. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx

[PATCH rdma-next 07/12] RDMA/mlx5: Move rep into port struct

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch In preparation of moving into a model of single IB device multiple ports move rep to be part of the port structure. We mark a representor device by setting is_rep, no functional change with this patch. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infin

[PATCH rdma-next 08/12] RDMA/mlx5: Move default representors SQ steering to rule to modify QP

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Currently the steering for SQs created on representors is done on creation, once we move to representors as ports of an IB device we need the port argument which is given only at the modify QP stage, adjust the code appropriately. Signed-off-by: Mark Bloch Signed-off-by: Leon R

[PATCH rdma-next 09/12] RDMA/mlx5: Refactor netdev affinity code

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch The design of representors is such that once an IB representor is created, the netdev of representor already exists, we can use that fact to simplify the netdev affinity code. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c |

[PATCH rdma-next 12/12] RDMA/mlx5: Remove VF representor profile

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Now that we have a single IB device with multipul ports we can remove the VF representor profile. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c | 39 --- drivers/infiniband/hw/mlx5/main.c| 46

[PATCH rdma-next 11/12] RDMA/mlx5: Move to single device multiport ports in switchdev mode

2019-03-28 Thread Leon Romanovsky
From: Mark Bloch Move from IB device (representor) per virtual function to single IB device with port per virtual function (port 1 represents the uplink). As number of ports is a static property of an IB device, declare the IB device with as many port as the possible according to the PCI bus. Si

Re: [PATCH ipsec-next 09/11] xfrm: remove afinfo pointer from xfrm_mode

2019-03-28 Thread Sabrina Dubroca
(just a couple of checkpatch-like comments) 2019-03-27, 18:31:38 +0100, Florian Westphal wrote: > diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c > index 6802d1aee424..cff048ad8562 100644 > --- a/net/ipv4/xfrm4_output.c > +++ b/net/ipv4/xfrm4_output.c > @@ -72,6 +72,8 @@ int xfrm4_o

Re: New xdpsock sample

2019-03-28 Thread Jonathan Lemon
> On Mar 28, 2019, at 5:35 AM, Björn Töpel wrote: > > Magnus and I took the route to simplify the sample, to make it easier > for new users. I still think that was the right path. Should there be > a sample showcasing all the knobs/pulleys? One problem I ran into yesterday is that the bpf prog

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

2019-03-28 Thread Ilias Apalodimas
The page_pool API has no users for it's DMA capabilities yet. Unmapping DMA addresses used by network drivers will be needed for real users. commit 1567b85eb8ad ("net: page_pool: don't use page->private to store dma_addr_t") uses 'struct page' to store the addresses. This patch provides a helper

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

2019-03-28 Thread Ilias Apalodimas
The page_pool API has no users for it's DMA capabilities yet. Retrieving DMA addresses used by network drivers will be needed for real users. commit 1567b85eb8ad ("net: page_pool: don't use page->private to store dma_addr_t") uses 'struct page' to store the addresses. This patch provides a helper

Re: [PATCH bpf 0/2] libbpf: minor packaging fixes

2019-03-28 Thread Daniel Borkmann
On 03/27/2019 02:51 PM, Björn Töpel wrote: > The DPDK project is moving forward with its AF_XDP PMD, and during > that process some libbpf issues surfaced [1]. Great to hear! > This series address two, minor, packaging issues for libbpf. The > header file xsk.h was missing from the instal_headers

[PATCH net-next 00/10] s390/qeth: updates 2019-03-28

2019-03-28 Thread Julian Wiedmann
Hi Dave, please apply the following patchset to net-next. This reworks the control IO code in qeth so that we no longer need to poll for cmd completion, and refactors the IDX setup code to also use this improved IO path. Thanks, Julian Julian Wiedmann (10): s390/qeth: defer RX modesetting s

[PATCH net-next 03/10] s390/qeth: add wrapper for IP table access

2019-03-28 Thread Julian Wiedmann
Extract a little helper, so that high-level callers can manipulate the IP table without worrying about the locking. This will make it easier to convert the code to a different locking primitive later on. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_l3_main.c | 33 +---

[PATCH net-next 06/10] s390/qeth: don't poll for cmd IO completion

2019-03-28 Thread Julian Wiedmann
All callers are running in process context now, so we can safely sleep in qeth_send_control_data() while waiting for a cmd to complete. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 11 +-- drivers/s390/net/qeth_core_main.c | 60 --

[PATCH net-next 05/10] s390/qeth: convert IP table spinlock to mutex

2019-03-28 Thread Julian Wiedmann
All users of the lock are running in process context now. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 2 +- drivers/s390/net/qeth_core_main.c | 1 - drivers/s390/net/qeth_l3_main.c | 34 +- drivers/s390/net/qeth_l3_sys.c| 20

[PATCH net-next 04/10] s390/qeth: defer IPv6 address notifier events

2019-03-28 Thread Julian Wiedmann
The inet6addr_chain is atomic. So instead of starting the cmd IO for SETIP / DELIP straight from the notifier callback, run it from a workqueue. This is the last step towards removal of cmd IO completion polling. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 1 + driver

[PATCH net-next 09/10] s390/qeth: use callback to finalize cmd

2019-03-28 Thread Julian Wiedmann
To avoid concurrency issues, some parts of the cmd setup are delayed until qeth_send_control_data() holds the IO channel's irq_pending "lock". Rather than hard-coding those setup steps for each cmd type, have the cmd provide a callback. This will make it easier to also issue IDX commands via qeth_s

[PATCH net-next 02/10] s390/qeth: remove locking for RX modeset cache

2019-03-28 Thread Julian Wiedmann
The L2 and L3 .ndo_set_rx_mode callbacks maintain an address cache to decide which addresses have changed since the last modeset. When the card is set offline, qeth_l?_stop_card() drains this cache. This happens only after 1) the net_device has been detached, and 2) any pending RX modeset has comp

Re: [PATCH v3 34/36] thunderbolt: Make rest of the logging to happen at debug level

2019-03-28 Thread Joe Perches
On Thu, 2019-03-28 at 15:36 +0300, Mika Westerberg wrote: > Now that the driver can handle every possible tunnel types there is no > point to log everything as info level so turn these to happen at debug > level instead. trivia: > diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path

[PATCH net-next 08/10] s390/qeth: let qeth_notify_reply() set the notify reason

2019-03-28 Thread Julian Wiedmann
As trivial cleanup before adding more users to qeth_notify_reply(), move the setup of reply->rc from the caller into the helper. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/driver

[PATCH 5/5] batman-adv: Fix genl notification for throughput_override

2019-03-28 Thread Simon Wunderlich
From: Sven Eckelmann The throughput_override sysfs file is not below the meshif but below a hardif. The kobj has therefore not a pointer which can be used to find the batadv_priv data. The pointer stored in the hardif object must be used instead to find the correct meshif private data. Fixes: 7e

[PATCH net-next 01/10] s390/qeth: defer RX modesetting

2019-03-28 Thread Julian Wiedmann
.ndo_set_rx_mode gets called in process context, but while holding the addr_list spinlock. Which means we currently can't sleep while re-programming the HW, and need to poll for IO completion. That's bad, in particular since receiving the cmd response can fail silently and we're then polling until

[PATCH net-next 10/10] s390/qeth: send IDX cmds via qeth_send_control_data()

2019-03-28 Thread Julian Wiedmann
This converts the IDX code to use qeth_send_control_data(), replacing a bunch of duplicated IO code and unbounded waits. It also allows the IDX sequence to benefit from the improved timeout & notify infrastructure, so that we can eliminate the DOWN -> ACTIVATING -> UP transition in the channel stat

[PATCH net-next 07/10] s390/qeth: clarify default cmd callback

2019-03-28 Thread Julian Wiedmann
Current code makes it look like qeth_send_control_data_cb() is some sort of default callback for all cmds. But in practice, it is only used for half of the cmd buffers we issue. Reduce the confusion by only setting this callback for cmds that actually want it, and while at it give the callback a na

Re: [PATCH v3 net-next 13/13] net: Use common nexthop init and release helpers

2019-03-28 Thread Alexei Starovoitov
On Wed, Mar 27, 2019 at 08:53:58PM -0700, David Ahern wrote: > From: David Ahern > > With fib_nh_common in place, move common initialization and release > code into helpers used by both ipv4 and ipv6. For the moment, the init > is just the lwt encap and the release is both the netdev reference an

[PATCH bpf] bpf, libbpf: fix quiet install_headers

2019-03-28 Thread Daniel Borkmann
Both btf.h and xsk.h headers are not installed quietly due to missing '\' for the call to QUIET_INSTALL. Lets fix it. Before: # make install_headers INSTALL headers if [ ! -d '''/usr/local/include/bpf' ]; then install -d -m 755 '''/usr/local/include/bpf'; fi; install btf.h -m 644 '''/us

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

2019-03-28 Thread Paolo Abeni
Currently, stats accounting for NOLOCK qdisc enslaved to classful (lock) qdiscs is buggy. Per CPU values are ignored in most places, as a result, stats dump in the above scenario always report 0 length backlog and parent backlog len is not updated correctly on NOLOCK qdisc removal. The first patch

[PATCH net 2/2] net: sched: introduce and use qdisc tree flush/purge helpers

2019-03-28 Thread Paolo Abeni
The same code to flush qdisc tree and purge the qdisc queue is duplicated in many places and in most cases it does not respect NOLOCK qdisc: the global backlog len is used and the per CPU values are ignored. This change addresses the above, factoring-out the relevant code and using the helpers int

[PATCH net 1/2] net: sched: introduce and use qstats read helpers

2019-03-28 Thread Paolo Abeni
Classful qdiscs can't access directly the child qdiscs backlog length: if such qdisc is NOLOCK, per CPU values should be accounted instead. Most qdiscs no not respect the above. As a result, qstats fetching for most classful qdisc is currently incorrect: if the child qdisc is NOLOCK, it always rep

Re: [PATCH bpf 0/2] libbpf: minor packaging fixes

2019-03-28 Thread Björn Töpel
On Thu, 28 Mar 2019 at 16:39, Daniel Borkmann wrote: > > On 03/27/2019 02:51 PM, Björn Töpel wrote: > > The DPDK project is moving forward with its AF_XDP PMD, and during > > that process some libbpf issues surfaced [1]. > > Great to hear! > > > This series address two, minor, packaging issues for

Re: [PATCH bpf] bpf, libbpf: fix quiet install_headers

2019-03-28 Thread Andrii Nakryiko
On Thu, Mar 28, 2019 at 8:54 AM Daniel Borkmann wrote: > > Both btf.h and xsk.h headers are not installed quietly due to > missing '\' for the call to QUIET_INSTALL. Lets fix it. > > Before: > > # make install_headers > INSTALL headers > if [ ! -d '''/usr/local/include/bpf' ]; then instal

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

2019-03-28 Thread Daniel Borkmann
On 03/28/2019 12:33 PM, luca.bocca...@gmail.com wrote: > 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 > Acked-by: Andrey Ignatov Applied, thanks!

[PATCH net-next] selftests: tc-testing: Add pedit tests

2019-03-28 Thread Dmytro Linkin
Add 36 pedit action tests to check pedit options described in tc-pedit(8) man page. Test cases can be specified by categories: actions, pedit, raw_op, layered_op. RAW_OP cases check offset option for u8, u16 and u32 offset size. LAYERED_OP cases check fields option for eth, ip, ip6, tcp and udp hea

Re: [PATCH v2 2/2] samples, selftests/bpf: add NULL check for ksym_search

2019-03-28 Thread Daniel Borkmann
On 03/27/2019 03:45 PM, Daniel T. Lee wrote: > Since, ksym_search added with verification logic for symbols existence, > it could return NULL when the kernel symbols are not loaded. > > This commit will add NULL check logic after ksym_search. > > Signed-off-by: Daniel T. Lee > --- > Changes in v

Re: [PATCHv3 net-next] sched: add dualpi2 scheduler module

2019-03-28 Thread Stephen Hemminger
On Thu, 28 Mar 2019 09:12:19 +0100 Olga Albisser wrote: > Additional details can be found in the draft: > https://www.ietf.org/id/draft-ietf-tsvwg-aqm-dualq-coupled > > Signed-off-by: Olga Albisser > Signed-off-by: Koen De Schepper > Signed-off-by: Oliver Tilmans > Signed-off-by: Bob Briscoe

Re: [patch net-next v4 09/12] dsa: implement ndo_get_devlink_port

2019-03-28 Thread Florian Fainelli
On 3/28/19 5:56 AM, Jiri Pirko wrote: > From: Jiri Pirko > > In order for devlink compat functions to work, implement > ndo_get_devlink_port. Legacy slaves does not have devlink port instances > created for themselves. > > Signed-off-by: Jiri Pirko Reviewed-by: Florian Fainelli Thanks for ma

Re: [patch net-next v4 10/12] dsa: do not support ndo_get_phys_port_name for non-legacy ports

2019-03-28 Thread Florian Fainelli
On 3/28/19 5:56 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Since each non-legacy slave has its own devlink port instance > correctly set, rely on devlink core to generate correct phys port name. > > Signed-off-by: Jiri Pirko Reviewed-by: Florian Fainelli -- Florian

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-28 Thread Petr Machata
Andrew Lunn writes: > I argued this is a PHY layer status information. We don't really want > to have to modify every MAC driver to call into phylib/phylink. Yes, > we can have a netdev_ops for those drivers which ignore the Linux PHY > layer, but ideally we want to transparently call into the

Re: [PATCH v3 net-next 13/13] net: Use common nexthop init and release helpers

2019-03-28 Thread David Ahern
On 3/28/19 9:50 AM, Alexei Starovoitov wrote: > > patch 5 isn't pretty still and you didn't answer my question > why pointer to fib6_flags is worse than duplicated check. fib6_flags (prefix flags) has nothing to do with a fib6_nh initialization, and I do want to add a 6th input argument for somet

[PATCH 0/4] ethtool: add support for new PHY tunable Fast Link Down

2019-03-28 Thread Heiner Kallweit
This series adds support for Fast Link Down as new PHY tunable. See [0] for the kernel part incl. the Marvell PHY driver as first user. [0] https://marc.info/?t=15535390081&r=1&w=2 Heiner Kallweit (4): ethtool: sync ethtool-copy.h with linux-next from 03/28/2019 ethtool: simplify handling

[PATCH 2/4] ethtool: simplify handling of PHY tunable downshift

2019-03-28 Thread Heiner Kallweit
In preparation of adding support for Fast Link Down as PHY tunable let's simplify the handling of PHY tunable downshift a little. Signed-off-by: Heiner Kallweit --- ethtool.c | 43 +-- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/ethtool

[PATCH 1/4] ethtool: sync ethtool-copy.h with linux-next from 03/28/2019

2019-03-28 Thread Heiner Kallweit
Sync ethtool-copy.h with linux-next from 03/28/2019. This provides access to the new PHY tunable for Fast Link Down support. Signed-off-by: Heiner Kallweit --- ethtool-copy.h | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/ethtoo

[PATCH 3/4] ethtool: add support for PHY tunable Fast Link Down

2019-03-28 Thread Heiner Kallweit
This patch adds support for PHY tunable Fast Link Down. Like downshift it uses an u8 parameter. Signed-off-by: Heiner Kallweit --- ethtool.c | 55 +-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/ethtool.c b/ethtool.c index f6

  1   2   >