Re: BUG: KASAN: use-after-free Read in tun_net_xmit

2019-04-22 Thread Jason Wang
On 2019/4/23 下午2:00, Cong Wang wrote: On Mon, Apr 22, 2019 at 2:41 AM Jason Wang wrote: On 2019/4/22 上午11:57, YueHaibing wrote: We get a KASAN report as below, but don't have any reproducer. Any comments are appreciated. == B

[PATCH iproute2-next] devlink: Increase column size for larger shared buffers

2019-04-22 Thread Ido Schimmel
From: Ido Schimmel With current number of spaces the output is mangled if the shared buffer is congested. Before: # devlink sb occupancy show swp32 swp32: pool: 0:10220112/10222128 1: 0/0 2: 0/0 3: 0/0 4:10221120/10222128 5: 0/0

Re: [patch net-next v2 08/16] netdevsim: add bus attributes to add new and delete devices

2019-04-22 Thread Jiri Pirko
Mon, Apr 22, 2019 at 09:23:38PM CEST, jakub.kicin...@netronome.com wrote: >On Sat, 20 Apr 2019 12:29:14 +0200, Jiri Pirko wrote: >> -err = ida_alloc(&nsim_bus_dev_ids, GFP_KERNEL); >> +err = ida_alloc_range(&nsim_bus_dev_ids, >> + id == ~0 ? 0 : id, id, GFP_KERNEL);

Re: [patch net-next v2 08/16] netdevsim: add bus attributes to add new and delete devices

2019-04-22 Thread Jiri Pirko
Mon, Apr 22, 2019 at 09:23:02PM CEST, jakub.kicin...@netronome.com wrote: >On Sat, 20 Apr 2019 12:29:14 +0200, Jiri Pirko wrote: >> +static ssize_t del_device_store(struct bus_type *bus, const char *buf, >> +size_t count) > >Please use the existing format of breaking mu

Re: [PATCH RFC] xdp: Support zero-copy XDP_TX from AF_XDP sockets.

2019-04-22 Thread Björn Töpel
On Thu, 18 Apr 2019 at 19:55, Jonathan Lemon wrote: > > On 18 Apr 2019, at 3:10, Björn Töpel wrote: > > > On Wed, 17 Apr 2019 at 21:58, Jonathan Lemon > > wrote: > >> > >> When the XDP program attached to a zero-copy AF_XDP socket returns > >> XDP_TX, > >> queue the umem frame on the XDP TX ring,

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

2019-04-22 Thread Heiner Kallweit
On 22.04.2019 15:20, Bjorn Helgaas wrote: > On Fri, Apr 19, 2019 at 03:13:38PM -0700, David Miller wrote: >> 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

Re: [PATCH 1/2] spi: Micrel eth switch: declare missing of table

2019-04-22 Thread Heiner Kallweit
On 22.04.2019 21:08, Daniel Gomez wrote: > Add missing table for SPI driver relying on SPI > device match since compatible is in a DT binding or in a DTS. > > Before this patch: > modinfo drivers/net/phy/spi_ks8995.ko | grep alias > alias: spi:ksz8795 > alias: spi:ksz8864 > alia

[PATCH 1/1, v2] net: socionext: replace napi_alloc_frag with the netdev variant on init

2019-04-22 Thread Ilias Apalodimas
The netdev variant is usable on any context since it disables interrupts. The napi variant of the call should only be used within softirq context. Replace napi_alloc_frag on driver init with the correct netdev_alloc_frag call Changes since v1: - Adjusted commit message Acked-by: Ard Biesheuvel A

Re: BUG: KASAN: use-after-free Read in tun_net_xmit

2019-04-22 Thread Cong Wang
On Mon, Apr 22, 2019 at 2:41 AM Jason Wang wrote: > > > On 2019/4/22 上午11:57, YueHaibing wrote: > > We get a KASAN report as below, but don't have any reproducer. > > > > Any comments are appreciated. > > > > == > > BUG: KASAN: use-af

Re: ipsec tunnel performance degrade

2019-04-22 Thread Florian Westphal
Vakul Garg wrote: > > Do you use xfrm interfaces? > > I don't think so. I use setkey to create policies/SAs. > Can you please give me some hint about it? Then you're not using ipsec interfaces. > > > Further, perf show that a lot of atomic primitives such as > > > __ll_sc___cmpxchg_case_mb_4(),

Re: [PATCH net-next] mlxsw: spectrum_router: Do not allow ipv6 gateway with v4 route via replace

2019-04-22 Thread Ido Schimmel
On Mon, Apr 22, 2019 at 03:42:14PM -0700, David Ahern wrote: > From: David Ahern > > mlxsw currently does not support v6 gateways with v4 routes. Commit > 19a9d136f198 ("ipv4: Flag fib_info with a fib_nh using IPv6 gateway") > prevents a route from being added, but nothing stops the replace. Add

