Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: add RXNFC support

2019-09-07 Thread Florian Fainelli
On 9/7/2019 1:00 PM, Vivien Didelot wrote: > Implement the .get_rxnfc and .set_rxnfc DSA operations to configure > a port's Layer 2 Policy Control List (PCL) via ethtool. > > Currently only dropping frames based on MAC Destination or Source > Address (including the option VLAN parameter) is sup

Re: [PATCH net-next 2/3] net: dsa: mv88e6xxx: introduce .port_set_policy

2019-09-07 Thread Marek Behun
On Sat, 7 Sep 2019 16:00:48 -0400 Vivien Didelot wrote: > @@ -3132,6 +3132,7 @@ static const struct mv88e6xxx_ops mv88e6172_ops = { > .port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay, > .port_set_speed = mv88e6352_port_set_speed, > .port_tag_remap = mv88e6095_port_tag_rem

[RFC bpf-next 7/7] bpf: add tests for bpftool packet capture

2019-09-07 Thread Alan Maguire
add tests which verify packet capture works for tracing of kprobes and raw tracepoints, and for capturing packets from existing skb/xdp programs. Signed-off-by: Alan Maguire --- tools/testing/selftests/bpf/Makefile | 3 +- .../testing/selftests/bpf/progs/bpftool_pcap_tc.c | 41

[RFC bpf-next 5/7] bpf: add pcap support to bpftool

2019-09-07 Thread Alan Maguire
bpftool is enhanced to be able to both capture from existing skb/xdp programs ("bpftool pcap prog") and to load tracing programs - including built-in simple kprobe/raw_tracepoint programs. The end result is to have a way of dynamically tapping BPF programs, kernel functions and tracepoints to capt

[RFC bpf-next 6/7] bpf: add documentation for bpftool pcap subcommand

2019-09-07 Thread Alan Maguire
Document supported "bpf pcap" subcommands. "prog" is used to capture packets from already-loaded programs. "trace" loads/atttaches tracing programs to capture packets. Signed-off-by: Alan Maguire --- tools/bpf/bpftool/Documentation/bpftool-btf.rst| 1 + tools/bpf/bpftool/Documentation/bpf

[RFC bpf-next 3/7] bpf: sync tools/include/uapi/linux/bpf.h for pcap support

2019-09-07 Thread Alan Maguire
sync bpf.h updates for bpf_pcap helper and associated definitions Signed-off-by: Alan Maguire --- tools/include/uapi/linux/bpf.h | 92 +- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linu

[RFC bpf-next 1/7] bpf: add bpf_pcap() helper to simplify packet capture

2019-09-07 Thread Alan Maguire
bpf_pcap() simplifies packet capture for skb and XDP BPF programs by creating a BPF perf event containing information relevant for packet capture (protocol, actual/captured packet size, time of capture, etc) along with the packet payload itself. All of this is stored in a "struct bpf_pcap_hdr". Th

[RFC bpf-next 2/7] bpf: extend bpf_pcap support to tracing programs

2019-09-07 Thread Alan Maguire
packet capture is especially valuable in tracing contexts, so extend bpf_pcap helper to take a tracing-derived skb pointer as an argument. In the case of tracing programs, the starting protocol (corresponding to libpcap DLT_* values; 1 for Ethernet, 12 for IP, etc) needs to be specified and should

[RFC bpf-next 4/7] bpf: add libpcap feature test

2019-09-07 Thread Alan Maguire
this test will be used when deciding whether to add the pcap support features in the following patch Signed-off-by: Alan Maguire --- tools/build/Makefile.feature | 2 ++ tools/build/feature/Makefile | 4 tools/build/feature/test-libpcap.c | 26 ++ 3 fil

[RFC bpf-next 0/7] bpf: packet capture helpers, bpftool support

2019-09-07 Thread Alan Maguire
Packet capture is useful from a general debugging standpoint, and is useful in particular in debugging BPF programs that do packet processing. For general debugging, being able to initiate arbitrary packet capture from kprobes and tracepoints is highly valuable; e.g. what do the packets that reach

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: add RXNFC support

2019-09-07 Thread Vivien Didelot
Hi Andrew, On Sat, 7 Sep 2019 22:32:56 +0200, Andrew Lunn wrote: > > + policy = devm_kzalloc(chip->dev, sizeof(*policy), GFP_KERNEL); > > + if (!policy) > > + return -ENOMEM; > > I think this might be the first time we have done dynamic memory > allocation in the mv88e6xxx driver.

[patch net-next v2 2/3] net: devlink: split reload op into two

2019-09-07 Thread Jiri Pirko
From: Jiri Pirko In order to properly implement failure indication during reload, split the reload op into two ops, one for down phase and one for up phase. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx4/main.c | 19 +++ drivers/net/ethernet/mellanox/mlxsw/co

[patch net-next v2 1/3] mlx4: Split restart_one into two functions

2019-09-07 Thread Jiri Pirko
From: Jiri Pirko Split the function restart_one into two functions and separate teardown and buildup. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx4/catas.c | 2 +- drivers/net/ethernet/mellanox/mlx4/main.c | 25 ++ drivers/net/ethernet/mellanox/mlx4/mlx

[patch net-next v2 3/3] net: devlink: move reload fail indication to devlink core and expose to user

2019-09-07 Thread Jiri Pirko
From: Jiri Pirko Currently the fact that devlink reload failed is stored in drivers. Move this flag into devlink core. Also, expose it to the user. Signed-off-by: Jiri Pirko --- v1->v2: - s/devlink failed/devlink reload failed/ in description --- drivers/net/ethernet/mellanox/mlxsw/core.c | 15

[patch net-next v2 0/3] net: devlink: move reload fail indication to devlink core and expose to user

2019-09-07 Thread Jiri Pirko
From: Jiri Pirko First two patches are dependencies of the last one. That moves devlink reload failure indication to the devlink code, so the drivers do not have to track it themselves. Currently it is only mlxsw, but I will send a follow-up patchset that introduces this in netdevsim too. Jiri P

Re: [patch net-next 3/3] net: devlink: move reload fail indication to devlink core and expose to user

2019-09-07 Thread Jiri Pirko
Sat, Sep 07, 2019 at 05:08:59PM CEST, dsah...@gmail.com wrote: >On 9/6/19 7:44 PM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Currently the fact that devlink failed is stored in drivers. Move this >> flag into devlink core. Also, expose it to the user. > >you mean 'reload failed', not 'devlink f

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: add RXNFC support

2019-09-07 Thread Andrew Lunn
> +static int mv88e6xxx_policy_insert(struct mv88e6xxx_chip *chip, int port, > +struct ethtool_rx_flow_spec *fs) > +{ > + struct ethhdr *mac_entry = &fs->h_u.ether_spec; > + struct ethhdr *mac_mask = &fs->m_u.ether_spec; > + enum mv88e6xxx_policy_mapping

Re: [PATCH net-next 1/3] net: dsa: mv88e6xxx: complete ATU state definitions

2019-09-07 Thread Andrew Lunn
On Sat, Sep 07, 2019 at 04:00:47PM -0400, Vivien Didelot wrote: > Marvell has different values for the state of a MAC address, > depending on its multicast bit. This patch completes the definitions > for these states. > > At the same time, use 0 which is intuitive enough and simplifies the > code

Re: [PATCH net-next 2/3] net: dsa: mv88e6xxx: introduce .port_set_policy

2019-09-07 Thread Andrew Lunn
On Sat, Sep 07, 2019 at 04:00:48PM -0400, Vivien Didelot wrote: > Introduce a new .port_set_policy operation to configure a port's > Policy Control List, based on mapping such as DA, SA, Etype and so on. > > Models similar to 88E6352 and 88E6390 are supported at the moment. > > Signed-off-by: Viv

[PATCH net-next 2/3] net: dsa: mv88e6xxx: introduce .port_set_policy

2019-09-07 Thread Vivien Didelot
Introduce a new .port_set_policy operation to configure a port's Policy Control List, based on mapping such as DA, SA, Etype and so on. Models similar to 88E6352 and 88E6390 are supported at the moment. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 9 drivers/net/ds

[PATCH net-next 3/3] net: dsa: mv88e6xxx: add RXNFC support

2019-09-07 Thread Vivien Didelot
Implement the .get_rxnfc and .set_rxnfc DSA operations to configure a port's Layer 2 Policy Control List (PCL) via ethtool. Currently only dropping frames based on MAC Destination or Source Address (including the option VLAN parameter) is supported. Signed-off-by: Vivien Didelot --- drivers/net

[PATCH net-next 1/3] net: dsa: mv88e6xxx: complete ATU state definitions

2019-09-07 Thread Vivien Didelot
Marvell has different values for the state of a MAC address, depending on its multicast bit. This patch completes the definitions for these states. At the same time, use 0 which is intuitive enough and simplifies the code a bit, instead of the UC or MC unused value. Signed-off-by: Vivien Didelot

[PATCH net-next 0/3] net: dsa: mv88e6xxx: add PCL support

2019-09-07 Thread Vivien Didelot
This small series implements the ethtool RXNFC operations in the mv88e6xxx DSA driver to configure a port's Layer 2 Policy Control List (PCL) supported by models such as 88E6352 and 88E6390 and equivalent. This allows to configure a port to discard frames based on a configured destination or sourc

Re: [PATCH net-next 0/4] net/tls: small TX offload optimizations

2019-09-07 Thread David Miller
From: Jakub Kicinski Date: Fri, 6 Sep 2019 22:29:56 -0700 > Hi! > > This set brings small TLS TX device optimizations. The biggest > gain comes from fixing a misuse of non temporal copy instructions. > On a synthetic workload modelled after customer's RFC application > I see 3-5% percent gain.

Re: pull request: bluetooth-next 2019-09-06

2019-09-07 Thread David Miller
From: Johan Hedberg Date: Fri, 6 Sep 2019 20:23:39 +0300 > Here's the main bluetooth-next pull request for the 5.4 kernel. > > - Cleanups & fixes to btrtl driver > - Fixes for Realtek devices in btusb, e.g. for suspend handling > - Firmware loading support for BCM4345C5 > - hidp_send_message

Re: [PATCH net] nfp: flower: cmsg rtnl locks can timeout reify messages

2019-09-07 Thread David Miller
From: Simon Horman Date: Fri, 6 Sep 2019 19:29:41 +0200 > From: Fred Lotter > > Flower control message replies are handled in different locations. The truly > high priority replies are handled in the BH (tasklet) context, while the > remaining replies are handled in a predefined Linux work que

Re: [PATCH net-next] ionic: Remove unused including

2019-09-07 Thread David Miller
From: YueHaibing Date: Fri, 6 Sep 2019 09:54:09 + > Remove including that don't need it. > > Signed-off-by: YueHaibing Applied.

Re: [PATCH v2 net] net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list

2019-09-07 Thread David Miller
From: Shmulik Ladkani Date: Fri, 6 Sep 2019 12:23:50 +0300 > Historically, support for frag_list packets entering skb_segment() was > limited to frag_list members terminating on exact same gso_size > boundaries. This is verified with a BUG_ON since commit 89319d3801d1 > ("net: Add frag_list supp

Re: [PATCHv3 net-next] ipmr: remove hard code cache_resolve_queue_len limit

2019-09-07 Thread David Miller
From: Hangbin Liu Date: Fri, 6 Sep 2019 15:36:01 +0800 > This is a re-post of previous patch wrote by David Miller[1]. > > Phil Karn reported[2] that on busy networks with lots of unresolved > multicast routing entries, the creation of new multicast group routes > can be extremely slow and unre

Re: [PATCH net v2] isdn/capi: check message length in capi_write()

2019-09-07 Thread David Miller
From: Eric Biggers Date: Thu, 5 Sep 2019 19:36:37 -0700 > From: Eric Biggers > > syzbot reported: > > BUG: KMSAN: uninit-value in capi_write+0x791/0xa90 > drivers/isdn/capi/capi.c:700 > CPU: 0 PID: 10025 Comm: syz-executor379 Not tainted 4.20.0-rc7+ #2 > Hardware name: Google Goo

Re: [PATCH] net-ipv6: addrconf_f6i_alloc - fix non-null pointer check to !IS_ERR()

2019-09-07 Thread David Miller
From: Maciej Żenczykowski Date: Thu, 5 Sep 2019 20:56:37 -0700 > From: Maciej Żenczykowski > > Fixes a stupid bug I recently introduced... > ip6_route_info_create() returns an ERR_PTR(err) and not a NULL on error. > > Fixes: d55a2e374a94 ("net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128

Re: [pull request][net-next 00/14] Mellanox, mlx5 cleanups & port congestion stats

2019-09-07 Thread David Miller
From: Saeed Mahameed Date: Thu, 5 Sep 2019 21:50:52 + > This series provides 12 mlx5 cleanup patches and last 2 patches provide > port congestion stats to ethtool. > > For more information please see tag log below. > > Please pull and let me know if there is any problem. Pulled, thanks Sae

Re: [PATCH net] tcp: ulp: fix possible crash in tcp_diag_get_aux_size()

2019-09-07 Thread David Miller
From: Eric Dumazet Date: Thu, 5 Sep 2019 13:20:41 -0700 > tcp_diag_get_aux_size() can be called with sockets in any state. > > icsk_ulp_ops is only present for full sockets. > > For SYN_RECV or TIME_WAIT ones we would access garbage. > > Fixes: 61723b393292 ("tcp: ulp: add functions to dump u

Re: [patch net-next] net: fib_notifier: move fib_notifier_ops from struct net into per-net struct

2019-09-07 Thread David Miller
From: Jiri Pirko Date: Thu, 5 Sep 2019 20:06:56 +0200 > From: Jiri Pirko > > No need for fib_notifier_ops to be in struct net. It is used only by > fib_notifier as a private data. Use net_generic to introduce per-net > fib_notifier struct and move fib_notifier_ops there. > > Signed-off-by: Ji

Re: [patch net-next 3/3] net: devlink: move reload fail indication to devlink core and expose to user

2019-09-07 Thread David Ahern
On 9/6/19 7:44 PM, Jiri Pirko wrote: > From: Jiri Pirko > > Currently the fact that devlink failed is stored in drivers. Move this > flag into devlink core. Also, expose it to the user. you mean 'reload failed', not 'devlink failed'?

Re: [PATCH v1 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-09-07 Thread Andrew Lunn
On Fri, Sep 06, 2019 at 02:54:03PM +0200, David Miller wrote: > From: Vladimir Oltean > Date: Mon, 2 Sep 2019 19:25:29 +0300 > > > This is the first attempt to submit the tc-taprio offload model for > > inclusion in the net tree. > > Someone really needs to review this. Hi Vladimir You might

Re: [PATCH 0/8] Netfilter updates for net-next

2019-09-07 Thread David Miller
From: Pablo Neira Ayuso Date: Thu, 5 Sep 2019 18:03:52 +0200 > The following patchset contains Netfilter updates for net-next: > > 1) Add nft_reg_store64() and nft_reg_load64() helpers, from Ander Juaristi. > > 2) Time matching support, also from Ander Juaristi. > > 3) VLAN support for nfnetl

Re: iproute2: tc: potential buffer overflow

2019-09-07 Thread tomaspaukrt
The updated patch is in the attachment. -- Původní e-mail -- Od: Stephen Hemminger Komu: tomaspau...@email.cz Datum: 31. 8. 2019 17:38:01 Předmět: Re: iproute2: tc: potential buffer overflow On Sat, 31 Aug 2019 15:13:27 +0200 (CEST) wrote: > Hi, > > there are two potentially dan

Re: [PATCH v1 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-09-07 Thread David Miller
This is a warning that I will toss this patch series if it receives no series review in the next couple of days. Thank you.

[PATCH net v2 11/11] net: remove unnecessary variables and callback

2019-09-07 Thread Taehee Yoo
This patch removes variables and callback these are related to the nested device structure. devices that can be nested have their own nest_level variable that represents the depth of nested devices. In the previous patch, new {lower/upper}_level variables are added and they replace old private nest

[PATCH net v2 10/11] vxlan: add adjacent link to limit depth level

2019-09-07 Thread Taehee Yoo
Current vxlan code doesn't limit the number of nested devices. Nested devices would be handled recursively and this routine needs huge stack memory. So, unlimited nested devices could make stack overflow. In order to fix this issue, this patch adds adjacent links. The adjacent link APIs internally

Re: [PATCH] net/hamradio/6pack: Fix the size of a sk_buff used in 'sp_bump()'

2019-09-07 Thread David Miller
From: Christophe JAILLET Date: Mon, 26 Aug 2019 21:02:09 +0200 > We 'allocate' 'count' bytes here. In fact, 'dev_alloc_skb' already add some > extra space for padding, so a bit more is allocated. > > However, we use 1 byte for the KISS command, then copy 'count' bytes, so > count+1 bytes. > > E

[PATCH net v2 09/11] net: core: add ignore flag to netdev_adjacent structure

2019-09-07 Thread Taehee Yoo
In order to link an adjacent node, netdev_upper_dev_link() is used and in order to unlink an adjacent node, netdev_upper_dev_unlink() is used. unlink operation does not fail, but link operation can fail. In order to exchange adjacent nodes, we should unlink an old adjacent node first. then, link a

[PATCH net v2 08/11] macsec: fix refcnt leak in module exit routine

2019-09-07 Thread Taehee Yoo
When a macsec interface is created, it increases a refcnt to a lower device(real device). when macsec interface is deleted, the refcnt is decreased in macsec_free_netdev(), which is ->priv_destructor() of macsec interface. The problem scenario is this. When nested macsec interfaces are exiting, th

[PATCH net v2 07/11] macvlan: use dynamic lockdep key instead of subclass

2019-09-07 Thread Taehee Yoo
All macvlan device has same lockdep key and subclass is initialized with nest_level. But actual nest_level value can be changed when a lower device is attached. And at this moment, the subclass should be updated but it seems to be unsafe. So this patch makes macvlan use dynamic lockdep key instead

[PATCH net v2 05/11] team: use dynamic lockdep key instead of static key

2019-09-07 Thread Taehee Yoo
In the current code, all team devices have same static lockdep key and team devices could be nested so that it makes unnecessary lockdep warning. Test commands: ip link add team0 type team for i in {1..7} do let A=$i-1 ip link add team$i type team ip

[PATCH net v2 06/11] macsec: use dynamic lockdep key instead of subclass

2019-09-07 Thread Taehee Yoo
All macsec device has same lockdep key and subclass is initialized with nest_level. But actual nest_level value can be changed when a lower device is attached. And at this moment, the subclass should be updated but it seems to be unsafe. So this patch makes macsec use dynamic lockdep key instead of

[PATCH net v2 03/11] bonding: fix unexpected IFF_BONDING bit unset

2019-09-07 Thread Taehee Yoo
The IFF_BONDING means bonding master or bonding slave device. ->ndo_add_slave() sets IFF_BONDING flag and ->ndo_del_slave() unsets IFF_BONDING flag. bond0<--bond1 Both bond0 and bond1 are bonding device and these should keep having IFF_BONDING flag until they are removed. But bond1 would lose IFF

[PATCH net v2 01/11] net: core: limit nested device depth

2019-09-07 Thread Taehee Yoo
Current code doesn't limit the number of nested devices. Nested devices would be handled recursively and this needs huge stack memory. So, unlimited nested devices could make stack overflow. This patch adds upper_level and lower_leve, they are common variables and represent maximum lower/upper dep

[PATCH net v2 04/11] bonding: use dynamic lockdep key instead of subclass

2019-09-07 Thread Taehee Yoo
All bonding device has same lockdep key and subclass is initialized with nest_level. But actual nest_level value can be changed when a lower device is attached. And at this moment, the subclass should be updated but it seems to be unsafe. So this patch makes bonding use dynamic lockdep key instead

[PATCH net v2 02/11] vlan: use dynamic lockdep key instead of subclass

2019-09-07 Thread Taehee Yoo
All VLAN device has same lockdep key and subclass is initialized with nest_level. But actual nest_level value can be changed when a lower device is attached. And at this moment, the subclass should be updated but it seems to be unsafe. So this patch makes VLAN use dynamic lockdep key instead of the

[PATCH net v2 00/11] net: fix nested device bugs

2019-09-07 Thread Taehee Yoo
This patchset fixes several bugs that are related to nesting device infrastructure. Current nesting infrastructure code doesn't limit the depth level of devices. nested devices could be handled recursively. at that moment, it needs huge memory and stack overflow could occur. Below devices type have

Re: [net-next 00/16][pull request] 100GbE Intel Wired LAN Driver Updates 2019-09-05

2019-09-07 Thread David Miller
From: Jeff Kirsher Date: Thu, 5 Sep 2019 13:33:50 -0700 > This series contains updates to ice driver. Pulled, thanks Jeff.

Re: [net-next 02/11] devlink: add 'reset_dev_on_drv_probe' param

2019-09-07 Thread Jiri Pirko
Sat, Sep 07, 2019 at 06:17:30AM CEST, jakub.kicin...@netronome.com wrote: >On Fri, 6 Sep 2019 11:40:54 -0700, Dirk van der Merwe wrote: >> >> DEVLINK_PARAM_RESET_DEV_VALUE_UNKNOWN (0) >> >> + Unknown or invalid value. >> > Why do you need this? Do you have usecase for this value

Re: pull-request: bpf 2019-09-06

2019-09-07 Thread David Miller
From: Alexei Starovoitov Date: Fri, 6 Sep 2019 15:20:32 -0700 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) verifier precision tracking fix, from Alexei. > > Please consider pulling these changes from: > > git://git.kernel.org/pub/sc