Re: [PATCH net-next] nfp: add SR-IOV trusted VF support

2019-04-19 Thread David Miller
From: Jakub Kicinski Date: Fri, 19 Apr 2019 17:20:09 -0700 > From: Pablo Cascón > > By default VFs are not trusted. Add ndo_set_vf_trust support to toggle > a new per-VF bit. Coupled with FW with this capability allows a > trusted VF to change its MAC even after being administratively set by >

[PATCH 1/5] net: sched: taprio: Remove pointless variable assigment

2019-04-19 Thread Andre Guedes
This patch removes a pointless variable assigment in taprio_change(). The 'err' variable is not used from this assignment to the next one so this patch removes it. Signed-off-by: Andre Guedes --- net/sched/sch_taprio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/sched/sch_taprio.c b/n

[PATCH 4/5] net: sched: taprio: Fix taprio_peek()

2019-04-19 Thread Andre Guedes
While traversing taprio's children qdisc list, if the gate is closed for a given traffic class, we should continue traversing the list since the remaining qdiscs may have skb ready for transmission. This patch also takes this opportunity and changes the function to use the TAPRIO_ALL_GATES_OPEN ma

[PATCH 2/5] net: sched: taprio: Refactor taprio_get_start_time()

2019-04-19 Thread Andre Guedes
This patch does a code refactoring to taprio_get_start_time() function to improve readability and report error properly. If 'base' time is later than 'now', the start time is equal to 'base' and taprio_get_start_time() is done. That's the natural case so we move that code to the beginning of the f

[PATCH 5/5] net: sched: taprio: Fix taprio_dequeue()

2019-04-19 Thread Andre Guedes
In case we don't have 'guard' or 'budget' to transmit the skb, we should continue traversing the qdisc list since the remaining guard/budget might be enough to transmit a skb from other children qdiscs. Fixes: 5a781ccbd19e (“tc: Add support for configuring the taprio scheduler”) Signed-off-by: And

[PATCH 0/5] Taprio qdisc fixes

2019-04-19 Thread Andre Guedes
Hi all, This series contains some minor improvements (patches 1 and 2) and fixes (patches 3-5) to taprio qdisc. Best regards, Andre Andre Guedes (5): net: sched: taprio: Remove pointless variable assigment net: sched: taprio: Refactor taprio_get_start_time() net: sched: taprio: Fix null p

[PATCH 3/5] net: sched: taprio: Fix null pointer deref bug

2019-04-19 Thread Andre Guedes
If 'entry' is NULL we WARN_ON() but dereference the pointer anyway, generating a null pointer dereference bug. This patch fixes should_ restart_cycle() so we return if the pointer is NULL. Fixes: 5a781ccbd19e (“tc: Add support for configuring the taprio scheduler”) Signed-off-by: Andre Guedes ---

[PATCH net-next] nfp: add SR-IOV trusted VF support

2019-04-19 Thread Jakub Kicinski
From: Pablo Cascón By default VFs are not trusted. Add ndo_set_vf_trust support to toggle a new per-VF bit. Coupled with FW with this capability allows a trusted VF to change its MAC even after being administratively set by the PF. Also populate the trusted field on ndo_get_vf_config. Add the sam

[PATCH v3] ethtool: Add bash-completion script