Re: [PATCH net-next 00/14] mlxsw: Shared buffer improvements

2019-04-22 Thread Ido Schimmel
On Mon, Apr 22, 2019 at 02:17:39PM -0700, Jakub Kicinski wrote: > Out of curiosity - are you guys considering adding CPU flavour ports, > or is there a good reason not to have it exposed? Yes, we are considering that. In fact, Alexander (Cc-ed) just asked me if it is possible to monitor the occupa

Re: [PATCH net-next] net: systemport: Remove need for DMA descriptor

2019-04-22 Thread David Miller
From: Florian Fainelli Date: Mon, 22 Apr 2019 09:46:44 -0700 > All we do is write the length/status and address bits to a DMA > descriptor only to write its contents into on-chip registers right > after, eliminate this unnecessary step. > > Signed-off-by: Florian Fainelli Applied, thanks.

Re: [PATCH net-next 00/14] mlxsw: Shared buffer improvements

2019-04-22 Thread David Miller
From: Ido Schimmel Date: Mon, 22 Apr 2019 12:08:38 + > This patchset includes two improvements with regards to shared buffer > configuration in mlxsw. > > The first part of this patchset forbids the user from performing illegal > shared buffer configuration that can result in unnecessary pac

Re: [PATCH v2] net: stmmac: move stmmac_check_ether_addr() to driver probe

2019-04-22 Thread David Miller
From: Vinod Koul Date: Mon, 22 Apr 2019 15:15:32 +0530 > stmmac_check_ether_addr() checks the MAC address and assigns one in > driver open(). In many cases when we create slave netdevice, the dev > addr is inherited from master but the master dev addr maybe NULL at > that time, so move this call

Re: [PATCH -next 0/7] clean up needless use of module infrastructure

2019-04-22 Thread David Miller
From: Paul Gortmaker Date: Sat, 20 Apr 2019 23:29:41 -0400 > People can embed modular includes and modular exit functions into code > that never use any of it, and they won't get any errors or warnings. > > Using modular infrastructure in non-modules might seem harmless, but some > of the downfa

Re: [PATCH net-next] net: Rename net/nexthop.h net/rtnh.h

2019-04-22 Thread David Miller
From: David Ahern Date: Sat, 20 Apr 2019 09:28:20 -0700 > From: David Ahern > > The header contains rtnh_ macros so rename the file accordingly. > Allows a later patch to use the nexthop.h name for the new > nexthop code. > > Signed-off-by: David Ahern Applied, thanks David.

Re: [PATCH] include/net/tcp.h: whitespace cleanup at tcp_v4_check

2019-04-22 Thread David Miller
From: "Daniel T. Lee" Date: Sun, 21 Apr 2019 00:50:42 +0900 > This patch makes trivial whitespace fix to the function > tcp_v4_check at include/net/tcp.h file. > > It has stylistic issue, which is "space required after that ','" > and it can be confirmed with ./scripts/checkpatch.pl tool. > >

Re: [PATCH net-next] ipv6: Remove fib6_info_nh_lwt

2019-04-22 Thread David Miller
From: David Ahern Date: Sat, 20 Apr 2019 09:27:27 -0700 > From: David Ahern > > fib6_info_nh_lwt is no longer used; remove it. > > Signed-off-by: David Ahern Applied, thanks David.

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

2019-04-22 Thread David Miller
From: Ard Biesheuvel Date: Fri, 19 Apr 2019 08:46:40 +0200 > 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 disa

Re: pull-request: bpf-next 2019-04-22

2019-04-22 Thread David Miller
From: Alexei Starovoitov Date: Mon, 22 Apr 2019 20:13:35 -0700 > The following pull-request contains BPF updates for your *net-next* tree. > > The main changes are: ... > Please consider pulling these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git Pulled, t

Re: [PATCH 0/5] Taprio qdisc fixes

2019-04-22 Thread David Miller
From: "Guedes, Andre" Date: Mon, 22 Apr 2019 19:18:26 + >> On Apr 20, 2019, at 8:46 PM, David Miller wrote: >> >> From: Andre Guedes >> Date: Fri, 19 Apr 2019 17:00:47 -0700 >> >>> This series contains some minor improvements (patches 1 and 2) and >>> fixes (patches 3-5) to taprio qdisc.

Re: [PATCH net-next] macvlan: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to real device

2019-04-22 Thread Hangbin Liu
Hi Miroslav, On Thu, Apr 18, 2019 at 10:05:09AM +0200, Miroslav Lichvar wrote: > > So I guess the macvlan should reject SIOCSHWTSTAMP but allow > > SIOCGHWTSTAMP. > > FWIW, my suggestion was to limit what the SIOCSHWTSTAMP ioctl can do > on the virtual interface. It could only enable HW timestampi

Re: [PATCH bpf-next v6 0/9] net: flow_dissector: trigger BPF hook when called from eth_get_headlen

