Re: [PATCH net] net: thunderx: don't allow jumbo frames with XDP

2019-04-03 Thread Jesper Dangaard Brouer
On Wed, 3 Apr 2019 01:11:36 +0200 Matteo Croce wrote: > The thunderx driver forbids to load an eBPF program if the MTU is higher > than 1500 bytes, but this can be circumvented by first loading the eBPF, > and then raising the MTU. > > XDP assumes that SKBs are linear and fit in a single page,

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

2019-04-03 Thread Paul Blakey
Kevin 'ldir' Darbyshire-Bryant wrote on 02/04/2019 12:24: > Hi Cong & all, > >> On 1 Apr 2019, at 22:06, Cong Wang wrote: >> >> On Mon, Apr 1, 2019 at 7:22 AM Paul Blakey wrote: >>> >> > >> >>> >>> This would probably be better off with the previous name act_conndscp. >> >> >> If naming is th

Re: [PATCH v3 net-next 3/3] tcp: add one skb cache for rx

2019-04-03 Thread Eric Dumazet
On 04/02/2019 06:17 PM, Jakub Kicinski wrote: > On Fri, 22 Mar 2019 08:56:40 -0700, Eric Dumazet wrote: >> Often times, recvmsg() system calls and BH handling for a particular >> TCP socket are done on different cpus. >> >> This means the incoming skb had to be allocated on a cpu, >> but freed o

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

2019-04-03 Thread Kevin 'ldir' Darbyshire-Bryant
> On 3 Apr 2019, at 08:47, Paul Blakey wrote: > > > > Kevin 'ldir' Darbyshire-Bryant wrote on 02/04/2019 12:24: >> Hi Cong & all, >> >>> On 1 Apr 2019, at 22:06, Cong Wang wrote: >>> >>> On Mon, Apr 1, 2019 at 7:22 AM Paul Blakey wrote: >>> >> > > > Hi Kevin, > If you'd like, Yo

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

2019-04-03 Thread Sabrina Dubroca
2019-03-29, 21:16:21 +0100, Florian Westphal wrote: > This series removes all function pointers from the xfrm_mode struct. > They are either replaced by direct calls or a static helper. > > This reduces code size: even merging all xfrm{4,6}_,mode* modules > into the core reduces total size, as the

Re: [PATCH bpf-next] kbuild: add ability to generate BTF type info for vmlinux

2019-04-03 Thread Jiri Olsa
On Tue, Apr 02, 2019 at 09:49:50AM -0700, andrii.nakry...@gmail.com wrote: > From: Andrii Nakryiko > > This patch adds new config option to trigger generation of BTF type > information from DWARF debuginfo for vmlinux and kernel modules through > pahole, which in turn relies on libbpf for btf_ded

Re: [PATCH bpf-next] kbuild: add ability to generate BTF type info for vmlinux

2019-04-03 Thread Daniel Borkmann
On 04/03/2019 10:46 AM, Jiri Olsa wrote: > On Tue, Apr 02, 2019 at 09:49:50AM -0700, andrii.nakry...@gmail.com wrote: >> From: Andrii Nakryiko >> >> This patch adds new config option to trigger generation of BTF type >> information from DWARF debuginfo for vmlinux and kernel modules through >> pah

Re: [PATCH bpf-next] kbuild: add ability to generate BTF type info for vmlinux

2019-04-03 Thread Jiri Olsa
On Wed, Apr 03, 2019 at 11:04:28AM +0200, Daniel Borkmann wrote: > On 04/03/2019 10:46 AM, Jiri Olsa wrote: > > On Tue, Apr 02, 2019 at 09:49:50AM -0700, andrii.nakry...@gmail.com wrote: > >> From: Andrii Nakryiko > >> > >> This patch adds new config option to trigger generation of BTF type > >> i

[PATCH] net: Remove inclusion of pci.h

2019-04-03 Thread Yuval Shaia
This header is not in use - remove it. Signed-off-by: Yuval Shaia --- net/core/dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 2b67f2aa59dd..21a8205a7896 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -131,7 +131,6 @@ #include #include #in

Re: [PATCH bpf-next] kbuild: add ability to generate BTF type info for vmlinux

2019-04-03 Thread Daniel Borkmann
On 04/03/2019 11:12 AM, Jiri Olsa wrote: > On Wed, Apr 03, 2019 at 11:04:28AM +0200, Daniel Borkmann wrote: >> On 04/03/2019 10:46 AM, Jiri Olsa wrote: >>> On Tue, Apr 02, 2019 at 09:49:50AM -0700, andrii.nakry...@gmail.com wrote: From: Andrii Nakryiko This patch adds new config opt

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

2019-04-03 Thread Paul Blakey
Kevin 'ldir' Darbyshire-Bryant wrote on 03/04/2019 11:23: > > >> On 3 Apr 2019, at 08:47, Paul Blakey wrote: >> >> >> >> Kevin 'ldir' Darbyshire-Bryant wrote on 02/04/2019 12:24: >>> Hi Cong & all, >>> On 1 Apr 2019, at 22:06, Cong Wang wrote: On Mon, Apr 1, 2019 at 7:22 AM Pau

[PATCH net] libcxgb: fix incorrect ppmax calculation

