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

2019-10-03 Thread Bjørn Mork
Reinhard Speyerer writes: > Add support for Cinterion CLS8 devices. > Use QMI_QUIRK_SET_DTR as required for Qualcomm MDM9x07 chipsets. Acked-by: Bjørn Mork

[PATCH] ixgbe: Remove duplicate clear_bit() call

2019-10-03 Thread Igor Pylypiv
__IXGBE_RX_BUILD_SKB_ENABLED bit is already cleared. Signed-off-by: Igor Pylypiv --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 1ce2397306b9.

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

2019-10-03 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > 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 optiona

Re: [patch net-next v3 12/15] netdevsim: register port netdevices into net of device

2019-10-03 Thread Jiri Pirko
Fri, Oct 04, 2019 at 01:21:21AM CEST, jakub.kicin...@netronome.com wrote: >On Thu, 3 Oct 2019 11:49:37 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Register newly created port netdevice into net namespace >> that the parent device belongs to. >> >> Signed-off-by: Jiri Pirko > >Acked-by:

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

2019-10-03 Thread Jiri Pirko
Fri, Oct 04, 2019 at 01:17:30AM CEST, jakub.kicin...@netronome.com wrote: >On Thu, 3 Oct 2019 11:49:36 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> During devlink reload, all driver objects should be reinstantiated with >> the exception of devlink instance and devlink resources and params.

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

2019-10-03 Thread Vishal Kulkarni
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 for dynamic allocation of resources for ULD") Signed-off-by: Shahjada Abu

Re: [PATCH bpf-next 0/3] Add new-style bpf_object__open APIs

2019-10-03 Thread Andrii Nakryiko
On Thu, Oct 3, 2019 at 10:29 PM Andrii Nakryiko wrote: > > 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,

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

2019-10-03 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 v2 bpf-next 1/3] libbpf: stop enforcing kern_version, populate it for users

2019-10-03 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 v2 bpf-next 2/3] libbpf: add bpf_object__open_{file,mem} w/ extensible opts

2019-10-03 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 v2 bpf-next 0/3] Add new-style bpf_object__open APIs

2019-10-03 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-

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

2019-10-03 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 bpf-next 0/3] Add new-style bpf_object__open APIs

2019-10-03 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-

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

2019-10-03 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 bpf-next 3/3] selftests/bpf: switch tests to new bpf_object__open_{file,mem}() APIs

2019-10-03 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

Re: [PATCHv2 ipsec-next] xfrm: remove the unnecessary .net_exit for xfrmi

2019-10-03 Thread Steffen Klassert
On Tue, Sep 17, 2019 at 11:02:29AM +0200, Steffen Klassert wrote: > On Mon, Sep 09, 2019 at 04:30:10PM +0800, Xin Long wrote: > > The xfrm_if(s) on each netns can be deleted when its xfrmi dev is > > deleted. xfrmi dev's removal can happen when: > > > > a. netns is being removed and all xfrmi de

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

2019-10-03 Thread Roopa Prabhu
On Thu, Oct 3, 2019 at 5:59 AM Ido Schimmel wrote: > > On Wed, Oct 02, 2019 at 08:58:52AM -0700, Roopa Prabhu wrote: > > On Wed, Oct 2, 2019 at 1:41 AM Ido Schimmel wrote: > > > > > > From: Ido Schimmel > > > > > > When performing L3 offload, routes and nexthops are usually programmed > > > into

Reminder: 3 open syzbot reports in "net/rxrpc" subsystem

2019-10-03 Thread Eric Biggers
[This email was generated by a script. Let me know if you have any suggestions to make it better, or if you want it re-generated with the latest status.] Of the currently open syzbot reports against the upstream kernel, I've manually marked 3 of them as possibly being bugs in the "net/rxrpc" subs

[PATCH bpf-next] libbpf: fix BTF-defined map's __type macro handling of arrays

2019-10-03 Thread Andrii Nakryiko
Due to a quirky C syntax of declaring pointers to array or function prototype, existing __type() macro doesn't work with map key/value types that are array or function prototype. One has to create a typedef first and use it to specify key/value type for a BPF map. By using typeof(), pointer to typ

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