2019-04-22 Thread Alexei Starovoitov
On Mon, Apr 22, 2019 at 08:55:43AM -0700, Stanislav Fomichev wrote: > Currently, when eth_get_headlen calls flow dissector, it doesn't pass any > skb. Because we use passed skb to lookup associated networking namespace > to find whether we have a BPF program attached or not, we always use > C-based

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

2019-04-22 Thread David Miller
From: Bjorn Helgaas Date: Mon, 22 Apr 2019 08:20:20 -0500 > On Fri, Apr 19, 2019 at 03:13:38PM -0700, David Miller wrote: >> 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,

Re: [PATCH bpf-next v6 11/16] bpf, libbpf: support global data/bss/rodata sections

2019-04-22 Thread Andrii Nakryiko
On Mon, Apr 22, 2019 at 5:58 PM Daniel Borkmann wrote: > > On 04/19/2019 03:18 AM, Andrii Nakryiko wrote: > > On Tue, Apr 9, 2019 at 2:20 PM Daniel Borkmann wrote: > >> > [...] > >> + def->type = BPF_MAP_TYPE_ARRAY; > >> + def->key_size = sizeof(int); > >> + def->value_size = da

Re: [PATCH] isdn: hisax: Fix misuse of %x in config.c

2019-04-22 Thread Stephen Hemminger
On Tue, 23 Apr 2019 10:25:28 +0800 Fuqian Huang wrote: > Pointers should be printed with %p or %px rather than > cast to (u_long) type and printed with %lX. > As the function seems to be for debug purpose. > Change %lX to %px to print the pointer value. > > Signed-off-by: Fuqian Huang > --- >

pull-request: bpf-next 2019-04-22

2019-04-22 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) allow stack/queue helpers from more bpf program types, from Alban. 2) allow parallel verification of root bpf programs, from Alexei. 3) introduce bpf sysctl hook for trusted root cases,

Re: [net-next 01/14] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2019-04-22 Thread Jakub Kicinski
On Mon, 22 Apr 2019 15:32:53 -0700, Saeed Mahameed wrote: > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h > b/drivers/net/ethernet/mellanox/mlx5/core/en.h > index 51e109fdeec1..6147be23a9b9 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h > +++ b/drivers/net/ethernet/mellano

RE: ipsec tunnel performance degrade

2019-04-22 Thread Vakul Garg
> -Original Message- > From: Florian Westphal > Sent: Monday, April 22, 2019 11:16 PM > To: Vakul Garg > Cc: netdev@vger.kernel.org > Subject: Re: ipsec tunnel performance degrade > > Vakul Garg wrote: > > Post kernel 4.9, I am experiencing more than 50% degrade in ipsec > performanc

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

2019-04-22 Thread Tom Herbert
On Mon, Apr 22, 2019 at 6:49 PM David Ahern wrote: > > On 4/22/19 7:15 PM, Tom Herbert wrote: > > Is there are particular reason why you think rtnetlink would be more > > appropriate? > > Thinking about this from an app API perspective: rtnetlink is used to > configure IPv6 addresses and IPv6 rout

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

2019-04-22 Thread David Ahern
On 4/22/19 7:15 PM, Tom Herbert wrote: > Is there are particular reason why you think rtnetlink would be more > appropriate? Thinking about this from an app API perspective: rtnetlink is used to configure IPv6 addresses and IPv6 routes yet extensions will require a genl interface. Just seems odd f

[PATCH net-next 3/3] ipv6: convert fib6_ref to refcount_t

2019-04-22 Thread Eric Dumazet
We suspect some issues involving fib6_ref 0 -> 1 transitions might cause strange syzbot reports. Lets convert fib6_ref to refcount_t to catch them earlier. Signed-off-by: Eric Dumazet Cc: Wei Wang --- include/net/ip6_fib.h | 8 net/ipv6/ip6_fib.c| 6 +++--- net/ipv6/route.c |

[PATCH net-next 0/3] ipv6: fib6_ref conversion to refcount_t

2019-04-22 Thread Eric Dumazet
We are chasing use-after-free in IPv6 that could have their origin in fib6_ref 0 -> 1 transitions. This patch series should help finding the root causes if these illegal transitions ever happen. Eric Dumazet (3): ipv6: fib6_info_destroy_rcu() cleanup ipv6: broadly use fib6_info_hold() helper

[PATCH net-next 1/3] ipv6: fib6_info_destroy_rcu() cleanup

2019-04-22 Thread Eric Dumazet
We do not need to clear f6i->rt6i_exception_bucket right before freeing f6i. Note that f6i->rt6i_exception_bucket is properly protected by f6i->exception_bucket_flushed being set to one in rt6_flush_exceptions() under the protection of rt6_exception_lock. Signed-off-by: Eric Dumazet Cc: Wei Wang

[PATCH net-next 2/3] ipv6: broadly use fib6_info_hold() helper

