Re: netns_id in bpf_sk_lookup_{tcp,udp}

2018-11-19 Thread Joe Stringer
On Mon, 19 Nov 2018 at 12:54, Joe Stringer wrote: > > On Mon, 19 Nov 2018 at 12:29, Nicolas Dichtel > wrote: > > > > Le 19/11/2018 à 20:54, David Ahern a écrit : > > > On 11/19/18 12:47 PM, Joe Stringer wrote: > > >> On Mon, 19 Nov 2018 at 10:39, David Ahern wrote: > > >>> > > >>> On 11/19/18

[PATCH net] net/ibmnvic: Fix deadlock problem in reset

2018-11-19 Thread Juliet Kim
This patch changes to use rtnl_lock only during a reset to avoid deadlock that could occur when a thread operating close is holding rtnl_lock and waiting for reset_lock acquired by another thread, which is waiting for rtnl_lock in order to set the number of tx/rx queues during a reset. Also, we

Re

2018-11-19 Thread efn
Hello How are you? Am SARAH MONGAR. For an Export Business am, writing to inform you, concerning business proposer in Agriculture raw materials export supply to Germany. If you are good in Business kindly write me on my mail I'D sarahmor1...@gmail.com SARAH MONGAR E-mail:

[PATCH v5 bpf-next 10/13] tools/bpf: do not use pahole if clang/llvm can generate BTF sections

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song Add additional checks in tools/testing/selftests/bpf and samples/bpf such that if clang/llvm compiler can generate BTF sections, do not use pahole. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau --- samples/bpf/Makefile | 8

[PATCH v5 bpf-next 13/13] tools/bpf: bpftool: add support for func types

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song This patch added support to print function signature if btf func_info is available. Note that ksym now uses function name instead of prog_name as prog_name has a limit of 16 bytes including ending '\0'. The following is a sample output for selftests test_btf with file

[PATCH v5 bpf-next 09/13] tools/bpf: add support to read .BTF.ext sections

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song The .BTF section is already available to encode types. These types can be used for map pretty print. The whole .BTF will be passed to the kernel as well for which kernel can verify and return to the user space for pretty print etc. The llvm patch at

[PATCH v5 bpf-next 11/13] tools/bpf: refactor to implement btf_get_from_id() in lib/bpf

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song The function get_btf() is implemented in tools/bpf/bpftool/map.c to get a btf structure given a map_info. This patch refactored this function to be function btf_get_from_id() in tools/lib/bpf so that it can be used later. Signed-off-by: Yonghong Song Signed-off-by: Martin

[PATCH v5 bpf-next 12/13] tools/bpf: enhance test_btf file testing to test func info

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song Change the bpf programs test_btf_haskv.c and test_btf_nokv.c to have two sections, and enhance test_btf.c test_file feature to test btf func_info returned by the kernel. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau ---

[PATCH v5 bpf-next 02/13] bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO

2018-11-19 Thread Martin KaFai Lau
This patch adds BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO to support the function debug info. BTF_KIND_FUNC_PROTO must not have a name (i.e. !t->name_off) and it is followed by >= 0 'struct bpf_param' objects to describe the function arguments. The BTF_KIND_FUNC must have a valid name and it must

[PATCH v5 bpf-next 03/13] tools/bpf: Sync kernel btf.h header

2018-11-19 Thread Martin KaFai Lau
The kernel uapi btf.h is synced to the tools directory. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/include/uapi/linux/btf.h | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/btf.h

[PATCH v5 bpf-next 00/13] bpf: Add btf func info support

2018-11-19 Thread Martin KaFai Lau
The BTF support was added to kernel by Commit 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)"), which introduced .BTF section into ELF file and is primarily used for map pretty print. pahole is used to convert dwarf to BTF for ELF files. This patch added func info support to the kernel

[PATCH v5 bpf-next 08/13] tools/bpf: extends test_btf to test load/retrieve func_type info

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song A two function bpf program is loaded with btf and func_info. After successful prog load, the bpf_get_info syscall is called to retrieve prog info to ensure the types returned from the kernel matches the types passed to the kernel from the user space. Several negative tests

[PATCH v5 bpf-next 04/13] tools/bpf: Add tests for BTF_KIND_FUNC_PROTO and BTF_KIND_FUNC

2018-11-19 Thread Martin KaFai Lau
This patch adds unit tests for BTF_KIND_FUNC_PROTO and BTF_KIND_FUNC to test_btf. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/lib/bpf/btf.c| 4 + tools/testing/selftests/bpf/test_btf.c | 474 - 2 files changed, 476