2019-10-03 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-

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

2019-10-03 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 bpf-next 2/2] libbpf: add bpf_object__open_{file,mem} w/ extensible opts

2019-10-03 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

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

2019-10-03 Thread Jakub Kicinski
On Fri, 4 Oct 2019 03:35:21 +0200, Andrew Lunn wrote: > 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 v

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

2019-10-03 Thread David Ahern
On 10/2/19 11:37 PM, Ido Schimmel wrote: > The new indication is dumped to user space via a new flag (i.e., > 'RTM_F_IN_HW') in the 'rtm_flags' field in the ancillary header. > nice series Ido. why not call this RTM_F_OFFLOAD to keep it consistent with the nexthop offload

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

2019-10-03 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 net-next 0/2] mv88e6xxx: Allow config of ATU hash algorithm

2019-10-03 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. Andrew Lunn (2): net: dsa: Add support

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

2019-10-03 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

[v4 2/4] samples: pktgen: fix proc_cmd command result check logic

2019-10-03 Thread Daniel T. Lee
Currently, proc_cmd is used to dispatch command to 'pg_ctrl', 'pg_thread', 'pg_set'. proc_cmd is designed to check command result with grep the "Result:", but this might fail since this string is only shown in 'pg_thread' and 'pg_set'. This commit fixes this logic by grep-ing the "Result:" string

[v4 1/4] samples: pktgen: make variable consistent with option

2019-10-03 Thread Daniel T. Lee
This commit changes variable names that can cause confusion. For example, variable DST_MIN is quite confusing since the keyword 'udp_dst_min' and keyword 'dst_min' is used with pg_ctrl. On the following commit, 'dst_min' will be used to set destination IP, and the existing variable name DST_MIN s

[v4 3/4] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-10-03 Thread Daniel T. Lee
This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) Validating the address should be preceded prior to the parsing. Helpers will be used in prior to set target address in samples/pktgen. Signed-off-by: Daniel T. Lee ---

[v4 4/4] samples: pktgen: allow to specify destination IP range (CIDR)

2019-10-03 Thread Daniel T. Lee
Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max") But on samples, each pktgen script doesn't have any option to achieve this. This commit adds the feature to specify the destination address range with CIDR. -d : (

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

2019-10-03 Thread Vladimir Oltean
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 swp2 ingress tc filter del dev swp2 ingress pref 49152 Signed-off-by: Vlad

Re: [patch net-next v3 14/15] net: devlink: allow to change namespaces during reload

2019-10-03 Thread Jakub Kicinski
On Thu, 3 Oct 2019 11:49:39 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > All devlink instances are created in init_net and stay there for a > lifetime. Allow user to be able to move devlink instances into > namespaces during devlink reload operation. That ensures proper > re-instantiation of

Re: [patch net-next v3 13/15] netdevsim: take devlink net instead of init_net

2019-10-03 Thread Jakub Kicinski
On Thu, 3 Oct 2019 11:49:38 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Follow-up patch is going to allow to reload devlink instance into > different network namespace, so use devlink_net() helper instead > of init_net. > > Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski

Re: [patch net-next v3 12/15] netdevsim: register port netdevices into net of device

2019-10-03 Thread Jakub Kicinski
On Thu, 3 Oct 2019 11:49:37 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Register newly created port netdevice into net namespace > that the parent device belongs to. > > Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski > diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdev

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

2019-10-03 Thread Jakub Kicinski
On Thu, 3 Oct 2019 11:49:36 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > During devlink reload, all driver objects should be reinstantiated with > the exception of devlink instance and devlink resources and params. > Move existing devlink_resource_size_get() calls into fib_create() just > bef

Re: [patch net-next v3 10/15] netdevsim: add all ports in nsim_dev_create() and del them in destroy()

2019-10-03 Thread Jakub Kicinski
On Thu, 3 Oct 2019 11:49:35 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Currently the probe/remove function does this separately. Put the > addition an deletion of ports into nsim_dev_create() and > nsim_dev_destroy(). > > Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski

Re: [patch net-next v3 01/15] netdevsim: change fib accounting and limitations to be per-device

2019-10-03 Thread Jakub Kicinski
On Thu, 3 Oct 2019 11:49:26 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Currently, the accounting is done per-namespace. However, devlink > instance is always in init_net namespace for now, so only the accounting > related to init_net is used. Limitations set using devlink resources > are on

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

2019-10-03 Thread Tom Herbert
From: Tom Herbert Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc. Signed-off-by: Tom Herbert --- include/net/ipeh.h | 16 +++ include/net/ipv6.h

[PATCH v5 net-next 5/7] ip6tlvs: Add TX parameters

2019-10-03 Thread Tom Herbert
From: Tom Herbert Define a number of transmit parameters for TLV Parameter table definitions. These will be used for validating TLVs that are set on a socket. Signed-off-by: Tom Herbert --- include/net/ipeh.h | 18 include/uapi/linux/ipeh.h | 8 +++ net/ipv6/exth

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

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

[PATCH v5 net-next 4/7] ip6tlvs: Registration of TLV handlers and parameters

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

[PATCH v5 net-next 3/7] ipeh: Generic TLV parser

2019-10-03 Thread Tom Herbert
From: Tom Herbert Create a generic TLV parser. This will be used with various extension headers that carry options including Destination, Hop-by-Hop, Segment Routing TLVs, and other cases of simple stateless parsing. Signed-off-by: Tom Herbert --- include/net/ipeh.h| 25 net/

[PATCH v5 net-next 2/7] ipeh: Move generic EH functions to exthdrs_common.c

2019-10-03 Thread Tom Herbert
From: Tom Herbert Move generic functions in exthdrs.c to new exthdrs_common.c so that exthdrs.c only contains functions that are specific to IPv6 processing, and exthdrs_common.c contains functions that are generic. These functions include those that will be used with IPv4 extension headers. Gene

[PATCH v5 net-next 0/7] ipv6: Extension header infrastructure