2019-04-22 Thread Eric Dumazet
Instead of using atomic_inc(), prefer fib6_info_hold() so that upcoming refcount_t conversion is simpler. Only fib6_info_alloc() is using atomic_set() since we just allocated a new object. Signed-off-by: Eric Dumazet Cc: Wei Wang --- net/ipv6/ip6_fib.c | 16 1 file changed, 8

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

2019-04-22 Thread Tom Herbert
On Mon, Apr 22, 2019 at 7:55 AM David Ahern wrote: > > On 4/22/19 6:33 AM, Tom Herbert wrote: > > > > > > On Sun, Apr 21, 2019, 11:43 PM David Ahern > > wrote: > > > > On 4/19/19 4:36 PM, Tom Herbert wrote: > > > Add a netlink interface to manage the TX TLV param

Re: [PATCH v2 net-next 14/14] dsa: Allow tag drivers to be built as modules

2019-04-22 Thread Randy Dunlap
On 4/22/19 5:22 PM, Andrew Lunn wrote: > Make the CONFIG symbols tristate and add help text. > > The broadcom and Microchip KSZ tag drivers support two different > tagging protocols in one driver. Add a configuration option for the > drivers, and then options to select the protocol. > > Create a

Re: [PATCH bpf-next v6 11/16] bpf, libbpf: support global data/bss/rodata sections

2019-04-22 Thread Daniel Borkmann
On 04/19/2019 03:18 AM, Andrii Nakryiko wrote: > On Tue, Apr 9, 2019 at 2:20 PM Daniel Borkmann wrote: >> [...] >> + def->type = BPF_MAP_TYPE_ARRAY; >> + def->key_size = sizeof(int); >> + def->value_size = data->d_size; >> + def->max_entries = 1; >> + def->map_flags =

[PATCH] [PATCH net, stable 4.19.y, 1/1] net: hns: Fix WARNING when hns modules installed

2019-04-22 Thread xiaojun2
From: Jun Xiao Commit dfdf26babc98 upstream this patch need merge to 4.19.y stable kernel Fix Conflict:already fixed the confilct dfdf26babc98 with Yonglong Liu stable candidate:user cannot connect to the internet via hns dev by default setting without this patch we have already verified this

[PATCH v2 net-next 06/14] dsa: Add boilerplate helper to register DSA tag driver modules

2019-04-22 Thread Andrew Lunn
A DSA tag driver module will need to register the tag protocols it implements with the DSA core. Add macros containing this boiler plate. The registration/unregistration code is currently just a stub. A Later patch will add the real implementation. Signed-off-by: Andrew Lunn Reviewed-by: Florian

[PATCH v2 net-next 05/14] dsa: Add TAG protocol to tag ops

2019-04-22 Thread Andrew Lunn
In order that we can match the tagging protocol a switch driver request to the tagger, we need to know what protocol the tagger supports. Add this information to the ops structure. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli v2 More tag protocol to end of structure to keep hot memb

[PATCH v2 net-next 02/14] dsa: Move tagger name into its ops structure

2019-04-22 Thread Andrew Lunn
Rather than keep a list to map a tagger ops to a name, place the name into the ops structure. This removes the hard coded list, a step towards making the taggers more dynamic. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli v2: Move name to end of structure, keeping the hot entries at

[PATCH v2 net-next 03/14] dsa: Add MODULE_ALIAS to taggers in preparation to become modules

2019-04-22 Thread Andrew Lunn
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 which the C pre-processor can stringinfy. Only the compile

[PATCH v2 net-next 08/14] dsa: Register the none tagger ops

2019-04-22 Thread Andrew Lunn
The none tagger is special in that it does not live in a tag_*.c file, but is within the core. Register/unregister when DSA is loaded/unloaded. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- net/dsa/dsa.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/net/dsa/dsa.c b/n

[PATCH v2 net-next 04/14] dsa: Add MODULE_LICENSE to tag drivers

2019-04-22 Thread Andrew Lunn
All the tag drivers are some variant of GPL. Add a MODULE_LICENSE() indicating this, so the drivers can later be compiled as modules. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- net/dsa/tag_brcm.c| 1 + net/dsa/tag_dsa.c | 1 + net/dsa/tag_edsa.c| 1 + net/dsa/tag_g

[PATCH v2 net-next 09/14] dsa: Rename dsa_resolve_tag_protocol() to _get ready for locking

2019-04-22 Thread Andrew Lunn
dsa_resolve_tag_protocol() is used to find the tagging driver needed by a switch driver. When the tagging drivers become modules, it will be necassary to take a reference on the module to prevent it being unloaded. So rename this function to _get() to indicate it has some locking properties. Signe

[PATCH v2 net-next 07/14] dsa: Keep link list of tag drivers