[PATCH v5 bpf-next 05/13] bpf: Introduce bpf_func_info

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song This patch added interface to load a program with the following additional information: . prog_btf_fd . func_info, func_info_rec_size and func_info_cnt where func_info will provide function range and type_id corresponding to each function. The func_info_rec_size is

[PATCH v5 bpf-next 06/13] tools/bpf: sync kernel uapi bpf.h header to tools directory

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song The kernel uapi bpf.h is synced to tools directory. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau --- tools/include/uapi/linux/bpf.h | 13 + 1 file changed, 13 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h

[PATCH v5 bpf-next 07/13] tools/bpf: add new fields for program load in lib/bpf

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song The new fields are added for program load in lib/bpf so application uses api bpf_load_program_xattr() is able to load program with btf and func_info data. This functionality will be used in next patch by bpf selftest test_btf. Signed-off-by: Yonghong Song Signed-off-by:

[PATCH v5 bpf-next 01/13] bpf: btf: Break up btf_type_is_void()

2018-11-19 Thread Martin KaFai Lau
This patch breaks up btf_type_is_void() into btf_type_is_void() and btf_type_is_fwd(). It also adds btf_type_nosize() to better describe it is testing a type has nosize info. Signed-off-by: Martin KaFai Lau --- kernel/bpf/btf.c | 37 ++--- 1 file changed, 22

[PATCH bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-19 Thread Nikita V. Shirokov
idea is pretty simple. for specified map (pointed by struct bpf_map) we would provide descriptor of already loaded map, which is going to be used as a prototype for inner map. proposed workflow: 1) open bpf's object (bpf_object__open) 2) create bpf's map which is going to be used as a prototype 3)

[PATCH bpf-next 0/2] bpf: adding support for mapinmap in libbpf

2018-11-19 Thread Nikita V. Shirokov
in this patch series i'm adding a helper for libbpf which would allow it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS). first patch contains new helper + explains proposed workflow second patch contains tests which also could be used as example of usage Nikita V.

[PATCH bpf-next 2/2] bpf: adding tests for mapinmap helpber in libbpf

2018-11-19 Thread Nikita V. Shirokov
adding test/example of bpf_map__add_inner_map_fd usage Signed-off-by: Nikita V. Shirokov --- tools/testing/selftests/bpf/Makefile| 3 +- tools/testing/selftests/bpf/test_mapinmap.c | 53 tools/testing/selftests/bpf/test_maps.c | 76 +

Re: [PATCH bpf-next] bpf: libbpf: retry program creation without the name

