Re: [Intel-wired-lan] [PATCH bpf-next v4 03/11] libbpf: add flags to umem config

2019-07-31 Thread Andrii Nakryiko
On Wed, Jul 31, 2019 at 8:21 AM Björn Töpel wrote: > > On Tue, 30 Jul 2019 at 19:43, Kevin Laatz wrote: > > > > This patch adds a 'flags' field to the umem_config and umem_reg structs. > > This will allow for more options to be added for configuring umems. > > > > The first use for the flags fiel

[PATCH v3 bpf-next 12/12] selftests/bpf: add CO-RE relocs misc tests

2019-07-31 Thread Andrii Nakryiko
Add tests validating few edge-cases of capturing offset relocations. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/core_reloc.c | 19 ++ .../bpf/progs/btf__core_reloc_misc.c | 4 ++ .../selftests/bpf/progs/core_reloc_types.h| 25 .../bpf/progs/tes

[PATCH v3 bpf-next 08/12] selftests/bpf: add CO-RE relocs enum/ptr/func_proto tests

2019-07-31 Thread Andrii Nakryiko
Test CO-RE relocation handling of ints, enums, pointers, func protos, etc. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 36 ++ .../bpf/progs/btf__core_reloc_primitives.c| 3 + ...f__core_reloc_primitives___diff_enum_def.c |

[PATCH v3 bpf-next 04/12] selftests/bpf: add CO-RE relocs testing setup

2019-07-31 Thread Andrii Nakryiko
Add CO-RE relocation test runner. Add one simple test validating that libbpf's logic for searching for kernel image and loading BTF out of it works. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 125 ++ .../bpf/progs/test_c

[PATCH v3 bpf-next 05/12] selftests/bpf: add CO-RE relocs struct flavors tests

2019-07-31 Thread Andrii Nakryiko
Add tests verifying that BPF program can use various struct/union "flavors" to extract data from the same target struct/union. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 34 ++ .../bpf/progs/btf__core_reloc_flavors.c | 3

[PATCH v3 bpf-next 00/12] CO-RE offset relocations

2019-07-31 Thread Andrii Nakryiko
This patch set implements central part of CO-RE (Compile Once - Run Everywhere, see [0] and [1] for slides and video): relocating fields offsets. Most of the details are written down as comments to corresponding parts of the code. Patch #1 adds loading of .BTF.ext offset relocations section and ma

[PATCH v3 bpf-next 07/12] selftests/bpf: add CO-RE relocs array tests

2019-07-31 Thread Andrii Nakryiko
Add tests for various array handling/relocation scenarios. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 41 ++ .../bpf/progs/btf__core_reloc_arrays.c| 3 + .../btf__core_reloc_arrays___diff_arr_dim.c | 3 + ...btf__cor

[PATCH v3 bpf-next 03/12] selftests/bpf: add BPF_CORE_READ relocatable read macro

2019-07-31 Thread Andrii Nakryiko
Add BPF_CORE_READ macro used in tests to do bpf_core_read(), which automatically captures offset relocation. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/bpf_helpers.h | 20 1 file changed, 20 insertions(+) diff --git a/tools/testing/selftests/bpf/bpf_help

[PATCH v3 bpf-next 11/12] selftests/bpf: add CO-RE relocs ints tests

2019-07-31 Thread Andrii Nakryiko
Add various tests validating handling compatible/incompatible integer types. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 40 +++ .../bpf/progs/btf__core_reloc_ints.c | 3 + .../bpf/progs/btf__core_reloc_ints___bool.c |

[PATCH v3 bpf-next 01/12] libbpf: add .BTF.ext offset relocation section loading

2019-07-31 Thread Andrii Nakryiko
Add support for BPF CO-RE offset relocations. Add section/record iteration macros for .BTF.ext. These macro are useful for iterating over each .BTF.ext record, either for dumping out contents or later for BPF CO-RE relocation handling. To enable other parts of libbpf to work with .BTF.ext contents

[PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-31 Thread Andrii Nakryiko
This patch implements the core logic for BPF CO-RE offsets relocations. Every instruction that needs to be relocated has corresponding bpf_offset_reloc as part of BTF.ext. Relocations are performed by trying to match recorded "local" relocation spec against potentially many compatible "target" type

[PATCH v3 bpf-next 06/12] selftests/bpf: add CO-RE relocs nesting tests

2019-07-31 Thread Andrii Nakryiko
Add a bunch of test validating correct handling of nested structs/unions. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 39 +++ .../bpf/progs/btf__core_reloc_nesting.c | 3 + .../btf__core_reloc_nesting___anon_embed.c| 3 +

[PATCH v3 bpf-next 09/12] selftests/bpf: add CO-RE relocs modifiers/typedef tests

2019-07-31 Thread Andrii Nakryiko
Add tests validating correct handling of various combinations of typedefs and const/volatile/restrict modifiers. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 27 +++ .../bpf/progs/btf__core_reloc_mods.c | 3 + .../progs/btf_

[PATCH v3 bpf-next 10/12] selftests/bpf: add CO-RE relocs ptr-as-array tests

2019-07-31 Thread Andrii Nakryiko
Add test validating correct relocation handling for cases where pointer to something is used as an array. E.g.: int *ptr = ...; int x = ptr[42]; Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 20 + .../bpf/progs/btf__core_r

Re: [PATCH net-next v5 6/6] netfilter: nf_tables_offload: support indr block call

2019-07-31 Thread wenxu
On 8/1/2019 11:58 AM, Yunsheng Lin wrote: > On 2019/8/1 11:03, we...@ucloud.cn wrote: >> From: wenxu >> >> nftable support indr-block call. It makes nftable an offload vlan >> and tunnel device. >> >> nft add table netdev firewall >> nft add chain netdev firewall aclout { type filter hook ingres

[PATCH net-next 01/12] net: hns3: add link change event report

2019-07-31 Thread Huazhong Tan
From: Jian Shen Previously, PF updates link status per second. For some scenario, it requires link down event being reported more quickly. To solve it, firmware pushes the link change event to PF with CMDQ message, and driver updates the link status directly. Signed-off-by: Jian Shen Reviewed-b

[PATCH net-next 10/12] net: hns3: fix some reset handshake issue

2019-07-31 Thread Huazhong Tan
Currently, the driver sets handshake status to tell the hardware that the driver have downed the netdev and it can continue with reset process. The driver will clear the handshake status when re-initializing the CMDQ, and does not recover this status when reset fail, which may cause the hardware to

[PATCH net-next 02/12] net: hns3: add handler for NCSI error mailbox

2019-07-31 Thread Huazhong Tan
When NCSI has HW error, the IMP will report this error to the driver by sending a mailbox. After received this message, the driver should assert a global reset to fix this kind of HW error. Signed-off-by: Huazhong Tan Reviewed-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h

[PATCH net-next 06/12] net: hns3: minor cleanup in hns3_clean_rx_ring

2019-07-31 Thread Huazhong Tan
From: Yunsheng Lin The unused_count variable is used to indicate how many RX BD need attaching new buffer in hns3_clean_rx_ring, and the clean_count variable has the similar meaning. This patch removes the clean_count variable and use unused_count to uniformly indicate the RX BD that need attach

[PATCH net-next 03/12] net: hns3: do not query unsupported commands in debugfs

2019-07-31 Thread Huazhong Tan
From: Yufeng Mo Some commands are not supported on DCB-unsupported ports. This patch distinguishes these commands and does not query unsupported commands in debugfs. This patch also fix an error in the dump "qos buf cfg" command in debugfs. Fixes: 2849d4e7a1be ("net: hns3: Add "tc config" info

[PATCH net-next 07/12] net: hns3: minior error handling change for hclge_tm_schd_info_init

2019-07-31 Thread Huazhong Tan
From: Yunsheng Lin When hclge_tm_schd_info_update calls hclge_tm_schd_info_init to initialize the schedule info, hdev->tm_info.num_pg and hdev->tx_sch_mode is not changed, which makes the checking in hclge_tm_schd_info_init unnecessary. So this patch moves the hdev->tm_info.num_pg and hdev->tx_s

Re: [PATCH net-next v5 6/6] netfilter: nf_tables_offload: support indr block call

2019-07-31 Thread Yunsheng Lin
On 2019/8/1 11:03, we...@ucloud.cn wrote: > From: wenxu > > nftable support indr-block call. It makes nftable an offload vlan > and tunnel device. > > nft add table netdev firewall > nft add chain netdev firewall aclout { type filter hook ingress offload > device mlx_pf0vf0 priority - 300 \; }

RE: [PATCH net] r8152: fix typo in register name

2019-07-31 Thread Hayes Wang
> From: Kevin Lo [mailto:ke...@kevlo.org] > Sent: Thursday, August 01, 2019 11:30 AM > To: Hayes Wang > Cc: netdev@vger.kernel.org > Subject: [PATCH net] r8152: fix typo in register name > > It is likely that PAL_BDC_CR should be PLA_BDC_CR. > > Signed-off-by: Kevin Lo Acked-by: Hayes Wang Be

Re: [PATCH bpf 1/2] bpf: fix x64 JIT code generation for jmp to 1st insn

2019-07-31 Thread Alexei Starovoitov
On Wed, Jul 31, 2019 at 12:36 PM Song Liu wrote: > > > > > On Jul 30, 2019, at 6:38 PM, Alexei Starovoitov wrote: > > > > Introduction of bounded loops exposed old bug in x64 JIT. > > JIT maintains the array of offsets to the end of all instructions to > > compute jmp offsets. > > addrs[0] - offs

Re: [PATCH bpf v2] libbpf : make libbpf_num_possible_cpus function thread safe

2019-07-31 Thread Alexei Starovoitov
On Wed, Jul 31, 2019 at 3:11 PM Takshak Chahande wrote: > > Having static variable `cpus` in libbpf_num_possible_cpus function > without guarding it with mutex makes this function thread-unsafe. > > If multiple threads accessing this function, in the current form; it > leads to incrementing the st

[PATCH net] r8152: fix typo in register name

2019-07-31 Thread Kevin Lo
It is likely that PAL_BDC_CR should be PLA_BDC_CR. Signed-off-by: Kevin Lo --- diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 39e0768d734d..0cc03a9ff545 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -50,7 +50,7 @@ #define PLA_TEREDO_WAKE_BASE 0xc0c

[PATCH net-next 3/6] cls_api: add flow_indr_block_call function

2019-07-31 Thread wenxu
From: wenxu This patch make indr_block_call don't access struct tc_indr_block_cb and tc_indr_block_dev directly Signed-off-by: wenxu --- v5: new patch net/sched/cls_api.c | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/net/sched/cls_api.

[PATCH net-next v5 6/6] netfilter: nf_tables_offload: support indr block call

2019-07-31 Thread wenxu
From: wenxu nftable support indr-block call. It makes nftable an offload vlan and tunnel device. nft add table netdev firewall nft add chain netdev firewall aclout { type filter hook ingress offload device mlx_pf0vf0 priority - 300 \; } nft add rule netdev firewall aclout ip daddr 10.0.0.1 fwd

[PATCH net-next v5 4/6] flow_offload: move tc indirect block to flow offload

2019-07-31 Thread wenxu
From: wenxu move tc indirect block to flow_offload and rename it to flow indirect block.The nf_tables can use the indr block architecture. Signed-off-by: wenxu --- v5: make flow_indr_block_cb/dev in c file drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 +- .../net/ethernet/netronom

[PATCH net-next v5 2/6] cls_api: replace block with flow_block in tc_indr_block_dev

2019-07-31 Thread wenxu
From: wenxu This patch make tc_indr_block_dev can separate from tc subsystem Signed-off-by: wenxu --- v5: new patch net/sched/cls_api.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 2e3b58d.

[PATCH net-next v5 0/6] flow_offload: add indr-block in nf_table_offload

2019-07-31 Thread wenxu
From: wenxu This series patch make nftables offload support the vlan and tunnel device offload through indr-block architecture. The first four patches mv tc indr block to flow offload and rename to flow-indr-block. Because the new flow-indr-block can't get the tcf_block directly. The fifthe patc

[PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-07-31 Thread wenxu
From: wenxu The new flow-indr-block can't get the tcf_block directly. It provide a callback list to find the flow_block immediately when the device register and contain a ingress block. Signed-off-by: wenxu --- v5: add get_block_cb_list for both nft and tc include/net/flow_offload.h | 17

[PATCH net-next v5 1/6] cls_api: modify the tc_indr_block_ing_cmd parameters.

2019-07-31 Thread wenxu
From: wenxu This patch make tc_indr_block_ing_cmd can't access struct tc_indr_block_dev and tc_indr_block_cb. Signed-off-by: wenxu --- v5: new patch net/sched/cls_api.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/net/sched/cls_api.c b/net/s

Re: [RFC iproute2 0/4] Revert tc batchsize feature

2019-07-31 Thread Dave Taht
Does this fix my longstanding issue with piping commands into it? :P ( https://github.com/tohojo/flent/issues/146 ) On Wed, Jul 31, 2019 at 5:46 PM Stephen Hemminger wrote: > > The batchsize feature of tc might save a few cycles but it > is a maintaince nightmare, it has uninitialized variables

[RFC iproute2 1/4] Revert "tc: Remove pointless assignments in batch()"

2019-07-31 Thread Stephen Hemminger
This reverts commit 6358bbc381c6e38465838370bcbbdeb77ec3565a. --- tc/tc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tc/tc.c b/tc/tc.c index 64e342dd85bf..1f23971ae4b9 100644 --- a/tc/tc.c +++ b/tc/tc.c @@ -326,11 +326,11 @@ static int batch(const char *name) st

[RFC iproute2 2/4] Revert "tc: flush after each command in batch mode"

2019-07-31 Thread Stephen Hemminger
This reverts commit d66fdfda71e4a30c1ca0ddb7b1a048bef30fe79e. --- tc/tc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tc/tc.c b/tc/tc.c index 1f23971ae4b9..c115155b2234 100644 --- a/tc/tc.c +++ b/tc/tc.c @@ -405,7 +405,6 @@ static int batch(const char *name) err = do_cmd(l

[RFC iproute2 4/4] Revert "tc: Add batchsize feature for filter and actions"

2019-07-31 Thread Stephen Hemminger
This reverts commit 485d0c6001c4aa134b99c86913d6a7089b7b2ab0. --- tc/m_action.c | 65 ++-- tc/tc.c| 199 - tc/tc_common.h | 7 +- tc/tc_filter.c | 129 4 files changed, 87 insertions(+), 313 de

[RFC iproute2 3/4] Revert "tc: fix batch force option"

2019-07-31 Thread Stephen Hemminger
This reverts commit b133392468d1f404077a8f3554d1f63d48bb45e8. --- tc/tc.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tc/tc.c b/tc/tc.c index c115155b2234..b7b6bd288897 100644 --- a/tc/tc.c +++ b/tc/tc.c @@ -334,7 +334,6 @@ static int batch(const char *

[RFC iproute2 0/4] Revert tc batchsize feature

2019-07-31 Thread Stephen Hemminger
The batchsize feature of tc might save a few cycles but it is a maintaince nightmare, it has uninitialized variables and poor error handling. This patch set reverts back to the original state. Please don't resubmit original code. Go back to the drawing board and do something generic. For example

Re: [PATCH] net/mlx5e: Allow removing representors netdev to other namespace

2019-07-31 Thread Tonghao Zhang
On Wed, May 22, 2019 at 12:49 PM Or Gerlitz wrote: > > On Wed, May 22, 2019 at 4:26 AM Tonghao Zhang > wrote: > > > I review the reps of netronome nfp codes, nfp does't set the > > NETIF_F_NETNS_LOCAL to netdev->features. > > And I changed the OFED codes which used for our product environment,

Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning

2019-07-31 Thread Randy Dunlap
This does not address >> the several -Wint-to-pointer-cast and -Wpointer-to-int-cast warnings >> that appeared as a result of commit 171a9bae68c7 ("staging/octeon: >> Allow test build on !MIPS") in these files. >> >> Fixes: 171a9bae68c7 ("staging/octeon:

Re: [PATCH net-next] be2net: disable bh with spin_lock in be_process_mcc

2019-07-31 Thread David Miller
From: Denis Kirjanov Date: Tue, 30 Jul 2019 13:32:26 +0200 > Signed-off-by: Denis Kirjanov Empty commit message, no way. You must explain what this patch is doing, and why.

Re: [patch net-next v2 0/3] net: devlink: Finish network namespace support

2019-07-31 Thread David Miller
From: Jiri Pirko Date: Tue, 30 Jul 2019 10:57:31 +0200 > Devlink from the beginning counts with network namespaces, but the > instances has been fixed to init_net. The first patch allows user > to move existing devlink instances into namespaces: ... I read this thread and see there will be a v3

Re: [PATCH nf,v2] netfilter: nf_tables: map basechain priority to hardware priority

2019-07-31 Thread Jakub Kicinski
On Wed, 31 Jul 2019 14:16:56 +0200, Pablo Neira Ayuso wrote: > This patch adds initial support for offloading basechains using the > priority range from -8192 to 8191. > > The software priority -8192 is mapped to the hardware priority > 0xC000 + 1. tcf_auto_prio() uses 0xC000 if the user specifies

Re: [PATCH v2 net-next 1/1] tc-testing: Clarify the use of tdc's -d option

2019-07-31 Thread David Miller
From: Lucas Bates Date: Mon, 29 Jul 2019 19:18:12 -0400 > The -d command line argument to tdc requires the name of a physical device > on the system where the tests will be run. If -d has not been used, tdc > will skip tests that require a physical device. > > This patch is intended to better do

Re: [PATCH 00/14] ARM: move lpc32xx and dove to multiplatform

2019-07-31 Thread Russell King - ARM Linux admin
On Wed, Jul 31, 2019 at 09:56:42PM +0200, Arnd Bergmann wrote: > For dove, the patches are basically what I had proposed back in > 2015 when all other ARMv6/ARMv7 machines became part of a single > kernel build. I don't know what the state is mach-dove support is, > compared to the DT based support

Re: [PATCH net] selftests/tls: fix TLS tests with CONFIG_TLS=n

2019-07-31 Thread David Miller
From: Jakub Kicinski Date: Mon, 29 Jul 2019 16:08:03 -0700 > Build bot reports some recent TLS tests are failing > with CONFIG_TLS=n. Correct the expected return code > and skip TLS installation if not supported. > > Tested with CONFIG_TLS=n and CONFIG_TLS=m. > > Reported-by: kernel test robot

Re: [pull request][net-next 00/13] Mellanox, mlx5 tc flow handling for concurrent execution (Part 1)

2019-07-31 Thread David Miller
From: Saeed Mahameed Date: Mon, 29 Jul 2019 23:50:14 + > This series, mostly from Vlad, is the first part of ongoing work to > improve mlx5 tc flow handling by removing dependency on rtnl_lock and > providing a more fine-grained locking and rcu safe data structures. > > For more information

Re: [PATCH bpf v2] libbpf : make libbpf_num_possible_cpus function thread safe

2019-07-31 Thread Jakub Kicinski
On Wed, 31 Jul 2019 15:10:55 -0700, Takshak Chahande wrote: > Having static variable `cpus` in libbpf_num_possible_cpus function > without guarding it with mutex makes this function thread-unsafe. > > If multiple threads accessing this function, in the current form; it > leads to incrementing the

Re: [patch net-next 0/3] net: devlink: Finish network namespace support

2019-07-31 Thread David Ahern
On 7/31/19 4:28 PM, Jakub Kicinski wrote: > On Wed, 31 Jul 2019 16:07:31 -0600, David Ahern wrote: >> On 7/31/19 4:02 PM, Jakub Kicinski wrote: >>> Can you elaborate further? Ports for most purposes are represented by >>> netdevices. Devlink port instances expose global topological view of >>> the

Re: [patch net-next 0/3] net: devlink: Finish network namespace support

2019-07-31 Thread Jakub Kicinski
On Wed, 31 Jul 2019 16:07:31 -0600, David Ahern wrote: > On 7/31/19 4:02 PM, Jakub Kicinski wrote: > > Can you elaborate further? Ports for most purposes are represented by > > netdevices. Devlink port instances expose global topological view of > > the ports which is primarily relevant if you can

Re: [Potential Spoof] [PATCH bpf v2] libbpf : make libbpf_num_possible_cpus function thread safe

2019-07-31 Thread Andrey Ignatov
Takshak Chahande [Wed, 2019-07-31 15:11 -0700]: > Having static variable `cpus` in libbpf_num_possible_cpus function > without guarding it with mutex makes this function thread-unsafe. > > If multiple threads accessing this function, in the current form; it > leads to incrementing the static vari

[PATCH bpf v2] libbpf : make libbpf_num_possible_cpus function thread safe

2019-07-31 Thread Takshak Chahande
Having static variable `cpus` in libbpf_num_possible_cpus function without guarding it with mutex makes this function thread-unsafe. If multiple threads accessing this function, in the current form; it leads to incrementing the static variable value `cpus` in the multiple of total available CPUs.

Re: [patch net-next 0/3] net: devlink: Finish network namespace support

2019-07-31 Thread David Ahern
On 7/31/19 4:02 PM, Jakub Kicinski wrote: > On Wed, 31 Jul 2019 15:50:26 -0600, David Ahern wrote: >> On 7/30/19 12:08 AM, Jiri Pirko wrote: >>> Mon, Jul 29, 2019 at 10:17:25PM CEST, dsah...@gmail.com wrote: On 7/27/19 3:44 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Devlink

Re: [patch net-next 0/3] net: devlink: Finish network namespace support

2019-07-31 Thread Jakub Kicinski
On Wed, 31 Jul 2019 15:50:26 -0600, David Ahern wrote: > On 7/30/19 12:08 AM, Jiri Pirko wrote: > > Mon, Jul 29, 2019 at 10:17:25PM CEST, dsah...@gmail.com wrote: > >> On 7/27/19 3:44 AM, Jiri Pirko wrote: > >>> From: Jiri Pirko > >>> > >>> Devlink from the beginning counts with network namesp

Re: [PATCH 0/2] tools: bpftool: add net (un)load command to load XDP

2019-07-31 Thread David Ahern
On 7/30/19 7:21 PM, Jakub Kicinski wrote: > If bpftool was taught to do equivalent of 'ip link' that would be very different story and I would be opposed to that. >>> Yes, that'd be pretty clear cut, only the XDP stuff is a bit more >>> of a judgement call. >> bpftool must be able t

Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning

2019-07-31 Thread Randy Dunlap
9bae68c7 ("staging/octeon: > Allow test build on !MIPS") in these files. > > Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") > Reported-by: kbuild test robot > Reported-by: Mark Brown > Reported-by: Randy Dunlap > Signed-off-by: Nathan Cha

Re: [patch net-next 0/3] net: devlink: Finish network namespace support

2019-07-31 Thread David Ahern
On 7/30/19 12:08 AM, Jiri Pirko wrote: > Mon, Jul 29, 2019 at 10:17:25PM CEST, dsah...@gmail.com wrote: >> On 7/27/19 3:44 AM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Devlink from the beginning counts with network namespaces, but the >>> instances has been fixed to init_net. The first patch

[PATCH net] net: phy: fix race in genphy_update_link

2019-07-31 Thread Heiner Kallweit
In phy_start_aneg() autoneg is started, and immediately after that link and autoneg status are read. As reported in [0] it can happen that at time of this read the PHY has reset the "aneg complete" bit but not yet the "link up" bit, what can result in a false link-up detection. To fix this don't re

[net-next 08/16] ice: Only bump Rx tail and release buffers once per napi_poll

2019-07-31 Thread Jeff Kirsher
From: Brett Creeley Currently we bump the Rx tail and release/give buffers to hardware every 16 descriptors. This causes us to bump Rx tail up to 4 times per napi_poll call. Also we are always bumping tail on an odd index and this is a problem because hardware ignores the lower 3 bits in the QRX_

[net-next 09/16] ice: Set up Tx scheduling tree based on alloc VSI Tx queues

2019-07-31 Thread Jeff Kirsher
From: Akeem G Abodunrin This patch uses allocated number of Tx queues per VSI to set up its scheduling tree instead of using total number of available Tx queues. Only PF VSIs have total number of allocated Tx queues equal to number of available Tx queues, other VSIs have different number of queue

[net-next 04/16] ice: Always set prefena when configuring an Rx queue

2019-07-31 Thread Jeff Kirsher
From: Brett Creeley Currently we are always setting prefena to 0. This is causing the hardware to only fetch descriptors when there are none free in the cache for a received packet instead of prefetching when it has used the last descriptor regardless of incoming packets. Fix this by allowing the

[net-next 06/16] ice: Do not configure port with no media

2019-07-31 Thread Jeff Kirsher
From: Tony Nguyen The firmware reports an error when trying to configure a port with no media. Instead of always configuring the port, check for media before attempting to configure it. In the absence of media, turn off link and poll for media to become available before re-enabling link. Move ic

[net-next 15/16] ice: Remove flag to track VF interrupt status

2019-07-31 Thread Jeff Kirsher
From: Akeem G Abodunrin As a result of refactoring of VF VSIs interrupts code, there is no need to track its configuration status again with ICE_VF_STATE_CFG_INTR flag - In fact, it is not being checked anywhere in the code right now, so this patch removes the dead code as applicable to the flag.

[net-next 12/16] ice: Remove duplicate code in ice_alloc_rx_bufs

2019-07-31 Thread Jeff Kirsher
From: Brett Creeley Currently if the call to ice_alloc_mapped_page() fails we jump to the no_buf label, possibly call ice_release_rx_desc(), and return true indicating that there is more work to do. In the success case we just fall out of the while loop, possibly call ice_alloc_mapped_page(), and

[net-next 03/16] ice: Move vector base setup to PF VSI

2019-07-31 Thread Jeff Kirsher
From: Tony Nguyen When interrupt tracking was refactored, during rebuild, the call to ice_vsi_setup_vector_base() was inadvertently removed from the PF VSI instead of being removed from the VF VSI. During reset, the failure to properly setup the vector base generates a call trace. Correct this so

[net-next 02/16] ice: track hardware stat registers past rollover

2019-07-31 Thread Jeff Kirsher
From: Jacob Keller Currently, ice_stat_update32 and ice_stat_update40 will limit the value of the software statistic to 32 or 40 bits wide, depending on which register is being read. This means that if a driver is running for a long time, the displayed software register values will roll over to

[net-next 14/16] ice: Remove unnecessary flag ICE_FLAG_MSIX_ENA

2019-07-31 Thread Jeff Kirsher
From: Brett Creeley This flag is not needed and is called every time we re-enable interrupts in the hotpath so remove it. Also remove ice_vsi_req_irq() because it was a wrapper function for ice_vsi_req_irq_msix() whose sole purpose was checking the ICE_FLAG_MSIX_ENA flag. Signed-off-by: Brett Cr

[net-next 13/16] ice: Don't return error for disabling LAN Tx queue that does exist

2019-07-31 Thread Jeff Kirsher
From: Akeem G Abodunrin Since Tx rings are being managed by FW/NVM, Tx rings might have not been set up or driver had already wiped them off - In that case, call to disable LAN Tx queue is being returned as not in existence. This patch makes sure we don't return unnecessary error for such scenari

[net-next 05/16] ice: separate out control queue lock creation

2019-07-31 Thread Jeff Kirsher
From: Jacob Keller The ice_init_all_ctrlq and ice_shutdown_all_ctrlq functions create and destroy the locks used to protect the send and receive process of each control queue. This is problematic, as the driver may use these functions to shutdown and re-initialize the control queues at run time.

[net-next 07/16] ice: Disable VFs until reset is completed

2019-07-31 Thread Jeff Kirsher
From: Akeem G Abodunrin This patch adds code to clear VFs enable status until reset is completed, and Tx/Rx rings are setup. Without this patch, the code flow request Tx queues to be disabled after reset, especially PFR - where VF VSI Tx rings have already been wiped off in the NVM and result to

[net-next 11/16] ice: Add stats for Rx drops at the port level

2019-07-31 Thread Jeff Kirsher
From: Brett Creeley Currently we are not reporting dropped counts at the port level to ethtool or netlink. This was found when debugging Rx dropped issues and the total packets sent did not equal the total packets received minus the rx_dropped, which was very confusing. To determine dropped count

[net-next 10/16] ice: Update number of VF queue before setting VSI resources

2019-07-31 Thread Jeff Kirsher
From: Akeem G Abodunrin In case there is a request from a VF to change its number of queues, and the request was successful, we need to update number of queues configured on the VF before updating corresponding VSI for that VF, especially LAN Tx queue tree and TC update, otherwise, we would conti

[net-next 00/16][pull request] 100GbE Intel Wired LAN Driver Updates 2019-07-31

2019-07-31 Thread Jeff Kirsher
This series contains updates to ice driver only. Paul adds support for reporting what the link partner is advertising for flow control settings. Jake fixes the hardware statistics register which is prone to rollover since the statistic registers are either 32 or 40 bits wide, depending on which r

[net-next 16/16] ice: Bump version number

2019-07-31 Thread Jeff Kirsher
From: Tony Nguyen Update driver version to 0.7.5 Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/driv

[net-next 01/16] ice: add lp_advertising flow control support

2019-07-31 Thread Jeff Kirsher
From: Paul Greenwalt Add support for reporting link partner advertising when ETHTOOL_GLINKSETTINGS defined. Get pause param reports the Tx/Rx pause configured, and then ethtool issues ETHTOOL_GSET ioctl and ice_get_settings_link_up reports the negotiated Tx/Rx pause. Negotiated pause frame report

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-07-31 Thread David Ahern
On 7/31/19 1:58 PM, David Ahern wrote: > On 7/31/19 1:46 PM, David Ahern wrote: >> On 7/31/19 1:45 PM, Jiri Pirko wrote: check. e.g., what happens if a resource controller has been configured for the devlink instance and it is moved to a namespace whose existing config exceeds those

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-07-31 Thread David Ahern
On 7/31/19 1:46 PM, David Ahern wrote: > On 7/31/19 1:45 PM, Jiri Pirko wrote: >>> check. e.g., what happens if a resource controller has been configured >>> for the devlink instance and it is moved to a namespace whose existing >>> config exceeds those limits? >> >> It's moved with all the values.

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-07-31 Thread David Ahern
On 7/31/19 1:45 PM, Jiri Pirko wrote: >> check. e.g., what happens if a resource controller has been configured >> for the devlink instance and it is moved to a namespace whose existing >> config exceeds those limits? > > It's moved with all the values. The whole instance is moved. > The values

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-07-31 Thread Jiri Pirko
Wed, Jul 31, 2019 at 09:41:10PM CEST, dsah...@gmail.com wrote: >On 7/31/19 1:26 PM, Jiri Pirko wrote: >> Wed, Jul 31, 2019 at 12:39:52AM CEST, jakub.kicin...@netronome.com wrote: >>> On Tue, 30 Jul 2019 10:57:32 +0200, Jiri Pirko wrote: From: Jiri Pirko All devlink instances are cre

Re: [PATCH] net: usb: pegasus: fix improper read if get_registers() fail

2019-07-31 Thread Petko Manolov
On 19-07-30 15:13:57, Denis Kirjanov wrote: > get_registers() may fail with -ENOMEM and in this > case we can read a garbage from the status variable tmp. > > Reported-by: syzbot+3499a83b2d062ae40...@syzkaller.appspotmail.com > Signed-off-by: Denis Kirjanov > --- > drivers/net/usb/pegasus.c | 2

Re: [PATCH] net: usb: pegasus: fix improper read if get_registers() fail

2019-07-31 Thread Petko Manolov
On 19-07-31 22:10:39, Petko Manolov wrote: > On 19-07-30 15:13:57, Denis Kirjanov wrote: > > get_registers() may fail with -ENOMEM and in this > > case we can read a garbage from the status variable tmp. > > > > Reported-by: syzbot+3499a83b2d062ae40...@syzkaller.appspotmail.com > > Signed-off-by:

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-07-31 Thread David Ahern
On 7/31/19 1:26 PM, Jiri Pirko wrote: > Wed, Jul 31, 2019 at 12:39:52AM CEST, jakub.kicin...@netronome.com wrote: >> On Tue, 30 Jul 2019 10:57:32 +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

Re: [PATCH bpf 2/2] selftests/bpf: tests for jmp to 1st insn

2019-07-31 Thread Song Liu
> On Jul 30, 2019, at 6:38 PM, Alexei Starovoitov wrote: > > Add 2 tests that check JIT code generation to jumps to 1st insn. > 1st test is similar to syzbot reproducer. > The backwards branch is never taken at runtime. > 2nd test has branch to 1st insn that executes. > The test is written as

Re: [PATCH bpf 1/2] bpf: fix x64 JIT code generation for jmp to 1st insn

2019-07-31 Thread Song Liu
> On Jul 30, 2019, at 6:38 PM, Alexei Starovoitov wrote: > > Introduction of bounded loops exposed old bug in x64 JIT. > JIT maintains the array of offsets to the end of all instructions to > compute jmp offsets. > addrs[0] - offset of the end of the 1st insn (that includes prologue). > addrs[

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-07-31 Thread Jiri Pirko
Wed, Jul 31, 2019 at 12:39:52AM CEST, jakub.kicin...@netronome.com wrote: >On Tue, 30 Jul 2019 10:57:32 +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 >> namesp

Re: [PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-31 Thread Song Liu
> On Jul 31, 2019, at 10:18 AM, Andrii Nakryiko > wrote: > > On Wed, Jul 31, 2019 at 1:30 AM Song Liu wrote: >> >> >> >>> On Jul 30, 2019, at 11:52 PM, Andrii Nakryiko >>> wrote: >>> >>> On Tue, Jul 30, 2019 at 10:19 PM Song Liu wrote: > On Jul 30, 2019, at 6:00

Re: [PATCH net-next 0/6] flow_offload: add indr-block in nf_table_offload

2019-07-31 Thread Jiri Pirko
Wed, Jul 31, 2019 at 10:12:27AM CEST, we...@ucloud.cn wrote: >From: wenxu > >This series patch make nftables offload support the vlan and >tunnel device offload through indr-block architecture. > >The first four patches mv tc indr block to flow offload and >rename to flow-indr-block. >Because the

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-07-31 Thread Andy Lutomirski
On Wed, Jul 31, 2019 at 1:10 AM Song Liu wrote: > > > > > On Jul 30, 2019, at 1:24 PM, Andy Lutomirski wrote: > > > > On Mon, Jul 29, 2019 at 10:07 PM Song Liu wrote: > >> > >> Hi Andy, > >> > >>> On Jul 27, 2019, at 11:20 AM, Song Liu wrote: > >>> > >>> Hi Andy, > >>> > >>> > > [...] > > >>> >

Re: [oss-drivers] Re: [PATCH net-next] net/tls: prevent skb_orphan() from leaking TLS plain text with offload

2019-07-31 Thread Willem de Bruijn
On Wed, Jul 31, 2019 at 2:12 PM Jakub Kicinski wrote: > > On Wed, 31 Jul 2019 11:57:10 -0400, Willem de Bruijn wrote: > > On Tue, Jul 30, 2019 at 5:13 PM Jakub Kicinski wrote: > > > sk_validate_xmit_skb() and drivers depend on the sk member of > > > struct sk_buff to identify segments requiring en

[PATCH] net: mdio-octeon: Fix build error and Kconfig warning

2019-07-31 Thread Nathan Chancellor
arm allyesconfig warns: WARNING: unmet direct dependencies detected for MDIO_OCTEON Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y] && 64BIT && HAS_IOMEM [=y] && OF_MDIO [=y] Selected by [y]: - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC && NETDEVICES [=y]

Re: [PATCH net-next] net/tls: prevent skb_orphan() from leaking TLS plain text with offload

2019-07-31 Thread Jakub Kicinski
On Wed, 31 Jul 2019 13:57:26 +, Boris Pismenny wrote: > > diff --git a/Documentation/networking/tls-offload.rst > > b/Documentation/networking/tls-offload.rst > > index 048e5ca44824..2bc3ab5515d8 100644 > > --- a/Documentation/networking/tls-offload.rst > > +++ b/Documentation/networking/tls-o

Re: [PATCH bpf-next v4 09/11] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-07-31 Thread Jonathan Lemon
On 30 Jul 2019, at 1:53, Kevin Laatz wrote: This patch adds buffer recycling support for unaligned buffers. Since we don't mask the addr to 2k at umem_reg in unaligned mode, we need to make sure we give back the correct (original) addr to the fill queue. We achieve this using the new descri

Re: [PATCH 1/2] tools: bpftool: add net load command to load XDP on interface

2019-07-31 Thread Daniel T. Lee
On Wed, Jul 31, 2019 at 7:08 PM Jesper Dangaard Brouer wrote: > > On Wed, 31 Jul 2019 03:48:20 +0900 > "Daniel T. Lee" wrote: > > > By this commit, using `bpftool net load`, user can load XDP prog on > > interface. New type of enum 'net_load_type' has been made, as stated at > > cover-letter, the

Re: [oss-drivers] Re: [PATCH net-next] net/tls: prevent skb_orphan() from leaking TLS plain text with offload

2019-07-31 Thread Jakub Kicinski
On Wed, 31 Jul 2019 11:57:10 -0400, Willem de Bruijn wrote: > On Tue, Jul 30, 2019 at 5:13 PM Jakub Kicinski wrote: > > sk_validate_xmit_skb() and drivers depend on the sk member of > > struct sk_buff to identify segments requiring encryption. > > Any operation which removes or does not preserve th

Re: [PATCH bpf-next v4 07/11] mlx5e: modify driver for handling offsets

2019-07-31 Thread Jonathan Lemon
On 30 Jul 2019, at 1:53, Kevin Laatz wrote: With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by

Re: [PATCH bpf-next v4 04/11] xsk: add support to allow unaligned chunk placement

2019-07-31 Thread Jonathan Lemon
On 30 Jul 2019, at 1:53, Kevin Laatz wrote: Currently, addresses are chunk size aligned. This means, we are very restricted in terms of where we can place chunk within the umem. For example, if we have a chunk size of 2k, then our chunks can only be placed at 0,2k,4k,6k,8k... and so on (ie.

Re: [PATCH net v3] ipvs: Improve robustness to the ipvs sysctl

2019-07-31 Thread Julian Anastasov
Hello, On Thu, 1 Aug 2019, hujunwei wrote: > From: Junwei Hu > > The ipvs module parse the user buffer and save it to sysctl, > then check if the value is valid. invalid value occurs > over a period of time. > Here, I add a variable, struct ctl_table tmp, used to read > the value from

Re: [PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-31 Thread Andrii Nakryiko
On Wed, Jul 31, 2019 at 1:30 AM Song Liu wrote: > > > > > On Jul 30, 2019, at 11:52 PM, Andrii Nakryiko > > wrote: > > > > On Tue, Jul 30, 2019 at 10:19 PM Song Liu wrote: > >> > >> > >> > >>> On Jul 30, 2019, at 6:00 PM, Andrii Nakryiko > >>> wrote: > >>> > >>> On Tue, Jul 30, 2019 at 5:39 P

Re: [PATCH bpf-next 1/9] selftests/bpf: prevent headers to be compiled as C code

2019-07-31 Thread Andrii Nakryiko
On Wed, Jul 31, 2019 at 6:21 AM Ilya Leoshkevich wrote: > > > Am 27.07.2019 um 20:53 schrieb Andrii Nakryiko : > > > > On Fri, Jul 26, 2019 at 3:01 PM Stanislav Fomichev wrote: > >> > >> On 07/26, Andrii Nakryiko wrote: > >>> On Fri, Jul 26, 2019 at 2:21 PM Stanislav Fomichev > >>> wrote: > >>>

  1   2   >