Re: [RFC 04/20] RDMA/irdma: Add driver framework definitions

2019-10-04 Thread Leon Romanovsky
On Fri, Oct 04, 2019 at 05:46:15PM -0700, Jeff Kirsher wrote: > On Fri, 2019-10-04 at 23:45 +, Jason Gunthorpe wrote: > > On Fri, Oct 04, 2019 at 01:12:22PM -0700, Jeff Kirsher wrote: > > > > > > > + if (ldev->version.major != I40E_CLIENT_VERSION_MAJOR || > > > > > + ldev->version.m

[patch net-next 1/3] net: devlink: export devlink net setter

2019-10-04 Thread Jiri Pirko
From: Jiri Pirko For newly allocated devlink instance allow drivers to set net struct Signed-off-by: Jiri Pirko --- include/net/devlink.h | 2 ++ net/core/devlink.c| 15 --- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/net/devlink.h b/include/net/dev

[patch net-next 3/3] selftests: test creating netdevsim inside network namespace

2019-10-04 Thread Jiri Pirko
From: Jiri Pirko Add a test that creates netdevsim instance inside network namespace and verifies that the related devlink instance and port netdevices reside in the namespace. Signed-off-by: Jiri Pirko --- .../drivers/net/netdevsim/devlink_in_netns.sh | 72 +++ tools/testing/s

[patch net-next 2/3] netdevsim: create devlink and netdev instances in namespace

2019-10-04 Thread Jiri Pirko
From: Jiri Pirko When user does create new netdevsim instance using sysfs bus file, create the devlink instance and related netdev instance in the namespace of the caller. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/bus.c | 1 + drivers/net/netdevsim/dev.c | 1 + drivers/ne

[patch net-next 0/3] create netdevsim instances in namespace

2019-10-04 Thread Jiri Pirko
From: Jiri Pirko Allow user to create netdevsim devlink and netdevice instances in a network namespace according to the namespace where the user resides in. Add a selftest to test this. Jiri Pirko (3): net: devlink: export devlink net setter netdevsim: create devlink and netdev instances in

Re: [PATCH bpf-next 07/10] bpf: add support for BTF pointers to x86 JIT

2019-10-04 Thread Eric Dumazet
On 10/4/19 10:03 PM, Alexei Starovoitov wrote: > Pointer to BTF object is a pointer to kernel object or NULL. > Such pointers can only be used by BPF_LDX instructions. > The verifier changed their opcode from LDX|MEM|size > to LDX|PROBE_MEM|size to make JITing easier. > The number of entries in

[PATCH bpf-next 07/10] bpf: add support for BTF pointers to x86 JIT

2019-10-04 Thread Alexei Starovoitov
Pointer to BTF object is a pointer to kernel object or NULL. Such pointers can only be used by BPF_LDX instructions. The verifier changed their opcode from LDX|MEM|size to LDX|PROBE_MEM|size to make JITing easier. The number of entries in extable is the number of BPF_LDX insns that access kernel me

[PATCH bpf-next 06/10] bpf: add support for BTF pointers to interpreter

2019-10-04 Thread Alexei Starovoitov
Pointer to BTF object is a pointer to kernel object or NULL. The memory access in the interpreter has to be done via probe_kernel_read to avoid page faults. Signed-off-by: Alexei Starovoitov --- include/linux/filter.h | 3 +++ kernel/bpf/core.c | 19 +++ kernel/bpf/verifier

[PATCH bpf-next 08/10] bpf: check types of arguments passed into helpers

2019-10-04 Thread Alexei Starovoitov
Introduce new helper that reuses existing skb perf_event output implementation, but can be called from raw_tracepoint programs that receive 'struct sk_buff *' as tracepoint argument or can walk other kernel data structures to skb pointer. In order to do that teach verifier to resolve true C types

[PATCH bpf-next 03/10] bpf: process in-kernel BTF

2019-10-04 Thread Alexei Starovoitov
If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux' for further use by the verifier. In-kernel BTF is trusted just like kallsyms and other build artifacts embedded into vmlinux. Yet run this BTF image through BTF verifier to make sure that it is valid and it wasn't mangled during

[PATCH bpf-next 00/10] bpf: revolutionize bpf tracing

2019-10-04 Thread Alexei Starovoitov
Revolutionize bpf tracing and bpf C programming. C language allows any pointer to be typecasted to any other pointer or convert integer to a pointer. Though bpf verifier is operating at assembly level it has strict type checking for fixed number of types. Known types are defined in 'enum bpf_reg_ty

[PATCH bpf-next 01/10] bpf: add typecast to raw_tracepoints to help BTF generation

2019-10-04 Thread Alexei Starovoitov
When pahole converts dwarf to btf it emits only used types. Wrap existing __bpf_trace_##template() function into btf_trace_##template typedef and use it in type cast to make gcc emits this type into dwarf. Then pahole will convert it to btf. The "btf_trace_" prefix will be used to identify BTF enab

[PATCH bpf-next 02/10] bpf: add typecast to bpf helpers to help BTF generation

2019-10-04 Thread Alexei Starovoitov
When pahole converts dwarf to btf it emits only used types. Wrap existing bpf helper functions into typedef and use it in typecast to make gcc emits this type into dwarf. Then pahole will convert it to btf. The "btf_#name_of_helper" types will be used to figure out types of arguments of bpf helpers

[PATCH bpf-next 09/10] bpf: disallow bpf_probe_read[_str] helpers

2019-10-04 Thread Alexei Starovoitov
Disallow bpf_probe_read() and bpf_probe_read_str() helpers in raw_tracepoint bpf programs that use in-kernel BTF to track types of memory accesses. Signed-off-by: Alexei Starovoitov --- kernel/trace/bpf_trace.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/trace/bpf_trace.c b/ke

[PATCH bpf-next 10/10] selftests/bpf: add kfree_skb raw_tp test

2019-10-04 Thread Alexei Starovoitov
Load basic cls_bpf program. Load raw_tracepoint program and attach to kfree_skb raw tracepoint. Trigger cls_bpf via prog_test_run. At the end of test_run kernel will call kfree_skb which will trigger trace_kfree_skb tracepoint. Which will call our raw_tracepoint program. Which will take that skb an

[PATCH bpf-next 05/10] bpf: implement accurate raw_tp context access via BTF

2019-10-04 Thread Alexei Starovoitov
libbpf analyzes bpf C program, searches in-kernel BTF for given type name and stores it into expected_attach_type. The kernel verifier expects this btf_id to point to something like: typedef void (*btf_trace_kfree_skb)(void *, struct sk_buff *skb, void *loc); which represents signature of raw_trace

[PATCH bpf-next 04/10] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-04 Thread Alexei Starovoitov
For raw tracepoint program types libbpf will try to find btf_id of raw tracepoint in vmlinux's BTF. It's a responsiblity of bpf program author to annotate the program with SEC("raw_tracepoint/name") where "name" is a valid raw tracepoint. If "name" is indeed a valid raw tracepoint then in-kernel BT

Re: [RFC PATCH] net: hns3: add devlink health dump support for hw mac tbl

2019-10-04 Thread Yunsheng Lin
On 2019/9/30 17:27, Jiri Pirko wrote: > Sun, Sep 29, 2019 at 02:13:43PM CEST, linyunsh...@huawei.com wrote: >> This patch adds the devlink health dump support for hw mac tbl, >> which helps to debug some hardware packet switching problem or >> misconfiguation of the hardware mac table. > > So you

Re: [PATCH net] selftests/net: add nettest to .gitignore

2019-10-04 Thread David Miller
From: Jakub Kicinski Date: Fri, 4 Oct 2019 17:36:50 -0700 > nettest is missing from gitignore. > > Fixes: acda655fefae ("selftests: Add nettest") > Signed-off-by: Jakub Kicinski Applied.

Re: [PATCH net] nfc: fix memory leak in llcp_sock_bind()

2019-10-04 Thread David Miller
From: Eric Dumazet Date: Fri, 4 Oct 2019 11:08:34 -0700 > sysbot reported a memory leak after a bind() has failed. > > While we are at it, abort the operation if kmemdup() has failed. > > BUG: memory leak ... > Fixes: 30cc4587659e ("NFC: Move LLCP code to the NFC top level diirectory") > Sign

Re: [PATCH net] sch_dsmark: fix potential NULL deref in dsmark_init()

2019-10-04 Thread David Miller
From: Eric Dumazet Date: Fri, 4 Oct 2019 10:34:45 -0700 > Make sure TCA_DSMARK_INDICES was provided by the user. > > syzbot reported : ... > Fixes: 758cc43c6d73 ("[PKT_SCHED]: Fix dsmark to apply changes consistent") > Signed-off-by: Eric Dumazet > Reported-by: syzbot Applied and queued up

Re: [PATCH net v2 0/4] Fix regression with AR8035 speed downgrade

2019-10-04 Thread David Miller
From: Russell King - ARM Linux admin Date: Fri, 4 Oct 2019 17:05:25 +0100 > The following series attempts to address an issue spotted by tinywrkb > with the AR8035 on the Cubox-i2 in a situation where the PHY downgrades > the negotiated link. ... Series applied.

Re: [PATCH net] ipv6: Handle missing host route in __ipv6_ifa_notify

2019-10-04 Thread David Miller
From: David Ahern Date: Fri, 4 Oct 2019 08:03:09 -0700 > From: David Ahern > > Rajendra reported a kernel panic when a link was taken down: > > [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at > 00a8 > [ 6870.271856] IP: [] __ipv6_ifa_notify+0x154/0

Re: [PATCH] net: phy: allow for reset line to be tied to a sleepy GPIO controller

2019-10-04 Thread David Miller
From: Andrea Merello Date: Fri, 4 Oct 2019 15:53:32 +0200 > mdio_device_reset() makes use of the atomic-pretending API flavor for > handling the PHY reset GPIO line. > > I found no hint that mdio_device_reset() is called from atomic context > and indeed it uses usleep_range() since long time, s

Re: [PATCH v2 net-next 1/2] net: dsa: Add support for devlink device parameters

2019-10-04 Thread Andrew Lunn
On Fri, Oct 04, 2019 at 08:21:22PM -0400, Vivien Didelot wrote: > On Fri, 4 Oct 2019 23:09:33 +0200, Andrew Lunn wrote: > > Add plumbing to allow DSA drivers to register parameters with devlink. > > > > To keep with the abstraction, the DSA drivers pass the ds structure to > > these helpers, and

Re: [RFC 04/20] RDMA/irdma: Add driver framework definitions

2019-10-04 Thread Jeff Kirsher
On Fri, 2019-10-04 at 23:45 +, Jason Gunthorpe wrote: > On Fri, Oct 04, 2019 at 01:12:22PM -0700, Jeff Kirsher wrote: > > > > > + if (ldev->version.major != I40E_CLIENT_VERSION_MAJOR || > > > > + ldev->version.minor != I40E_CLIENT_VERSION_MINOR) { > > > > + pr_err

[PATCH net] selftests/net: add nettest to .gitignore

2019-10-04 Thread Jakub Kicinski
nettest is missing from gitignore. Fixes: acda655fefae ("selftests: Add nettest") Signed-off-by: Jakub Kicinski --- tools/testing/selftests/net/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/.gitignore b/tools/testing/selftests/net/.gitignore index c7

Re: [PATCH v2 net-next 2/2] net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm.

2019-10-04 Thread Vivien Didelot
Hi Andrew, On Fri, 4 Oct 2019 23:09:34 +0200, Andrew Lunn wrote: > Some of the marvell switches have bits controlling the hash algorithm > the ATU uses for MAC addresses. In some industrial settings, where all > the devices are from the same manufacture, and hence use the same OUI, > the default

Re: [PATCH net] net: ipv4: avoid mixed n_redirects and rate_tokens usage

2019-10-04 Thread David Miller
From: Paolo Abeni Date: Fri, 4 Oct 2019 15:11:17 +0200 > Since commit c09551c6ff7f ("net: ipv4: use a dedicated counter > for icmp_v4 redirect packets") we use 'n_redirects' to account > for redirect packets, but we still use 'rate_tokens' to compute > the redirect packets exponential backoff. >

Re: [PATCH] r8152: Set macpassthru in reset_resume callback

2019-10-04 Thread David Miller
From: Kai-Heng Feng Date: Fri, 4 Oct 2019 20:51:04 +0800 > r8152 may fail to establish network connection after resume from system > suspend. > > If the USB port connects to r8152 lost its power during system suspend, > the MAC address was written before is lost. The reason is that The MAC > ad

Re: [PATCH] net: dsa: sja1105: Make function sja1105_xfer_long_buf static

2019-10-04 Thread David Miller
From: zhengbin Date: Fri, 4 Oct 2019 17:57:30 +0800 > Fix sparse warnings: > > drivers/net/dsa/sja1105/sja1105_spi.c:159:5: warning: symbol > 'sja1105_xfer_long_buf' was not declared. Should it be static? > > Reported-by: Hulk Robot > Signed-off-by: zhengbin Applied.

Re: [PATCH v2 net-next 1/2] net: dsa: Add support for devlink device parameters

2019-10-04 Thread Vivien Didelot
On Fri, 4 Oct 2019 23:09:33 +0200, Andrew Lunn wrote: > Add plumbing to allow DSA drivers to register parameters with devlink. > > To keep with the abstraction, the DSA drivers pass the ds structure to > these helpers, and the DSA core then translates that to the devlink > structure associated t

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-10-04 Thread Jakub Kicinski
On Fri, 4 Oct 2019 16:23:40 -0700, Cong Wang wrote: > On Fri, Oct 4, 2019 at 3:54 PM Jakub Kicinski wrote: > > On Thu, 3 Oct 2019 16:45:25 -0300, Marcelo Ricardo Leitner wrote: > > > On Sat, Sep 21, 2019 at 07:24:34PM -0700, Jakub Kicinski wrote: > > > > Applied, queued for 4.14+, thanks! > >

Re: [RFC 04/20] RDMA/irdma: Add driver framework definitions

2019-10-04 Thread Jason Gunthorpe
On Fri, Oct 04, 2019 at 01:12:22PM -0700, Jeff Kirsher wrote: > > > + if (ldev->version.major != I40E_CLIENT_VERSION_MAJOR || > > > + ldev->version.minor != I40E_CLIENT_VERSION_MINOR) { > > > + pr_err("version mismatch:\n"); > > > + pr_err("expected major ver %d, caller specifi

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-04 Thread Andrii Nakryiko
On Fri, Oct 4, 2019 at 3:51 PM Andrii Nakryiko wrote: > > On Fri, Oct 4, 2019 at 3:47 PM Andrii Nakryiko > wrote: > > > > On Fri, Oct 4, 2019 at 2:58 PM Daniel Borkmann wrote: > > > > > > On Fri, Oct 04, 2019 at 11:06:13PM +0200, Daniel Borkmann wrote: > > > > On Fri, Oct 04, 2019 at 01:21:55PM

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-10-04 Thread Cong Wang
On Fri, Oct 4, 2019 at 3:54 PM Jakub Kicinski wrote: > > On Thu, 3 Oct 2019 16:45:25 -0300, Marcelo Ricardo Leitner wrote: > > On Sat, Sep 21, 2019 at 07:24:34PM -0700, Jakub Kicinski wrote: > > > Applied, queued for 4.14+, thanks! > > > > Ahm, this breaks some user applications. > > > > I'm getti

Re: [RFC PATCH net-next 12/15] ipv4: Add "in hardware" indication to routes

2019-10-04 Thread David Ahern
On 10/4/19 11:43 AM, Roopa Prabhu wrote: > On Fri, Oct 4, 2019 at 9:38 AM David Ahern wrote: >> >> On 10/4/19 8:43 AM, Ido Schimmel wrote: Sounds like there are 2 cases for prefixes that should be flagged to the user -- "offloaded" (as in traffic is offloaded) and "in_hw" (prefix is >>>

[PATCH net-next 5/6] net/tls: add TlsDecryptError stat

2019-10-04 Thread Jakub Kicinski
Add a statistic for TLS record decryption errors. Since devices are supposed to pass records as-is when they encounter errors this statistic will count bad records in both pure software and inline crypto configurations. Signed-off-by: Jakub Kicinski --- Documentation/networking/tls.rst | 3 +++

[PATCH net-next 6/6] net/tls: add TlsDeviceRxResync statistic

2019-10-04 Thread Jakub Kicinski
Add a statistic for number of RX resyncs sent down to the NIC. Signed-off-by: Jakub Kicinski --- Documentation/networking/tls.rst | 3 +++ include/uapi/linux/snmp.h| 1 + net/tls/tls_device.c | 1 + net/tls/tls_proc.c | 1 + 4 files changed, 6 insertions(+) dif

[PATCH net-next 3/6] net/tls: add skeleton of MIB statistics

2019-10-04 Thread Jakub Kicinski
Add a skeleton structure for adding TLS statistics. Signed-off-by: Jakub Kicinski --- Documentation/networking/tls.rst | 6 ++ include/net/netns/mib.h | 3 +++ include/net/snmp.h | 6 ++ include/net/tls.h| 13 +++ include/uapi/linux/snmp.

[PATCH net-next 0/6] net/tls: add ctrl path tracing and statistics

2019-10-04 Thread Jakub Kicinski
Hi! This set adds trace events related to TLS offload and basic MIB stats for TLS. First patch contains the TLS offload related trace points. Those are helpful in troubleshooting offload issues, especially around the resync paths. Second patch adds a tracepoint to the fastpath of device offload,

[PATCH net-next 4/6] net/tls: add statistics for installed sessions

2019-10-04 Thread Jakub Kicinski
Add SNMP stats for number of sockets with successfully installed sessions. Break them down to software and hardware ones. Note that if hardware offload fails stack uses software implementation, and counts the session appropriately. Signed-off-by: Jakub Kicinski --- Documentation/networking/tls

[PATCH net-next 1/6] net/tls: add tracing for device/offload events

2019-10-04 Thread Jakub Kicinski
Add tracing of device-related interaction to aid performance analysis, especially around resync: tls:tls_device_offload_set tls:tls_device_rx_resync_send tls:tls_device_rx_resync_nh_schedule tls:tls_device_rx_resync_nh_delay tls:tls_device_tx_resync_req tls:tls_device_tx_resync_send Signed-

[PATCH net-next 2/6] net/tls: add device decrypted trace point

2019-10-04 Thread Jakub Kicinski
Add a tracepoint to the TLS offload's fast path. This tracepoint can be used to track the decrypted and encrypted status of received records. Records decrypted by the device should have decrypted set to 1, records which have neither decrypted nor decrypted set are partially decrypted, require re-en

Re: [PATCH bpf-next v2 2/5] bpf: Add support for setting chain call sequence for programs

2019-10-04 Thread Jakub Kicinski
On Fri, 04 Oct 2019 19:22:42 +0200, Toke Høiland-Jørgensen wrote: > From: Alan Maguire > > This adds support for setting and deleting bpf chain call programs through > a couple of new commands in the bpf() syscall. The CHAIN_ADD and CHAIN_DEL > commands take two eBPF program fds and a return code

Re: [PATCH bpf-next v2 1/5] bpf: Support injecting chain calls into BPF programs on load

2019-10-04 Thread Jakub Kicinski
On Fri, 04 Oct 2019 19:22:41 +0200, Toke Høiland-Jørgensen wrote: > From: Toke Høiland-Jørgensen > > This adds support for injecting chain call logic into eBPF programs before > they return. The code injection is controlled by a flag at program load > time; if the flag is set, the verifier will a

Re: [linux-firmware][pull request] ice: Add package file for Intel E800 series driver

2019-10-04 Thread Josh Boyer
On Mon, Sep 23, 2019 at 5:56 PM Jeff Kirsher wrote: > > From: Tony Nguyen > > The ice driver must load a package file to the firmware to utilize full > functionality; add the package file to /lib/firmware/intel/ice/ddp. Also > add a symlink, ice.pkg, so the driver can refer to the package by a >

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-10-04 Thread Jakub Kicinski
On Thu, 3 Oct 2019 16:45:25 -0300, Marcelo Ricardo Leitner wrote: > On Sat, Sep 21, 2019 at 07:24:34PM -0700, Jakub Kicinski wrote: > > Applied, queued for 4.14+, thanks! > > Ahm, this breaks some user applications. > > I'm getting "Attribute failed policy validation" extack error while > addin

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-04 Thread Andrii Nakryiko
On Fri, Oct 4, 2019 at 3:47 PM Andrii Nakryiko wrote: > > On Fri, Oct 4, 2019 at 2:58 PM Daniel Borkmann wrote: > > > > On Fri, Oct 04, 2019 at 11:06:13PM +0200, Daniel Borkmann wrote: > > > On Fri, Oct 04, 2019 at 01:21:55PM -0700, Andrii Nakryiko wrote: > > > > On Fri, Oct 4, 2019 at 11:30 AM J

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-04 Thread Andrii Nakryiko
On Fri, Oct 4, 2019 at 2:58 PM Daniel Borkmann wrote: > > On Fri, Oct 04, 2019 at 11:06:13PM +0200, Daniel Borkmann wrote: > > On Fri, Oct 04, 2019 at 01:21:55PM -0700, Andrii Nakryiko wrote: > > > On Fri, Oct 4, 2019 at 11:30 AM Jakub Kicinski > > > wrote: > > > > On Fri, 4 Oct 2019 09:00:42 -07

[PATCH v3 bpf-next 4/4] selftests/bpf: switch tests to new bpf_object__open_{file,mem}() APIs

2019-10-04 Thread Andrii Nakryiko
Verify new bpf_object__open_mem() and bpf_object__open_file() APIs work as expected by switching test_attach_probe test to use embedded BPF object and bpf_object__open_mem() and test_reference_tracking to bpf_object__open_file(). Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/Mak

[PATCH v3 bpf-next 1/4] libbpf: stop enforcing kern_version, populate it for users

2019-10-04 Thread Andrii Nakryiko
Kernel version enforcement for kprobes/kretprobes was removed from 5.0 kernel in 6c4fc209fcf9 ("bpf: remove useless version check for prog load"). Since then, BPF programs were specifying SEC("version") just to please libbpf. We should stop enforcing this in libbpf, if even kernel doesn't care. Fur

[PATCH v3 bpf-next 3/4] libbpf: fix bpf_object__name() to actually return object name

2019-10-04 Thread Andrii Nakryiko
bpf_object__name() was returning file path, not name. Fix this. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index d471d33400ae..a02cdedc4e3f 100644 --- a/tools/lib/bp

[PATCH v3 bpf-next 2/4] libbpf: add bpf_object__open_{file,mem} w/ extensible opts

2019-10-04 Thread Andrii Nakryiko
Add new set of bpf_object__open APIs using new approach to optional parameters extensibility allowing simpler ABI compatibility approach. This patch demonstrates an approach to implementing libbpf APIs that makes it easy to extend existing APIs with extra optional parameters in such a way, that AB

[PATCH v3 bpf-next 0/4] Add new-style bpf_object__open APIs

2019-10-04 Thread Andrii Nakryiko
Add bpf_object__open_file() and bpf_object__open_mem() APIs that use a new approach to providing future-proof non-ABI-breaking API changes. It relies on APIs accepting optional self-describing "opts" struct, containing its own size, filled out and provided by potentially outdated (as well as newer-

samples/bpf not working?

2019-10-04 Thread Daniel T. Lee
Currently, building the bpf samples isn't working. Running make from the directory 'samples/bpf' will just shows following result without compiling any samples. $ make make -C ../../ /git/linux/samples/bpf/ BPF_SAMPLES_PATH=/git/linux/samples/bpf make[1]: Entering directory '/git/linux' CALL

Re: [patch net-next] net: devlink: don't ignore errors during dumpit

2019-10-04 Thread David Miller
From: Jiri Pirko Date: Fri, 4 Oct 2019 11:50:12 +0200 > From: Jiri Pirko > > Currently, some dumpit function may end-up with error which is not > -EMSGSIZE and this error is silently ignored. Use does not have clue > that something wrong happened. Instead of silent ignore, propagate > the erro

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-04 Thread Daniel Borkmann
On Fri, Oct 04, 2019 at 11:06:13PM +0200, Daniel Borkmann wrote: > On Fri, Oct 04, 2019 at 01:21:55PM -0700, Andrii Nakryiko wrote: > > On Fri, Oct 4, 2019 at 11:30 AM Jakub Kicinski > > wrote: > > > On Fri, 4 Oct 2019 09:00:42 -0700, Andrii Nakryiko wrote: > > > > On Fri, Oct 4, 2019 at 8:44 AM D

Re: [PATCH v2 net-next] net: dsa: sja1105: Add support for port mirroring

2019-10-04 Thread David Miller
From: Vladimir Oltean Date: Fri, 4 Oct 2019 03:33:47 +0300 > Amazingly, of all features, this does not require a switch reset. > > Tested with: > > tc qdisc add dev swp2 clsact > tc filter add dev swp2 ingress matchall skip_sw \ > action mirred egress mirror dev swp3 > tc filter show dev

Re: [PATCH net V2] cxgb4:Fix out-of-bounds MSI-X info array access

2019-10-04 Thread David Miller
From: Vishal Kulkarni Date: Fri, 4 Oct 2019 04:06:15 +0530 > When fetching free MSI-X vectors for ULDs, check for the error code > before accessing MSI-X info array. Otherwise, an out-of-bounds access is > attempted, which results in kernel panic. > > Fixes: 94cdb8bb993a ("cxgb4: Add support fo

Re: [PATCH v2 net-next 2/2] net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm.

2019-10-04 Thread Andrew Lunn
On Fri, Oct 04, 2019 at 02:32:36PM -0700, Jakub Kicinski wrote: > On Fri, 4 Oct 2019 23:09:34 +0200, Andrew Lunn wrote: > > diff --git a/Documentation/networking/devlink-params-mv88e6xxx.txt > > b/Documentation/networking/devlink-params-mv88e6xxx.txt > > new file mode 100644 > > index 000

Re: [PATCH v2 net-next 2/2] net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm.

2019-10-04 Thread Jakub Kicinski
On Fri, 4 Oct 2019 23:09:34 +0200, Andrew Lunn wrote: > diff --git a/Documentation/networking/devlink-params-mv88e6xxx.txt > b/Documentation/networking/devlink-params-mv88e6xxx.txt > new file mode 100644 > index ..cc5c1ac87c36 > --- /dev/null > +++ b/Documentation/networking/devlink-p

Re: [PATCH net] Revert "ipv6: Handle race in addrconf_dad_work"

2019-10-04 Thread David Miller
From: David Ahern Date: Thu, 3 Oct 2019 14:46:15 -0700 > From: David Ahern > > This reverts commit a3ce2a21bb8969ae27917281244fa91bf5f286d7. > > Eric reported tests failings with commit. After digging into it, > the bottom line is that the DAD sequence is not to be messed with. > There are to

Re: [PATCH] net: make sock_prot_memory_pressure() return "const char *"

2019-10-04 Thread David Miller
From: Alexey Dobriyan Date: Fri, 4 Oct 2019 00:44:40 +0300 > This function returns string literals which are "const char *". > > Signed-off-by: Alexey Dobriyan Applied.

Re: [PATCH] igmp: uninline ip_mc_validate_checksum()

2019-10-04 Thread David Miller
From: Alexey Dobriyan Date: Fri, 4 Oct 2019 00:26:52 +0300 > This function is only used via function pointer. > > "inline" doesn't hurt given that taking address of an inline function > forces out-of-line version but it doesn't help either. > > Signed-off-by: Alexey Dobriyan Applied.

Re: [patch net-next] net: devlink: don't ignore errors during dumpit

2019-10-04 Thread Jakub Kicinski
On Fri, 4 Oct 2019 11:50:12 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Currently, some dumpit function may end-up with error which is not > -EMSGSIZE and this error is silently ignored. Use does not have clue > that something wrong happened. Instead of silent ignore, propagate > the error t

Re: [PATCH net-next] net: spread "enum sock_flags"

2019-10-04 Thread David Miller
From: Alexey Dobriyan Date: Thu, 3 Oct 2019 23:56:37 +0300 > Some ints are "enum sock_flags" in fact. > > Signed-off-by: Alexey Dobriyan Applied.

Re: [PATCH net-next] net, uapi: fix -Wpointer-arith warnings

2019-10-04 Thread David Miller
From: Alexey Dobriyan Date: Thu, 3 Oct 2019 23:29:24 +0300 > Add casts to fix these warnings: > > ./usr/include/linux/netfilter_arp/arp_tables.h:200:19: error: pointer of type > 'void *' used in arithmetic [-Werror=pointer-arith] > ./usr/include/linux/netfilter_bridge/ebtables.h:197:19: error:

Re: [PATCH bpf-next v2 1/5] bpf: Support injecting chain calls into BPF programs on load

2019-10-04 Thread kbuild test robot
Hi "Toke, I love your patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/bpf-Support-injecting-chain-calls-into-BPF-programs-on-load/20191005-035650 base: https://git.kernel.org/pub/scm/linu

Re: [PATCH] can: flexcan: use devm_platform_ioremap_resource() to simplify code

2019-10-04 Thread Marc Kleine-Budde
On 9/29/19 10:32 AM, Joakim Zhang wrote: > Use the new helper devm_platform_ioremap_resource() which wraps the > platform_get_resource() and devm_ioremap_resource() together to simplify > the code. > > Signed-off-by: Joakim Zhang Applied to linux-can-next. tnx, Marc -- Pengutronix e.K.

[PATCH v2 net-next 1/2] net: dsa: Add support for devlink device parameters

2019-10-04 Thread Andrew Lunn
Add plumbing to allow DSA drivers to register parameters with devlink. To keep with the abstraction, the DSA drivers pass the ds structure to these helpers, and the DSA core then translates that to the devlink structure associated to the device. Signed-off-by: Andrew Lunn --- include/net/dsa.h

[PATCH v2 net-next 2/2] net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm.

2019-10-04 Thread Andrew Lunn
Some of the marvell switches have bits controlling the hash algorithm the ATU uses for MAC addresses. In some industrial settings, where all the devices are from the same manufacture, and hence use the same OUI, the default hashing algorithm is not optimal. Allow the other algorithms to be selected

[PATCH v2 net-next 0/2] mv88e6xxx: Allow config of ATU hash algorithm

2019-10-04 Thread Andrew Lunn
The Marvell switches allow the hash algorithm for MAC addresses in the address translation unit to be configured. Add support to the DSA core to allow DSA drivers to make use of devlink parameters, and allow the ATU hash to be get/set via such a parameter. v2: Pass a pointer for where the hash sh

Re: [PATCH net-next 0/6] net/tls: separate the TLS TOE code out

2019-10-04 Thread David Miller
From: Jakub Kicinski Date: Thu, 3 Oct 2019 11:18:53 -0700 > We have 3 modes of operation of TLS - software, crypto offload > (Mellanox, Netronome) and TCP Offload Engine-based (Chelsio). > The last one takes over the socket, like any TOE would, and > is not really compatible with how we want to

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-04 Thread Daniel Borkmann
On Fri, Oct 04, 2019 at 01:21:55PM -0700, Andrii Nakryiko wrote: > On Fri, Oct 4, 2019 at 11:30 AM Jakub Kicinski > wrote: > > On Fri, 4 Oct 2019 09:00:42 -0700, Andrii Nakryiko wrote: > > > On Fri, Oct 4, 2019 at 8:44 AM David Ahern wrote: > > >> > I'm not following you; my interpretation of you

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-04 Thread Jakub Kicinski
On Fri, 4 Oct 2019 18:37:44 +, Yonghong Song wrote: > > Having a header which works today, but may not work tomorrow is going > > to be pretty bad user experience :( No matter how many warnings you put > > in the source people will get caught off guard by this :( > > > > If you define the curr

Re: [PATCH] qmi_wwan: add support for Cinterion CLS8 devices

2019-10-04 Thread David Miller
From: Reinhard Speyerer Date: Thu, 3 Oct 2019 18:34:39 +0200 > Add support for Cinterion CLS8 devices. > Use QMI_QUIRK_SET_DTR as required for Qualcomm MDM9x07 chipsets. ... > Signed-off-by: Reinhard Speyerer Applied.

Re: [PATCH bpf-next v2 1/5] bpf: Support injecting chain calls into BPF programs on load

2019-10-04 Thread kbuild test robot
Hi "Toke, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/bpf-Support-injecting-chain-calls-into-BPF-programs-on-load/20191005-035650 base: https://git.kernel.org/pub/scm/linux/kern

Re: [patch net-next v3 11/15] netdevsim: implement proper devlink reload

2019-10-04 Thread Jiri Pirko
Fri, Oct 04, 2019 at 07:42:17PM CEST, jakub.kicin...@netronome.com wrote: >On Fri, 4 Oct 2019 08:19:14 +0200, Jiri Pirko wrote: >> >> @@ -84,20 +82,10 @@ int nsim_fib_set_max(struct nsim_fib_data *fib_data, >> >> entry = &fib_data->ipv6.rules; >> >> break; >> >> default: >> >>

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-04 Thread Andrii Nakryiko
On Fri, Oct 4, 2019 at 11:30 AM Jakub Kicinski wrote: > > On Fri, 4 Oct 2019 09:00:42 -0700, Andrii Nakryiko wrote: > > On Fri, Oct 4, 2019 at 8:44 AM David Ahern wrote: > >> > I'm not following you; my interpretation of your comment seems like you > > > are making huge assumptions. > > > > > > I

Re: [RFC 04/20] RDMA/irdma: Add driver framework definitions

2019-10-04 Thread Jeff Kirsher
On Thu, 2019-09-26 at 20:30 +0300, Leon Romanovsky wrote: > On Thu, Sep 26, 2019 at 09:45:03AM -0700, Jeff Kirsher wrote: > > From: Mustafa Ismail > > > > Register irdma as a platform driver capable of supporting platform > > devices from multi-generation RDMA capable Intel HW. Establish the > >

Re: trace_printk issue. Was: [PATCH bpf-next] bpf, capabilities: introduce CAP_BPF

2019-10-04 Thread Alexei Starovoitov
On 10/3/19 9:41 AM, Steven Rostedt wrote: > On Thu, 3 Oct 2019 09:18:40 -0700 > Alexei Starovoitov wrote: > >> I think dropping last events is just as bad. Is there a mode to overwrite old >> and keep the last N (like perf does) ? > > Well, it drops it by pages. Thus you should always have the l

Re: [PATCH bpf-next 1/2] bpf, x86: Small optimization in comparing against imm0

2019-10-04 Thread Alexei Starovoitov
On Thu, Oct 3, 2019 at 2:08 PM John Fastabend wrote: > > Song Liu wrote: > > On Wed, Oct 2, 2019 at 5:30 PM Daniel Borkmann wrote: > > > > > > Replace 'cmp reg, 0' with 'test reg, reg' for comparisons against > > > zero. Saves 1 byte of instruction encoding per occurrence. The flag > > > results

RE: [Intel-wired-lan] [PATCH] ixgbe: Remove duplicate clear_bit() call

2019-10-04 Thread Bowers, AndrewX
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Igor Pylypiv > Sent: Thursday, October 3, 2019 11:54 PM > To: Kirsher, Jeffrey T ; David S . Miller > > Cc: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org; Igor Pylypiv > > Su

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-04 Thread Yonghong Song
On 10/4/19 11:30 AM, Jakub Kicinski wrote: > On Fri, 4 Oct 2019 09:00:42 -0700, Andrii Nakryiko wrote: >> On Fri, Oct 4, 2019 at 8:44 AM David Ahern wrote: I'm not following you; my interpretation of your comment seems like you >>> are making huge assumptions. >>> >>> I build bpf programs f

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-04 Thread Jakub Kicinski
On Fri, 4 Oct 2019 09:00:42 -0700, Andrii Nakryiko wrote: > On Fri, Oct 4, 2019 at 8:44 AM David Ahern wrote: >> > I'm not following you; my interpretation of your comment seems like you > > are making huge assumptions. > > > > I build bpf programs for specific kernel versions using the devel > >

Re: [PATCH 3/3] dpaa2-eth: Avoid unbounded while loops

2019-10-04 Thread Andrew Lunn
On Fri, Oct 04, 2019 at 12:21:33PM +0300, Ioana Ciornei wrote: > From: Ioana Radulescu > > Throughout the driver there are several places where we wait > indefinitely for DPIO portal commands to be executed, while > the portal returns a busy response code. > > Even though in theory we are guaran

Re: [PATCH net] ipv6: Handle missing host route in __ipv6_ifa_notify

2019-10-04 Thread Eric Dumazet
On 10/4/19 8:03 AM, David Ahern wrote: > From: David Ahern > > Rajendra reported a kernel panic when a link was taken down: > > > up. There is a race between addrcond_dad_work getting scheduled and > taking the rtnl lock and a process taking the link down (under rtnl). > The latter removes

Re: [patch net-next v3 00/15] devlink: allow devlink instances to change network namespace

2019-10-04 Thread David Miller
From: Jiri Pirko Date: Thu, 3 Oct 2019 11:49:25 +0200 > Devlink from the beginning counts with network namespaces, but the > instances has been fixed to init_net. > > Implement change of network namespace as part of "devlink reload" > procedure like this: > > $ ip netns add testns1 > $ devlink

[PATCH net] nfc: fix memory leak in llcp_sock_bind()

2019-10-04 Thread Eric Dumazet
sysbot reported a memory leak after a bind() has failed. While we are at it, abort the operation if kmemdup() has failed. BUG: memory leak unreferenced object 0x888105d83ec0 (size 32): comm "syz-executor067", pid 7207, jiffies 4294956228 (age 19.430s) hex dump (first 32 bytes): 00 69

Re: [PATCH bpf-next v2 2/2] selftests/bpf: add test for BPF flow dissector in the root namespace

2019-10-04 Thread Song Liu
On Fri, Oct 4, 2019 at 8:58 AM Stanislav Fomichev wrote: > > Make sure non-root namespaces get an error if root flow dissector is > attached. > > Cc: Petar Penkov > Signed-off-by: Stanislav Fomichev Acked-by: Song Liu

Re: [PATCH bpf-next v2 1/2] bpf/flow_dissector: add mode to enforce global BPF flow dissector

2019-10-04 Thread Song Liu
On Fri, Oct 4, 2019 at 8:58 AM Stanislav Fomichev wrote: > > Always use init_net flow dissector BPF program if it's attached and fall > back to the per-net namespace one. Also, deny installing new programs if > there is already one attached to the root namespace. > Users can still detach their BPF

Re: [PATCH net v2 2/4] net: phy: extract link partner advertisement reading

2019-10-04 Thread Andrew Lunn
On Fri, Oct 04, 2019 at 05:06:04PM +0100, Russell King wrote: > Move reading the link partner advertisement out of genphy_read_status() > into its own separate function. This will allow re-use of this code by > PHY drivers that are able to read the resolved status from the PHY. > > Tested-by: tin

Re: [RFC PATCH net-next 12/15] ipv4: Add "in hardware" indication to routes

2019-10-04 Thread Roopa Prabhu
On Fri, Oct 4, 2019 at 9:38 AM David Ahern wrote: > > On 10/4/19 8:43 AM, Ido Schimmel wrote: > >> Sounds like there are 2 cases for prefixes that should be flagged to the > >> user -- "offloaded" (as in traffic is offloaded) and "in_hw" (prefix is > >> in hardware but forwarding is not offloaded

Re: [patch net-next v3 11/15] netdevsim: implement proper devlink reload

2019-10-04 Thread Jakub Kicinski
On Fri, 4 Oct 2019 08:19:14 +0200, Jiri Pirko wrote: > >> @@ -84,20 +82,10 @@ int nsim_fib_set_max(struct nsim_fib_data *fib_data, > >>entry = &fib_data->ipv6.rules; > >>break; > >>default: > >> - return 0; > >> - } > >> - > >> - /* not allowing a new max to b

[PATCH net] sch_dsmark: fix potential NULL deref in dsmark_init()

2019-10-04 Thread Eric Dumazet
Make sure TCA_DSMARK_INDICES was provided by the user. syzbot reported : kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] PREEMPT SMP KASAN CPU: 1 PID: 8799 Comm: syz-executor235 Not tainted 5.3.0+ #0 Hardwar

[PATCH bpf-next v2 5/5] selftests: Add tests for XDP chain calls

2019-10-04 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen This adds new self tests for the XDP chain call functionality. Signed-off-by: Toke Høiland-Jørgensen --- tools/testing/selftests/bpf/.gitignore|1 tools/testing/selftests/bpf/Makefile |3 tools/testing/selftests/bpf/progs/xdp_dummy.c |

[PATCH bpf-next v2 4/5] libbpf: Add syscall wrappers for BPF_PROG_CHAIN_* commands

2019-10-04 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen This adds simple syscall wrappers for the new BPF_PROG_CHAIN_* commands to libbpf. Signed-off-by: Toke Høiland-Jørgensen --- tools/lib/bpf/bpf.c | 34 ++ tools/lib/bpf/bpf.h |4 tools/lib/bpf/libbpf.map |3 ++

[PATCH bpf-next v2 2/5] bpf: Add support for setting chain call sequence for programs

2019-10-04 Thread Toke Høiland-Jørgensen
From: Alan Maguire This adds support for setting and deleting bpf chain call programs through a couple of new commands in the bpf() syscall. The CHAIN_ADD and CHAIN_DEL commands take two eBPF program fds and a return code, and install the 'next' program to be chain called after the 'prev' program

[PATCH bpf-next v2 0/5] xdp: Support multiple programs on a single interface through chain calls

2019-10-04 Thread Toke Høiland-Jørgensen
This series adds support for executing multiple XDP programs on a single interface in sequence, through the use of chain calls, as discussed at the Linux Plumbers Conference last month: https://linuxplumbersconf.org/event/4/contributions/460/ # HIGH-LEVEL IDEA Since the response to the previous

  1   2   >