2019-04-22 Thread Andrew Lunn
Let the tag drivers register themselves with the DSA core, keeping them in a linked list. Signed-off-by: Andrew Lunn v2 -- List pointer has been moved void functions, since there cannot be errors --- net/dsa/dsa.c | 28 1 file changed, 28 insertions(+) diff --git a

[PATCH v2 net-next 00/14] Make DSA tag drivers kernel modules

2019-04-22 Thread Andrew Lunn
istorically, DSA tag drivers have been compiled into the kernel as part of the DSA core. With the growing number of tag drivers, it makes sense to allow this driver code to be compiled as a module, and loaded on demand. v2 -- Move name to end of structure, keeping the hot entries at the beginning.

[PATCH v2 net-next 12/14] dsa: Cleanup unneeded table and make tag structures static

2019-04-22 Thread Andrew Lunn
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 --- include/net/dsa.h | 1 - net/dsa/dsa.c | 35 -

[PATCH v2 net-next 13/14] dsa: tag_brcm: Avoid unused symbols

2019-04-22 Thread Andrew Lunn
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 Lunn Reviewed-by: Florian Fainelli v2 Reorder patch to

[PATCH v2 net-next 14/14] dsa: Allow tag drivers to be built as modules

2019-04-22 Thread Andrew Lunn
Make the CONFIG symbols tristate and add help text. The broadcom and Microchip KSZ tag drivers support two different tagging protocols in one driver. Add a configuration option for the drivers, and then options to select the protocol. Create a submenu for the tagging drivers. Signed-off-by: Andr

[PATCH v2 net-next 11/14] dsa: Make use of the list of tag drivers

2019-04-22 Thread Andrew Lunn
Implement the _get and _put functions to make use of the list of tag drivers. Also, trigger the loading of the module, based on the alias information. The _get function takes a reference on the tag driver, so it cannot be unloaded, and the _put function releases the reference. Signed-off-by: Andre

[PATCH v2 net-next 10/14] dsa: Add stub tag driver put method

2019-04-22 Thread Andrew Lunn
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 release code as a stub. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli v2 -- Fix fall-through comment --- net/dsa/dsa.c |

[PATCH v2 net-next 01/14] dsa: Add SPDX header to tag drivers.

2019-04-22 Thread Andrew Lunn
Add an SPDX header, and remove the license boilerplate text. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- net/dsa/tag_brcm.c| 6 +- net/dsa/tag_dsa.c | 6 +- net/dsa/tag_edsa.c| 6 +- net/dsa/tag_ksz.c | 6 +- net/dsa/tag_lan9303.c | 11 +-

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

2019-04-22 Thread Alexei Starovoitov
On 4/22/19 4:58 PM, Daniel Borkmann wrote: > On 04/19/2019 04:44 PM, 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 + >>

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

2019-04-22 Thread Daniel Borkmann
On 04/19/2019 04:44 PM, 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 bpf-next] bpf: document the verifier limits

2019-04-22 Thread Daniel Borkmann
On 04/18/2019 03:27 AM, Alexei Starovoitov wrote: > Document the verifier limits. > > Signed-off-by: Alexei Starovoitov Applied, thanks!

Re: [PATCH bpf-next 2/2] selftests/bpf: expand test_tc_tunnel with SIT encap

2019-04-22 Thread Y Song
On Mon, Apr 22, 2019 at 4:47 PM Willem de Bruijn wrote: > > On Mon, Apr 22, 2019 at 7:40 PM Y Song wrote: > > > > On Mon, Apr 22, 2019 at 7:58 AM Willem de Bruijn > > wrote: > > > > > > From: Willem de Bruijn > > > > > > So far, all BPF tc tunnel testcases encapsulate in the same network > > >

Re: [PATCH bpf-next 2/2] selftests/bpf: expand test_tc_tunnel with SIT encap

2019-04-22 Thread Willem de Bruijn
On Mon, Apr 22, 2019 at 7:40 PM Y Song wrote: > > On Mon, Apr 22, 2019 at 7:58 AM Willem de Bruijn > wrote: > > > > From: Willem de Bruijn > > > > So far, all BPF tc tunnel testcases encapsulate in the same network > > protocol. Add an encap testcase that requires updating skb->protocol. > > > >

Re: [PATCH bpf v2 1/2] bpf: mark registers as safe or unknown in all frames

2019-04-22 Thread Daniel Borkmann
On 04/22/2019 08:34 PM, Paul Chaignon wrote: > In case of a null check on a pointer inside a subprog, we should mark all > registers with this pointer as either safe or unknown, in both the current > and previous frames. Currently, only spilled registers and registers in > the current frame are ma

Re: [PATCH bpf-next 2/2] selftests/bpf: expand test_tc_tunnel with SIT encap

2019-04-22 Thread Y Song
On Mon, Apr 22, 2019 at 7:58 AM Willem de Bruijn wrote: > > From: Willem de Bruijn > > So far, all BPF tc tunnel testcases encapsulate in the same network > protocol. Add an encap testcase that requires updating skb->protocol. > > The 6in4 tunnel encapsulates an IPv6 packet inside an IPv4 tunnel.

