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 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

[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: [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

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: [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 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: [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 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: [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 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 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 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 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: 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/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,

[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

[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 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 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

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

[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

[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 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 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 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] 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

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

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 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 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 \; }

[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

[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 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 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

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 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 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 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

[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 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 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 |

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

<    1   2