2019-04-03 Thread Varun Prakash
BITS_TO_LONGS() uses DIV_ROUND_UP() because of this ppmax value can be greater than available per cpu page pods. This patch removes BITS_TO_LONGS() to fix this issue. Signed-off-by: Varun Prakash --- drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c | 9 - 1 file changed, 8 insertions(

Re: [PATCH bpf-next] kbuild: add ability to generate BTF type info for vmlinux

2019-04-03 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 03, 2019 at 11:12:58AM +0200, Jiri Olsa escreveu: > On Wed, Apr 03, 2019 at 11:04:28AM +0200, Daniel Borkmann wrote: > > On 04/03/2019 10:46 AM, Jiri Olsa wrote: > > > On Tue, Apr 02, 2019 at 09:49:50AM -0700, andrii.nakry...@gmail.com wrote: > > >> From: Andrii Nakryiko > > >> > > >>

Re: [PATCH net-next] net: use correct this_cpu primitive in dev_recursion_level

2019-04-03 Thread Eric Dumazet
On 04/02/2019 11:28 PM, Florian Westphal wrote: > syzbot reports: > BUG: using __this_cpu_read() in preemptible code: > caller is dev_recursion_level include/linux/netdevice.h:3052 [inline] > __this_cpu_preempt_check+0x246/0x270 lib/smp_processor_id.c:47 > dev_recursion_level include/linux/net

[patch net-next v4 00/13] net: extend devlink port attrs with switch ID

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Extend devlink port attrs to contain switch ID and change drivers that register devlink ports to use that. Jiri Pirko (13): net: devlink: convert devlink_port_attrs bools to bits net: devlink: extend port attrs for switch ID net: devlink: introduce devlink_compat_switch_id

[patch net-next v4 06/13] bnxt: move bp->switch_id initialization to PF probe

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Currently the switch_id is being only initialized when switching eswitch mode from "legacy" to "switchdev". However, nothing prevents the id to be initialized from the very beginning. Physical ports can show it even in "legacy" mode. Signed-off-by: Jiri Pirko --- v3->v4: - new

[patch net-next v4 03/13] net: devlink: introduce devlink_compat_switch_id_get() helper

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Introduce devlink_compat_switch_id_get() helper which fills up switch_id according to passed netdev pointer. Call it directly from dev_get_port_parent_id() as a fallback when ndo_get_port_parent_id is not defined for given netdev. Signed-off-by: Jiri Pirko --- v3->v4: - continu

[patch net-next v4 12/13] dsa: pass switch ID through devlink_port_attrs_set()

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Leave ndo_get_port_parent_id implementation only for legacy. Signed-off-by: Jiri Pirko Reviewed-by: Florian Fainelli --- v2->v3: - fix parent id ndo com

[patch net-next v4 02/13] net: devlink: extend port attrs for switch ID

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Extend devlink_port_attrs_set() to pass switch ID for ports which are part of switch and store it in port attrs. For other ports, this is NULL. Note that this allows the driver to group devlink ports into one or more switches according to the actual topology. Signed-off-by: Jir

[patch net-next v4 04/13] mlxsw: Pass switch ID through devlink_port_attrs_set()

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c | 6 -- drivers/net/ethernet/mellanox/mlxsw/core.h | 4 +++- driver

[patch net-next v4 05/13] mlxsw: Remove ndo_get_port_parent_id implementation

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Remove implementation of get_port_parent_id ndo and rely on core calling into devlink for the information directly. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 13 - drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 13

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

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

[patch net-next v4 01/13] net: devlink: convert devlink_port_attrs bools to bits

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko In order to save space in the struct, convert bools to bits. Signed-off-by: Jiri Pirko Reviewed-by: Florian Fainelli Reviewed-by: Jakub Kicinski --- include/net/devlink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/devlink.h b/include/

[patch net-next v4 11/13] mlxsw: switch_ib: Pass valid HW id down to mlxsw_core_port_init()

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Obtain HW id and pass it down to mlxsw_core_port_init() as it would be used as switch_id in devlink and exposed to user. Signed-off-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/switchib.c| 22 ++- 1 file changed, 21 insertions(+), 1 deletion(-) diff

[patch net-next v4 10/13] nfp: remove ndo_get_port_parent_id implementation

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Remove implementation of get_port_parent_id ndo and rely on core calling into devlink for the information directly. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c | 1 - .../net/ethernet/netronome/nfp/nfp_net_repr.c

[patch net-next v4 09/13] nfp: pass switch ID through devlink_port_attrs_set()

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 5 - 1 file changed, 4 insertions(+),

[patch net-next v4 07/13] bnxt: pass switch ID through devlink_port_attrs_set()

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Signed-off-by: Jiri Pirko --- rfc->v1: - new patch --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 del

[patch net-next v4 08/13] bnxt: remove ndo_get_port_parent_id implementation for physical ports

2019-04-03 Thread Jiri Pirko
From: Jiri Pirko Remove implementation of get_port_parent_id ndo and rely on core calling into devlink for the information directly. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnx

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

2019-04-03 Thread Kevin 'ldir' Darbyshire-Bryant
> On 3 Apr 2019, at 12:56, Paul Blakey wrote: > > > > Kevin 'ldir' Darbyshire-Bryant wrote on 03/04/2019 11:23: >> >> >>> On 3 Apr 2019, at 08:47, Paul Blakey wrote: >>> >>> >>> >>> Kevin 'ldir' Darbyshire-Bryant wrote on 02/04/2019 12:24: Hi Cong & all, > On 1 Apr 2019,

[RFC net-next 1/1] net: sched: fix hw filter offload in tc flower

2019-04-03 Thread John Hurley
Recent refactoring of fl_change aims to use the classifier spinlock to avoid the need for rtnl lock. In doing so, the fl_hw_replace_filer() function was moved to before the lock is taken. This can create problems for drivers if duplicate filters are created (commmon in ovs tc offload due to filters

Re: [PATCH net] r8169: switch off ASPM by default and add sysfs attribute to control ASPM

2019-04-03 Thread Bjorn Helgaas
[+cc Frederick] On Wed, Apr 03, 2019 at 07:53:40AM +0200, Heiner Kallweit wrote: > On 02.04.2019 23:57, Bjorn Helgaas wrote: > > On Tue, Apr 02, 2019 at 10:41:20PM +0200, Heiner Kallweit wrote: > >> On 02.04.2019 22:16, Florian Fainelli wrote: > >>> On 4/2/19 12:55 PM, Heiner Kallweit wrote: > >>>

Re: [PATCH v2 iproute2-next 2/4] rdma: add helper rd_sendrecv_msg()

2019-04-03 Thread Steve Wise
On Sun, Mar 31, 2019 at 9:06 PM David Ahern wrote: > > On 3/26/19 1:18 PM, Steve Wise wrote: > > This function sends the constructed netlink message and then > > receives the response. > > > > Change rd_recv_msg() to display any error messages. > > > > Change 'rdma dev set' to use rd_sendrecv_msg(

Re: [PATCH bpf] bpf: report verifier bugs as warnings

2019-04-03 Thread Paul Chaignon
On Tue, Apr 02, 2019 at 10:39:29AM -0700, Alexei Starovoitov wrote: > On Tue, Apr 02, 2019 at 04:37:19PM +0200, Daniel Borkmann wrote: > > On 04/02/2019 01:58 PM, Paul Chaignon wrote: > > > Three checks for verifier bugs were introduced in commit f4d7e40 ("bpf: > > > introduce function calls (verif

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

2019-04-03 Thread Daniel Borkmann
On 04/01/2019 10:57 PM, Stanislav Fomichev wrote: > This patch series fixes the existing BPF flow dissector API to > support calling BPF progs from the eth_get_headlen context (the support > itself will be added in bpf-next tree). > > The summary of the changes: > * fix VLAN handling in bpf_flow

bnx2x - odd behaviour

2019-04-03 Thread Ian Kumlien
Hi, We just had this happen on 5.0.2 It looks like the interface went down, ended up in a broken state and a ip li set down/up dev enp2s0f0 made it work again It looks really weird and I haven't really seen anything like it, anyone with a clue? dmesg: [1310361.808694] bnx2x :02:00.0 en

[PATCH bpf-next] selftests: bpf: add VRF test cases to lwt_ip_encap test.

2019-04-03 Thread Peter Oskolkov
This patch adds tests validating that VRF and BPF-LWT encap work together well, as requested by David Ahern. Signed-off-by: Peter Oskolkov --- .../selftests/bpf/test_lwt_ip_encap.sh| 134 +++--- 1 file changed, 86 insertions(+), 48 deletions(-) diff --git a/tools/testing/sel

Re: [PATCH bpf] bpf: report verifier bugs as warnings

2019-04-03 Thread Edward Cree
On 02/04/2019 15:37, Daniel Borkmann wrote: > If we really want to have a kernel warn, then lets add a > helper macro verbose_and_warn(...) which will trigger a one-time warning, but > keeps > the verbose log intact as well. +1 Any time the verifier detects that its internal invariants have been

Re: [PATCH net-next 1/1] net: sched: ensure tc flower reoffload takes filter ref

2019-04-03 Thread Vlad Buslov
On Wed 03 Apr 2019 at 01:53, John Hurley wrote: > Recent changes to TC flower remove the requirement for rtnl lock when > accessing and modifying filters. Refcounts now ensure access and deletion > do not happen concurrently. However, the reoffload function which cycles > through all filters and r

Re: [PATCH bpf-next 1/5] bpf: Reject indirect var_off stack access in raw mode

2019-04-03 Thread Daniel Borkmann
On 04/02/2019 10:19 PM, Andrey Ignatov wrote: > It's hard to guarantee that whole memory is marked as initialized on > helper return if uninitialized stack is accessed with variable offset > since specific bounds are unknown to verifier. This may cause > uninitialized stack leaking. > > Reject suc

Re: [RFC net-next 1/1] net: sched: fix hw filter offload in tc flower

2019-04-03 Thread Vlad Buslov
On Wed 03 Apr 2019 at 15:37, John Hurley wrote: > Recent refactoring of fl_change aims to use the classifier spinlock to > avoid the need for rtnl lock. In doing so, the fl_hw_replace_filer() > function was moved to before the lock is taken. This can create problems > for drivers if duplicate fi

Re: [PATCH bpf-next 1/5] bpf: Reject indirect var_off stack access in raw mode

2019-04-03 Thread Daniel Borkmann
On 04/03/2019 06:21 PM, Daniel Borkmann wrote: > On 04/02/2019 10:19 PM, Andrey Ignatov wrote: >> It's hard to guarantee that whole memory is marked as initialized on >> helper return if uninitialized stack is accessed with variable offset >> since specific bounds are unknown to verifier. This may

[PATCH v3 iproute2-next 3/4] rdma: add 'link add/delete' commands

2019-04-03 Thread Steve Wise
Add new 'link' subcommand 'add' and 'delete' to allow binding a soft-rdma device to a netdev interface. EG: rdma link add rxe_eth0 type rxe netdev eth0 rdma link delete rxe_eth0 Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky --- rdma/link.c | 78 +++

[PATCH v3 iproute2-next 2/4] rdma: add helper rd_sendrecv_msg()

2019-04-03 Thread Steve Wise
This function sends the constructed netlink message and then receives the response. Change rd_recv_msg() to display any error messages. Change 'rdma dev set' to use rd_sendrecv_msg(). Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky --- rdma/dev.c | 2 +- rdma/rdma.h | 2 ++ rdma/r

[PATCH v3 iproute2-next 1/4] Add .mailmap file

2019-04-03 Thread Steve Wise
.mailmap allows tracking multiple email addresses to the proper user name. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky --- .mailmap | 8 1 file changed, 8 insertions(+) create mode 100644 .mailmap diff --git a/.mailmap b/.mailmap new file mode 100644 index ..c012d3

[PATCH v3 iproute2-next 0/4] Dynamic rdma link creation

2019-04-03 Thread Steve Wise
This series adds rdmatool support for creating/deleting rdma links. This will be used, mainly, by soft rdma drivers to allow adding/deleting rdma links over netdev interfaces. It provides the user side for the following kernel changes merged in linux-5.1. Changes since v2: - move checks for requ

[PATCH v3 iproute2-next 4/4] rdma: man page update for link add/delete

2019-04-03 Thread Steve Wise
Update the 'rdma link' man page with 'link add/delete' info. Signed-off-by: Steve Wise --- man/man8/rdma-link.8 | 47 1 file changed, 47 insertions(+) diff --git a/man/man8/rdma-link.8 b/man/man8/rdma-link.8 index bddf3474..b3b40de7 100644 --- a/man/

Re: [PATCH bpf] bpf: report verifier bugs as warnings

2019-04-03 Thread Alexei Starovoitov
On Wed, Apr 03, 2019 at 04:52:40PM +0100, Edward Cree wrote: > On 02/04/2019 15:37, Daniel Borkmann wrote: > > If we really want to have a kernel warn, then lets add a > > helper macro verbose_and_warn(...) which will trigger a one-time warning, > > but keeps > > the verbose log intact as well. >

Re: [PATCH v3 iproute2-next 4/4] rdma: man page update for link add/delete

2019-04-03 Thread Leon Romanovsky
On Wed, Apr 03, 2019 at 12:10:32PM -0500, Steve Wise wrote: > Update the 'rdma link' man page with 'link add/delete' info. > > Signed-off-by: Steve Wise > --- > man/man8/rdma-link.8 | 47 > 1 file changed, 47 insertions(+) > Thanks, Reviewed-by: Leon

Re: [PATCH v3 iproute2-next 0/4] Dynamic rdma link creation

2019-04-03 Thread Leon Romanovsky
On Wed, Apr 03, 2019 at 12:10:28PM -0500, Steve Wise wrote: > This series adds rdmatool support for creating/deleting rdma links. > This will be used, mainly, by soft rdma drivers to allow adding/deleting > rdma links over netdev interfaces. It provides the user side for > the following kernel cha

Re: [PATCH net-next 4/4] bridge: update vlan dev state when port added to or deleted from vlan

2019-04-03 Thread Mike Manning
On 02/04/2019 21:10, Nikolay Aleksandrov wrote: > On 02/04/2019 18:35, Mike Manning wrote: >> If vlan bridge binding is enabled, then the link state of a vlan device >> that is an upper device of the bridge should track the state of bridge >> ports that are members of that vlan. So if a bridge port

Re: [PATCH] netfilter:bridge: Hold bridge dev for fake_rtable to avoid the dangling pointer

2019-04-03 Thread Pablo Neira Ayuso
On Tue, Apr 02, 2019 at 12:56:09PM +, Rundong Ge wrote: > Problem: > When bridge-nf-call-iptables is enabled, skb_dst(skb) of packets that > in the nfqueue may be a dangling pointer if user delete the bridge. > Because packets go through the br_nf_pre_routing_finish will set the dst > pointer t

Re: [PATCH net-next 3/4] bridge: support binding vlan dev link state to vlan member bridge ports

2019-04-03 Thread Mike Manning
On 02/04/2019 20:22, Nikolay Aleksandrov wrote: > On 02/04/2019 18:35, Mike Manning wrote: >> In the case of vlan filtering on bridges, the bridge may also have the >> corresponding vlan devices as upper devices. A vlan bridge binding mode >> is added to allow the link state of the vlan device to t

Re: [PATCH net] r8169: switch off ASPM by default and add sysfs attribute to control ASPM

2019-04-03 Thread Heiner Kallweit
On 03.04.2019 15:14, Bjorn Helgaas wrote: > [+cc Frederick] > > On Wed, Apr 03, 2019 at 07:53:40AM +0200, Heiner Kallweit wrote: >> On 02.04.2019 23:57, Bjorn Helgaas wrote: >>> On Tue, Apr 02, 2019 at 10:41:20PM +0200, Heiner Kallweit wrote: On 02.04.2019 22:16, Florian Fainelli wrote: >

Re: [PATCH net-next 2/4] vlan: do not transfer link state in vlan bridge binding mode

2019-04-03 Thread Mike Manning
On 02/04/2019 21:15, Nikolay Aleksandrov wrote: > On 02/04/2019 18:35, Mike Manning wrote: >> In vlan bridge binding mode, the link state is no longer transferred >> from the lower device. Instead it is set by the bridge module according >> to the state of bridge ports that are members of the vlan.

Re: [PATCH net-next 3/4] bridge: support binding vlan dev link state to vlan member bridge ports

2019-04-03 Thread Nikolay Aleksandrov
On 03/04/2019 20:43, Mike Manning wrote: > On 02/04/2019 20:22, Nikolay Aleksandrov wrote: >> On 02/04/2019 18:35, Mike Manning wrote: >>> In the case of vlan filtering on bridges, the bridge may also have the >>> corresponding vlan devices as upper devices. A vlan bridge binding mode >>> is added

[PATCH net-next] Revert "r8169: use netif_receive_skb_list batching"

2019-04-03 Thread Heiner Kallweit
This reverts commit 6578229d4efb7ea6287861bfc2bd306140458e07. netif_receive_skb_list() doesn't support GRO, therefore we may have scenarios with decreased performance. See discussion here [0]. [0] https://marc.info/?t=15540384741&r=1&w=2 Signed-off-by: Heiner Kallweit --- drivers/net/ethern

Re: [PATCH] ethtool: fix SPEED_UNKNOWN definition to avoid signed-unsigned comparison

2019-04-03 Thread Zhivich, Michael
On 4/2/19, 4:26 PM, "David Miller" wrote: > From: Michael Zhivich > Date: Mon, 1 Apr 2019 13:14:28 -0400 > >> When building C++ userspace code that includes ethtool.h >> with "-Werror -Wall", g++ complains about signed-unsigned comparison in >> ethtool_validate_speed() due to definition of SPEE

Re: [PATCH net-next 3/4] bridge: support binding vlan dev link state to vlan member bridge ports

2019-04-03 Thread Nikolay Aleksandrov
On 03/04/2019 20:53, Nikolay Aleksandrov wrote: > On 03/04/2019 20:43, Mike Manning wrote: >> On 02/04/2019 20:22, Nikolay Aleksandrov wrote: >>> On 02/04/2019 18:35, Mike Manning wrote: In the case of vlan filtering on bridges, the bridge may also have the corresponding vlan devices as u

[PATCH net-next 0/2] net: phy: use generic PHY ability readers if callback get_features isn't set

2019-04-03 Thread Heiner Kallweit
Meanwhile we have generic functions for reading the abilities of Clause 22 / 45 PHY's. This allows to use them as fallback in case callback get_features isn't set. Benefit is the reduction of boilerplate code in PHY drivers. Heiner Kallweit (2): net: phy: allow a PHY driver to define neither fea

[PATCH net-next 1/2] net: phy: allow a PHY driver to define neither features nor get_features

2019-04-03 Thread Heiner Kallweit
Meanwhile we have generic functions for reading the abilities of Clause 22 / 45 PHY's. This allows to use them as fallback in case callback get_features isn't set. Benefit is the reduction of boilerplate code in PHY drivers. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 17 ++

[PATCH net-next 2/2] net: phy: realtek: remove setting callback get_features and use phylib fallback

2019-04-03 Thread Heiner Kallweit
Now that phylib uses genphy_read_abilities() as fallback, we don't have to set callback get_features any longer. Signed-off-by: Heiner Kallweit --- drivers/net/phy/realtek.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index

Re: [PATCH net-next 3/4] bridge: support binding vlan dev link state to vlan member bridge ports

2019-04-03 Thread Nikolay Aleksandrov
On 03/04/2019 21:17, Nikolay Aleksandrov wrote: > On 03/04/2019 20:53, Nikolay Aleksandrov wrote: >> On 03/04/2019 20:43, Mike Manning wrote: >>> On 02/04/2019 20:22, Nikolay Aleksandrov wrote: On 02/04/2019 18:35, Mike Manning wrote: > In the case of vlan filtering on bridges, the bridge

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

2019-04-03 Thread Jesper Dangaard Brouer
On Mon, 1 Apr 2019 13:57:34 -0700 Stanislav Fomichev wrote: > diff --git a/Documentation/networking/bpf_flow_dissector.txt > b/Documentation/networking/bpf_flow_dissector.txt > new file mode 100644 > index ..513be8e20afb > --- /dev/null > +++ b/Documentation/networking/bpf_flow_diss

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

2019-04-03 Thread Stanislav Fomichev
On 04/03, Jesper Dangaard Brouer wrote: > On Mon, 1 Apr 2019 13:57:34 -0700 > Stanislav Fomichev wrote: > > > diff --git a/Documentation/networking/bpf_flow_dissector.txt > > b/Documentation/networking/bpf_flow_dissector.txt > > new file mode 100644 > > index ..513be8e20afb > > ---

Fw: [Bug 203137] New: Bridge does not forward multicast if multicast_querier is enabled

2019-04-03 Thread Stephen Hemminger
Begin forwarded message: Date: Wed, 03 Apr 2019 04:49:49 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 203137] New: Bridge does not forward multicast if multicast_querier is enabled https://bugzilla.kernel.org/show_bug.cgi?id=203137

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

2019-04-03 Thread David Ahern
On 4/2/19 11:27 PM, Martin Lau wrote: > On Tue, Apr 02, 2019 at 02:11:53PM -0700, David Ahern wrote: >> From: David Ahern >> >> Second set of three with the end goal of enabling IPv6 gateways with IPv4 >> routes. > I am still not completely convinced on the new "*nhc" in patch 2 without > seeing a

Re: [PATCH v3 iproute2-next 0/4] Dynamic rdma link creation

2019-04-03 Thread David Ahern
On 4/3/19 11:10 AM, Steve Wise wrote: > This series adds rdmatool support for creating/deleting rdma links. > This will be used, mainly, by soft rdma drivers to allow adding/deleting > rdma links over netdev interfaces. It provides the user side for > the following kernel changes merged in linux-5

Re: [PATCH net] r8169: switch off ASPM by default and add sysfs attribute to control ASPM

2019-04-03 Thread Frederick Lawler
Heiner Kallweit wrote on 4/3/19 12:45 PM: On 03.04.2019 15:14, Bjorn Helgaas wrote: [+cc Frederick] On Wed, Apr 03, 2019 at 07:53:40AM +0200, Heiner Kallweit wrote: On 02.04.2019 23:57, Bjorn Helgaas wrote: On Tue, Apr 02, 2019 at 10:41:20PM +0200, Heiner Kallweit wrote: On 02.04.2019 22:16,

Re: Fw: [Bug 203137] New: Bridge does not forward multicast if multicast_querier is enabled

2019-04-03 Thread Nikolay Aleksandrov
On 03/04/2019 21:53, Stephen Hemminger wrote: > > > Begin forwarded message: > > Date: Wed, 03 Apr 2019 04:49:49 + > From: bugzilla-dae...@bugzilla.kernel.org > To: step...@networkplumber.org > Subject: [Bug 203137] New: Bridge does not forward multicast if > multicast_querier is enabled >

Re: [PATCH net] r8169: switch off ASPM by default and add sysfs attribute to control ASPM

2019-04-03 Thread Heiner Kallweit
On 03.04.2019 21:18, Frederick Lawler wrote: > Heiner Kallweit wrote on 4/3/19 12:45 PM: >> On 03.04.2019 15:14, Bjorn Helgaas wrote: >>> [+cc Frederick] >>> >>> On Wed, Apr 03, 2019 at 07:53:40AM +0200, Heiner Kallweit wrote: On 02.04.2019 23:57, Bjorn Helgaas wrote: > On Tue, Apr 02, 201

Re: [PATCH bpf] bpf: report verifier bugs as warnings

2019-04-03 Thread Edward Cree
On 03/04/2019 18:30, Alexei Starovoitov wrote: > verbose_and_warn() doesn't fit these two practical cases of warn + verbose. > Hence I see no reason to combine warn and verbose into single helper. > They're perfectly fine being separate. Makes sense. So presumably the right patch would be to add m

Re: [PATCH net-next 1/2] net: phy: allow a PHY driver to define neither features nor get_features

2019-04-03 Thread Andrew Lunn
> @@ -2218,9 +2223,9 @@ int phy_driver_register(struct phy_driver *new_driver, > struct module *owner) > /* Either the features are hard coded, or dynamically >* determine. It cannot be both or neither >*/ Hi Heiner The comment needs updating to match the code. > - if

[PATCH bpf] flow_dissector: rst'ify documentation

2019-04-03 Thread Stanislav Fomichev
Rename bpf_flow_dissector.txt to bpf_flow_dissector.rst and fix formatting. Also, link it from the Documentation/networking/index.rst. Tested with 'make htmldocs' to make sure it looks reasonable. Fixes: ae82899bbe92 ("flow_dissector: document BPF flow dissector environment") Signed-off-by: Stani

Re: [PATCH net-next 2/2] net: phy: realtek: remove setting callback get_features and use phylib fallback

2019-04-03 Thread Andrew Lunn
On Wed, Apr 03, 2019 at 08:20:09PM +0200, Heiner Kallweit wrote: > Now that phylib uses genphy_read_abilities() as fallback, we don't have > to set callback get_features any longer. Hi Heiner I wonder how many PHY drivers we will break if we just remove .features everywhere? Maybe we should crea

Re: [PATCH bpf-next 1/5] bpf: Reject indirect var_off stack access in raw mode

2019-04-03 Thread Andrey Ignatov
Daniel Borkmann [Wed, 2019-04-03 09:22 -0700]: > On 04/02/2019 10:19 PM, Andrey Ignatov wrote: > > It's hard to guarantee that whole memory is marked as initialized on > > helper return if uninitialized stack is accessed with variable offset > > since specific bounds are unknown to verifier. This

Re: [PATCH net-next 2/2] net: phy: realtek: remove setting callback get_features and use phylib fallback

2019-04-03 Thread Heiner Kallweit
On 03.04.2019 22:55, Andrew Lunn wrote: > On Wed, Apr 03, 2019 at 08:20:09PM +0200, Heiner Kallweit wrote: >> Now that phylib uses genphy_read_abilities() as fallback, we don't have >> to set callback get_features any longer. > > Hi Heiner > > I wonder how many PHY drivers we will break if we jus

Re: [PATCH net-next 1/2] net: phy: allow a PHY driver to define neither features nor get_features

2019-04-03 Thread Heiner Kallweit
On 03.04.2019 22:46, Andrew Lunn wrote: >> @@ -2218,9 +2223,9 @@ int phy_driver_register(struct phy_driver *new_driver, >> struct module *owner) >> /* Either the features are hard coded, or dynamically >> * determine. It cannot be both or neither >> */ > > Hi Heiner > > The comm

[PATCH net-next v2 0/2] net: phy: use generic PHY ability readers if callback get_features isn't set

2019-04-03 Thread Heiner Kallweit
Meanwhile we have generic functions for reading the abilities of Clause 22 / 45 PHY's. This allows to use them as fallback in case callback get_features isn't set. Benefit is the reduction of boilerplate code in PHY drivers. v2: - adjust a comment in patch 1 to match the code Heiner Kallweit (2):

[PATCH net-next v2 2/2] net: phy: realtek: remove setting callback get_features and use phylib fallback

2019-04-03 Thread Heiner Kallweit
Now that phylib uses genphy_read_abilities() as fallback, we don't have to set callback get_features any longer. Signed-off-by: Heiner Kallweit --- drivers/net/phy/realtek.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index

[PATCH net-next v2 1/2] net: phy: allow a PHY driver to define neither features nor get_features

2019-04-03 Thread Heiner Kallweit
Meanwhile we have generic functions for reading the abilities of Clause 22 / 45 PHY's. This allows to use them as fallback in case callback get_features isn't set. Benefit is the reduction of boilerplate code in PHY drivers. v2: - adjust the comment in phy_driver_register to match the code Signed

cellular modem driver APIs

2019-04-03 Thread Johannes Berg
Hi all, I've been looking at modem drivers, to see what the APIs are to interact with them, and while I originally thought I had the story sorted out ... not at all. Here's the current things we seem to be doing: (1) Channels are created/encoded as VLANs (cdc_mbim) This is ... strange a

Re: [PATCH bpf-next 1/5] bpf: Reject indirect var_off stack access in raw mode

2019-04-03 Thread Andrey Ignatov
Daniel Borkmann [Wed, 2019-04-03 09:46 -0700]: > On 04/03/2019 06:21 PM, Daniel Borkmann wrote: > > On 04/02/2019 10:19 PM, Andrey Ignatov wrote: > >> It's hard to guarantee that whole memory is marked as initialized on > >> helper return if uninitialized stack is accessed with variable offset > >

[PATCH bpf 1/2] ixgbe: fix AF_XDP tx byte count

2019-04-03 Thread William Tu
The tx bytecount is done twice. When running './xdpsock -t -N -i eth3' and 'ip -s link show dev eth3' The avg packet size is 120 instead of 60. So remove the extra one. Signed-off-by: William Tu --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/

[PATCH bpf 2/2] ixgbe: fix AF_XDP tx packet count.

2019-04-03 Thread William Tu
The total_packets count at ixgbe_clean_xdp_tx_irq is always zero when testing with xdpsock -t -N. Set the gso_segs to 1 to make the tx packet count correct. Signed-off-by: William Tu --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/

Re: [PATCH net-next v2 2/2] net: phy: realtek: remove setting callback get_features and use phylib fallback

2019-04-03 Thread Andrew Lunn
On Wed, Apr 03, 2019 at 11:15:17PM +0200, Heiner Kallweit wrote: > Now that phylib uses genphy_read_abilities() as fallback, we don't have > to set callback get_features any longer. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next v2 1/2] net: phy: allow a PHY driver to define neither features nor get_features

2019-04-03 Thread Andrew Lunn
On Wed, Apr 03, 2019 at 11:14:33PM +0200, Heiner Kallweit wrote: > Meanwhile we have generic functions for reading the abilities of > Clause 22 / 45 PHY's. This allows to use them as fallback in case > callback get_features isn't set. Benefit is the reduction of > boilerplate code in PHY drivers. >

[PATCH v2 bpf-next 1/5] bpf: Reject indirect var_off stack access in raw mode

2019-04-03 Thread Andrey Ignatov
It's hard to guarantee that whole memory is marked as initialized on helper return if uninitialized stack is accessed with variable offset since specific bounds are unknown to verifier. This may cause uninitialized stack leaking. Reject such an access in check_stack_boundary to prevent possible le

[PATCH v2 bpf-next 2/5] selftests/bpf: Test indirect var_off stack access in raw mode

2019-04-03 Thread Andrey Ignatov
Test that verifier rejects indirect access to uninitialized stack with variable offset. Example of output: # ./test_verifier ... #859/p indirect variable-offset stack access, uninitialized OK Signed-off-by: Andrey Ignatov --- .../testing/selftests/bpf/verifier/var_off.c | 27

[PATCH v2 bpf-next 3/5] bpf: Reject indirect var_off stack access in unpriv mode

2019-04-03 Thread Andrey Ignatov
Proper support of indirect stack access with variable offset in unprivileged mode (!root) requires corresponding support in Spectre masking for stack ALU in retrieve_ptr_limit(). There are no use-case for variable offset in unprivileged mode though so make verifier reject such accesses for simplic

[PATCH v2 bpf-next 0/5] bpf: Fix indirect var_off stack access support

2019-04-03 Thread Andrey Ignatov
v1->v2: - rely on meta = NULL to reject var_off stack access to uninit buffer. This patch set is a follow-up for discussion [1]. It fixes variable offset stack access handling for raw and unprivileged mode, rejecting both of them. Patch 1 handles raw (uninitialized) mode. Patch 2 adds test for r

[PATCH v2 bpf-next 4/5] selftests/bpf: Test indirect var_off stack access in unpriv mode

2019-04-03 Thread Andrey Ignatov
Test that verifier rejects indirect stack access with variable offset in unprivileged mode and accepts same code in privileged mode. Since pointer arithmetics is prohibited in unprivileged mode verifier should reject the program even before it gets to helper call that uses variable offset, at the

[PATCH v2 bpf-next 5/5] bpf: Add missed newline in verifier verbose log

2019-04-03 Thread Andrey Ignatov
check_stack_access() that prints verbose log is used in adjust_ptr_min_max_vals() that prints its own verbose log and now they stick together, e.g.: variable stack access var_off=(0xfff0; 0x4) off=-16 size=1R2 stack pointer arithmetic goes out of range, prohibited for !root Add

[PATCH v3 1/2] selftests/bpf: ksym_search won't check symbols exists

2019-04-03 Thread Daniel T. Lee
Currently, ksym_search located at trace_helpers won't check symbols are existing or not. In ksym_search, when symbol is not found, it will return &syms[0](_stext). But when the kernel symbols are not loaded, it will return NULL, which is not a desired action. This commit will add verification log

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

2019-04-03 Thread Daniel T. Lee
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 v3: - Added NULL check for samples/spintest_user.c Change

Re: [PATCH bpf-next 1/5] bpf: Reject indirect var_off stack access in raw mode

2019-04-03 Thread Daniel Borkmann
On 04/03/2019 11:02 PM, Andrey Ignatov wrote: > Daniel Borkmann [Wed, 2019-04-03 09:22 -0700]: >> On 04/02/2019 10:19 PM, Andrey Ignatov wrote: >>> It's hard to guarantee that whole memory is marked as initialized on >>> helper return if uninitialized stack is accessed with variable offset >>> sin

Re: [PATCH bpf] bpf: report verifier bugs as warnings

2019-04-03 Thread Daniel Borkmann
On 04/03/2019 07:30 PM, Alexei Starovoitov wrote: > On Wed, Apr 03, 2019 at 04:52:40PM +0100, Edward Cree wrote: >> On 02/04/2019 15:37, Daniel Borkmann wrote: >>> If we really want to have a kernel warn, then lets add a >>> helper macro verbose_and_warn(...) which will trigger a one-time warning,

[Patch net v2 0/3] bluetooth: validate packet boundary carefully

2019-04-03 Thread Cong Wang
This patchset fixes the out-of-bound access in bluetooth stack. Although it is large, all of them follow the same pattern, so it should not be hard to review. I try to group them as much as I can. This patchset should cover Dan's patch too. Please check each patch for details. (Resending v2 as it

[Patch net v2 1/3] bluetooth: validate HCI_EVENT_PKT packet carefully

2019-04-03 Thread Cong Wang
hci_event_packet() blindly assumes all packets are sane, at least for packets allocated via vhci_get_user() path this is not true. We have to check if we access skb data out-of-bound with pskb_may_pull() before each skb->data dereference on RX path. Reported-and-tested-by: syzbot+cec7a50c412a2c03f

[Patch net v2 3/3] bluetooth: validate HCI_EV_CMD_COMPLETE packet carefully

2019-04-03 Thread Cong Wang
Similarly, we need to check skb->data boundary for HCI_EV_CMD_COMPLETE event too. Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Dan Carpenter Reviewed-by: Tomas Bortoli Signed-off-by: Cong Wang --- net/bluetooth/hci_event.c | 258 +++--- 1 file changed, 215 insert

[Patch net v2 2/3] bluetooth: validate HCI_EV_LE_META packet carefully

2019-04-03 Thread Cong Wang
Similarly, we need to check skb->data boundary for HCI_EV_LE_META event too. Note, hci_le_adv_report_evt() and hci_le_ext_adv_report_evt() are slightly complicated, as they read the length of the field from the packet as well. Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Dan Carpenter Reviewed-by

  1   2   >