Re: [PATCH bpf-next 1/2] bpf: update skb->protocol in bpf_skb_net_grow

2019-04-22 Thread Y Song
On Mon, Apr 22, 2019 at 7:58 AM Willem de Bruijn wrote: > > From: Willem de Bruijn > > Some tunnels, like sit, change the network protocol of packet. > If so, update skb->protocol to match the new type. > > Signed-off-by: Willem de Bruijn Acked-by: Yonghong Song > --- > net/core/filter.c | 8

[net-next 11/14] net/mlx5e: Remove unused parameter

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy mdev is unused in mlx5e_rx_is_linear_skb. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 7 +++ drivers/net/ethernet/mellanox/mlx5/core/en/params.h | 3 +-- dri

[net-next 06/14] net/mlx5e: XDP, Inline small packets into the TX MPWQE in XDP xmit flow

2019-04-22 Thread Saeed Mahameed
From: Shay Agroskin Upon high packet rate with multiple CPUs TX workloads, much of the HCA's resources are spent on prefetching TX descriptors, thus affecting transmission rates. This patch comes to mitigate this problem by moving some workload to the CPU and reducing the HW data prefetch overhea

[net-next 01/14] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2019-04-22 Thread Saeed Mahameed
From: Tariq Toukan A single cacheline might not contain the packet header for small L1_CACHE_BYTES values. Issue an additional prefetch in this case. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h| 17 + .../net/e

[net-next 08/14] net/mlx5e: Report mlx5e_xdp_set errors

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy If the channels fail to reopen after setting an XDP program, return the error code instead of 0. A proper fix is still needed, as now any error while reopening the channels brings the interface down. This patch only adds error reporting. Signed-off-by: Maxim Mikityanskiy

[net-next 04/14] net/mlx5e: XDP, Enhance RQ indication for XDP redirect flush

2019-04-22 Thread Saeed Mahameed
From: Tariq Toukan The XDP redirect flush indication belongs to the receive queue, not to its XDP send queue. For this, use a new bit on rq->flags. Signed-off-by: Tariq Toukan Reviewed-by: Shay Agroskin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +

[net-next 10/14] net/mlx5e: Add an underflow warning comment

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy mlx5e_mpwqe_get_log_rq_size calculates the number of WQEs (N) based on the requested number of frames in the RQ (F) and the number of packets per WQE (P). It ensures that N is not less than the minimum number of WQEs in an RQ (N_min). Arithmetically, it means that F / P >

[net-next 09/14] net/mlx5e: Move parameter calculation functions to en/params.c

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy This commit moves the parameter calculation functions to a separate file for better modularity and code sharing with future features. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/Mak

[net-next 05/14] net/mlx5e: XDP, Add TX MPWQE session counter

2019-04-22 Thread Saeed Mahameed
From: Shay Agroskin This counter tracks how many TX MPWQE sessions are started in XDP SQ in XDP TX/REDIRECT flow. It counts per-channel and global stats. Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 ++ drivers/net/ether

[pull request][net-next 00/14] Mellanox, mlx5 RX and XDP improvements

2019-04-22 Thread Saeed Mahameed
Hi Dave, This series includes updates to mlx5e driver RX data path and some significant XDP RX/TX improvements to overcome/mitigate HW and PCIE bottlenecks. For more information please see tag log below. Please pull and let me know if there is any problem. Please note that the series starts wit

[PATCH net-next] mlxsw: spectrum_router: Do not allow ipv6 gateway with v4 route via replace

2019-04-22 Thread David Ahern
From: David Ahern mlxsw currently does not support v6 gateways with v4 routes. Commit 19a9d136f198 ("ipv4: Flag fib_info with a fib_nh using IPv6 gateway") prevents a route from being added, but nothing stops the replace. Add a catch for it too. $ ip ro add 172.16.2.0/24 via 10.99.1.2 $

[net-next 14/14] net/mlx5e: Use #define for the WQE wait timeout constant

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy Create a #define for the timeout of mlx5e_wait_for_min_rx_wqes to clarify the meaning of a magic number. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++--- 1

[net-next 12/14] net/mlx5e: Take HW interrupt trigger into a function

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy mlx5e_trigger_irq posts a NOP to the ICO SQ just to trigger an IRQ and enter the NAPI poll on the right CPU according to the affinity. Use it in mlx5e_activate_rq. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/n

[net-next 02/14] net/mlx5e: RX, Support multiple outstanding UMR posts