2019-04-19 Thread Kevin Locke
To aid users constructing a valid ethtool invocation, create a [bash-completion] script to provide [programmable completion] of ethtool arguments. It supports all current command options. The script is named shell-completion/bash/ethtool, similar to [kmod], and installed to `pkg-config --variable

Re: [bpf-next v2] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread Alexei Starovoitov
On Fri, Apr 19, 2019 at 06:37:20PM -0500, robert.mcc...@rockwellcollins.com wrote: > From: > > The BPF_PROG_LOAD condition for kernel version <= 5.1 is > >log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ > > Signed-off-by: McCabe, Robert J I fixed up 'From' line to match as-is

[PATCH net] net/tls: don't leak IV and record seq when offload fails

2019-04-19 Thread Jakub Kicinski
When device refuses the offload in tls_set_device_offload_rx() it calls tls_sw_free_resources_rx() to clean up software context state. Unfortunately, tls_sw_free_resources_rx() does not free all the state tls_set_sw_offload() allocated - it leaks IV and sequence number buffers. All other code pat

[PATCH net] net/tls: avoid potential deadlock in tls_set_device_offload_rx()

2019-04-19 Thread Jakub Kicinski
If device supports offload, but offload fails tls_set_device_offload_rx() will call tls_sw_free_resources_rx() which (unhelpfully) releases and reacquires the socket lock. For a small fix release and reacquire the device_offload_lock. Fixes: 4799ac81e52a ("tls: Add rx inline crypto offload") Sign

Re: [PATCH bpf-next v5 5/6] net: pass net argument to the eth_get_headlen

2019-04-19 Thread Alexei Starovoitov
On Fri, Apr 19, 2019 at 04:47:44PM -0700, Stanislav Fomichev wrote: > On 04/19, Alexei Starovoitov wrote: > > On Fri, Apr 19, 2019 at 04:29:44PM -0700, Stanislav Fomichev wrote: > > > On 04/18, Alexei Starovoitov wrote: > > > > On Thu, Apr 18, 2019 at 05:43:50PM -0700, Stanislav Fomichev wrote: > >

Re: [PATCH] net: socionext: replace napi_alloc_frag with the netdev variant on init

2019-04-19 Thread Jassi Brar
On Fri, 19 Apr 2019 at 01:46, Ard Biesheuvel wrote: > > On Thu, 18 Apr 2019 at 22:24, Ilias Apalodimas > wrote: > > > > Hi Ard, > > > > Use netdev_alloc_frag during the Rx ring setup instead napi_alloc_frag > > > > > > > > > > Why? > > > > > The netdev variant is usable on any context since it di

Re: [PATCH bpf-next v5 5/6] net: pass net argument to the eth_get_headlen

2019-04-19 Thread Stanislav Fomichev
On 04/19, Alexei Starovoitov wrote: > On Fri, Apr 19, 2019 at 04:29:44PM -0700, Stanislav Fomichev wrote: > > On 04/18, Alexei Starovoitov wrote: > > > On Thu, Apr 18, 2019 at 05:43:50PM -0700, Stanislav Fomichev wrote: > > > > On 04/18, Alexei Starovoitov wrote: > > > > > On Mon, Apr 15, 2019 at 1

Re: [PATCH net-next] tcp: properly reset skb->truesize for tx recycling

2019-04-19 Thread David Miller
From: Eric Dumazet Date: Fri, 19 Apr 2019 16:02:03 -0700 > tcp sendmsg() and sendpage() normally advance skb->data_len > and skb->truesize by the payload added to an skb. > > But sendmsg(fd, ..., MSG_ZEROCOPY) has to account for whole pages, > even if a single byte of payload is used in the page

Re: [PATCH bpf-next v5 5/6] net: pass net argument to the eth_get_headlen

2019-04-19 Thread Alexei Starovoitov
On Fri, Apr 19, 2019 at 04:29:44PM -0700, Stanislav Fomichev wrote: > On 04/18, Alexei Starovoitov wrote: > > On Thu, Apr 18, 2019 at 05:43:50PM -0700, Stanislav Fomichev wrote: > > > On 04/18, Alexei Starovoitov wrote: > > > > On Mon, Apr 15, 2019 at 10:38:00AM -0700, Stanislav Fomichev wrote: > >

[bpf-next v2] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread robert . mccabe
From: The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: McCabe, Robert J --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h i

Re: [PATCH bpf-next v5 5/6] net: pass net argument to the eth_get_headlen

2019-04-19 Thread Stanislav Fomichev
On 04/18, Alexei Starovoitov wrote: > On Thu, Apr 18, 2019 at 05:43:50PM -0700, Stanislav Fomichev wrote: > > On 04/18, Alexei Starovoitov wrote: > > > On Mon, Apr 15, 2019 at 10:38:00AM -0700, Stanislav Fomichev wrote: > > > > Update all users eth_get_headlen to pass network namespace > > > > and

Re: [PATCH v4 bpf-next 02/15] bpf: mark lo32 writes that should be zero extended into hi32

2019-04-19 Thread Alexei Starovoitov
On Fri, Apr 19, 2019 at 4:27 PM Jiong Wang wrote: > > OK, will split REG_LIVE_READ into REG_LIVE_READ64 and REG_LIVE_READ32, and > will let the prior override the latter early inside mark_reg_read. I feel > renaming parameter for propagate_liveness (the "parent" etc) could be a > following up patc

Re: [PATCH v4 bpf-next 02/15] bpf: mark lo32 writes that should be zero extended into hi32

2019-04-19 Thread Jiong Wang
Alexei Starovoitov writes: > On Fri, Apr 19, 2019 at 02:33:10PM -0700, Jakub Kicinski wrote: >> On Fri, 19 Apr 2019 14:14:05 -0700, Alexei Starovoitov wrote: >> > > This reminds me, I'm not entirely clear on the need to propagate the >> > > zext through stack slots... Pointers are guaranteed to

Re: [PATCH bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread Robert McCabe
> sending one patch was enough. no need to spam 5 times. Gosh that's embarrassing. I was having a difficult time sending the patch (I'm new at patchwork-based development). I'll submit a a new patch with your suggestion.

Re: [PATCH net-next] tcp: properly reset skb->truesize for tx recycling

2019-04-19 Thread Soheil Hassas Yeganeh
On Fri, Apr 19, 2019 at 7:02 PM Eric Dumazet wrote: > > tcp sendmsg() and sendpage() normally advance skb->data_len > and skb->truesize by the payload added to an skb. > > But sendmsg(fd, ..., MSG_ZEROCOPY) has to account for whole pages, > even if a single byte of payload is used in the page. > >

[PATCH net-next] tcp: properly reset skb->truesize for tx recycling

2019-04-19 Thread Eric Dumazet
tcp sendmsg() and sendpage() normally advance skb->data_len and skb->truesize by the payload added to an skb. But sendmsg(fd, ..., MSG_ZEROCOPY) has to account for whole pages, even if a single byte of payload is used in the page. This means that we can not assume skb->truesize can be adjusted by

[PATCH v5 net-next 6/6] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-04-19 Thread Tom Herbert
Validate Destination and Hop-by-Hop options. This uses the information in the TLV parameters table to validate various aspects of both individual TLVs as well as a list of TLVs in an extension header. There are two levels of validation that can be performed: simple checks and deep checks. Simple c

[PATCH v5 net-next 3/6] exthdrs: Registration of TLV handlers and parameters

2019-04-19 Thread Tom Herbert
Create a single TLV parameter table that holds meta information for IPv6 Hop-by-Hop and Destination TLVs. The data structure is composed of a 256 element array of u8's (one entry for each TLV type to allow O(1) lookup). Each entry provides an offset into an array of TLV proc data structures which f

[PATCH v5 net-next 5/6] ip6tlvs: Add netlink interface

2019-04-19 Thread Tom Herbert
Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 18 +++ include/uapi/linux/in6.h | 31 + n

[PATCH v5 net-next 4/6] exthdrs: Add TX parameters

2019-04-19 Thread Tom Herbert
Define a number of transmit parameters for TLV Parameter table definitions. These will be used for validating TLVs that are set on a socket. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 26 - include/uapi/linux/in6.h | 8 +++ net/ipv6/exthdrs.c |

[PATCH v5 net-next 0/6] exthdrs: Make ext. headers & options useful - Part I

2019-04-19 Thread Tom Herbert
Extension headers are the mechanism of extensibility for the IPv6 protocol, however to date they have only seen limited deployment. The reasons for that are because intermediate devices don't handle them well, and there haven't really be any useful extension headers defined. In particular, Destinat

[PATCH v5 net-next 2/6] exthdrs: Move generic EH functions to exthdrs_core.c

2019-04-19 Thread Tom Herbert
Move generic functions in exthdrs.c to exthdrs_core.c so that exthdrs.c only contains functions that are specific to IPv6 processing, and exthdrs_core.c contains functions that are generic. Signed-off-by: Tom Herbert --- net/ipv6/exthdrs.c | 138 -

[PATCH v5 net-next 1/6] exthdrs: Create exthdrs_options.c

2019-04-19 Thread Tom Herbert
Create exthdrs_options.c to hold code related to specific Hop-by-Hop and Destination extension header options. Move related functions in exthdrs.c to the new file. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 15 net/ipv6/Makefile | 2 +- net/ipv6/exthdrs.c

Re: [PATCH 1/1] be2net: Detach interface for avoiding a system crash

2019-04-19 Thread Saeed Mahameed
On Fri, 2019-04-19 at 21:07 +0800, Firo wrote: > > On 4/19/19 2:17 AM, Saeed Mahameed wrote: > > On Thu, 2019-04-18 at 15:05 +0800, Firo wrote: > > > On 4/2/19 12:25 AM, Saeed Mahameed wrote: > > > > On Mon, 2019-04-01 at 20:24 +0800, Firo Yang wrote: > > > > > This crash is triggered by a user-af

Re: [pull request][net 0/3] Mellanox, mlx5 fixes 2019-04-19

2019-04-19 Thread David Miller
From: Saeed Mahameed Date: Fri, 19 Apr 2019 14:03:09 -0700 > This series introduces some fixes to mlx5 driver. > > Please pull and let me know if there is any problem. Pulled. > For -stable v4.7: > ('net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query') > > For -stable v4.19:

Re: [PATCH 0/3] PCI: add help pci_dev_id

2019-04-19 Thread David Miller
From: Heiner Kallweit Date: Fri, 19 Apr 2019 20:27:45 +0200 > In several places in the kernel we find PCI_DEVID used like this: > PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper > for it. I'll wait for an ACK from the PCI folks on patch #1.

Re: [PATCH net-next] mlxsw: spectrum: Assume CONFIG_NET_DEVLINK is always enabled

2019-04-19 Thread David Miller
From: Ido Schimmel Date: Fri, 19 Apr 2019 13:27:05 + > From: Jiri Pirko > > Since commit f6b19b354d50 ("net: devlink: select NET_DEVLINK > from drivers") adds implicit select of NET_DEVLINK for > mlxsw, the code does not have to deal with the case > when CONFIG_NET_DEVLINK is not enabled. S

Re: [PATCHv2 net] team: fix possible recursive locking when add slaves

2019-04-19 Thread David Miller
From: Hangbin Liu Date: Fri, 19 Apr 2019 14:31:00 +0800 > If we add a bond device which is already the master of the team interface, > we will hold the team->lock in team_add_slave() first and then request the > lock in team_set_mac_address() again. The functions are called like: > > - team_add_

Re: [PATCH v4 net-next 1/6] exthdrs: Create exthdrs_options.c

2019-04-19 Thread David Miller
No Signoffs on any of your patches...

Re: [PATCH v4 bpf-next 02/15] bpf: mark lo32 writes that should be zero extended into hi32

2019-04-19 Thread Alexei Starovoitov
On Fri, Apr 19, 2019 at 02:33:10PM -0700, Jakub Kicinski wrote: > On Fri, 19 Apr 2019 14:14:05 -0700, Alexei Starovoitov wrote: > > > This reminds me, I'm not entirely clear on the need to propagate the > > > zext through stack slots... Pointers are guaranteed to be 64bit, we > > > don't save pare

Re: [PATCH v4 bpf-next 02/15] bpf: mark lo32 writes that should be zero extended into hi32

2019-04-19 Thread Jakub Kicinski
On Fri, 19 Apr 2019 14:14:05 -0700, Alexei Starovoitov wrote: > > This reminds me, I'm not entirely clear on the need to propagate the > > zext through stack slots... Pointers are guaranteed to be 64bit, we > > don't save parentage on scalars (AFAICT), > > scalars have parentage chain too. > we

Re: [PATCH net-next] net: dsa: mv88e6xxx: Only reconfigure MAC when something changes

2019-04-19 Thread David Miller
From: Andrew Lunn Date: Thu, 18 Apr 2019 03:11:39 +0200 > phylink will call the mac_config() callback once per second when > polling a PHY or a fixed link. The MAC driver is not supposed to > reconfigure the MAC if nothing has changed. > > Make the mv88e6xxx driver look at the current configurat

Re: [PATCH bpf-next v3 2/5] nbd: trace sending nbd requests

2019-04-19 Thread Josef Bacik
On Fri, Apr 19, 2019 at 02:04:06PM -0700, Matt Mullins wrote: > This adds a tracepoint that can both observe the nbd request being sent > to the server, as well as modify that request , e.g., setting a flag in > the request that will cause the server to collect detailed tracing data. > > The struc

Re: [PATCH v4 bpf-next 02/15] bpf: mark lo32 writes that should be zero extended into hi32

2019-04-19 Thread Alexei Starovoitov
On Fri, Apr 19, 2019 at 01:40:51PM -0700, Jakub Kicinski wrote: > On Thu, 18 Apr 2019 16:57:50 -0700, Alexei Starovoitov wrote: > > > @@ -6371,8 +6406,10 @@ static int propagate_liveness(struct > > > bpf_verifier_env *env, > > > for (i = frame < vstate->curframe ? BPF_REG_6 : 0; i < > >

Re: [patch net-next 14/15] netdevsim: move netdev creation/destruction to dev probe

2019-04-19 Thread Jakub Kicinski
On Fri, 19 Apr 2019 07:28:33 +0200, Jiri Pirko wrote: > Thu, Apr 18, 2019 at 07:25:50PM CEST, jakub.kicin...@netronome.com wrote: > >On Thu, 18 Apr 2019 16:06:13 +0200, Jiri Pirko wrote: > >> -simB3.remove() > >> +simdevB.remove() > >> bpftool_prog_list_wait(expected=0) > >> > >>

[net 3/3] net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query

2019-04-19 Thread Saeed Mahameed
From: Erez Alfasi Querying EEPROM high pages data for SFP module is currently not supported by our driver and yet queried, resulting in invalid FW queries. Set the EEPROM ethtool data length to 256 for SFP module will limit the reading for page 0 only and prevent invalid FW queries. Fixes: bb64

[net 1/3] net/mlx5e: Fix use-after-free after xdp_return_frame

2019-04-19 Thread Saeed Mahameed
From: Maxim Mikityanskiy xdp_return_frame releases the frame. It leads to releasing the page, so it's not allowed to access xdpi.xdpf->len after that, because xdpi.xdpf is at xdp->data_hard_start after convert_to_xdp_frame. This patch moves the memory access to precede the return of the frame. F

[pull request][net 0/3] Mellanox, mlx5 fixes 2019-04-19

2019-04-19 Thread Saeed Mahameed
Hi Dave, This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v4.7: ('net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query') For -stable v4.19: ('net/mlx5e: Fix the max MTU check in case of XDP') For -stable v5.0:

[net 2/3] net/mlx5e: Fix the max MTU check in case of XDP

2019-04-19 Thread Saeed Mahameed
From: Maxim Mikityanskiy MLX5E_XDP_MAX_MTU was calculated incorrectly. It didn't account for NET_IP_ALIGN and MLX5E_HW2SW_MTU, and it also misused MLX5_SKB_FRAG_SZ. This commit fixes the calculations and adds a brief explanation for the formula used. Fixes: a26a5bdf3ee2d ("net/mlx5e: Restrict th

Re: [patch net-next 03/15] netdevsim: rename devlink.c to dev.c to contain per-dev(asic) items

2019-04-19 Thread Jiri Pirko
Thu, Apr 18, 2019 at 07:17:22PM CEST, jakub.kicin...@netronome.com wrote: >On Thu, 18 Apr 2019 16:06:02 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> The existing devlink.c code is going to be extended to represent asic >> device on a bus. As this is about more than just devlink, >> rename t

Re: [PATCH net-next v3 0/5] net: support binding vlan dev link state to vlan member bridge ports

2019-04-19 Thread David Miller
From: Mike Manning Date: Thu, 18 Apr 2019 18:35:30 +0100 > For vlan filtering on bridges, the bridge may also have vlan devices > as upper devices. For switches, these are used to provide L3 packet > processing for ports that are members of a given vlan. > > While it is correct that the admin st

Re: [patch net-next rfc 00/15] netdevsim: impement proper device model

2019-04-19 Thread Jakub Kicinski
On Fri, 19 Apr 2019 07:25:01 +0200, Jiri Pirko wrote: > >Hm.. I'm getting lost, sorry, I'm probably confusing myself here.. > > > >Netdevsim is supposed to test real, existing kernel interfaces and core > >code. What we do today with linking based on netdevs is quite simple > >and works very well

Re: [PATCH v4 bpf-next 02/15] bpf: mark lo32 writes that should be zero extended into hi32

2019-04-19 Thread Jakub Kicinski
On Thu, 18 Apr 2019 16:57:50 -0700, Alexei Starovoitov wrote: > > @@ -6371,8 +6406,10 @@ static int propagate_liveness(struct > > bpf_verifier_env *env, > > for (i = frame < vstate->curframe ? BPF_REG_6 : 0; i < > > BPF_REG_FP; i++) { > > err = propagate_liveness_r

Re: [PATCH 1/1] [bpf-next] libbpf: fix off-by-one error for BPF_LOG_BUF_SIZE

2019-04-19 Thread Y Song
On Fri, Apr 19, 2019 at 12:32 PM rjmccabe3701 wrote: > > From: "McCabe, Robert J" > > The BPF_PROG_LOAD condition for kernel version <= 5.1 is > >log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ > > Signed-off-by: McCabe, Robert J Acked-by: Yonghong Song > --- > tools/lib/bpf/

Re: [PATCH] net: socionext: replace napi_alloc_frag with the netdev variant on init

2019-04-19 Thread Ard Biesheuvel
On Thu, 18 Apr 2019 at 22:24, Ilias Apalodimas wrote: > > Hi Ard, > > > Use netdev_alloc_frag during the Rx ring setup instead napi_alloc_frag > > > > > > > Why? > > > The netdev variant is usable on any context since it disables interrupts. > The napi variant of the call is supposed to be used un

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

2019-04-19 Thread Nikolay Aleksandrov
On 18/04/2019 20: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 track only the > state of the subset of bridge ports t

[PATCHv2 net] team: fix possible recursive locking when add slaves

2019-04-19 Thread Hangbin Liu
If we add a bond device which is already the master of the team interface, we will hold the team->lock in team_add_slave() first and then request the lock in team_set_mac_address() again. The functions are called like: - team_add_slave() - team_port_add() - team_port_enter() - team_modeop

[PATCH bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread robert . mccabe
From: "McCabe, Robert J" The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: rjmccabe3701 --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/

[PATCH bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread robert . mccabe
From: "McCabe, Robert J" The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: rjmccabe3701 --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/

Re: [patch net-next 14/15] netdevsim: move netdev creation/destruction to dev probe

2019-04-19 Thread Jiri Pirko
Thu, Apr 18, 2019 at 07:25:50PM CEST, jakub.kicin...@netronome.com wrote: >On Thu, 18 Apr 2019 16:06:13 +0200, Jiri Pirko wrote: >> @@ -1279,24 +1312,13 @@ try: >> start_test("Test multi-dev ASIC cross-dev destruction...") >> bpftool_prog_list_wait(expected=2) >> >> -simA.remove() >

Re: [PATCH net-next 0/5] net: some build fixes and other improvements

2019-04-19 Thread Guillaume Nault
On Thu, Apr 18, 2019 at 05:34:07PM -0700, Jakub Kicinski wrote: > On Thu, 18 Apr 2019 17:06:47 -0700 (PDT), David Miller wrote: > > From: Jakub Kicinski > > Date: Wed, 17 Apr 2019 13:51:54 -0700 > > > > > A few unrelated improvements here, mostly trying to make random > > > configs build and W=1

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

2019-04-19 Thread Nikolay Aleksandrov
On 18/04/2019 20: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. > > Signed-off-by: Mike Manning > --- > net/8021q

[bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread rjmccabe3701
From: "McCabe, Robert J" The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: rjmccabe3701 --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/

[PATCH 1/3] PCI: add helper pci_dev_id

2019-04-19 Thread Heiner Kallweit
In several places in the kernel we find PCI_DEVID used like this: PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper for it. Signed-off-by: Heiner Kallweit --- include/linux/pci.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/pci.h b/include/linux/pci.h in

Re: [PATCH bpf-next 0/2] bpf: parallel verification

2019-04-19 Thread Andrii Nakryiko
On Fri, Apr 19, 2019 at 11:24 AM Alexei Starovoitov wrote: > > Allow the bpf verifier to run in parallel for root. > > Alexei Starovoitov (2): > bpf: remove global variables > bpf: drop bpf_verifier_lock > > include/linux/bpf_verifier.h | 5 + > kernel/bpf/verifier.c| 33

Re: [patch net-next rfc 00/15] netdevsim: impement proper device model

2019-04-19 Thread Jiri Pirko
Thu, Apr 18, 2019 at 07:07:48PM CEST, jakub.kicin...@netronome.com wrote: >On Thu, 18 Apr 2019 09:22:56 +0200, Jiri Pirko wrote: >> Tue, Apr 16, 2019 at 08:04:59PM CEST, jakub.kicin...@netronome.com wrote: >> >On Tue, 16 Apr 2019 10:59:37 +0200, Jiri Pirko wrote: >> >> >> 4) netdevsim instances a

Re: [PATCH bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread Alexei Starovoitov
On Fri, Apr 19, 2019 at 11:47:45AM -0500, robert.mcc...@rockwellcollins.com wrote: > From: "McCabe, Robert J" > > The BPF_PROG_LOAD condition for kernel version <= 5.1 is > >log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ > > Signed-off-by: rjmccabe3701 > --- > tools/lib/bpf/

[PATCH bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread robert . mccabe
From: The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: rjmccabe3701 --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h index

[PATCH 1/1] [bpf-next] libbpf: fix off-by-one error for BPF_LOG_BUF_SIZE

2019-04-19 Thread rjmccabe3701
From: "McCabe, Robert J" The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: McCabe, Robert J --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/to

[PATCH 1/1] [bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread rjmccabe3701
From: "McCabe, Robert J" The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: rjmccabe3701 --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/

Re: [PATCH net-next 08/15] dsa: Keep link list of tag drivers

2019-04-19 Thread Florian Fainelli
On 4/17/2019 7:31 PM, Andrew Lunn wrote: > Let the tag drivers register themselves with the DSA core, keeping > them in a linked list. > > Signed-off-by: Andrew Lunn > --- [snip] > int dsa_tag_drivers_register(struct dsa_device_ops *ops[], >unsigned int count, st

Re: [PATCH net-next 06/15] dsa: Remove const from tag driver ops structure

2019-04-19 Thread Florian Fainelli
On 4/18/2019 2:47 PM, Andrew Lunn wrote: > On Thu, Apr 18, 2019 at 10:58:46AM -0700, Florian Fainelli wrote: >> >> >> On 4/17/2019 7:31 PM, Andrew Lunn wrote: >>> A later patch will create a linked list of tag driver ops structures, >>> using a list_head in the structure. So the structure cannot

Re: [PATCH net-next v3 1/5] vlan: support binding link state to vlan member bridge ports

2019-04-19 Thread Nikolay Aleksandrov
On 18/04/2019 20:35, Mike Manning wrote: > In the case of vlan filtering on bridges, the bridge may also have the > corresponding vlan devices as upper devices. Currently the link state > of vlan devices is transferred from the lower device. So this is up if > the bridge is in admin up state and th

[PATCH 1/1] [bpf-next] libbpf: fix off-by-one error for BPF_LOG_BUF_SIZE

2019-04-19 Thread McCabe, Robert J
The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: McCabe, Robert J --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h index bc3

Re: [PATCH net-next 03/15] dsa: Add MODULE_ALIAS to taggers in preperation to become modules

2019-04-19 Thread Florian Fainelli
On 4/17/2019 7:31 PM, Andrew Lunn wrote: > When the tag drivers become modules, we will need to dynamically load > them based on what the switch drivers need. Add aliases to map between > the TAG protocol and the driver. > > In order to do this, we need the tag protocol number as something > wh

[PATCH bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread robert . mccabe
From: "McCabe, Robert J" The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: rjmccabe3701 --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/

Re: [PATCH 1/1] be2net: Detach interface for avoiding a system crash

2019-04-19 Thread Firo
On 4/19/19 2:17 AM, Saeed Mahameed wrote: > On Thu, 2019-04-18 at 15:05 +0800, Firo wrote: >> >> On 4/2/19 12:25 AM, Saeed Mahameed wrote: >>> On Mon, 2019-04-01 at 20:24 +0800, Firo Yang wrote: This crash is triggered by a user-after-free since lake of the synchronization of a race co

[PATCH bpf-next 0/2] bpf: parallel verification

2019-04-19 Thread Alexei Starovoitov
Allow the bpf verifier to run in parallel for root. Alexei Starovoitov (2): bpf: remove global variables bpf: drop bpf_verifier_lock include/linux/bpf_verifier.h | 5 + kernel/bpf/verifier.c| 33 ++--- 2 files changed, 23 insertions(+), 15 deletions(-

[PATCH bpf-next 2/2] bpf: drop bpf_verifier_lock

2019-04-19 Thread Alexei Starovoitov
Drop bpf_verifier_lock for root to avoid being DoS-ed by unprivileged. The BPF verifier is now fully parallel. All unpriv users are still serialized by bpf_verifier_lock to avoid exhausting kernel memory by running N parallel verifications. Signed-off-by: Alexei Starovoitov --- kernel/bpf/verifi

Re: [PATCH] of_net: Fix residues after of_get_nvmem_mac_address removal

2019-04-19 Thread David Miller
From: Petr Štetiar Date: Wed, 17 Apr 2019 22:09:12 +0200 > I've discovered following discrepancy in the bindings/net/ethernet.txt > documentation, where it states following: > > - nvmem-cells: phandle, reference to an nvmem node for the MAC address; > - nvmem-cell-names: string, should be "mac

[PATCH bpf-next 1/2] bpf: remove global variables

2019-04-19 Thread Alexei Starovoitov
Move three global variables protected by bpf_verifier_lock into 'struct bpf_verifier_env' to allow parallel verification. Signed-off-by: Alexei Starovoitov --- include/linux/bpf_verifier.h | 5 + kernel/bpf/verifier.c| 25 + 2 files changed, 18 insertions(+),

Re: [PATCH net-next 1/1] nfp: flower: fix size_t compile warning

2019-04-19 Thread David Miller
From: John Hurley Date: Thu, 18 Apr 2019 01:05:39 +0100 > A recent addition to NFP introduced a function that formats a string with > a size_t variable. This is formatted with %ld which is fine on 64-bit > architectures but produces a compile warning on 32-bit architectures. > > Fix this by usin

Re: [PATCH net-next v3 5/5] bridge: update vlan dev link state for bridge netdev changes

2019-04-19 Thread Nikolay Aleksandrov
On 18/04/2019 20: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 tracks the state of bridge ports > that are members of that vlan. But this can only be done when the link > state of the bridge is up. If it is

[PATCH bpf-next 1/1] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread McCabe, Robert J
From: "McCabe, Robert J" The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: rjmccabe3701 --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/

Re: [PATCH 4.19 stable 0/3] net: ip6 defrag: backport fixes

2019-04-19 Thread David Miller
From: Sasha Levin Date: Wed, 17 Apr 2019 16:53:17 -0400 > On Wed, Apr 17, 2019 at 11:51:27AM -0600, Captain Wiggum wrote: >>Hi All, >> >>We have built 4.19 with Peter's patch, and now all TAHI IPv6 tests >>pass, even another issue I reported is fixed! >>This patch looks great from our testing. Pl

Re: [PATCH bpf-next v5 5/6] net: pass net argument to the eth_get_headlen

2019-04-19 Thread Alexei Starovoitov
On Thu, Apr 18, 2019 at 05:43:50PM -0700, Stanislav Fomichev wrote: > On 04/18, Alexei Starovoitov wrote: > > On Mon, Apr 15, 2019 at 10:38:00AM -0700, Stanislav Fomichev wrote: > > > Update all users eth_get_headlen to pass network namespace > > > and pass it down to the flow dissector. This commi

Re: [PATCH net] team: fix possible recursive locking when add slaves

2019-04-19 Thread Jiri Pirko
Wed, Apr 17, 2019 at 02:12:11PM CEST, liuhang...@gmail.com wrote: >If we add a bond device which is already the master of the team interface, >we will hold the team->lock in team_add_slave() first and then request the >lock in team_set_mac_address() again. The functions are called like: > >- team_a

[bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread rjmccabe3701
From: "McCabe, Robert J" The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: rjmccabe3701 --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/

[PATCH 1/1] [bpf-next] libbpf: fix BPF_LOG_BUF_SIZE off-by-one error

2019-04-19 Thread rjmccabe3701
From: "McCabe, Robert J" The BPF_PROG_LOAD condition for kernel version <= 5.1 is log->len_total > UINT_MAX >> 8 /* (16 * 1024 * 1024) - 1 */ Signed-off-by: rjmccabe3701 --- tools/lib/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf.h b/tools/

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

2019-04-19 Thread Nikolay Aleksandrov
On 18/04/2019 20: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 becomes or > stops being a member of a vlan, then up

Re: [PATCH net-next 15/15] dsa: tag_brcm: Avoid unused symbols

2019-04-19 Thread Florian Fainelli
On 4/17/2019 7:31 PM, Andrew Lunn wrote: > It is possible that the driver is compiled with both > CONFIG_NET_DSA_TAG_BRCM and CONFIG_NET_DSA_TAG_BRCM_PREPEND disabled. > This results in warnings about unused symbols. Add some conditional > compilation to avoid this. > > Signed-off-by: Andrew Lu

Re: [PATCH net-next 13/15] dsa: Cleanup unneeded table and make tag structures static

2019-04-19 Thread Florian Fainelli
On 4/17/2019 7:31 PM, Andrew Lunn wrote: > Now that tag drivers dynamically register, we don't need the static > table. Remove it. This also means the tag driver structures can be > made static. > > Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next 07/15] dsa: Add boilerplate helper to register DSA tag driver modules

2019-04-19 Thread Florian Fainelli
On 4/17/2019 7:31 PM, Andrew Lunn wrote: > A DSA tag driver module will need to register the tag protocols it > implements with the DSA core. Add a macro containing this boiler plate. > > The registration/unregistration code is currently just a stub. A Later > patch will add the real implementa

[PATCH 3/3] r8169: use new helper pci_dev_id

2019-04-19 Thread Heiner Kallweit
Use new helper pci_dev_id() to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index efaea1a0a..ae476fe8d

[PATCH 2/3] PCI: use helper pci_dev_id

2019-04-19 Thread Heiner Kallweit
Use new helper pci_dev_id() to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/pci/msi.c| 6 +++--- drivers/pci/search.c | 10 +++--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 73986825d..e039b740f 100644 ---

[PATCH 3/3] r8169: use new helper pci_dev_id

2019-04-19 Thread Heiner Kallweit
Use new helper pci_dev_id() to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index efaea1a0a..ae476fe8d

[PATCH 1/3] PCI: add helper pci_dev_id

2019-04-19 Thread Heiner Kallweit
In several places in the kernel we find PCI_DEVID used like this: PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper for it. Signed-off-by: Heiner Kallweit --- include/linux/pci.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/pci.h b/include/linux/pci.h in

[PATCH 0/3] PCI: add help pci_dev_id

2019-04-19 Thread Heiner Kallweit
In several places in the kernel we find PCI_DEVID used like this: PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper for it. Heiner Kallweit (3): PCI: add helper pci_dev_id PCI: use helper pci_dev_id r8169: use new helper pci_dev_id drivers/net/ethernet/realtek/r8169.c | 3

Re: [PATCH net-next v3 0/5] net: support binding vlan dev link state to vlan member bridge ports

2019-04-19 Thread Nikolay Aleksandrov
On 18/04/2019 20:35, Mike Manning wrote: > For vlan filtering on bridges, the bridge may also have vlan devices > as upper devices. For switches, these are used to provide L3 packet > processing for ports that are members of a given vlan. > > While it is correct that the admin state for these vlan

[PATCH 0/3] PCI: add help pci_dev_id

2019-04-19 Thread Heiner Kallweit
In several places in the kernel we find PCI_DEVID used like this: PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper for it. Heiner Kallweit (3): PCI: add helper pci_dev_id PCI: use helper pci_dev_id r8169: use new helper pci_dev_id drivers/net/ethernet/realtek/r8169.c | 3

Re: [RFC PATCH 3/3] net: ethernet: ti: cpsw: add XDP support

2019-04-19 Thread Ivan Khoronzhuk
On Fri, Apr 19, 2019 at 11:31:56AM +0300, Ilias Apalodimas wrote: Hi Ivan, +static struct page *cpsw_alloc_page(struct cpsw_common *cpsw) +{ + struct page_pool *pool = cpsw->rx_page_pool; + struct page *page; + int i = 0; + + do { + page = page_pool_dev_all

Re: [PATCH net-next 11/15] dsa: Add stub tag driver put method

2019-04-19 Thread Florian Fainelli
On 4/17/2019 7:31 PM, Andrew Lunn wrote: > When a DSA switch driver is unloaded, the lock on the tag driver > should be released so the module can be unloaded. Add the needed calls, > but leave the actual relase code as a stub. > > Signed-off-by: Andrew Lunn > --- [snip] > diff --git a/net/d

  1   2   >