2018-11-19 Thread Y Song
On Mon, Nov 19, 2018 at 4:52 PM Stanislav Fomichev wrote: > > [Recent commit 23499442c319 ("bpf: libbpf: retry map creation without > the name") fixed this issue for maps, let's do the same for programs.] > > Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support > to specify BPF obj

[PATCH net-next 02/11] r8169: use dev_get_drvdata where possible

2018-11-19 Thread Heiner Kallweit
Using dev_get_drvdata directly is simpler here. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index

[PATCH net-next 01/11] r8169: merge rtl_irq_enable and rtl_irq_enable_all

2018-11-19 Thread Heiner Kallweit
After the recent changes to the interrupt handler rtl_irq_enable and rtl_irq_enable_all can be merged. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[PATCH net-next 06/14] net: sched: gred: add basic Qdisc offload

2018-11-19 Thread Jakub Kicinski
Add basic offload for the GRED Qdisc. Inform the drivers any time Qdisc or virtual queue configuration changes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 36 ++ net/sched/sch_gred.c

[PATCH net-next 02/14] nfp: abm: pass band parameter to functions

2018-11-19 Thread Jakub Kicinski
In preparation for per-band RED offload pass band parameter to functions. For now it will always be 0. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 52 ++- drivers/net/ethernet/netronome/nfp/abm/main.h | 10 ++--

[PATCH net-next 09/14] nfp: abm: add GRED offload

2018-11-19 Thread Jakub Kicinski
Add support for GRED offload. It behaves much like RED, but can apply different parameters to different bands. GRED operates pretty much exactly like our HW/FW with a single FIFO and different RED state instances. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley ---

[PATCH net-next 08/14] nfp: abm: wrap RED parameters in bands

2018-11-19 Thread Jakub Kicinski
Wrap RED parameters and stats into a structure, and a 1-element array. Upcoming GRED offload will add the support for more bands. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/main.h | 26 +++--- .../net/ethernet/netronome/nfp/abm/qdisc.c

[PATCH net-next 13/14] nfp: abm: add cls_u32 offload for simple band classification

2018-11-19 Thread Jakub Kicinski
Use offload of very simple u32 filters to direct packets to GRED bands based on the DSCP marking. No u32 hashing is supported, just plain simple filters matching on ToS or Priority with appropriate mask device can support. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley ---

Re: [PATCH 0/3] Fix unsafe BPF_PROG_TEST_RUN interface

2018-11-19 Thread Daniel Borkmann
On 11/19/2018 03:30 PM, Lorenz Bauer wrote: > On Sun, 18 Nov 2018 at 06:13, Y Song wrote: >> >> There is a slight change of user space behavior for this patch. >> Without this patch, the value bpf_attr.test.data_size_out is output only. >> For example, >>output buffer : out_buf (user

Re: [PATCH bpf-next v2] filter: add BPF_ADJ_ROOM_DATA mode to bpf_skb_adjust_room()

2018-11-19 Thread Daniel Borkmann
On 11/13/2018 05:35 PM, Nicolas Dichtel wrote: > This new mode enables to add or remove an l2 header in a programmatic way > with cls_bpf. > For example, it enables to play with mpls headers. > > Signed-off-by: Nicolas Dichtel > Acked-by: Martin KaFai Lau (Sorry for late reply, swamped due to

[PATCH net-next] net_sched: sch_fq: avoid calling ktime_get_ns() if not needed

2018-11-19 Thread Eric Dumazet
There are two cases were we can avoid calling ktime_get_ns() : 1) Queue is empty. 2) Internal queue is not empty. Signed-off-by: Eric Dumazet --- net/sched/sch_fq.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c index

Re: [PATCH bpf-next 2/2] bpf: adding tests for mapinmap helpber in libbpf

2018-11-19 Thread Nikita V. Shirokov
O Mon, Nov 19, 2018 at 05:18:46PM -0800, Y Song wrote: > On Mon, Nov 19, 2018 at 4:13 PM Nikita V. Shirokov > wrote: > > > > adding test/example of bpf_map__add_inner_map_fd usage > > > > Signed-off-by: Nikita V. Shirokov > > --- > > tools/testing/selftests/bpf/Makefile| 3 +- > >

Re: [PATCH bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-19 Thread Nikita V. Shirokov
On Mon, Nov 19, 2018 at 05:12:43PM -0800, Y Song wrote: > On Mon, Nov 19, 2018 at 4:13 PM Nikita V. Shirokov > wrote: > > > > idea is pretty simple. for specified map (pointed by struct bpf_map) > > we would provide descriptor of already loaded map, which is going to be > > used as a prototype

[PATCH net-next 05/11] r8169: use PCI_VDEVICE macro

2018-11-19 Thread Heiner Kallweit
Using macro PCI_VDEVICE helps to simplify the PCI ID table. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[PATCH net-next 03/11] r8169: remove unused interrupt sources

2018-11-19 Thread Heiner Kallweit
Setting PCSTimeout interrupt source was copied from the vendor driver which uses the chip programmable timer interrupt. The mainline driver doesn't use this timer interrupt. SYSErr indicates a PCI error and isn't defined on the PCIe models. Signed-off-by: Heiner Kallweit ---

[PATCH net-next 06/11] r8169: remove print_mac_version

2018-11-19 Thread Heiner Kallweit
The syslog message printed on driver load allows to easily identify the mac version number (based on chip name and XID). So we don't need this extra debug message which is wrong anyway because e.g. RTL_GIGA_MAC_VER_01 has value 0. Signed-off-by: Heiner Kallweit ---

[PATCH net-next 04/11] r8169: replace event_slow with irq_mask

2018-11-19 Thread Heiner Kallweit
Recently the "slow event" handler was removed, therefore the member name isn't appropriate any longer. In addition store the full mask, including the RTL_EVENT_NAPI interrupt source bits. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 22 +++--- 1 file

[PATCH net-next 11/11] r8169: improve chip version identification

2018-11-19 Thread Heiner Kallweit
Only the upper 12 bits are used for chip identification, this helps to reduce the size of array mac_info. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 119 +-- 1 file changed, 59 insertions(+), 60 deletions(-) diff --git

[PATCH net-next 07/11] r8169: remove "not PCI Express" message

2018-11-19 Thread Heiner Kallweit
The ones who want to know can easily identify whether chip is PCI or PCIe based on the chip name. I doubt there's any benefit in this message, so remove it. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH net-next 09/11] r8169: remove workaround for ancient gcc bug

2018-11-19 Thread Heiner Kallweit
The kernel can't be built any longer with this ancient GCC version. Eventually it becomes clear what this statement actually does. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH net-next 10/11] r8169: simplify ocp functions

2018-11-19 Thread Heiner Kallweit
rtl8168_oob_notify is used in rtl8168dp_driver_start and rtl8168dp_driver_stop only, so we can rename it to r8168dp_oob_notify. The same applies to condition rtl_ocp_read_cond which can be renamed to rtl_dp_ocp_read_cond. This allows to simplify the code. Signed-off-by: Heiner Kallweit ---

[PATCH net-next 08/11] r8169: remove manual padding in struct ring_info

2018-11-19 Thread Heiner Kallweit
The compiler takes care of alignment and padding, I see no need to bother him with manual hints. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

Re: [PATCH mlx5-next 00/10] Collection of ODP fixes

2018-11-19 Thread Jason Gunthorpe
On Mon, Nov 12, 2018 at 01:43:15PM -0700, Leon Romanovsky wrote: > On Thu, Nov 08, 2018 at 09:10:07PM +0200, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Hi, > > > > This is collection of fixes to mlx5_core and mlx5_ib ODP logic. > > There are two main reasons why we decided to

[PATCH iproute2-next 5/8] tc: gred: separate out stats printing

2018-11-19 Thread Jakub Kicinski
Printing GRED statistics is long and deserves a function on its own. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tc/q_gred.c | 67 +++-- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/tc/q_gred.c b/tc/q_gred.c

[PATCH iproute2-next 4/8] tc: gred: jsonify GRED output

2018-11-19 Thread Jakub Kicinski
Make GRED dump JSON-compatible. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tc/q_gred.c | 105 1 file changed, 74 insertions(+), 31 deletions(-) diff --git a/tc/q_gred.c b/tc/q_gred.c index 80a9ccbbd3cb..768b77ba3b0d

[PATCH iproute2-next 2/8] json: add %hhu helpers

2018-11-19 Thread Jakub Kicinski
Add helpers for printing char-size values. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- include/json_print.h | 1 + include/json_writer.h | 2 ++ lib/json_print.c | 1 + lib/json_writer.c | 11 +++ 4 files changed, 15 insertions(+) diff --git

[PATCH iproute2-next 6/8] tc: gred: use extended stats if available

2018-11-19 Thread Jakub Kicinski
Use the extended attributes with extra and better stats, when possible. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tc/q_gred.c | 122 1 file changed, 114 insertions(+), 8 deletions(-) diff --git a/tc/q_gred.c

[PATCH iproute2-next 0/8] tc: gred: JSON-ify and support per-vq config

2018-11-19 Thread Jakub Kicinski
Hi! This set brings GRED support up to date with recent kernel changes. In particular the new netlink attributes for more fine-grained stats and per-virtual queue flags. To make GRED usable in modern deployments the patch set starts with adding JSON output. Jakub Kicinski (8): tc: gred:

[PATCH iproute2-next 8/8] tc: gred: allow controlling and dumping per-DP RED flags

2018-11-19 Thread Jakub Kicinski
Kernel now support setting ECN and HARDDROP flags per-virtual queue. Allow users to tweak the settings, and print them on dump. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tc/q_gred.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff

[PATCH iproute2-next 1/8] tc: gred: remove unclear comment

2018-11-19 Thread Jakub Kicinski
The comment about providing a proper message seems similar to the comment in the kernel which says: /* hack -- fix at some point with proper message This is how we indicate to tc that there is no VQ at this DP */ it's unclear what that message would be, and whether it's needed.

[PATCH iproute2-next 7/8] tc: gred: support controlling RED flags

2018-11-19 Thread Jakub Kicinski
Kernel GRED qdisc supports ECN marking, and the harddrop flag but setting and dumping this flag is not possible with iproute2. Add the support. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- bash-completion/tc | 2 +- tc/q_gred.c| 8 +++- 2 files changed, 8

Re: [PATCH v3 0/4] bpf: allow zero-initialising hash map seed

2018-11-19 Thread Daniel Borkmann
On 11/16/2018 12:41 PM, Lorenz Bauer wrote: > Allow forcing the seed of a hash table to zero, for deterministic > execution during benchmarking and testing. > > Changes from v2: > * Change ordering of BPF_F_ZERO_SEED in linux/bpf.h > > Comments adressed from v1: > * Add comment to discourage

Re: [PATCH bpf-next v2] bpf: libbpf: retry map creation without the name

2018-11-19 Thread Daniel Borkmann
On 11/19/2018 11:49 PM, Stanislav Fomichev wrote: > Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support > to specify BPF obj name"), libbpf unconditionally sets bpf_attr->name > for maps. Pre v4.14 kernels don't know about map names and return an > error about unexpected non-zero

Re: [PATCH bpf-next 2/2] bpf: adding tests for mapinmap helpber in libbpf

2018-11-19 Thread Y Song
On Mon, Nov 19, 2018 at 4:13 PM Nikita V. Shirokov wrote: > > adding test/example of bpf_map__add_inner_map_fd usage > > Signed-off-by: Nikita V. Shirokov > --- > tools/testing/selftests/bpf/Makefile| 3 +- > tools/testing/selftests/bpf/test_mapinmap.c | 53 >

Re: [Patch net] net: invert the check of detecting hardware RX checksum fault

2018-11-19 Thread Cong Wang
On Fri, Nov 16, 2018 at 12:15 PM Cong Wang wrote: > > On Thu, Nov 15, 2018 at 8:52 PM Eric Dumazet wrote: > > > > You could use trafgen to cook such a frame and confirm the theory. > > > > Something like : > > I will try it. I just tried it, it doesn't make much difference, the warning only

Re: [PATCH net-next 00/14] gred: add offload support

2018-11-19 Thread David Miller
From: Jakub Kicinski Date: Mon, 19 Nov 2018 15:21:36 -0800 > This series adds support for GRED offload in the nfp driver. So > far we have only supported the RED Qdisc offload, but we need a > way to differentiate traffic types e.g. based on DSCP marking. > > It may seem like PRIO+RED is a

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-19 Thread David Ahern
On 11/9/18 5:06 PM, David Ahern wrote: > On 11/9/18 9:21 AM, David Ahern wrote: >>> Is there possible to add only counters from xdp for vlans ? >>> This will help me in testing. >> I will take a look today at adding counters that you can dump using >> bpftool. It will be a temporary solution for

[PATCH iproute2-next 3/8] tc: move RED flag printing to helper

2018-11-19 Thread Jakub Kicinski
Number of qdiscs use the same set of flags to control shared RED implementation. Add a helper for printing those flags. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tc/q_choke.c | 3 +-- tc/q_red.c | 14 ++ tc/q_sfq.c | 3 +-- tc/tc_red.c | 20

[PATCH v2 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2018-11-19 Thread Rajat Jain
If the platform provides it, use the reset gpio to reset the BT chip (requested by the HCI core if needed). This has been found helpful on some of Intel bluetooth controllers where the firmware gets stuck and the only way out is a hard reset pin provided by the platform. Signed-off-by: Rajat Jain

[PATCH net-next 00/14] gred: add offload support

2018-11-19 Thread Jakub Kicinski
Hi! This series adds support for GRED offload in the nfp driver. So far we have only supported the RED Qdisc offload, but we need a way to differentiate traffic types e.g. based on DSCP marking. It may seem like PRIO+RED is a good match for this job, however, (a) we don't need strict priority

[PATCH net-next 12/14] nfp: abm: add functions to update DSCP -> virtual queue map

2018-11-19 Thread Jakub Kicinski
Learn how to set the DSCP map. FW uses a packed array which geometry depends on the number of supported priorities and virtual queues. Write code to assemble this map and to communicate the setting to the FW via mailbox. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley ---

[PATCH net-next 07/14] net: sched: gred: support reporting stats from offloads

2018-11-19 Thread Jakub Kicinski
Allow drivers which offload GRED to report back statistics. Since A lot of GRED stats is fairly ad hoc in nature pass to drivers the standard struct gnet_stats_basic/gnet_stats_queue pairs, and untangle the values in the core. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley ---

[PATCH net-next 05/14] nfp: abm: add up bands for sto/non-sto stats

2018-11-19 Thread Jakub Kicinski
Add up stats for all bands for the extra ethtool statistics. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 36 --- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git

[PATCH net-next 11/14] nfp: abm: calculate PRIO map len and check mailbox size

2018-11-19 Thread Jakub Kicinski
In preparation for PRIO offload calculate how long the prio map for FW will be and make sure the configuration can be performed via the vNIC mailbox. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 42 ++-

[PATCH net-next 14/14] nfp: abm: add support for more threshold actions

2018-11-19 Thread Jakub Kicinski
Original FW only allowed us to perform ECN marking. Newer releases also support plain old drop. Add the ability to configure drop policy. This is particularly useful in combination with GRED, because different bands can have different ECN marking setting. Signed-off-by: Jakub Kicinski

[PATCH net-next 03/14] nfp: abm: size threshold table to account for bands

2018-11-19 Thread Jakub Kicinski
Make sure the threshold table is large enough to hold information for all bands. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH net-next 04/14] nfp: abm: switch to extended stats for reading packet/byte counts

2018-11-19 Thread Jakub Kicinski
In PRIO-enabled FW read the statistics from per-band symbol, rather than from the standard per-PCIe-queue counters. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 47 +-- drivers/net/ethernet/netronome/nfp/abm/main.h |

[PATCH net-next 10/14] net: sched: cls_u32: add res to offload information

2018-11-19 Thread Jakub Kicinski
In case of egress offloads the class/flowid assigned by the filter may be very important for offloaded Qdisc selection. Provide this info to drivers. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- include/net/pkt_cls.h | 1 + net/sched/cls_u32.c | 2 ++ 2 files changed, 3

[PATCH net-next 01/14] nfp: abm: map per-band symbols

2018-11-19 Thread Jakub Kicinski
In preparation for multi-band RED offload if FW is capable map the extended symbols which will allow us to set per-band parameters and read stats. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 56 ++-

[PATCH bpf-next] bpf: libbpf: retry program creation without the name

2018-11-19 Thread Stanislav Fomichev
[Recent commit 23499442c319 ("bpf: libbpf: retry map creation without the name") fixed this issue for maps, let's do the same for programs.] Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support to specify BPF obj name"), libbpf unconditionally sets bpf_attr->name for programs. Pre

[PATCH iproute2] bpf: initialise map symbol before retrieving and comparing its type

2018-11-19 Thread Quentin Monnet
In order to compare BPF map symbol type correctly in regard to the latest LLVM, commit 7a04dd84a7f9 ("bpf: check map symbol type properly with newer llvm compiler") compares map symbol type to both NOTYPE and OBJECT. To do so, it first retrieves the type from "sym.st_info" and stores it into a

Re: [Patch net] net: invert the check of detecting hardware RX checksum fault

2018-11-19 Thread Eric Dumazet
On 11/19/2018 05:42 PM, Cong Wang wrote: > On Fri, Nov 16, 2018 at 12:15 PM Cong Wang wrote: >> >> On Thu, Nov 15, 2018 at 8:52 PM Eric Dumazet wrote: >>> >>> You could use trafgen to cook such a frame and confirm the theory. >>> >>> Something like : >> >> I will try it. > > I just tried it,

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-19 Thread David Ahern
On 11/19/18 7:16 PM, David Miller wrote: > From: Xin Long > Date: Thu, 15 Nov 2018 16:23:38 +0900 > >> The attachment is the ip6_dst.sh with IPVS. >> >> # sh ip6_dst.sh > > Maybe a selftests candidate? > That script was not a reliable reproducer for me. I created a much simpler one that

[PATCH bpf-next] bpf: libbpf: retry map creation without the name

2018-11-19 Thread Stanislav Fomichev
Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support to specify BPF obj name"), libbpf unconditionally sets bpf_attr->name for maps. Pre v4.14 kernels don't know about map names and return an error about unexpected non-zero data. Retry sys_bpf without a map name to cover older

Re: [PATCH net-next 01/18] net: skb_scrub_packet(): Scrub offload_fwd_mark

2018-11-19 Thread Petr Machata
David Miller writes: > From: Ido Schimmel > Date: Mon, 19 Nov 2018 16:11:07 + > >> From: Petr Machata >> >> When a packet is trapped and the corresponding SKB marked as >> already-forwarded, it retains this marking even after it is forwarded >> across veth links into another bridge.

Re: [PATCH bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-19 Thread Y Song
On Mon, Nov 19, 2018 at 4:13 PM Nikita V. Shirokov wrote: > > idea is pretty simple. for specified map (pointed by struct bpf_map) > we would provide descriptor of already loaded map, which is going to be > used as a prototype for inner map. proposed workflow: > 1) open bpf's object

[PATCH v1 1/2] ip6_tunnel: Adding support of mapping rules for MAP-E tunnel

2018-11-19 Thread Felix Jia
From: Blair Steven Mapping of Addresses and Ports with Encapsulation (MAP-E) is defined in RFC7597, and is an IPv6 transition technology providing interoperability between IPv4 and IPv6 networks. MAP-E uses the encapsulation mode described in RFC2473 (IPv6 Tunneling) to transport IPv4 and IPv6

Re: [PATCH net-next 00/11] r8169: series with further smaller improvements

2018-11-19 Thread David Miller
From: Heiner Kallweit Date: Mon, 19 Nov 2018 22:30:25 +0100 > Again nothing exciting, just smaller improvements. Series applied, thank you!

[PATCH v1 2/2] netfilter: Add PSID mode to MASQUERADE

2018-11-19 Thread Felix Jia
From: Blair Steven This adds support for masquerading into a smaller subset of ports - defined by the PSID values from RFC-7597 Section 5.1. This is part of the support for MAP-E, which allows multiple devices to share an IPv4 address by splitting the L4 port / id into ranges by both

Re: [PATCH net-next 00/18] selftests: Add tests for VXLAN at an 802.1d bridge

2018-11-19 Thread David Miller
From: Ido Schimmel Date: Mon, 19 Nov 2018 16:11:06 + > This patchset adds several tests for VXLAN attached to an 802.1d bridge > and fixes a related bug. So I'm still applying this as-is to net-next, but I still expect patch #1 to be submitted to net. Thanks.

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-19 Thread David Miller
From: Xin Long Date: Thu, 15 Nov 2018 16:23:38 +0900 > The attachment is the ip6_dst.sh with IPVS. > > # sh ip6_dst.sh Maybe a selftests candidate?

Re: [PATCH net 0/2] qed: Fix Queue Manager getters

2018-11-19 Thread David Miller
From: Denis Bolotin Date: Mon, 19 Nov 2018 16:28:29 +0200 > This patch series fixes various queue manager getter functions. It is > important to make sure the getter's caller will receive a valid queue even > in error case to prevent more serious bugs. > Please consider applying to net. Series

[PATCH bpf-next v2] bpf: libbpf: retry map creation without the name

2018-11-19 Thread Stanislav Fomichev
Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support to specify BPF obj name"), libbpf unconditionally sets bpf_attr->name for maps. Pre v4.14 kernels don't know about map names and return an error about unexpected non-zero data. Retry sys_bpf without a map name to cover older

Re: [PATCH] ipv4: allow newer DSCP values in ip rules

2018-11-19 Thread David Miller
From: Pavel Balaev Date: Mon, 19 Nov 2018 12:00:45 +0300 > After this patch this one can use it: You can "configure it" but it doesn't work at all. Did you test this in any way beyond simply dumping the FIB rule tables? The whole kernel masks the TOS value using RT_TOS() so it is going to

[net 07/13] net/mlx5e: Apply the correct check for supporting TC esw rules split

2018-11-19 Thread Saeed Mahameed
From: Roi Dayan The mirror and not the output count is the one denoting a split. Fix to condition the offload attempt on the mirror count being > 0 along the firmware to have the related capability. Fixes: 592d36515969 ("net/mlx5e: Parse mirroring action for offloaded TC eswitch flows")

[net 10/13] net/mlx5e: Fix a bug in turning off FEC policy in unsupported speeds

2018-11-19 Thread Saeed Mahameed
From: Shay Agroskin Some speeds don't support turning FEC policy off. In case a requested FEC policy is not supported for a speed (including current speed), its new FEC policy would be: no FEC - if disabling FEC is supported for that speed unchanged - else Fixes: 2095b2641477

[net 09/13] net/mlx5e: Fix selftest for small MTUs

2018-11-19 Thread Saeed Mahameed
From: Valentine Fatiev Loopback test had fixed packet size, which can be bigger than configured MTU. Shorten the loopback packet size to be bigger than minimal MTU allowed by the device. Text field removed from struct 'mlx5ehdr' as redundant to allow send small packets as minimal allowed MTU.

[net 03/13] net/mlx5e: Don't match on vlan non-existence if ethertype is wildcarded

2018-11-19 Thread Saeed Mahameed
From: Or Gerlitz For the "all" ethertype we should not care whether the packet has vlans. Besides being wrong, the way we did it caused FW error for rules such as: tc filter add dev eth0 protocol all parent : \ prio 1 flower skip_sw action drop b/c the matching meta-data (outer

[net 11/13] net/mlx5e: Fix wrong field name in FEC related functions

2018-11-19 Thread Saeed Mahameed
From: Shay Agroskin This bug would result in reading wrong FEC capabilities for 10G/40G. Fixes: 2095b2641477 ("net/mlx5e: Add port FEC get/set functions") Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/port.c | 4 ++-- 1 file

[net 13/13] net/mlx5e: Fix failing ethtool query on FEC query error

2018-11-19 Thread Saeed Mahameed
From: Shay Agroskin If FEC caps query fails when executing 'ethtool ' the whole callback fails unnecessarily, fixed that by replacing the error return code with debug logging only. Fixes: 6cfa94605091 ("net/mlx5e: Ethtool driver callback for query/set FEC policy") Signed-off-by: Shay Agroskin

[net 12/13] net/mlx5e: Removed unnecessary warnings in FEC caps query

2018-11-19 Thread Saeed Mahameed
From: Shay Agroskin Querying interface FEC caps with 'ethtool [int]' after link reset throws warning regading link speed. This warning is not needed as there is already an indication in user space that the link is not up. Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration")

[net 01/13] net/mlx5: IPSec, Fix the SA context hash key

2018-11-19 Thread Saeed Mahameed
From: Raed Salem The commit "net/mlx5: Refactor accel IPSec code" introduced a bug where asynchronous short time change in hash key value by create/release SA context might happen during an asynchronous hash resize operation this could cause a subsequent remove SA context operation to fail as

[net 02/13] net/mlx5e: IPoIB, Reset QP after channels are closed

2018-11-19 Thread Saeed Mahameed
From: Denis Drozdov The mlx5e channels should be closed before mlx5i_uninit_underlay_qp puts the QP into RST (reset) state during mlx5i_close. Currently QP state incorrectly set to RST before channels got deactivated and closed, since mlx5_post_send request expects QP in RTS (Ready To Send)

[pull request][net 00/13] Mellanox, mlx5 fixes 2018-11-19

2018-11-19 Thread Saeed Mahameed
Hi Dave, The following fixes are for mlx5 core and netdev driver. For -stable v4.16 bc7fda7d4637 ('net/mlx5e: IPoIB, Reset QP after channels are closed') For -stable v4.17 36917a270395 ('net/mlx5: IPSec, Fix the SA context hash key') For -stable v4.18 6492a432be3a ('net/mlx5e: Always use the

[net 08/13] net/mlx5e: RX, verify received packet size in Linear Striding RQ

2018-11-19 Thread Saeed Mahameed
From: Moshe Shemesh In case of striding RQ, we use MPWRQ (Multi Packet WQE RQ), which means that WQE (RX descriptor) can be used for many packets and so the WQE is much bigger than MTU. In virtualization setups where the port mtu can be larger than the vf mtu, if received packet is bigger than

[net 06/13] net/mlx5e: Adjust to max number of channles when re-attaching

2018-11-19 Thread Saeed Mahameed
From: Yuval Avnery When core driver enters deattach/attach flow after pci reset, Number of logical CPUs may have changed. As a result we need to update the cpu affiliated resource tables. 1. indirect rqt list 2. eq table Reproduction (PowerPC): echo 1000 >

[net 04/13] net/mlx5e: Claim TC hw offloads support only under a proper build config

2018-11-19 Thread Saeed Mahameed
From: Or Gerlitz Currently, we are only supporting tc hw offloads when the eswitch support is compiled in, but we are not gating the adevertizment of the NETIF_F_HW_TC feature on this config being set. Fix it, and while doing that, also avoid dealing with the feature on ethtool when the config

[net 05/13] net/mlx5e: Always use the match level enum when parsing TC rule match

2018-11-19 Thread Saeed Mahameed
From: Or Gerlitz We get the match level (none, l2, l3, l4) while going over the match dissectors of an offloaded tc rule. When doing this, the match level enum and the not min inline enum values should be used, fix that. This worked accidentally b/c both enums have the same numerical values.

Re: [PATCH iproute2] bpf: initialise map symbol before retrieving and comparing its type

2018-11-19 Thread Y Song
On Mon, Nov 19, 2018 at 5:28 PM Quentin Monnet wrote: > > In order to compare BPF map symbol type correctly in regard to the > latest LLVM, commit 7a04dd84a7f9 ("bpf: check map symbol type properly > with newer llvm compiler") compares map symbol type to both NOTYPE and > OBJECT. To do so, it

Re: [PATCH iproute2-next 2/8] json: add %hhu helpers

2018-11-19 Thread Jakub Kicinski
On Mon, 19 Nov 2018 17:18:42 -0800, Stephen Hemminger wrote: > > void jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short > > num) > > { > > jsonw_name(self, prop); > > Do you really need this? it turns out that because of C type > conversions print_uint should just

  1   2   3   >