2019-04-22 Thread Saeed Mahameed
From: Tariq Toukan The buffers mapping of the Multi-Packet WQEs (of Striding RQ) is done via UMR posts, one UMR WQE per an RX MPWQE. A single MPWQE is capable of serving many incoming packets, usually larger than the budget of a single napi cycle. Hence, posting a single UMR WQE per napi cycle (

[net-next 03/14] net/mlx5e: XDP, Fix shifted flag index in RQ bitmap

2019-04-22 Thread Saeed Mahameed
From: Tariq Toukan Values in enum mlx5e_rq_flag are used as bit indixes. Intention was to use them with no BIT(i) wrapping. No functional bug fix here, as the same (shifted)flag bit is used for all set, test, and clear operations. Fixes: 121e89275471 ("net/mlx5e: Refactor RQ XDP_TX indication")

[net-next 13/14] net/mlx5e: Remove unused rx_page_reuse stat

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy Remove the no longer used page_reuse stat of RQs. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 2 -- 2 fi

[net-next 07/14] net/mlx5e: Remove unused parameter

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy params is unused in mlx5e_init_di_list. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/e

[PATCH 4.14 stable 5/5] net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

2019-04-22 Thread Peter Oskolkov
[ Upstream commit 997dd96471641e147cb2c33ad54284000d0f5e35 ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.14 stable 1/5] ipv6: frags: fix a lockdep false positive

2019-04-22 Thread Peter Oskolkov
From: Eric Dumazet [ Upstream commit 415787d7799f4fccbe8d49cb0b8e5811be6b0389 ] lockdep does not know that the locks used by IPv4 defrag and IPv6 reassembly units are of different classes. It complains because of following chains : 1) sch_direct_xmit()(lock txq->_xmit_lock) dev_har

[PATCH 4.14 stable 4/5] net: IP6 defrag: use rbtrees for IPv6 defrag

2019-04-22 Thread Peter Oskolkov
[ Upstream commit d4289fcc9b16b89619ee1c54f829e05e56de8b9a ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.14 stable 3/5] ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

2019-04-22 Thread Peter Oskolkov
From: Florian Westphal [ Upstream commit 70b095c84326640eeacfd69a411db8fc36e8ab1a ] IPV6=m DEFRAG_IPV6=m CONNTRACK=y yields: net/netfilter/nf_conntrack_proto.o: In function `nf_ct_netns_do_get': net/netfilter/nf_conntrack_proto.c:802: undefined reference to `nf_defrag_ipv6_enable' net/netfilte

[PATCH 4.14 stable 2/5] net: IP defrag: encapsulate rbtree defrag code into callable functions

2019-04-22 Thread Peter Oskolkov
[ Upstream commit c23f35d19db3b36ffb9e04b08f1d91565d15f84f ] This is a refactoring patch: without changing runtime behavior, it moves rbtree-related code from IPv4-specific files/functions into .h/.c defrag files shared with IPv6 defragmentation code. Signed-off-by: Peter Oskolkov Cc: Eric Dumaz

[PATCH 4.14 stable 0/5] net: ip6 defrag: backport fixes

2019-04-22 Thread Peter Oskolkov
This is a backport of a 5.1rc patchset: https://patchwork.ozlabs.org/cover/1029418/ Which was backported into 4.19: https://patchwork.ozlabs.org/cover/1081619/ I had to backport two additional patches into 4.14 to make it work. John Masinter (captwiggum), could you, please, confirm that thi

Re: [PATCH bpf v2 0/2] bpf: mark registers as safe or unknown in all frames

2019-04-22 Thread Yonghong Song
On 4/22/19 11:34 AM, Paul Chaignon wrote: > In case of a null check on a pointer inside a subprog, we should mark all > registers with this pointer as either safe or unknown, in both the current > and previous frames. Currently, only spilled registers and registers in > the current frame are mar

Re: [PATCH net-next] net: systemport: Remove need for DMA descriptor

2019-04-22 Thread Jakub Kicinski
On Mon, 22 Apr 2019 09:46:44 -0700, Florian Fainelli wrote: > All we do is write the length/status and address bits to a DMA > descriptor only to write its contents into on-chip registers right > after, eliminate this unnecessary step. > > Signed-off-by: Florian Fainelli Reviewed-by: Jakub Kicin

Re: [PATCH bpf-next v3 1/5] bpf: add writable context for raw tracepoints

2019-04-22 Thread Yonghong Song
On 4/22/19 12:23 PM, Matt Mullins wrote: > On Mon, 2019-04-22 at 18:12 +, Yonghong Song wrote: >> >> On 4/19/19 2:04 PM, Matt Mullins wrote: >>> This is an opt-in interface that allows a tracepoint to provide a safe >>> buffer that can be written from a BPF_PROG_TYPE_RAW_TRACEPOINT program. >

Re: [PATCH net-next 00/14] mlxsw: Shared buffer improvements

2019-04-22 Thread Jakub Kicinski
On Mon, 22 Apr 2019 12:08:38 +, Ido Schimmel wrote: > This patchset includes two improvements with regards to shared buffer > configuration in mlxsw. > > The first part of this patchset forbids the user from performing illegal > shared buffer configuration that can result in unnecessary packet

