[PATCH bpf] xsk: do not remove umem from netdevice on fall-back to copy-mode

2019-02-11 Thread Björn Töpel
From: Björn Töpel Commit c9b47cc1fabc ("xsk: fix bug when trying to use both copy and zero-copy on one queue id") stores the umem into the netdev._rx struct. However, the patch incorrectly removed the umem from the netdev._rx struct when user-space passed "best-effort" mode (i.e. select the faste

Re: [PATCH 01/18] MIPS: lantiq: pass struct device to DMA API functions

2019-02-11 Thread Christoph Hellwig
On Thu, Feb 07, 2019 at 11:29:14PM +, Paul Burton wrote: > Would you like this to go through the MIPS tree or elsewhere? If the > latter: > > Acked-by: Paul Burton Please pick it up through the mips tree!

Re: [PATCH v2] net: fix IPv6 prefix route residue

2019-02-11 Thread Zhiqiang Liu
> From: Zhiqiang Liu > Date: Mon, 11 Feb 2019 10:57:46 +0800 > >> From: Zhiqiang Liu >> >> Follow those steps: >> # ip addr add 2001:123::1/32 dev eth0 >> # ip addr add 2001:123:456::2/64 dev eth0 >> # ip addr del 2001:123::1/32 dev eth0 >> # ip addr del 2001:123:456::2/64 dev eth0 >> and th

Re: [oss-drivers] Re: [RFC 1/3] devlink: add flash update command

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 08:25:30PM CET, jakub.kicin...@netronome.com wrote: >On Mon, 11 Feb 2019 17:45:13 +0100, Jiri Pirko wrote: >> Mon, Feb 11, 2019 at 07:59:20AM CET, jakub.kicin...@netronome.com wrote: >> >Add devlink flash update command. Advanced NICs have firmware >> >stored in flash and often

Re: [PATCH net-next 3/3] staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS

2019-02-11 Thread Greg KH
On Mon, Feb 11, 2019 at 01:17:49PM -0800, Florian Fainelli wrote: > There is no code that tries to get the attribute > SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, remove support for doing that. > > Signed-off-by: Florian Fainelli > --- > drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 - > 1 file chang

[PATCH net-next 2/2] devlink: Fix list access without lock while reading region

2019-02-11 Thread Parav Pandit
While finding the devlink device during region reading, devlink device list is accessed and devlink device is returned without holding a lock. This could lead to user-after-free accesses. While at it, add lockdep assert to ensure that all future callers hold the lock when calling devlink_get_from_

[PATCH net-next 1/2] devlink: Return right error code in case of errors for region read

2019-02-11 Thread Parav Pandit
devlink_nl_cmd_region_read_dumpit() misses to return right error code on most error conditions. Return the right error code on such errors. Fixes: 4e54795a27f5 ("devlink: Add support for region snapshot read command") Signed-off-by: Parav Pandit Acked-by: Jiri Pirko --- net/core/devlink.c | 22

Re: [PATCH net] dsa: mv88e6xxx: Ensure all pending interrupts are handled prior to exit

2019-02-11 Thread Heiner Kallweit
On 12.02.2019 04:58, Andrew Lunn wrote: >>> Hi David >>> >>> I just tested this on one of my boards. It loops endlessly: >>> >>> [ 47.173396] mv88e6xxx_g1_irq_thread_work: c881 a8 80 >>> >>> [ 47.182108] mv88e6xxx_g1_irq_thread_work: c881 a8 80 >>>

linux-next: manual merge of the akpm tree with the bpf tree

2019-02-11 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the akpm tree got a conflict in: net/xdp/xdp_umem.c between commit: e451eb510684 ("xsk: share the mmap_sem for page pinning") from the bpf tree and patch: "net/xdp/xdp_umem.c: do not use mmap_sem" from the akpm tree. I fixed it up (I dropped the akp

[Patch net] team: avoid complex list operations in team_nl_cmd_options_set()

2019-02-11 Thread Cong Wang
The current opt_inst_list operations inside team_nl_cmd_options_set() is too complex to track: LIST_HEAD(opt_inst_list); nla_for_each_nested(...) { list_for_each_entry(opt_inst, &team->option_inst_list, list) { if (__team_option_inst_tmp_find(&opt_inst_list, opt_inst))

Re: [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure

2019-02-11 Thread David Miller
From: Eli Britstein Date: Mon, 11 Feb 2019 09:52:59 +0200 > Implementation of macro "flow_action_for_each" introduced in > commit e3ab786b42535 ("flow_offload: add flow action infrastructure") > and used in commit 738678817573c ("drivers: net: use flow action > infrastructure") iterated the first

Re: [PATCH] Documentation: fix some freescale dpio-driver.rst warnings

2019-02-11 Thread David Miller
From: Randy Dunlap Date: Sun, 10 Feb 2019 22:32:42 -0800 > From: Randy Dunlap > > Fix markup warnings for one list by using correct list syntax. > Fix markup warnings for another list by using blank lines before the > list. > > Documentation/networking/device_drivers/freescale/dpaa2/dpio-drive

Re: [net] tipc: fix link session and re-establish issues

2019-02-11 Thread David Miller
From: Tuong Lien Date: Mon, 11 Feb 2019 13:29:43 +0700 > When a link endpoint is re-created (e.g. after a node reboot or > interface reset), the link session number is varied by random, the peer > endpoint will be synced with this new session number before the link is > re-established. > > Howev

Re: [PATCH bpf-next 4/4] selftests/bpf: Test static data relocation

2019-02-11 Thread Alexei Starovoitov
On Mon, Feb 11, 2019 at 04:47:29PM -0800, Joe Stringer wrote: > Add tests for libbpf relocation of static variable references into the > .data and .bss sections of the ELF. > > Signed-off-by: Joe Stringer ... > +#define __fetch(x) (__u32)(&(x)) > + > +static __u32 static_bss = 0; /* Reloc referen

Re: [PATCH bpf-next v9 7/7] selftests: bpf: add test_lwt_ip_encap selftest

2019-02-11 Thread Alexei Starovoitov
On Mon, Feb 11, 2019 at 8:40 PM David Ahern wrote: > > On 2/11/19 9:39 PM, Alexei Starovoitov wrote: > > This needs one more rebase on top of Jiong's makefile changes. > > Other than this it looks great. > > Thanks! > > needs more than that. just sent comments about patch 5. yep. just saw your co

Re: [PATCH net-next v2 0/5] devlink: minor tweaks to reported device info

2019-02-11 Thread David Miller
From: Jakub Kicinski Date: Sun, 10 Feb 2019 19:35:26 -0800 > This series contains two minor touch ups for devlink code. First > || is corrected to && in the ethtool compat code. Next patch > decreases the stack allocation size. > > On the nfp side after further discussions with the manufacturing

Re: [PATCH bpf-next v9 7/7] selftests: bpf: add test_lwt_ip_encap selftest

2019-02-11 Thread David Ahern
On 2/11/19 9:39 PM, Alexei Starovoitov wrote: > This needs one more rebase on top of Jiong's makefile changes. > Other than this it looks great. > Thanks! needs more than that. just sent comments about patch 5.

Re: [PATCH bpf-next v9 5/7] bpf: add handling of BPF_LWT_REROUTE to lwt_bpf.c

2019-02-11 Thread David Ahern
On 2/11/19 5:42 PM, Peter Oskolkov wrote: > @@ -88,6 +90,35 @@ static int run_lwt_bpf(struct sk_buff *skb, struct > bpf_lwt_prog *lwt, > return ret; > } > > +static int bpf_lwt_input_reroute(struct sk_buff *skb) > +{ > + int err = -EINVAL; > + > + if (skb->protocol == htons(ETH_P_

Re: [PATCH bpf-next v9 7/7] selftests: bpf: add test_lwt_ip_encap selftest

2019-02-11 Thread Alexei Starovoitov
On Mon, Feb 11, 2019 at 04:42:49PM -0800, Peter Oskolkov wrote: > This patch adds a bpf self-test to cover BPF_LWT_ENCAP_IP mode > in bpf_lwt_push_encap. > > Covered: > - encapping in LWT_IN and LWT_XMIT > - IPv4 and IPv6 > > A follow-up patch will add GSO and VRF-enabled tests. > > Signed-off-b

Re: [PATCH v2] net: fix IPv6 prefix route residue

2019-02-11 Thread David Miller
From: Zhiqiang Liu Date: Mon, 11 Feb 2019 10:57:46 +0800 > From: Zhiqiang Liu > > Follow those steps: > # ip addr add 2001:123::1/32 dev eth0 > # ip addr add 2001:123:456::2/64 dev eth0 > # ip addr del 2001:123::1/32 dev eth0 > # ip addr del 2001:123:456::2/64 dev eth0 > and then prefix rou

Re: [PATCH bpf-next v2 0/4] selftests: bpf: improve bpf object file rules

2019-02-11 Thread Alexei Starovoitov
On Mon, Feb 11, 2019 at 12:01:17PM +, Jiong Wang wrote: > This set improves bpf object file related rules in selftests Makefile. > - tell git to ignore the build dir "alu32". > - extend sub-register mode compilation to all bpf object files to give > LLVM compiler bpf back-end more exerc

[v3, 9/9] MAINTAINERS: add enetc_ptp driver into QorIQ PTP list

2019-02-11 Thread Yangbo Lu
This patch to add enetc_ptp driver into QorIQ PTP list for maintaining. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - None. --- MAINTAINERS |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 604bca2..d

[v3, 6/9] ptp_qoriq: fix register memory map

2019-02-11 Thread Yangbo Lu
The 1588 timer on eTSEC Ethernet controller uses different register memory map with DPAA Ethernet controller. Now the new ENETC Ethernet controller uses same reigster memory map with DPAA. To support ENETC, let's use register memory map of DPAA/ENETC in default. Signed-off-by: Yangbo Lu --- Chang

[v3, 8/9] enetc: add PTP clock driver

2019-02-11 Thread Yangbo Lu
This patch is to add PTP clock driver for ENETC. The driver reused QorIQ PTP clock driver. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Converted to use ptp_qoriq_free(). --- drivers/net/ethernet/freescale/enetc/Kconfig | 12 ++ drivers/net/etherne

[v3, 7/9] ptp: add QorIQ PTP support for ENETC

2019-02-11 Thread Yangbo Lu
This patch is to add QorIQ PTP support for ENETC. ENETC PTP driver which is a PCI driver for same 1588 timer IP block will reuse QorIQ PTP driver. Signed-off-by: Yangbo Lu --- Chanbges for v2: - None. Chanbges for v3: - None. --- drivers/ptp/Kconfig |2 +- 1 files changed, 1

[v3, 4/9] ptp_qoriq: add little enadian support

2019-02-11 Thread Yangbo Lu
There is QorIQ 1588 timer IP block on the new ENETC Ethernet controller. However it uses little endian mode which is different with before. This patch is to add little endian support for the driver by using "little-endian" dts node property. Signed-off-by: Yangbo Lu --- Changes for v2: -

[v3, 0/9] Add ENETC PTP clock driver

2019-02-11 Thread Yangbo Lu
There is same QorIQ 1588 timer IP block on the new ENETC Ethernet controller with eTSEC/DPAA Ethernet controllers. However it's different endianness (little-endian) and using PCI driver. To support ENETC PTP driver, ptp_qoriq driver needed to be reworked to make functions global for reusing, to ad

[v3, 5/9] dt-binding: ptp_qoriq: add little-endian support

2019-02-11 Thread Yangbo Lu
Specify "little-endian" property if the 1588 timer IP block is little-endian mode. The default endian mode is big-endian. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - None. --- .../devicetree/bindings/ptp/ptp-qoriq.txt |3 +++ 1 files change

[v3, 1/9] ptp_qoriq: make structure/function names more consistent

2019-02-11 Thread Yangbo Lu
Strings containing "ptp_qoriq" or "qoriq_ptp" which were used for structure/function names were complained by users. Let's just use the unique "ptp_qoriq" to make these names more consistent. This patch is just to unify the names using "ptp_qoriq". It hasn't changed any functions. Signed-off-by: Y

[v3, 2/9] ptp_qoriq: make ptp operations global

2019-02-11 Thread Yangbo Lu
This patch is to make functions of ptp operations global, so that ENETC PTP driver which is a PCI driver for same 1588 timer IP block could reuse them. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - None. --- drivers/ptp/ptp_qoriq.c | 27 ++

[v3, 3/9] ptp_qoriq: convert to use ptp_qoriq_init/free

2019-02-11 Thread Yangbo Lu
Moved QorIQ PTP clock initialization/free into new functions ptp_qoriq_init()/ptp_qoriq_free(). These functions could also be reused by ENETC PTP drvier which is a PCI driver for same 1588 timer IP block. Signed-off-by: Yangbo Lu --- Changes for v2: - None. Changes for v3: - Added

RE: [v2, 0/9] Add ENETC PTP clock driver

2019-02-11 Thread Y.b. Lu
Hi David, > -Original Message- > From: David Miller > Sent: Monday, February 4, 2019 4:12 AM > To: Y.b. Lu > Cc: netdev@vger.kernel.org; devicet...@vger.kernel.org; > richardcoch...@gmail.com; robh...@kernel.org; Claudiu Manoil > > Subject: Re: [v2, 0/9] Add ENETC PTP clock driver > >

Re: [PATCH net] dsa: mv88e6xxx: Ensure all pending interrupts are handled prior to exit

2019-02-11 Thread Andrew Lunn
> > Hi David > > > > I just tested this on one of my boards. It loops endlessly: > > > > [ 47.173396] mv88e6xxx_g1_irq_thread_work: c881 a8 80 > > > > [ 47.182108] mv88e6xxx_g1_irq_thread_work: c881 a8 80 > > > > [ 47.190820] mv88e6xxx_g1_ir

Re: [PATCH] ipv6: fix icmp6_send() route lookup

2019-02-11 Thread Ivan Delalande
Hi David, On Mon, Feb 11, 2019 at 12:38:18PM -0800, David Miller wrote: > From: Alin Nastac > Date: Thu, 7 Feb 2019 16:05:31 +0100 > > > Original packet destination address must be used as saddr for the > > route lookup performed by icmp6_send() even when this address is > > not local. This fix

RE: [PATCH v3] arm64: dts: lx2160aqds: Add mdio mux nodes

2019-02-11 Thread Pankaj Bansal
> -Original Message- > From: Leo Li > Sent: Tuesday, 12 February, 2019 02:14 AM > To: Shawn Guo ; Pankaj Bansal > > Cc: Andrew Lunn ; Florian Fainelli ; > netdev@vger.kernel.org; linux-arm-ker...@lists.infradead.org > Subject: RE: [PATCH v3] arm64: dts: lx2160aqds: Add mdio mux nodes >

[PATCH net-next v4] ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs

2019-02-11 Thread Callum Sinclair
Created a way to clear the multicast forwarding cache on a socket without having to either remove the entries manually using the delete entry socket option or destroy and recreate the multicast socket. Calling the socket option MRT_FLUSH will allow any combination of the four flag options to be cl

[PATCH net-next v4] ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs

2019-02-11 Thread Callum Sinclair
Currently the only way to clear the forwarding cache was to delete the entries one by one using the MRT_DEL_MFC socket option or to destroy and recreate the socket. Create a new socket option which with the use of optional flags can clear any combination of multicast entries (static or not static)

Re: [net] tipc: fix skb may be leaky in tipc_link_input

2019-02-11 Thread David Miller
From: Hoang Le Date: Mon, 11 Feb 2019 09:18:28 +0700 > When we free skb at tipc_data_input, we return a 'false' boolean. > Then, skb passed to subcalling tipc_link_input in tipc_link_rcv, > > > 1303 int tipc_link_rcv: > ... > 1354if (!tipc_data_input(l, skb, l->inputq)) > 1355rc |=

Re: [PATCH net-next] ipvs: Use struct_size() helper

2019-02-11 Thread Gustavo A. R. Silva
On 2/11/19 5:40 PM, Pablo Neira Ayuso wrote: > On Fri, Feb 08, 2019 at 10:56:48AM +0100, Simon Horman wrote: >> On Thu, Feb 07, 2019 at 06:44:56PM -0600, Gustavo A. R. Silva wrote: >>> One of the more common cases of allocation size calculations is finding >>> the size of a structure that has a

[PATCH v2 bpf-next] tools: bpftool: doc, add text about feature-subcommand

2019-02-11 Thread Prashant Bhole
This patch adds missing information about feature-subcommand in bpftool.rst Signed-off-by: Prashant Bhole --- v2: used tabs instead of spaces tools/bpf/bpftool/Documentation/bpftool.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/Documentation/bpfto

Re: [PATCH net] dsa: mv88e6xxx: Ensure all pending interrupts are handled prior to exit

2019-02-11 Thread Andrew Lunn
> Yes, it is true the PHY and SERDES enables in Global 2 should be > cleared before the interrupt handler is installed for device > interrupts.  That's what is done for the interrupts enables in > Global 1.  I'm not seeing that these enables are initialized. > > Which switch? 6390X. > The device

Re: [PATCH net] dsa: mv88e6xxx: Ensure all pending interrupts are handled prior to exit

2019-02-11 Thread John David Anglin
On 2019-02-11 6:33 p.m., Andrew Lunn wrote: >> Signed-off-by: John David Anglin >> --- >> drivers/net/dsa/mv88e6xxx/chip.c | 28 ++-- >> 1 file changed, 22 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c >> b/drivers/net/dsa/mv88e6xxx/ch

[PATCH bpf-next 1/4] libbpf: Refactor relocations

2019-02-11 Thread Joe Stringer
Adjust the code for relocations slightly with no functional changes, so that upcoming patches that will introduce support for relocations into the .data and .bss sections can be added independent of these changes. Signed-off-by: Joe Stringer --- tools/lib/bpf/libbpf.c | 62 ++

[PATCH bpf-next 2/4] libbpf: Support 32-bit static data loads

2019-02-11 Thread Joe Stringer
Support loads of static 32-bit data when BPF writers make use of convenience macros for accessing static global data variables. A later patch in this series will demonstrate its usage in a selftest. As of LLVM-7, this technique only works with 32-bit data, as LLVM will complain if this technique i

[PATCH bpf-next 4/4] selftests/bpf: Test static data relocation

2019-02-11 Thread Joe Stringer
Add tests for libbpf relocation of static variable references into the .data and .bss sections of the ELF. Signed-off-by: Joe Stringer --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_progs.c | 44 + .../selftests/bpf/test_static_da

[PATCH bpf-next 0/4] libbpf: Add support for 32-bit static data

2019-02-11 Thread Joe Stringer
This series adds support to libbpf for relocating references to 32-bit static data inside ELF files, both for .data and .bss, similar to one of the approaches proposed in LPC 2018[0]. This improves a common workflow for BPF users, where the BPF program may be customised each time it is loaded, for

[PATCH bpf-next 3/4] libbpf: Support relocations for bss.

2019-02-11 Thread Joe Stringer
The BSS section in an ELF generated by LLVM represents constants for uninitialized variables or variables that are configured with a zero value. Support initializing zeroed static data by parsing the relocations with references to the .bss section and zeroing them. Signed-off-by: Joe Stringer ---

[PATCH bpf-next v9 6/7] bpf: sync /include/.../bpf.h with tools/include/.../bpf.h

2019-02-11 Thread Peter Oskolkov
This patch copies changes in bpf.h done by a previous patch in this patchset from the kernel uapi include dir into tools uapi include dir. Signed-off-by: Peter Oskolkov --- tools/include/uapi/linux/bpf.h | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --gi

[PATCH bpf-next v9 7/7] selftests: bpf: add test_lwt_ip_encap selftest

2019-02-11 Thread Peter Oskolkov
This patch adds a bpf self-test to cover BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap. Covered: - encapping in LWT_IN and LWT_XMIT - IPv4 and IPv6 A follow-up patch will add GSO and VRF-enabled tests. Signed-off-by: Peter Oskolkov --- tools/testing/selftests/bpf/Makefile | 5 +- .../

[PATCH bpf-next v9 4/7] ipv6_stub: add ipv6_route_input stub/proxy.

2019-02-11 Thread Peter Oskolkov
Proxy ip6_route_input via ipv6_stub, for later use by lwt bpf ip encap (see the next patch in the patchset). Signed-off-by: Peter Oskolkov --- include/net/addrconf.h | 1 + net/ipv6/addrconf_core.c | 6 ++ net/ipv6/af_inet6.c | 7 +++ 3 files changed, 14 insertions(+) diff --git

[PATCH bpf-next v9 2/7] bpf: implement BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap

2019-02-11 Thread Peter Oskolkov
Implement BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap BPF helper. It enables BPF programs (specifically, BPF_PROG_TYPE_LWT_IN and BPF_PROG_TYPE_LWT_XMIT prog types) to add IP encapsulation headers to packets (e.g. IP/GRE, GUE, IPIP). This is useful when thousands of different short-lived flows sho

[PATCH bpf-next v9 5/7] bpf: add handling of BPF_LWT_REROUTE to lwt_bpf.c

2019-02-11 Thread Peter Oskolkov
This patch builds on top of the previous patch in the patchset, which added BPF_LWT_ENCAP_IP mode to bpf_lwt_push_encap. As the encapping can result in the skb needing to go via a different interface/route/dst, bpf programs can indicate this by returning BPF_LWT_REROUTE, which triggers a new route

[PATCH bpf-next v9 0/7] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2019-02-11 Thread Peter Oskolkov
This patchset implements BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap BPF helper. It enables BPF programs (specifically, BPF_PROG_TYPE_LWT_IN and BPF_PROG_TYPE_LWT_XMIT prog types) to add IP encapsulation headers to packets (e.g. IP/GRE, GUE, IPIP). This is useful when thousands of different short-

[PATCH bpf-next v9 3/7] bpf: handle GSO in bpf_lwt_push_encap

2019-02-11 Thread Peter Oskolkov
This patch adds handling of GSO packets in bpf_lwt_push_ip_encap() (called from bpf_lwt_push_encap): * IPIP, GRE, and UDP encapsulation types are deduced by looking into iphdr->protocol or ipv6hdr->next_header; * SCTP GSO packets are not supported (as bpf_skb_proto_4_to_6 and similar do); * UD

[PATCH bpf-next v9 1/7] bpf: add plumbing for BPF_LWT_ENCAP_IP in bpf_lwt_push_encap

2019-02-11 Thread Peter Oskolkov
This patch adds all needed plumbing in preparation to allowing bpf programs to do IP encapping via bpf_lwt_push_encap. Actual implementation is added in the next patch in the patchset. Of note: - bpf_lwt_push_encap can now be called from BPF_PROG_TYPE_LWT_XMIT prog types in addition to BPF_PROG_

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

2019-02-11 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got conflicts in: net/ipv4/netfilter/nf_nat_l3proto_ipv4.c net/ipv6/netfilter/nf_nat_l3proto_ipv6.c between commit: 8303b7e8f018 ("netfilter: nat: fix spurious connection timeouts") from the net tree and commit: 303e0c558959 ("netf

Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread Ira Weiny
On Mon, Feb 11, 2019 at 04:25:10PM -0700, Jason Gunthorpe wrote: > On Mon, Feb 11, 2019 at 02:55:10PM -0800, Dan Williams wrote: > > > > I also wonder if someone should think about making fast into a flag > > > too.. > > > > > > But I'm not sure when fast should be used vs when it shouldn't :( > >

Re: [PATCH net-next] netfilter: xt_recent: Use struct_size() in kvzalloc()

2019-02-11 Thread Pablo Neira Ayuso
On Thu, Feb 07, 2019 at 06:56:08PM -0600, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct f

Re: Kernel memory corruption in CIPSO labeled TCP packets processing.

2019-02-11 Thread Paul Moore
On Mon, Feb 11, 2019 at 4:21 PM Nazarov Sergey wrote: > Hi, Paul! > What I need to do for this? If you haven't already done so, go read Documentation/process/submitting-patches.rst, that should guide you through the process. I would also suggest looking at both the git log and the mailing list a

Re: [PATCH net-next] ipvs: Use struct_size() helper

2019-02-11 Thread Pablo Neira Ayuso
On Fri, Feb 08, 2019 at 10:56:48AM +0100, Simon Horman wrote: > On Thu, Feb 07, 2019 at 06:44:56PM -0600, Gustavo A. R. Silva wrote: > > One of the more common cases of allocation size calculations is finding > > the size of a structure that has a zero-sized array at the end, along > > with memory

Re: [PATCH] netfilter: conntrack: fix indentation issue

2019-02-11 Thread Pablo Neira Ayuso
On Thu, Feb 07, 2019 at 01:13:11PM +, Colin King wrote: > From: Colin Ian King > > A statement in an if block is not indented correctly. Fix this. Applied, thanks.

Re: [PATCH net] dsa: mv88e6xxx: Ensure all pending interrupts are handled prior to exit

2019-02-11 Thread Andrew Lunn
> Signed-off-by: John David Anglin > --- > drivers/net/dsa/mv88e6xxx/chip.c | 28 ++-- > 1 file changed, 22 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/dsa/mv88e6xxx/chip.c > b/drivers/net/dsa/mv88e6xxx/chip.c > index 8dca2c949e73..12fd7ce3f1ff 100644 > -

Re: [PATCH] netfilter: nft_tunnel: Add NFTA_TUNNEL_MODE options

2019-02-11 Thread Pablo Neira Ayuso
On Tue, Jan 29, 2019 at 03:51:17PM +0800, we...@ucloud.cn wrote: > From: wenxu > > nft "tunnel" expr match both the tun_info of RX and TX. This patch > provide the NFTA_TUNNEL_MODE to individually match the tun_info of > RX or TX. Applied, thanks.

Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread Jason Gunthorpe
On Mon, Feb 11, 2019 at 02:55:10PM -0800, Dan Williams wrote: > > I also wonder if someone should think about making fast into a flag > > too.. > > > > But I'm not sure when fast should be used vs when it shouldn't :( > > Effectively fast should always be used just in case the user cares > about

RE: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread Weiny, Ira
> > On Mon, Feb 11, 2019 at 2:07 PM Jason Gunthorpe wrote: > > > > On Mon, Feb 11, 2019 at 01:52:38PM -0800, Ira Weiny wrote: > > > On Mon, Feb 11, 2019 at 01:39:12PM -0800, John Hubbard wrote: > > > > On 2/11/19 1:26 PM, Ira Weiny wrote: > > > > > On Mon, Feb 11, 2019 at 01:13:56PM -0800, John H

[PATCH] isdn: i4l: isdn_tty: Mark expected switch fall-through

2019-02-11 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/isdn/i4l/isdn_tty.c: In function ‘isdn_tty_edit_at’: drivers/isdn/i4l/isdn_tty.c:3644:18: warning: this statement may fall through [-Wimpl

Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread Dan Williams
On Mon, Feb 11, 2019 at 2:07 PM Jason Gunthorpe wrote: > > On Mon, Feb 11, 2019 at 01:52:38PM -0800, Ira Weiny wrote: > > On Mon, Feb 11, 2019 at 01:39:12PM -0800, John Hubbard wrote: > > > On 2/11/19 1:26 PM, Ira Weiny wrote: > > > > On Mon, Feb 11, 2019 at 01:13:56PM -0800, John Hubbard wrote: >

Re: [PATCH mlx5-next 2/2] net/mlx5: Factor out HCA capabilities functions

2019-02-11 Thread Saeed Mahameed
On Mon, 2019-02-11 at 20:32 +, Jason Gunthorpe wrote: > On Mon, Feb 11, 2019 at 10:02:07PM +0200, Leon Romanovsky wrote: > > On Mon, Feb 11, 2019 at 07:50:55PM +, Jason Gunthorpe wrote: > > > On Mon, Feb 11, 2019 at 01:56:08PM +0200, Leon Romanovsky wrote: > > > > From: Leon Romanovsky > >

Re: [PATCH 0/3] Add gup fast + longterm and use it in HFI1

2019-02-11 Thread Jason Gunthorpe
On Mon, Feb 11, 2019 at 10:40:02PM +, Weiny, Ira wrote: > > Many drivers do this, the 'doorbell' is a PCI -> CPU thing of some sort > > My surprise is why does _userspace_ allocate this memory? Well, userspace needs to read the memory, so either userpace allocates it and the kernel GUP's it,

[PATCH] isdn_v110: mark expected switch fall-through

2019-02-11 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/isdn/i4l/isdn_v110.c: In function ‘EncodeMatrix’: drivers/isdn/i4l/isdn_v110.c:353:7: warning: this statement may fall through [-Wimplicit

Re: [Patch net-next v2] mlx5: use RCU lock in mlx5_eq_cq_get()

2019-02-11 Thread Saeed Mahameed
On Wed, 2019-02-06 at 15:00 -0800, Cong Wang wrote: > mlx5_eq_cq_get() is called in IRQ handler, the spinlock inside > gets a lot of contentions when we test some heavy workload > with 60 RX queues and 80 CPU's, and it is clearly shown in the > flame graph. > > In fact, radix_tree_lookup() is perf

[PATCH net] batman-adv: fix uninit-value in batadv_interface_tx()

2019-02-11 Thread Eric Dumazet
KMSAN reported batadv_interface_tx() was possibly using a garbage value [1] batadv_get_vid() does have a pskb_may_pull() call but batadv_interface_tx() does not actually make sure this did not fail. [1] BUG: KMSAN: uninit-value in batadv_interface_tx+0x908/0x1e40 net/batman-adv/soft-interface.c:

RE: [PATCH 0/3] Add gup fast + longterm and use it in HFI1

2019-02-11 Thread Weiny, Ira
> On Mon, Feb 11, 2019 at 01:42:57PM -0800, Ira Weiny wrote: > > On Mon, Feb 11, 2019 at 01:47:10PM -0700, Jason Gunthorpe wrote: > > > On Mon, Feb 11, 2019 at 12:34:17PM -0800, Davidlohr Bueso wrote: > > > > On Mon, 11 Feb 2019, ira.we...@intel.com wrote: > > > > > Ira Weiny (3): > > > > > mm/gup

[PATCH] ser_gigaset: mark expected switch fall-through

2019-02-11 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/isdn/gigaset/ser-gigaset.c: In function ‘gigaset_tty_ioctl’: drivers/isdn/gigaset/ser-gigaset.c:627:3: warning: this statement may fall thr

Re: [PATCH 0/3] Add gup fast + longterm and use it in HFI1

2019-02-11 Thread Jason Gunthorpe
On Mon, Feb 11, 2019 at 09:14:56PM +, Weiny, Ira wrote: > > > > On Mon, Feb 11, 2019 at 12:16:40PM -0800, ira.we...@intel.com wrote: > > > From: Ira Weiny > > > > > > NOTE: This series depends on my clean up patch to remove the write > > > parameter from gup_fast_permitted()[1] > > > > > > HF

Re: [PATCH 0/3] Add gup fast + longterm and use it in HFI1

2019-02-11 Thread Jason Gunthorpe
On Mon, Feb 11, 2019 at 01:42:57PM -0800, Ira Weiny wrote: > On Mon, Feb 11, 2019 at 01:47:10PM -0700, Jason Gunthorpe wrote: > > On Mon, Feb 11, 2019 at 12:34:17PM -0800, Davidlohr Bueso wrote: > > > On Mon, 11 Feb 2019, ira.we...@intel.com wrote: > > > > Ira Weiny (3): > > > > mm/gup: Change "wr

linux-next: Fixes tag needs some work in the net-next tree

2019-02-11 Thread Stephen Rothwell
Hi all, In commit cbd72b485214 ("net: dsa: microchip: add switch offload forwarding support") Fixes tag Fixes: c2e866911e254067 ("microchip: break KSZ9477 DSA driver into two files") has these problem(s): - Subject does not match target commit subject Just use git log -1 --f

Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread Jason Gunthorpe
On Mon, Feb 11, 2019 at 01:52:38PM -0800, Ira Weiny wrote: > On Mon, Feb 11, 2019 at 01:39:12PM -0800, John Hubbard wrote: > > On 2/11/19 1:26 PM, Ira Weiny wrote: > > > On Mon, Feb 11, 2019 at 01:13:56PM -0800, John Hubbard wrote: > > >> On 2/11/19 12:39 PM, Jason Gunthorpe wrote: > > >>> On Mon,

KMSAN: uninit-value in capi_write

2019-02-11 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:11587f6ee534 kmsan: remove pr_err git tree: kmsan console output: https://syzkaller.appspot.com/x/log.txt?x=120bd84f40 kernel config: https://syzkaller.appspot.com/x/.config?x=c8a62a4eb8ea3e9f dashboard link: https://syzkalle

Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread John Hubbard
On 2/11/19 1:52 PM, Ira Weiny wrote: > On Mon, Feb 11, 2019 at 01:39:12PM -0800, John Hubbard wrote: >> On 2/11/19 1:26 PM, Ira Weiny wrote: >>> On Mon, Feb 11, 2019 at 01:13:56PM -0800, John Hubbard wrote: On 2/11/19 12:39 PM, Jason Gunthorpe wrote: > On Mon, Feb 11, 2019 at 12:16:42PM -0

Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread Ira Weiny
On Mon, Feb 11, 2019 at 01:39:12PM -0800, John Hubbard wrote: > On 2/11/19 1:26 PM, Ira Weiny wrote: > > On Mon, Feb 11, 2019 at 01:13:56PM -0800, John Hubbard wrote: > >> On 2/11/19 12:39 PM, Jason Gunthorpe wrote: > >>> On Mon, Feb 11, 2019 at 12:16:42PM -0800, ira.we...@intel.com wrote: > F

KMSAN: uninit-value in hsr_register_frame_in

2019-02-11 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:fa1981bee40f kmsan: fix defconfig build git tree: kmsan console output: https://syzkaller.appspot.com/x/log.txt?x=12c53624c0 kernel config: https://syzkaller.appspot.com/x/.config?x=52c9737ec5618f82 dashboard link: https://sy

Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread Dan Williams
On Mon, Feb 11, 2019 at 1:39 PM John Hubbard wrote: > > On 2/11/19 1:26 PM, Ira Weiny wrote: > > On Mon, Feb 11, 2019 at 01:13:56PM -0800, John Hubbard wrote: > >> On 2/11/19 12:39 PM, Jason Gunthorpe wrote: > >>> On Mon, Feb 11, 2019 at 12:16:42PM -0800, ira.we...@intel.com wrote: > From: Ir

Re: [PATCH v3 0/3 net-next] net: phy: disregard "Clause 22 registers present" bit in get_phy_c45_devs_in_pkg

2019-02-11 Thread David Miller
From: Heiner Kallweit Date: Mon, 11 Feb 2019 22:34:34 +0100 > On 11.02.2019 22:19, David Miller wrote: >> From: Heiner Kallweit >> Date: Fri, 8 Feb 2019 20:19:17 +0100 >> >>> Bit 0 in register 1.5 doesn't represent a device but is a flag that >>> Clause 22 registers are present. Therefore disre

Re: [PATCH 0/3] Add gup fast + longterm and use it in HFI1

2019-02-11 Thread Ira Weiny
On Mon, Feb 11, 2019 at 01:47:10PM -0700, Jason Gunthorpe wrote: > On Mon, Feb 11, 2019 at 12:34:17PM -0800, Davidlohr Bueso wrote: > > On Mon, 11 Feb 2019, ira.we...@intel.com wrote: > > > Ira Weiny (3): > > > mm/gup: Change "write" parameter to flags > > > mm/gup: Introduce get_user_pages_fast_

Re: [PATCHv1 net-next] devlink: Add WARN_ON to catch errors of not cleaning devlink objects

2019-02-11 Thread David Miller
From: Parav Pandit Date: Fri, 8 Feb 2019 15:15:00 -0600 > Add WARN_ON to make sure that all sub objects of a devlink device are > cleanedup before freeing the devlink device. > This helps to catch any driver bugs. > > Signed-off-by: Parav Pandit Applied, thanks.

Re: [PATCH net-next v4 0/9] net: Remove switchdev_ops

2019-02-11 Thread Ido Schimmel
On Mon, Feb 11, 2019 at 12:16:57PM -0800, David Miller wrote: > From: Florian Fainelli > Date: Mon, 11 Feb 2019 11:09:52 -0800 > > > David, I would like to get Ido's feedback on this to make sure I did not > > miss something, thank you! > > Ok, Ido please look at this when you can. Will review

Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread John Hubbard
On 2/11/19 1:26 PM, Ira Weiny wrote: > On Mon, Feb 11, 2019 at 01:13:56PM -0800, John Hubbard wrote: >> On 2/11/19 12:39 PM, Jason Gunthorpe wrote: >>> On Mon, Feb 11, 2019 at 12:16:42PM -0800, ira.we...@intel.com wrote: From: Ira Weiny >> [...] >> It seems to me that the longterm vs. short-t

Re: [PATCH v3 0/3 net-next] net: phy: disregard "Clause 22 registers present" bit in get_phy_c45_devs_in_pkg

2019-02-11 Thread Heiner Kallweit
On 11.02.2019 22:19, David Miller wrote: > From: Heiner Kallweit > Date: Fri, 8 Feb 2019 20:19:17 +0100 > >> Bit 0 in register 1.5 doesn't represent a device but is a flag that >> Clause 22 registers are present. Therefore disregard this bit when >> populating the device list. If code needs this

[PATCH net-next] net: phy: simplify genphy_config_eee_advert

2019-02-11 Thread Heiner Kallweit
Use new function phy_modify_mmd_changed(), the result speaks for itself. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 27 ++- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c in

Re: [PATCH 0/3] Add gup fast + longterm and use it in HFI1

2019-02-11 Thread Ira Weiny
On Mon, Feb 11, 2019 at 12:34:17PM -0800, Davidlohr Bueso wrote: > On Mon, 11 Feb 2019, ira.we...@intel.com wrote: > > Ira Weiny (3): > > mm/gup: Change "write" parameter to flags > > mm/gup: Introduce get_user_pages_fast_longterm() > > IB/HFI1: Use new get_user_pages_fast_longterm() > > Out of

Re: [PATCH 2/3] mm/gup: Introduce get_user_pages_fast_longterm()

2019-02-11 Thread Ira Weiny
On Mon, Feb 11, 2019 at 01:13:56PM -0800, John Hubbard wrote: > On 2/11/19 12:39 PM, Jason Gunthorpe wrote: > > On Mon, Feb 11, 2019 at 12:16:42PM -0800, ira.we...@intel.com wrote: > >> From: Ira Weiny > [...] > >> +static inline int get_user_pages_fast_longterm(unsigned long start, int > >> nr_p

Re: Kernel memory corruption in CIPSO labeled TCP packets processing.

2019-02-11 Thread Nazarov Sergey
Hi, Paul! What I need to do for this? 11.02.2019, 23:37, "Paul Moore" : > On Thu, Jan 31, 2019 at 8:20 AM Nazarov Sergey wrote: >>  31.01.2019, 05:10, "Paul Moore" : >>  > This isn't how the rest of the stack works, look at >>  > ip_local_deliver_finish() for one example. Perhaps the behavior you

Re: [PATCH net] net/x25: do not hold the cpu too long in x25_new_lci()

2019-02-11 Thread David Miller
From: Eric Dumazet Date: Fri, 8 Feb 2019 12:41:05 -0800 > Due to quadratic behavior of x25_new_lci(), syzbot was able > to trigger an rcu stall. > > Fix this by not blocking BH for the whole duration of > the function, and inserting a reschedule point when possible. > > If we care enough, usin

Re: [PATCH v3 0/3 net-next] net: phy: disregard "Clause 22 registers present" bit in get_phy_c45_devs_in_pkg

2019-02-11 Thread David Miller
From: Heiner Kallweit Date: Fri, 8 Feb 2019 20:19:17 +0100 > Bit 0 in register 1.5 doesn't represent a device but is a flag that > Clause 22 registers are present. Therefore disregard this bit when > populating the device list. If code needs this information it > should read register 1.5 directly

[PATCH net-next 0/3] Remove getting SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS

2019-02-11 Thread Florian Fainelli
Hi all, AFAICT there is no code that attempts to get the value of the attribute SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS while it is used with switchdev_port_attr_set(). This is effectively no doing anything and it can slow down future work that tries to make modifications in these areas so remove tha

[PATCH net-next 3/3] staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS

2019-02-11 Thread Florian Fainelli
There is no code that tries to get the attribute SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, remove support for doing that. Signed-off-by: Florian Fainelli --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/driv

[PATCH net-next 2/3] rocker: Remove getting PORT_BRIDGE_FLAGS

2019-02-11 Thread Florian Fainelli
There is no code that attempts to get the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute, remove support for that. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/rocker/rocker.h | 2 -- drivers/net/ethernet/rocker/rocker_main.c | 15 --- drivers/net/ethernet/rocker/r

[PATCH net-next 1/3] mlxsw: spectrum_switchdev: Remove getting PORT_BRIDGE_FLAGS

2019-02-11 Thread Florian Fainelli
There is no code that will query the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute remove support for that. Signed-off-by: Florian Fainelli --- .../mellanox/mlxsw/spectrum_switchdev.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxs

RE: [PATCH 0/3] Add gup fast + longterm and use it in HFI1

2019-02-11 Thread Weiny, Ira
> > On Mon, Feb 11, 2019 at 12:16:40PM -0800, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > NOTE: This series depends on my clean up patch to remove the write > > parameter from gup_fast_permitted()[1] > > > > HFI1 uses get_user_pages_fast() due to it performance advantages. > > Like RDM

  1   2   3   >