2019-10-03 Thread Tom Herbert
This patchset improves the IPv6 extension header infrastructure to make extension headers more usable and scalable. - Reorganize extension header files to separate out common API components - Create common TLV handler that will can be used in other use cases (e.g. segment routing TLVs,

[PATCH v5 net-next 1/7] ipeh: Create exthdrs_options.c and ipeh.h

2019-10-03 Thread Tom Herbert
From: Tom Herbert Create exthdrs_options.c to hold code related to specific Hop-by-Hop and Destination extension header options. Move related functions in exthdrs.c to the new file. Create include net/ipeh.h to contain common definitions for IP extension headers. Signed-off-by: Tom Herbert ---

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

2019-10-03 Thread Eric Dumazet
On 10/3/19 2:46 PM, David Ahern wrote: > 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 too many cases tha

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

2019-10-03 Thread Alexey Dobriyan
This function returns string literals which are "const char *". Signed-off-by: Alexey Dobriyan --- net/core/sock.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/sock.c +++ b/net/core/sock.c @@ -3493,7 +3493,7 @@ static long sock_prot_memory_allocated(struct proto *pr

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

2019-10-03 Thread David Ahern
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 too many cases that are expected to proceed regardless of whether a device

[PATCH v3 bpf-next 7/7] selftests/bpf: add BPF_CORE_READ and BPF_CORE_READ_STR_INTO macro tests

2019-10-03 Thread Andrii Nakryiko
Validate BPF_CORE_READ correctness and handling of up to 9 levels of nestedness using cyclic task->(group_leader->)*->tgid chains. Also add a test of maximum-dpeth BPF_CORE_READ_STR_INTO() macro. Acked-by: John Fastabend Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/

[PATCH v3 bpf-next 1/7] selftests/bpf: undo GCC-specific bpf_helpers.h changes

2019-10-03 Thread Andrii Nakryiko
Having GCC provide its own bpf-helper.h is not the right approach and is going to be changed. Undo bpf_helpers.h change before moving bpf_helpers.h into libbpf. Acked-by: Song Liu Acked-by: Ilya Leoshkevich Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bp

[PATCH v3 bpf-next 4/7] selftests/bpf: split off tracing-only helpers into bpf_tracing.h

2019-10-03 Thread Andrii Nakryiko
Split-off PT_REGS-related helpers into bpf_tracing.h header. Adjust selftests and samples to include it where necessary. Acked-by: John Fastabend Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- samples/bpf/map_perf_test_kern.c | 1 + samples/bpf/offwaketime_kern.c|

[PATCH v3 bpf-next 0/7] Move bpf_helpers and add BPF_CORE_READ macros

2019-10-03 Thread Andrii Nakryiko
This patch set makes bpf_helpers.h and bpf_endian.h a part of libbpf itself for consumption by user BPF programs, not just selftests. It also splits off tracing helpers into bpf_tracing.h, which also becomes part of libbpf. Some of the legacy stuff (BPF_ANNOTATE_KV_PAIR, load_{byte,half,word}, bpf_

[PATCH v3 bpf-next 3/7] selftests/bpf: adjust CO-RE reloc tests for new bpf_core_read() macro

2019-10-03 Thread Andrii Nakryiko
To allow adding a variadic BPF_CORE_READ macro with slightly different syntax and semantics, define CORE_READ in CO-RE reloc tests, which is a thin wrapper around low-level bpf_core_read() macro, which in turn is just a wrapper around bpf_probe_read(). Acked-by: John Fastabend Acked-by: Song Liu

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

2019-10-03 Thread Andrii Nakryiko
Move bpf_helpers.h, bpf_tracing.h, and bpf_endian.h into libbpf. Ensure they are installed along the other libbpf headers. Also, adjust selftests and samples include path to include libbpf now. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- samples/bpf/Makefile

[PATCH v3 bpf-next 6/7] libbpf: add BPF_CORE_READ/BPF_CORE_READ_INTO helpers

2019-10-03 Thread Andrii Nakryiko
Add few macros simplifying BCC-like multi-level probe reads, while also emitting CO-RE relocations for each read. Acked-by: John Fastabend Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/bpf_helpers.h | 153 +++- 1 file changed, 150 insertion

[PATCH v3 bpf-next 2/7] selftests/bpf: samples/bpf: split off legacy stuff from bpf_helpers.h

2019-10-03 Thread Andrii Nakryiko
Split off few legacy things from bpf_helpers.h into separate bpf_legacy.h file: - load_{byte|half|word}; - remove extra inner_idx and numa_node fields from bpf_map_def and introduce bpf_map_def_legacy for use in samples; - move BPF_ANNOTATE_KV_PAIR into bpf_legacy.h. Adjust samples and selftests

[PATCH] igmp: uninline ip_mc_validate_checksum()

2019-10-03 Thread Alexey Dobriyan
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 --- net/ipv4/igmp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/i

Re: [PATCH v2 bpf-next 6/7] libbpf: add BPF_CORE_READ/BPF_CORE_READ_INTO helpers

2019-10-03 Thread Andrii Nakryiko
On Thu, Oct 3, 2019 at 1:35 PM Song Liu wrote: > > On Wed, Oct 2, 2019 at 3:02 PM Andrii Nakryiko wrote: > > > > Add few macros simplifying BCC-like multi-level probe reads, while also > > emitting CO-RE relocations for each read. > > > > Acked-by: John Fastabend > > Signed-off-by: Andrii Nakryi

Re: [PATCH v2 bpf-next 2/7] selftests/bpf: samples/bpf: split off legacy stuff from bpf_helpers.h

2019-10-03 Thread Andrii Nakryiko
On Thu, Oct 3, 2019 at 1:09 PM Song Liu wrote: > > On Wed, Oct 2, 2019 at 3:01 PM Andrii Nakryiko wrote: > > > > Split off few legacy things from bpf_helpers.h into separate > > bpf_legacy.h file: > > - load_{byte|half|word}; > > - remove extra inner_idx and numa_node fields from bpf_map_def and

[PATCH] xfrm: ifdef setsockopt(UDP_ENCAP_ESPINUDP/UDP_ENCAP_ESPINUDP_NON_IKE)

2019-10-03 Thread Alexey Dobriyan
If IPsec is not configured, there is no reason to delay the inevitable. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |7 --- net/ipv4/udp.c |2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1613,13 +1613,6 @@

Re: [PATCH net-next] net: dsa: Allow port mirroring to the CPU port

2019-10-03 Thread Vladimir Oltean
On Thu, 3 Oct 2019 at 22:24, Andrew Lunn wrote: > > On Thu, Oct 03, 2019 at 02:37:50AM +0300, Vladimir Oltean wrote: > > On a regular netdev, putting it in promiscuous mode means receiving all > > traffic passing through it, whether or not it was destined to its MAC > > address. Then monitoring ap

Re: [PATCH v2 bpf-next 3/7] selftests/bpf: adjust CO-RE reloc tests for new bpf_core_read() macro

2019-10-03 Thread Andrii Nakryiko
On Thu, Oct 3, 2019 at 1:42 PM Song Liu wrote: > > On Thu, Oct 3, 2019 at 1:29 PM Andrii Nakryiko > wrote: > > > > On Thu, Oct 3, 2019 at 1:17 PM Song Liu wrote: > > > > > > On Wed, Oct 2, 2019 at 3:01 PM Andrii Nakryiko wrote: > > > > > > > > To allow adding a variadic BPF_CORE_READ macro with

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

2019-10-03 Thread John Fastabend
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 of test 'reg, reg' are identical to 'cmp reg, 0' in all > > cases ex

Re: [PATCH bpf-next 2/2] bpf: Add loop test case with 32 bit reg comparison against 0

2019-10-03 Thread Song Liu
On Wed, Oct 2, 2019 at 5:30 PM Daniel Borkmann wrote: > > Add a loop test with 32 bit register against 0 immediate: > > # ./test_verifier 631 > #631/p taken loop with back jump to 1st insn, 2 OK > > Disassembly: > > [...] > 1b: test %edi,%edi > 1d: jne0x0014 > [..

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

2019-10-03 Thread Alexey Dobriyan
Some ints are "enum sock_flags" in fact. Signed-off-by: Alexey Dobriyan --- include/net/sock.h |2 +- net/core/sock.c|5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2512,7 +2512,7 @@ static inline bool sk_listener(con

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

2019-10-03 Thread Song Liu
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 of test 'reg, reg' are identical to 'cmp reg, 0' in all > cases except for AF which we don't u

Re: [PATCH v2 bpf-next 3/7] selftests/bpf: adjust CO-RE reloc tests for new bpf_core_read() macro

2019-10-03 Thread Song Liu
On Thu, Oct 3, 2019 at 1:29 PM Andrii Nakryiko wrote: > > On Thu, Oct 3, 2019 at 1:17 PM Song Liu wrote: > > > > On Wed, Oct 2, 2019 at 3:01 PM Andrii Nakryiko wrote: > > > > > > To allow adding a variadic BPF_CORE_READ macro with slightly different > > > syntax and semantics, define CORE_READ i

Re: [PATCH v2 bpf-next 6/7] libbpf: add BPF_CORE_READ/BPF_CORE_READ_INTO helpers

2019-10-03 Thread Song Liu
On Wed, Oct 2, 2019 at 3:02 PM Andrii Nakryiko wrote: > > Add few macros simplifying BCC-like multi-level probe reads, while also > emitting CO-RE relocations for each read. > > Acked-by: John Fastabend > Signed-off-by: Andrii Nakryiko > --- > tools/lib/bpf/bpf_helpers.h | 143 +

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

2019-10-03 Thread Alexey Dobriyan
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: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] ./

Re: [PATCH v2 bpf-next 3/7] selftests/bpf: adjust CO-RE reloc tests for new bpf_core_read() macro

2019-10-03 Thread Andrii Nakryiko
On Thu, Oct 3, 2019 at 1:17 PM Song Liu wrote: > > On Wed, Oct 2, 2019 at 3:01 PM Andrii Nakryiko wrote: > > > > To allow adding a variadic BPF_CORE_READ macro with slightly different > > syntax and semantics, define CORE_READ in CO-RE reloc tests, which is > > a thin wrapper around low-level bpf

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

2019-10-03 Thread Song Liu
On Wed, Oct 2, 2019 at 3:03 PM Andrii Nakryiko wrote: > > Move bpf_helpers.h, bpf_tracing.h, and bpf_endian.h into libbpf. Ensure > they are installed along the other libbpf headers. Also, adjust > selftests and samples include path to include libbpf now. > > Signed-off-by: Andrii Nakryiko Acked-

Re: [PATCH v2 bpf-next 4/7] selftests/bpf: split off tracing-only helpers into bpf_tracing.h

2019-10-03 Thread Song Liu
On Thu, Oct 3, 2019 at 11:10 AM John Fastabend wrote: > > Andrii Nakryiko wrote: > > Split-off PT_REGS-related helpers into bpf_tracing.h header. Adjust > > selftests and samples to include it where necessary. > > > > Signed-off-by: Andrii Nakryiko > > --- > > Acked-by: John Fastabend Acked-by:

Re: [PATCH v2 bpf-next 3/7] selftests/bpf: adjust CO-RE reloc tests for new bpf_core_read() macro

2019-10-03 Thread Song Liu
On Wed, Oct 2, 2019 at 3:01 PM Andrii Nakryiko wrote: > > To allow adding a variadic BPF_CORE_READ macro with slightly different > syntax and semantics, define CORE_READ in CO-RE reloc tests, which is > a thin wrapper around low-level bpf_core_read() macro, which in turn is > just a wrapper around

Re: [PATCH v2 bpf-next 2/7] selftests/bpf: samples/bpf: split off legacy stuff from bpf_helpers.h

2019-10-03 Thread Song Liu
On Wed, Oct 2, 2019 at 3:01 PM Andrii Nakryiko wrote: > > Split off few legacy things from bpf_helpers.h into separate > bpf_legacy.h file: > - load_{byte|half|word}; > - remove extra inner_idx and numa_node fields from bpf_map_def and > introduce bpf_map_def_legacy for use in samples; > - move

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

2019-10-03 Thread Marcelo Ricardo Leitner
On Sat, Sep 21, 2019 at 07:24:34PM -0700, Jakub Kicinski wrote: > On Wed, 18 Sep 2019 22:15:24 -0700, Cong Wang wrote: > > On Wed, Sep 18, 2019 at 7:41 PM David Ahern wrote: > > > On 9/18/19 5:24 PM, Cong Wang wrote: > > > > The TCA_KIND attribute is of NLA_STRING which does not check > > > > th

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

2019-10-03 Thread John Fastabend
Jesper Dangaard Brouer wrote: > On Thu, 03 Oct 2019 09:48:22 +0200 > Toke Høiland-Jørgensen wrote: > > > John Fastabend writes: > > > > > Toke Høiland-Jørgensen wrote: > > >> John Fastabend writes: > > >> > > >> > Toke Høiland-Jørgensen wrote: > > >> >> Alan Maguire writes: > > >> >>

Re: [PATCH] openvswitch: Allow attaching helper in later commit

2019-10-03 Thread Yi-Hung Wei
On Thu, Oct 3, 2019 at 8:31 AM David Miller wrote: > > From: Yi-Hung Wei > Date: Mon, 30 Sep 2019 12:39:04 -0700 > > > - if ((nf_ct_is_confirmed(ct) ? !cached : info->commit) && > > + if ((nf_ct_is_confirmed(ct) ? !cached | add_helper : > > I would suggest using "||" inste

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

2019-10-03 Thread John Fastabend
Edward Cree wrote: > On 03/10/2019 15:33, Toke Høiland-Jørgensen wrote: > > In all cases, the sysadmin can't (or doesn't want to) modify any of the > > XDP programs. In fact, they may just be installed as pre-compiled .so > > BPF files on his system. So he needs to be able to configure the call > >

Re: [PATCH net-next] net: propagate errors correctly in register_netdevice()

2019-10-03 Thread David Miller
From: Eric Dumazet Date: Thu, 3 Oct 2019 08:59:24 -0700 > If netdev_name_node_head_alloc() fails to allocate > memory, we absolutely want register_netdevice() to return > -ENOMEM instead of zero :/ > > One of the syzbot report looked like : > > general protection fault: [#1] PREEMPT SMP K

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-03 Thread David Ahern
On 10/3/19 11:19 AM, Eric Dumazet wrote: > > On 10/3/19 9:32 AM, Eric Dumazet wrote: >> Still no luck for me :/ >> > One of the failing test was : > > unshare -n > ./traceroute_test.sh -I icmp > thanks for the test. I need to chase down a few more code paths, but I am thinking the proper next s

Re: [PATCH net-next] net: dsa: Allow port mirroring to the CPU port

2019-10-03 Thread Andrew Lunn
On Thu, Oct 03, 2019 at 02:37:50AM +0300, Vladimir Oltean wrote: > On a regular netdev, putting it in promiscuous mode means receiving all > traffic passing through it, whether or not it was destined to its MAC > address. Then monitoring applications such as tcpdump can see all > traffic transiting

Re: [PATCH net-next] net: propagate errors correctly in register_netdevice()

2019-10-03 Thread Jiri Pirko
Thu, Oct 03, 2019 at 05:59:24PM CEST, eduma...@google.com wrote: >If netdev_name_node_head_alloc() fails to allocate >memory, we absolutely want register_netdevice() to return >-ENOMEM instead of zero :/ oops. > >One of the syzbot report looked like : > >general protection fault: [#1] PREEM

Re: [PATCH net-next] mlxsw: PCI: Send EMAD traffic on a separate queue

2019-10-03 Thread David Miller
From: Ido Schimmel Date: Thu, 3 Oct 2019 08:44:49 +0300 > From: Petr Machata > > Currently mlxsw distributes sent traffic among all the available send > queues. That includes control traffic as well as EMADs, which are used for > configuration of the device. > > However because all the queues

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

2019-10-03 Thread Vladimir Oltean
Hi David, On Thu, 3 Oct 2019 at 22:04, David Miller wrote: > > From: Vladimir Oltean > Date: Thu, 3 Oct 2019 02:34:43 +0300 > > > + already_enabled = (general_params->mirr_port != SJA1105_NUM_PORTS); > > + if (already_enabled && enabled && general_params->mirr_port != to) { > > +

Re: [PATCH net-next v2] net/rds: Use DMA memory pool allocation for rds_header

2019-10-03 Thread David Miller
From: Ka-Cheong Poon Date: Wed, 2 Oct 2019 21:11:08 -0700 > Currently, RDS calls ib_dma_alloc_coherent() to allocate a large piece > of contiguous DMA coherent memory to store struct rds_header for > sending/receiving packets. The memory allocated is then partitioned > into struct rds_header.

Re: [PATCH net] tcp: fix slab-out-of-bounds in tcp_zerocopy_receive()

2019-10-03 Thread David Miller
From: Eric Dumazet Date: Wed, 2 Oct 2019 20:19:59 -0700 > Apparently a refactoring patch brought a bug, that was caught > by syzbot [1] > > Original code was correct, do not try to be smarter than the > compiler :/ > > [1] ... > Fixes: d8e18a516f8f ("net: Use skb accessors in network core") >

Re: [PATCH net-next] net: dsa: Allow port mirroring to the CPU port

2019-10-03 Thread Andrew Lunn
On Thu, Oct 03, 2019 at 12:04:57PM -0700, David Miller wrote: > From: Vladimir Oltean > Date: Thu, 3 Oct 2019 02:37:50 +0300 > > > On a regular netdev, putting it in promiscuous mode means receiving all > > traffic passing through it, whether or not it was destined to its MAC > > address. Then m

Re: [PATCH net-next] net: dsa: Allow port mirroring to the CPU port

2019-10-03 Thread David Miller
From: Vladimir Oltean Date: Thu, 3 Oct 2019 02:37:50 +0300 > On a regular netdev, putting it in promiscuous mode means receiving all > traffic passing through it, whether or not it was destined to its MAC > address. Then monitoring applications such as tcpdump can see all > traffic transiting it

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

2019-10-03 Thread David Miller
From: Vladimir Oltean Date: Thu, 3 Oct 2019 02:34:43 +0300 > + already_enabled = (general_params->mirr_port != SJA1105_NUM_PORTS); > + if (already_enabled && enabled && general_params->mirr_port != to) { > + dev_err(priv->ds->dev, > + "Delete mirroring rul

Re: [PATCH net-next] net: propagate errors correctly in register_netdevice()

2019-10-03 Thread Willem de Bruijn
On Thu, Oct 3, 2019 at 1:43 PM Eric Dumazet wrote: > > If netdev_name_node_head_alloc() fails to allocate > memory, we absolutely want register_netdevice() to return > -ENOMEM instead of zero :/ > > One of the syzbot report looked like : > > general protection fault: [#1] PREEMPT SMP KASAN >

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

2019-10-03 Thread Jesper Dangaard Brouer
On Thu, 3 Oct 2019 15:53:50 +0100 Edward Cree wrote: > On 03/10/2019 15:33, Toke Høiland-Jørgensen wrote: > > In all cases, the sysadmin can't (or doesn't want to) modify any of the > > XDP programs. In fact, they may just be installed as pre-compiled .so > > BPF files on his system. So he needs

[PATCH net-next 6/6] net/tls: allow compiling TLS TOE out

2019-10-03 Thread Jakub Kicinski
TLS "record layer offload" requires TOE, and bypasses most of the normal networking stack. It is also significantly less maintained. Allow users to compile it out to avoid issues. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman --- drivers/crypto/chelsio/Kconfi

[PATCH net-next 5/6] net/tls: rename tls_hw_* functions tls_toe_*

2019-10-03 Thread Jakub Kicinski
The tls_hw_* functions are quite confusingly named, since they are related to the TOE-offload, not TLS_HW offload which doesn't require TOE. Rename them. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman --- include/net/tls_toe.h | 6 +++--- net/tls/tls_main.c

[PATCH net-next 4/6] net/tls: move TOE-related code to a separate file

2019-10-03 Thread Jakub Kicinski
Move tls_hw_* functions to a new, separate source file to avoid confusion with normal, non-TOE offload. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman --- include/net/tls.h | 3 + include/net/tls_toe.h | 4 ++ net/tls/Makefile | 2 +- net/tls/tl

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

2019-10-03 Thread Jakub Kicinski
Hi! 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 do things in the networking stack. Confusingly the name of the

[PATCH net-next 1/6] net/tls: move TOE-related structures to a separate header

2019-10-03 Thread Jakub Kicinski
Move tls_device structure and register/unregister functions to a new header to avoid confusion with normal, non-TOE offload. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman --- drivers/crypto/chelsio/chtls/chtls.h | 1 + include/net/tls.h|

[PATCH net-next 3/6] net/tls: move tls_build_proto() on init path

2019-10-03 Thread Jakub Kicinski
Move tls_build_proto() so that TOE offload doesn't have to call it mid way through its bypass enable path. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman --- net/tls/tls_main.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/tls/

[PATCH net-next 2/6] net/tls: rename tls_device to tls_toe_device

2019-10-03 Thread Jakub Kicinski
Rename struct tls_device to struct tls_toe_device to avoid confusion with normal, non-TOE offload. No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman --- drivers/crypto/chelsio/chtls/chtls.h | 4 ++-- drivers/crypto/chelsio/chtls/chtl

Re: [PATCH V12 2/4] bpf: added new helper bpf_get_ns_current_pid_tgid

2019-10-03 Thread Carlos Antonio Neira Bustos
On Thu, Oct 03, 2019 at 10:30:06AM -0700, Andrii Nakryiko wrote: > On Thu, Oct 3, 2019 at 8:01 AM Carlos Antonio Neira Bustos > wrote: > > > > On Wed, Oct 02, 2019 at 12:52:29PM +0200, Daniel Borkmann wrote: > > > On 10/1/19 11:41 PM, Carlos Neira wrote: > > > > New bpf helper bpf_get_ns_current_p

  1   2   >