Re: [PATCH net-next] net: sched: flower: refactor reoffload for concurrent access

2019-04-22 Thread Jakub Kicinski
On Mon, 22 Apr 2019 10:21:34 +0300, Vlad Buslov wrote: > Recent changes that introduced unlocked flower did not properly account for > case when reoffload is initiated concurrently with filter updates. To fix > the issue, extend flower with 'hw_filters' list that is used to store > filters that don

Re: [PATCH net-next] net: sched: flower: refactor reoffload for concurrent access

2019-04-22 Thread Saeed Mahameed
On Mon, 2019-04-22 at 10:21 +0300, Vlad Buslov wrote: > Recent changes that introduced unlocked flower did not properly > account for > case when reoffload is initiated concurrently with filter updates. To > fix > the issue, extend flower with 'hw_filters' list that is used to store > filters that

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

2019-04-22 Thread Cong Wang
On Mon, Apr 22, 2019 at 12:24 PM Guedes, Andre wrote: > > > > On Apr 22, 2019, at 11:07 AM, Cong Wang wrote: > > > > On Mon, Apr 22, 2019 at 11:04 AM Cong Wang wrote: > >> > >> On Fri, Apr 19, 2019 at 6:06 PM Andre Guedes > >> wrote: > >>> > >>> If 'entry' is NULL we WARN_ON() but dereference

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

2019-04-22 Thread Jakub Kicinski
On Sat, 20 Apr 2019 12:29:21 +0200, Jiri Pirko wrote: > diff --git a/tools/testing/selftests/bpf/test_offload.py > b/tools/testing/selftests/bpf/test_offload.py > index 5f2e4f9e70e4..a0566dcf064a 100755 > --- a/tools/testing/selftests/bpf/test_offload.py > +++ b/tools/testing/selftests/bpf/test_of

Re: [patch net-next v2 08/16] netdevsim: add bus attributes to add new and delete devices

2019-04-22 Thread Jakub Kicinski
On Sat, 20 Apr 2019 12:29:14 +0200, Jiri Pirko wrote: > - err = ida_alloc(&nsim_bus_dev_ids, GFP_KERNEL); > + err = ida_alloc_range(&nsim_bus_dev_ids, > + id == ~0 ? 0 : id, id, GFP_KERNEL); #define for ~0 ?

Re: [patch net-next v2 08/16] netdevsim: add bus attributes to add new and delete devices

2019-04-22 Thread Jakub Kicinski
On Sat, 20 Apr 2019 12:29:14 +0200, Jiri Pirko wrote: > +static ssize_t del_device_store(struct bus_type *bus, const char *buf, > + size_t count) Please use the existing format of breaking multiline function declaration, if retype is longer than 3 chars it should be on

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

2019-04-22 Thread Guedes, Andre
> On Apr 22, 2019, at 11:07 AM, Cong Wang wrote: > > On Mon, Apr 22, 2019 at 11:04 AM Cong Wang wrote: >> >> On Fri, Apr 19, 2019 at 6:06 PM Andre Guedes wrote: >>> >>> If 'entry' is NULL we WARN_ON() but dereference the pointer anyway, >>> generating a null pointer dereference bug. This pa

Re: [PATCH 0/5] Taprio qdisc fixes

2019-04-22 Thread Guedes, Andre
Hi David, > On Apr 20, 2019, at 8:46 PM, David Miller wrote: > > From: Andre Guedes > Date: Fri, 19 Apr 2019 17:00:47 -0700 > >> This series contains some minor improvements (patches 1 and 2) and >> fixes (patches 3-5) to taprio qdisc. > > This series does not apply cleanly at all to the net

[PATCH 1/2] spi: Micrel eth switch: declare missing of table

2019-04-22 Thread Daniel Gomez
Add missing table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS. Before this patch: modinfo drivers/net/phy/spi_ks8995.ko | grep alias alias: spi:ksz8795 alias: spi:ksz8864 alias: spi:ks8995 After this patch: modinfo drivers

[PATCH 2/2] spi: ST ST95HF NFC: declare missing of table

2019-04-22 Thread Daniel Gomez
Add missing table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS. Before this patch: modinfo drivers/nfc/st95hf/st95hf.ko | grep alias alias: spi:st95hf After this patch: modinfo drivers/nfc/st95hf/st95hf.ko | grep alias alias: spi:st

Re: [PATCH bpf-next v6 3/9] net: plumb network namespace into __skb_flow_dissect

2019-04-22 Thread Stanislav Fomichev
On Mon, Apr 22, 2019 at 11:08 AM Saeed Mahameed wrote: > > On Mon, 2019-04-22 at 08:55 -0700, Stanislav Fomichev wrote: > > This new argument will be used in the next patches for the > > eth_get_headlen use case. eth_get_headlen calls flow dissector > > with only data (without skb) so there is cur

  1   2   >