Re: [PATCH v8 bpf-next 3/3] bpf: add selftest for BPF_ENABLE_STATS

2020-04-29 Thread Andrii Nakryiko
On Wed, Apr 29, 2020 at 10:12 PM Song Liu wrote: > > > > > On Apr 29, 2020, at 7:23 PM, Andrii Nakryiko > > wrote: > > > > On Tue, Apr 28, 2020 at 11:47 PM Song Liu wrote: > >> > >> Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats. > >> > >> ~/selftests/bpf# ./test_progs -t

Re: BUG: soft lockup while deleting tap interface from vlan aware bridge

2020-04-29 Thread Stefan Priebe - Profihost AG
Hello Nikolay, Am 29.04.20 um 23:23 schrieb Nikolay Aleksandrov: > On 4/29/20 11:52 PM, Stefan Priebe - Profihost AG wrote: >> Hello, >> >> while running a stable vanilla kernel 4.19.115 i'm reproducably get this >> one: >> >> watchdog: BUG: soft lockup - CPU#38 stuck for 22s! [bridge:3570653] >>

Re: [PATCH] xfrm: policy: Only use mark as policy lookup key

2020-04-29 Thread Yuehaibing
On 2020/4/24 11:48, Yuehaibing wrote: > On 2020/4/23 17:43, Xin Long wrote: >> On Thu, Apr 23, 2020 at 4:41 PM Yuehaibing wrote: >>> >>> On 2020/4/23 14:37, Xin Long wrote: On Thu, Apr 23, 2020 at 10:26 AM Yuehaibing wrote: > > On 2020/4/22 23:41, Xin Long wrote: >> On Wed, Apr 2

Net: [DSA]: dsa-loop kernel panic

2020-04-29 Thread Allen
Hi, We ran into a kernel panic with dsa-loop. Here are the details: VM: aarch64 kvm running 5.7.0-rc3+ $ modprobe dsa-loop [ 25.968427] dsa-loop fixed-0:1f: DSA mockup driver: 0x1f [ 25.978156] libphy: dsa slave smi: probed [ 25.979230] dsa-loop fixed-0:1f: nonfatal error -95 setting MT

Re: [PATCH v2] hv_netvsc: Fix netvsc_start_xmit's return type

2020-04-29 Thread Nathan Chancellor
Hi Michael, On Thu, Apr 30, 2020 at 12:06:09AM +, Michael Kelley wrote: > From: Nathan Chancellor Sent: Tuesday, April 28, > 2020 10:55 AM > > > > Do note that netvsc_xmit still returns int because netvsc_xmit has a > > potential return from netvsc_vf_xmit, which does not return netdev_tx_t

Re: [PATCH iproute2 v2 0/2] bpf: memory access fixes

2020-04-29 Thread Stephen Hemminger
On Wed, 22 Apr 2020 06:28:06 -0400 Jamal Hadi Salim wrote: > From: Jamal Hadi Salim > > Changes from V1: > 1) use snprintf instead of sprintf and fix corresponding error message. > Caught-by: Dominique Martinet > 2) Fix memory leak and extraneous free() in error path > > Jamal Hadi Salim (

Re: [PATCH iproute2 0/7] bridge vlan output fixes

2020-04-29 Thread Stephen Hemminger
On Tue, 28 Apr 2020 08:50:44 +0900 Benjamin Poirier wrote: > More fixes for `bridge vlan` and `bridge vlan tunnelshow` normal and JSON > mode output. > > Most of the changes are cosmetic except for changes to JSON format (flag > names, no empty lists). > > Benjamin Poirier (7): > bridge: Use

Re: [PATCH iproute2] tc: fq_codel: add drop_batch parameter

2020-04-29 Thread Stephen Hemminger
On Mon, 27 Apr 2020 10:51:55 -0700 Eric Dumazet wrote: > Commit 9d18562a2278 ("fq_codel: add batch ability to fq_codel_drop()") > added the new TCA_FQ_CODEL_DROP_BATCH_SIZE parameter, set by default to 64. > > Add to tc command the ability to get/set the drop_batch > > Signed-off-by: Eric Dumaz

Re: [iproute2 v3] devlink: add support for DEVLINK_CMD_REGION_NEW

2020-04-29 Thread Stephen Hemminger
On Tue, 28 Apr 2020 13:43:24 -0700 Jacob Keller wrote: > Add support to request that a new snapshot be taken immediately for > a devlink region. To avoid confusion, the desired snapshot id must be > provided. > > Note that if a region does not support snapshots on demand, the kernel > will rejec

Re: [PATCH] net/mlx5: reduce stack usage in qp_read_field

2020-04-29 Thread Leon Romanovsky
On Tue, Apr 28, 2020 at 11:23:47PM +0200, Arnd Bergmann wrote: > Moving the mlx5_ifc_query_qp_out_bits structure on the stack was a bit > excessive and now causes the compiler to complain on 32-bit architectures: > > drivers/net/ethernet/mellanox/mlx5/core/debugfs.c: In function > 'qp_read_field':

Re: [PATCH v8 bpf-next 3/3] bpf: add selftest for BPF_ENABLE_STATS

2020-04-29 Thread Song Liu
> On Apr 29, 2020, at 7:23 PM, Andrii Nakryiko > wrote: > > On Tue, Apr 28, 2020 at 11:47 PM Song Liu wrote: >> >> Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats. >> >> ~/selftests/bpf# ./test_progs -t enable_stats -v >> test_enable_stats:PASS:skel_open_and_load 0 ns

Re: [PATCHv4 iproute2-next 2/7] iproute_lwtunnel: add options support for vxlan metadata

2020-04-29 Thread Xin Long
On Thu, Apr 30, 2020 at 12:58 AM David Ahern wrote: > > On 4/27/20 4:27 AM, Xin Long wrote: > > diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c > > index 8599853..9945c86 100644 > > --- a/ip/iproute_lwtunnel.c > > +++ b/ip/iproute_lwtunnel.c > > @@ -333,6 +333,26 @@ static void lwtunnel

Re: [PATCH net-next v3 2/2] net: phy: tja11xx: add support for master-slave configuration

2020-04-29 Thread Oleksij Rempel
On Wed, Apr 29, 2020 at 08:20:53PM +0200, Andrew Lunn wrote: > > +static int tja11xx_config_aneg(struct phy_device *phydev) > > +{ > > + u16 ctl = 0; > > + int ret; > > + > > + switch (phydev->master_slave_set) { > > + case PORT_MODE_CFG_MASTER_FORCE: > > + case PORT_MODE_CFG_MASTER_PREFE

[PATCH net] gtp: set NLM_F_MULTI flag in gtp_genl_dump_pdp()

2020-04-29 Thread Yoshiyuki Kurauchi
In drivers/net/gtp.c, gtp_genl_dump_pdp() should set NLM_F_MULTI flag since it returns multipart message. This patch adds a new arg "flags" in gtp_genl_fill_info() so that flags can be set by the callers. Signed-off-by: Yoshiyuki Kurauchi --- drivers/net/gtp.c | 9 + 1 file changed, 5 in

Re: [PATCH net-next v3 1/2] ethtool: provide UAPI for PHY master/slave configuration.

2020-04-29 Thread Oleksij Rempel
Hi Michal, On Wed, Apr 29, 2020 at 09:52:22PM +0200, Michal Kubecek wrote: > On Tue, Apr 28, 2020 at 09:53:07AM +0200, Oleksij Rempel wrote: > > This UAPI is needed for BroadR-Reach 100BASE-T1 devices. Due to lack of > > auto-negotiation support, we needed to be able to configure the > > MASTER-SL

Re: [PATCH net-next v2] devlink: let kernel allocate region snapshot id

2020-04-29 Thread Jiri Pirko
Thu, Apr 30, 2020 at 01:38:13AM CEST, k...@kernel.org wrote: >Currently users have to choose a free snapshot id before >calling DEVLINK_CMD_REGION_NEW. This is potentially racy >and inconvenient. > >Make the DEVLINK_ATTR_REGION_SNAPSHOT_ID optional and try >to allocate id automatically. Send a mess

Re: [PATCH net-next] devlink: let kernel allocate region snapshot id

2020-04-29 Thread Jiri Pirko
Wed, Apr 29, 2020 at 06:35:18PM CEST, k...@kernel.org wrote: >On Wed, 29 Apr 2020 07:45:52 +0200 Jiri Pirko wrote: >> Wed, Apr 29, 2020 at 03:42:48AM CEST, k...@kernel.org wrote: >> >Jiri, this is what I had in mind of snapshots and the same >> >thing will come back for slice allocation. >> >> O

Re: [PATCH net-next v3 1/2] ethtool: provide UAPI for PHY master/slave configuration.

2020-04-29 Thread Oleksij Rempel
Hi Andrew, On Wed, Apr 29, 2020 at 08:16:14PM +0200, Andrew Lunn wrote: > On Tue, Apr 28, 2020 at 09:53:07AM +0200, Oleksij Rempel wrote: > > Hi Oleksij > > Sorry for taking a while to review this. I was busy fixing the FEC > driver which i broke :-( Not problem. Interesting, what is wrong with

Re: [PATCH bpf-next v1 03/19] bpf: add bpf_map iterator

2020-04-29 Thread Yonghong Song
On 4/29/20 8:06 PM, Alexei Starovoitov wrote: On 4/29/20 1:15 PM, Yonghong Song wrote: Even without lseek stop() will be called multiple times. If I read seq_file.c correctly it will be called before every copy_to_user(). Which means that for a lot of text (or if read() is done with small bu

Re: [PATCH bpf-next v1 03/19] bpf: add bpf_map iterator

2020-04-29 Thread Alexei Starovoitov
On 4/29/20 1:15 PM, Yonghong Song wrote: Even without lseek stop() will be called multiple times. If I read seq_file.c correctly it will be called before every copy_to_user(). Which means that for a lot of text (or if read() is done with small buffer) there will be plenty of start,show,show,stop

RE: [EXT] [PATCH net-next v2] net: ethernet: fec: Prevent MII event after MII_SPEED write

2020-04-29 Thread Andy Duan
From: Andrew Lunn Sent: Thursday, April 30, 2020 4:53 AM > The change to polled IO for MDIO completion assumes that MII events are > only generated for MDIO transactions. However on some SoCs writing to the > MII_SPEED register can also trigger an MII event. As a result, the next MDIO > read has a

Re: [PATCH iproute2-next v2] tc: pedit: Support JSON dumping

2020-04-29 Thread David Ahern
On 4/28/20 5:44 AM, Petr Machata wrote: > The action pedit does not currently support dumping to JSON. Convert > print_pedit() to the print_* family of functions so that dumping is correct > both in plain and JSON mode. In plain mode, the output is character for > character the same as it was befor

[PATCH] vhost: add mutex_lock/unlock for vhost_vq_reset

2020-04-29 Thread Jia He
vq->mutex is to protect any vq accessing, hence adding mutex_lock/unlock makes sense to avoid potential race condition. Signed-off-by: Jia He --- drivers/vhost/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index d450e16c5c25..622bfba2

Re: [PATCH iproute2-next] erspan: Add type I version 0 support.

2020-04-29 Thread David Ahern
On 4/29/20 6:45 PM, William Tu wrote: > On Wed, Apr 29, 2020 at 2:52 PM David Ahern wrote: >> >> On 4/26/20 9:04 AM, William Tu wrote: >>> The Type I ERSPAN frame format is based on the barebones >>> IP + GRE(4-byte) encapsulation on top of the raw mirrored frame. >>> Both type I and II use 0x88BE

Re: [PATCH v8 bpf-next 3/3] bpf: add selftest for BPF_ENABLE_STATS

2020-04-29 Thread Andrii Nakryiko
On Tue, Apr 28, 2020 at 11:47 PM Song Liu wrote: > > Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats. > > ~/selftests/bpf# ./test_progs -t enable_stats -v > test_enable_stats:PASS:skel_open_and_load 0 nsec > test_enable_stats:PASS:get_stats_fd 0 nsec > test_enable_stats:PASS:

Re: [PATCH bpf-next v2] bpf: bpf_{g,s}etsockopt for struct bpf_sock

2020-04-29 Thread Alexei Starovoitov
On Wed, Apr 29, 2020 at 04:33:12PM -0700, s...@google.com wrote: > On 04/30, Daniel Borkmann wrote: > > On 4/29/20 7:05 PM, Stanislav Fomichev wrote: > > > Currently, bpf_getsocktop and bpf_setsockopt helpers operate on the > > > 'struct bpf_sock_ops' context in BPF_PROG_TYPE_SOCK_OPS program. > >

Re: [PATCH bpf-next] bpf, riscv: Fix stack layout of JITed code on RV32

2020-04-29 Thread Xi Wang
On Wed, Apr 29, 2020 at 5:51 PM Luke Nelson wrote: > > This patch fixes issues with stackframe unwinding and alignment in the > current stack layout for BPF programs on RV32. > > In the current layout, RV32 fp points to the JIT scratch registers, rather > than to the callee-saved registers. This b

[PATCH v2 bpf-next] libbpf: fix false uninitialized variable warning

2020-04-29 Thread Andrii Nakryiko
Some versions of GCC falsely detect that vi might not be initialized. That's not true, but let's silence it with NULL initialization. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/b

[PATCH] vhost: vsock: don't send pkt when vq is not started

2020-04-29 Thread Jia He
Ning Bo reported an abnormal 2-second gap when booting Kata container [1]. The unconditional timeout is caused by VSOCK_DEFAULT_CONNECT_TIMEOUT of connect at client side. The vhost vsock client tries to connect an initlizing virtio vsock server. The abnormal flow looks like: host-userspace

Re: [PATCH bpf-next] libbpf: fix false unused variable warning

2020-04-29 Thread Andrii Nakryiko
On Wed, Apr 29, 2020 at 6:52 PM Yuehaibing wrote: > > On 2020/4/30 9:25, Andrii Nakryiko wrote: > > Some versions of GCC falsely detect that vi might not be initialized. That's > > not true, but let's silence it with NULL initialization. > > > > Title should be fixed 'unused' --> 'uninitialized' ?

Re: [PATCH bpf-next v1 17/19] tools/bpf: selftests: add iterator programs for ipv6_route and netlink

2020-04-29 Thread Andrii Nakryiko
On Mon, Apr 27, 2020 at 1:18 PM Yonghong Song wrote: > > Two bpf programs are added in this patch for netlink and ipv6_route > target. On my VM, I am able to achieve identical > results compared to /proc/net/netlink and /proc/net/ipv6_route. > > $ cat /proc/net/netlink > sk Eth P

Re: [PATCH bpf-next v1 11/19] bpf: add task and task/file targets

2020-04-29 Thread Andrii Nakryiko
On Mon, Apr 27, 2020 at 1:17 PM Yonghong Song wrote: > > Only the tasks belonging to "current" pid namespace > are enumerated. > > For task/file target, the bpf program will have access to > struct task_struct *task > u32 fd > struct file *file > where fd/file is an open file for the task. >

Re: [PATCH bpf-next 1/2] bpf: Change error code when ops is NULL

2020-04-29 Thread kbuild test robot
Hi Mao, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] [also build test WARNING on bpf/master net/master net-next/master ipvs/master v5.7-rc2 next-20200423] [if your patch is applied to the wrong git tree, please drop us a note to help improve

Re: [PATCH bpf-next] libbpf: fix false unused variable warning

2020-04-29 Thread Yuehaibing
On 2020/4/30 9:25, Andrii Nakryiko wrote: > Some versions of GCC falsely detect that vi might not be initialized. That's > not true, but let's silence it with NULL initialization. > Title should be fixed 'unused' --> 'uninitialized' ? > Signed-off-by: Andrii Nakryiko > --- > tools/lib/bpf/libb

Re: [PATCH v2 0/7] staging: qlge: Checkpatch.pl indentation fixes in qlge_main.c

2020-04-29 Thread Joe Perches
On Wed, 2020-04-29 at 21:31 -0400, Rylan Dmello wrote: > This patchset fixes some indentation- and style-related issues in qlge_main.c > reported by checkpatch.pl, such as: > > WARNING: Avoid multiple line dereference > WARNING: line over 80 characters > WARNING: suspect code indent for cond

Re: [PATCH bpf-next] libbpf: fix false unused variable warning

2020-04-29 Thread Yuehaibing
On 2020/4/30 9:25, Andrii Nakryiko wrote: > Some versions of GCC falsely detect that vi might not be initialized. That's > not true, but let's silence it with NULL initialization. > This title seems not appropriate, 'unused' --> 'initialized' ? > Signed-off-by: Andrii Nakryiko > --- > tools/

[PATCH -next v3] hinic: Use ARRAY_SIZE for nic_vf_cmd_msg_handler

2020-04-29 Thread Zou Wei
fix coccinelle warning, use ARRAY_SIZE drivers/net/ethernet/huawei/hinic/hinic_sriov.c:713:43-44: WARNING: Use ARRAY_SIZE v1-->v2: remove cmd_number v2-->v3: preserve the reverse christmas tree ordering of local variables Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/net/

Re: [PATCH bpf-next v1 15/19] tools/libbpf: add bpf_iter support

2020-04-29 Thread Andrii Nakryiko
On Mon, Apr 27, 2020 at 1:17 PM Yonghong Song wrote: > > Three new libbpf APIs are added to support bpf_iter: > - bpf_program__attach_iter > Given a bpf program and additional parameters, which is > none now, returns a bpf_link. > - bpf_link__create_iter > Given a bpf_link, create

Re: [PATCH -next v2] hinic: Use ARRAY_SIZE for nic_vf_cmd_msg_handler

2020-04-29 Thread Samuel Zou
On 2020/4/30 2:43, David Miller wrote: From: Zou Wei Date: Wed, 29 Apr 2020 12:17:40 +0800 fix coccinelle warning, use ARRAY_SIZE drivers/net/ethernet/huawei/hinic/hinic_sriov.c:713:43-44: WARNING: Use ARRAY_SIZE -- Please don't put this "---" here. diff --git a/drivers/n

[PATCH v2 7/7] staging: qlge: Fix function argument alignment warning in ql_init_device

2020-04-29 Thread Rylan Dmello
Fix checkpatch.pl check: CHECK: Alignment should match open parenthesis Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index fa708c72

[PATCH net-next] hinic: make a bunch of functions static

2020-04-29 Thread YueHaibing
These fucntions is used only in hinic_sriov.c, so make them static to fix sparse warnings. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- .../net/ethernet/huawei/hinic/hinic_sriov.c | 91 ++- 1 file changed, 48 insertions(+), 43 deletions(-) diff --git a/drivers/net/et

[PATCH v2 5/7] staging: qlge: Remove multi-line dereference from ql_request_irq

2020-04-29 Thread Rylan Dmello
Fix checkpatch.pl warning: WARNING: Avoid multiple line dereference - prefer 'qdev->flags' Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_ma

[PATCH v2 6/7] staging: qlge: Fix suspect code indent warning in ql_init_device

2020-04-29 Thread Rylan Dmello
Fix checkpatch.pl warnings: WARNING: suspect code indent for conditional statements (16, 23) WARNING: line over 80 characters Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/qlge/qlge_main

[PATCH v2 3/7] staging: qlge: Fix indentation in ql_get_mac_addr_reg

2020-04-29 Thread Rylan Dmello
This has similar indentation style issues as ql_set_mac_addr_reg, so I thought I'd re-indent this too. Fix several checkpatch.pl warnings: WARNING: line over 80 characters Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 76 1 file changed,

[PATCH v2 4/7] staging: qlge: Remove goto statements from ql_get_mac_addr_reg

2020-04-29 Thread Rylan Dmello
Similar to ql_set_mac_addr_reg, ql_get_mac_addr_reg also has several goto statements that can be trivially replaced with a break statement. Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/s

[PATCH v2 2/7] staging: qlge: Remove gotos from ql_set_mac_addr_reg

2020-04-29 Thread Rylan Dmello
As suggested by Joe Perches, this patch removes the 'exit' label from the ql_set_mac_addr_reg function and replaces the goto statements with break statements. Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) d

[PATCH v2 1/7] staging: qlge: Fix indentation in ql_set_mac_addr_reg

2020-04-29 Thread Rylan Dmello
Based on Joe Perches' feedback, fix the indentation throughout ql_set_mac_addr_reg. This helps fix several "line over 80 characters" warnings along with the original "multiple line dereference" warning. Fix checkpatch.pl warnings: WARNING: Avoid multiple line dereference - prefer 'qdev->func'

[PATCH v2 0/7] staging: qlge: Checkpatch.pl indentation fixes in qlge_main.c

2020-04-29 Thread Rylan Dmello
This patchset fixes some indentation- and style-related issues in qlge_main.c reported by checkpatch.pl, such as: WARNING: Avoid multiple line dereference WARNING: line over 80 characters WARNING: suspect code indent for conditional statements v2: - Addressed feedback from Joe Perches by u

[PATCH bpf-next] libbpf: fix false unused variable warning

2020-04-29 Thread Andrii Nakryiko
Some versions of GCC falsely detect that vi might not be initialized. That's not true, but let's silence it with NULL initialization. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/b

RE: [EXT] Re: [v4,net-next 1/4] net: qos: introduce a gate control flow action

2020-04-29 Thread Po Liu
Hi Vlad, > -Original Message- > From: Vlad Buslov > Sent: 2020年4月30日 1:04 > To: Po Liu > Cc: da...@davemloft.net; linux-ker...@vger.kernel.org; > netdev@vger.kernel.org; vinicius.go...@intel.com; Claudiu Manoil > ; Vladimir Oltean ; > Alexandru Marginean ; > michael.c...@broadcom.com; vi

[PATCH net-next 3/3] ptp: ptp_clockmatrix: Add adjphase() to support PHC write phase mode.

2020-04-29 Thread vincent.cheng.xh
From: Vincent Cheng Add idtcm_adjphase() to support PHC write phase mode. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clockmatrix.c | 123 ++ drivers/ptp/ptp_clockmatrix.h | 11 +++- 2 files changed, 132 insertions(+), 2 deletions(-) diff --git a/

Re: [PATCH iproute2 1/7] bridge: Use the same flag names in input and output

2020-04-29 Thread Nikolay Aleksandrov
On 4/30/20 3:22 AM, Benjamin Poirier wrote: On 2020-04-29 08:12 -0700, Roopa Prabhu wrote: On Mon, Apr 27, 2020 at 4:51 PM Benjamin Poirier wrote: Output the same names for vlan flags as the ones accepted in command input. Signed-off-by: Benjamin Poirier --- Benjamin, It's a good change,

[PATCH bpf-next] bpf, riscv: Fix stack layout of JITed code on RV32

2020-04-29 Thread Luke Nelson
This patch fixes issues with stackframe unwinding and alignment in the current stack layout for BPF programs on RV32. In the current layout, RV32 fp points to the JIT scratch registers, rather than to the callee-saved registers. This breaks stackframe unwinding, which expects fp to point just abov

Re: [PATCH iproute2-next] erspan: Add type I version 0 support.

2020-04-29 Thread William Tu
On Wed, Apr 29, 2020 at 2:52 PM David Ahern wrote: > > On 4/26/20 9:04 AM, William Tu wrote: > > The Type I ERSPAN frame format is based on the barebones > > IP + GRE(4-byte) encapsulation on top of the raw mirrored frame. > > Both type I and II use 0x88BE as protocol type. Unlike type II > > and

[PATCH net-next 1/3] ptp: Add adjphase function to support phase offset control.

2020-04-29 Thread vincent.cheng.xh
From: Vincent Cheng Adds adjust phase function to take advantage of a PHC clock's hardware filtering capability that uses phase offset control word instead of frequency offset control word. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clock.c | 2 ++ include/linux/ptp_clock_kernel

[PATCH net-next 2/3] ptp: Add adjust_phase to ptp_clock_caps capability.

2020-04-29 Thread vincent.cheng.xh
From: Vincent Cheng Add adjust_phase to ptp_clock_caps capability to allow user to query if a PHC driver supports adjust phase with ioctl PTP_CLOCK_GETCAPS command. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_chardev.c | 1 + include/uapi/linux/ptp_clock.h| 4 +++- too

[PATCH net-next 0/3] ptp: Add adjust phase to support phase offset.

2020-04-29 Thread vincent.cheng.xh
From: Vincent Cheng This series adds adjust phase to the PTP Hardware Clock device interface. Some PTP hardware clocks have a write phase mode that has a built-in hardware filtering capability. The write phase mode utilizes a phase offset control word instead of a frequency offset control word

RE: [PATCH net-next v2] devlink: let kernel allocate region snapshot id

2020-04-29 Thread Keller, Jacob E
> -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Jakub Kicinski > Sent: Wednesday, April 29, 2020 4:38 PM > To: da...@davemloft.net; j...@resnulli.us > Cc: netdev@vger.kernel.org; kernel-t...@fb.com; Keller, Jacob E > ; Jakub Kicinski > Subject: [PATCH net-next

Re: [PATCH v8 bpf-next 1/3] bpf: sharing bpf runtime stats with BPF_ENABLE_STATS

2020-04-29 Thread Song Liu
> On Apr 29, 2020, at 4:33 PM, Daniel Borkmann wrote: > >> [...] >> + >> +fd = anon_inode_getfd("bpf-stats", &bpf_stats_fops, NULL, 0); > > Missing O_CLOEXEC or intentional (if latter, I'd have expected a comment > here though)? Yeah, we should have O_CLOEXEC here. Will fix (unless you

Re: [PATCH iproute2 1/7] bridge: Use the same flag names in input and output

2020-04-29 Thread Benjamin Poirier
On 2020-04-29 08:12 -0700, Roopa Prabhu wrote: > On Mon, Apr 27, 2020 at 4:51 PM Benjamin Poirier > wrote: > > > > Output the same names for vlan flags as the ones accepted in command input. > > > > Signed-off-by: Benjamin Poirier > > --- > > Benjamin, It's a good change, but this will break ex

Re: [PATCH v4 bpf-next 09/15] net: Support xdp in the Tx path for packets as an skb

2020-04-29 Thread David Ahern
On 4/28/20 9:05 AM, Daniel Borkmann wrote: > I didn't see anything in the patch series on this (unless I missed it), but > don't we need to force turning off GSO/TSO for the device where XDP > egress is > attached? Otherwise how is this safe? E.g. generic XDP uses > netif_elide_gro() > to bypass GR

Re: [net 8/8] net/mlx5e: kTLS, Add resiliency to zero-size record frags in TX resync flow

2020-04-29 Thread Jakub Kicinski
On Wed, 29 Apr 2020 15:54:49 -0700 Saeed Mahameed wrote: > From: Tariq Toukan > > SKBs of TLS records might have empty zero-sized frags. Why? Let's fix that instead of adding checks to drivers. > Posting a DUMP WQE for such frag would result an error completion. > Add in-driver resiliency and s

RE: [PATCH v2] hv_netvsc: Fix netvsc_start_xmit's return type

2020-04-29 Thread Michael Kelley
From: Nathan Chancellor Sent: Tuesday, April 28, 2020 10:55 AM > > Do note that netvsc_xmit still returns int because netvsc_xmit has a > potential return from netvsc_vf_xmit, which does not return netdev_tx_t > because of the call to dev_queue_xmit. > > I am not sure if that is an oversight th

[PATCH iproute2-next v2] devlink: support kernel-side snapshot id allocation

2020-04-29 Thread Jakub Kicinski
Make ID argument optional and read the snapshot info that kernel sends us. $ devlink region new netdevsim/netdevsim1/dummy netdevsim/netdevsim1/dummy: snapshot 0 $ devlink -jp region new netdevsim/netdevsim1/dummy { "regions": { "netdevsim/netdevsim1/dummy": {

[PATCH net-next v2] devlink: let kernel allocate region snapshot id

2020-04-29 Thread Jakub Kicinski
Currently users have to choose a free snapshot id before calling DEVLINK_CMD_REGION_NEW. This is potentially racy and inconvenient. Make the DEVLINK_ATTR_REGION_SNAPSHOT_ID optional and try to allocate id automatically. Send a message back to the caller with the snapshot info. The message carryin

Re: [PATCH v8 bpf-next 1/3] bpf: sharing bpf runtime stats with BPF_ENABLE_STATS

2020-04-29 Thread Daniel Borkmann
On 4/29/20 8:45 AM, Song Liu wrote: Currently, sysctl kernel.bpf_stats_enabled controls BPF runtime stats. Typical userspace tools use kernel.bpf_stats_enabled as follows: 1. Enable kernel.bpf_stats_enabled; 2. Check program run_time_ns; 3. Sleep for the monitoring period; 4. Check p

Re: [PATCH] bpf: fix unused variable warning

2020-04-29 Thread Daniel Borkmann
On 4/29/20 3:21 PM, Arnd Bergmann wrote: Hiding the only using of bpf_link_type_strs[] in an #ifdef causes an unused-variable warning: kernel/bpf/syscall.c:2280:20: error: 'bpf_link_type_strs' defined but not used [-Werror=unused-variable] 2280 | static const char *bpf_link_type_strs[] = { M

Re: [PATCH bpf-next 0/3] Enable socket lookup in SOCKMAP/SOCKHASH from BPF

2020-04-29 Thread Daniel Borkmann
On 4/29/20 8:11 PM, Jakub Sitnicki wrote: This series enables BPF programs to fetch sockets from SOCKMAP/SOCKHASH by doing a map lookup, as proposed during virtual BPF conference. Patch 1 description covers changes on verifier side needed to make it work. Fetched socket can be inspected or pass

Re: [PATCH bpf-next v3 0/3] tools: bpftool: probe features for unprivileged users

2020-04-29 Thread Daniel Borkmann
On 4/29/20 4:45 PM, Quentin Monnet wrote: This set allows unprivileged users to probe available features with bpftool. On Daniel's suggestion, the "unprivileged" keyword must be passed on the command line to avoid accidentally dumping a subset of the features supported by the system. When used by

Re: [PATCH bpf-next v2] bpf: bpf_{g,s}etsockopt for struct bpf_sock

2020-04-29 Thread Daniel Borkmann
On 4/29/20 7:05 PM, Stanislav Fomichev wrote: Currently, bpf_getsocktop and bpf_setsockopt helpers operate on the 'struct bpf_sock_ops' context in BPF_PROG_TYPE_SOCK_OPS program. Let's generalize them and make the first argument be 'struct bpf_sock'. That way, in the future, we can allow those he

Re: [PATCH net-next v2 0/7] net: bcmgenet: add support for Wake on Filter

2020-04-29 Thread Doug Berger
On 4/29/20 3:07 PM, Doug Berger wrote: > On 4/29/20 1:01 PM, Doug Berger wrote: >> Changes in v2: >> Corrected Signed-off-by for commit 3/7. >> >> This commit set adds support for waking from 'standby' using a >> Rx Network Flow Classification filter specified with ethtool. >> >> The first two

[PATCH 1/2] cxgb4: Add missing annotation for service_ofldq()

2020-04-29 Thread Jules Irenge
Sparse reports a warning at service_ofldq() warning: context imbalance in service_ofldq() - unexpected unlock The root cause is the missing annotation at service_ofldq() Add the missing __must_hold(&q->sendq.lock) annotation Signed-off-by: Jules Irenge --- drivers/net/ethernet/chelsio/cxgb4/s

[PATCH 0/2] Lock warning cleanup

2020-04-29 Thread Jules Irenge
This patchset proposes a solution to functions that regiter context imbalance warnin, we add annotations to fix the warnings. Jules Irenge (2): cxgb4: Add missing annotation for service_ofldq() spi: atmel: Add missing annotation for atmel_spi_next_xfer_dma_submit() drivers/net/ethernet/c

[PATCH 2/2] spi: atmel: Add missing annotation for atmel_spi_next_xfer_dma_submit()

2020-04-29 Thread Jules Irenge
Sparse reports a warning at atmel_spi_next_xfer_dma_submit() warning: context imbalance in atmel_spi_next_xfer_dma_submit() - unexpected unlock The root cause is the missing annotation at atmel_spi_next_xfer_dma_submit() Add the missing __must_hold(&as->lock) annotation Signed-o

[net 6/8] net/mlx5: Fix command entry leak in Internal Error State

2020-04-29 Thread Saeed Mahameed
From: Moshe Shemesh Processing commands by cmd_work_handler() while already in Internal Error State will result in entry leak, since the handler process force completion without doorbell. Forced completion doesn't release the entry and event completion will never arrive, so entry should be releas

[net 8/8] net/mlx5e: kTLS, Add resiliency to zero-size record frags in TX resync flow

2020-04-29 Thread Saeed Mahameed
From: Tariq Toukan SKBs of TLS records might have empty zero-sized frags. Posting a DUMP WQE for such frag would result an error completion. Add in-driver resiliency and skip such frags. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Reviewed-by: B

[pull request][net 0/8] Mellanox, mlx5 fixes 2020-04-29

2020-04-29 Thread Saeed Mahameed
Hi Dave, This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v4.12 ('net/mlx5: Fix forced completion access non initialized command entry') ('net/mlx5: Fix command entry leak in Internal Error State') For -stable v5.4 ('net/mlx5:

[net 7/8] net/mlx5e: Fix q counters on uplink representors

2020-04-29 Thread Saeed Mahameed
From: Roi Dayan Need to allocate the q counters before init_rx which needs them when creating the rq. Fixes: 8520fa57a4e9 ("net/mlx5e: Create q counters on uplink representors") Signed-off-by: Roi Dayan Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/

[net 1/8] net/mlx5: E-switch, Fix error unwinding flow for steering init failure

2020-04-29 Thread Saeed Mahameed
From: Parav Pandit Error unwinding is done incorrectly in the cited commit. When steering init fails, there is no need to perform steering cleanup. When vport error exists, error cleanup should be mirror of the setup routine, i.e. to perform steering cleanup before metadata cleanup. This avoids

[net 5/8] net/mlx5: Fix forced completion access non initialized command entry

2020-04-29 Thread Saeed Mahameed
From: Moshe Shemesh mlx5_cmd_flush() will trigger forced completions to all valid command entries. Triggered by an asynch event such as fast teardown it can happen at any stage of the command, including command initialization. It will trigger forced completion and that can lead to completion on a

[net 2/8] net/mlx5: E-switch, Fix printing wrong error value

2020-04-29 Thread Saeed Mahameed
From: Parav Pandit When mlx5_modify_header_alloc() fails, instead of printing the error value returned, current error log prints 0. Fix by printing correct error value returned by mlx5_modify_header_alloc(). Fixes: 6724e66b90ee ("net/mlx5: E-Switch, Get reg_c1 value on miss") Signed-off-by: Par

[net 3/8] net/mlx5: E-switch, Fix mutex init order

2020-04-29 Thread Saeed Mahameed
From: Parav Pandit In cited patch mutex is initialized after its used. Below call trace is observed. Fix the order to initialize the mutex early enough. Similarly follow mirror sequence during cleanup. kernel: DEBUG_LOCKS_WARN_ON(lock->magic != lock) kernel: WARNING: CPU: 5 PID: 45916 at kernel/

[net 4/8] net/mlx5: DR, On creation set CQ's arm_db member to right value

2020-04-29 Thread Saeed Mahameed
From: Erez Shitrit In polling mode, set arm_db member to a value that will avoid CQ event recovery by the HW. Otherwise we might get event without completion function. In addition,empty completion function to was added to protect from unexpected events. Fixes: 297cccebdc5a ("net/mlx5: DR, Expose

Re: [PATCH net-next v2 0/7] net: bcmgenet: add support for Wake on Filter

2020-04-29 Thread Doug Berger
On 4/29/20 1:01 PM, Doug Berger wrote: > Changes in v2: > Corrected Signed-off-by for commit 3/7. > > This commit set adds support for waking from 'standby' using a > Rx Network Flow Classification filter specified with ethtool. > > The first two commits are bug fixes that should be applied

Re: [PATCH iproute2-next] erspan: Add type I version 0 support.

2020-04-29 Thread David Ahern
On 4/26/20 9:04 AM, William Tu wrote: > The Type I ERSPAN frame format is based on the barebones > IP + GRE(4-byte) encapsulation on top of the raw mirrored frame. > Both type I and II use 0x88BE as protocol type. Unlike type II > and III, no sequence number or key is required. should this be cons

Re: [PATCH net-next v2 7/7] net: bcmgenet: add WAKE_FILTER support

2020-04-29 Thread Florian Fainelli
On 4/29/20 1:02 PM, Doug Berger wrote: > This commit enables support for the WAKE_FILTER method of Wake on > LAN for the GENET driver. The method can be enabled by adding 'f' > to the interface 'wol' setting specified by ethtool. > > Rx network flow rules can be specified using ethtool. Rules that

[PATCH 0/2] Netfilter fixes for net

2020-04-29 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter fixes for net: 1) Do not update the UDP checksum when it's zero, from Guillaume Nault. 2) Fix return of local variable in nf_osf, from Arnd Bergmann. You can pull these changes from: git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.gi

[PATCH 2/2] netfilter: nf_osf: avoid passing pointer to local var

2020-04-29 Thread Pablo Neira Ayuso
From: Arnd Bergmann gcc-10 points out that a code path exists where a pointer to a stack variable may be passed back to the caller: net/netfilter/nfnetlink_osf.c: In function 'nf_osf_hdr_ctx_init': cc1: warning: function may return address of local variable [-Wreturn-local-addr] net/netfilter/n

[PATCH 1/2] netfilter: nat: never update the UDP checksum when it's 0

2020-04-29 Thread Pablo Neira Ayuso
From: Guillaume Nault If the UDP header of a local VXLAN endpoint is NAT-ed, and the VXLAN device has disabled UDP checksums and enabled Tx checksum offloading, then the skb passed to udp_manip_pkt() has hdr->check == 0 (outer checksum disabled) and skb->ip_summed == CHECKSUM_PARTIAL (inner packe

Re: [PATCH net-next v2 6/7] net: bcmgenet: add support for ethtool rxnfc flows

2020-04-29 Thread Florian Fainelli
On 4/29/20 1:02 PM, Doug Berger wrote: > This commit enables driver support for ethtool commands of this form: > ethtool -N|-U|--config-nfc|--config-ntuple devname > flow-type ether|ip4 > [src xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]] > [dst xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]] [prot

Re: [PATCH net 1/2] ionic: add LIF_READY state to close probe-open race

2020-04-29 Thread Shannon Nelson
On 4/29/20 12:38 PM, David Miller wrote: From: Shannon Nelson Date: Wed, 29 Apr 2020 11:37:38 -0700 Add a bit of state to the lif to signify when the queues are ready to be used. This closes an ionic_probe()/ionic_open() race condition where the driver has registered the netdev and signaled L

Re: [PATCH net-next v2 5/7] net: bcmgenet: code movement

2020-04-29 Thread Florian Fainelli
On 4/29/20 1:02 PM, Doug Berger wrote: > The Hardware Filter Block code will be used by ethtool functions > when defining flow types so this commit moves the functions in the > file to prevent the need for prototype declarations. > > This is broken out to facilitate review. > > Signed-off-by: Dou

Re: [PATCH net-next v2 3/7] net: bcmgenet: move clk_wol management to bcmgenet_wol

2020-04-29 Thread Florian Fainelli
On 4/29/20 1:02 PM, Doug Berger wrote: > The GENET_POWER_WOL_MAGIC power up and power down code configures > the device for WoL when suspending and disables the WoL logic when > resuming. It makes sense that this code should also manage the WoL > clocking. > > This commit consolidates the logic an

Re: [PATCH net-next v2 4/7] Revert "net: bcmgenet: remove unused function in bcmgenet.c"

2020-04-29 Thread Florian Fainelli
On 4/29/20 1:02 PM, Doug Berger wrote: > This reverts commit e2072600a24161b7ddcfb26814f69f5fbc8ef85a. > > This commit restores the previous implementation of Hardware Filter > Block functions to the file for use in subsequent commits. > > Signed-off-by: Doug Berger Acked-by: Florian Fainelli

RE: [PATCH net-next] devlink: let kernel allocate region snapshot id

2020-04-29 Thread Keller, Jacob E
> -Original Message- > From: Jakub Kicinski > Sent: Wednesday, April 29, 2020 9:39 AM > To: Keller, Jacob E > Cc: Jiri Pirko ; da...@davemloft.net; > netdev@vger.kernel.org; > kernel-t...@fb.com > Subject: Re: [PATCH net-next] devlink: let kernel allocate region snapshot id > > On We

Re: [PATCH RFC v2 00/11] dwmac-meson8b Ethernet RX delay configuration

2020-04-29 Thread Andrew Lunn
> - Khadas VIM2 seems to have the RX delay built into the PCB trace > length. When I enable the RX delay on the PHY or MAC I can't get any > data through. I expect that we will have the same situation on all > GXBB, GXM, AXG, G12A, G12B and SM1 boards Hi Martin Can you actually see this on

Re: [PATCH net 0/3] wireguard fixes for 5.7-rc4

2020-04-29 Thread David Miller
From: "Jason A. Donenfeld" Date: Wed, 29 Apr 2020 14:59:19 -0600 > Hi Dave, > > This series contains two fixes and a cleanup for wireguard: > > 1) Removal of a spurious newline, from Sultan Alsawaf. > > 2) Fix for a memory leak in an error path, in which memory allocated >prior to the erro

Re: BUG: soft lockup while deleting tap interface from vlan aware bridge

2020-04-29 Thread Nikolay Aleksandrov
On 4/29/20 11:52 PM, Stefan Priebe - Profihost AG wrote: Hello, while running a stable vanilla kernel 4.19.115 i'm reproducably get this one: watchdog: BUG: soft lockup - CPU#38 stuck for 22s! [bridge:3570653] ... Call Trace:nbp_vlan_delete+0x59/0xa0br_vlan_info+0x66/0xd0br_afspec+0x18c/0x1d0

Re: [PATCH net-next v2 2/7] net: bcmgenet: Fix WoL with password after deep sleep

2020-04-29 Thread Florian Fainelli
On 4/29/20 1:02 PM, Doug Berger wrote: > Broadcom STB chips support a deep sleep mode where all register contents > are lost. Because we were stashing the MagicPacket password into some of > these registers a suspend into that deep sleep then a resumption would > not lead to being able to wake-up f

Re: [PATCH net-next v2 1/7] net: bcmgenet: set Rx mode before starting netif

2020-04-29 Thread Florian Fainelli
On 4/29/20 1:02 PM, Doug Berger wrote: > This commit explicitly calls the bcmgenet_set_rx_mode() function when > the network interface is started. This function is normally called by > ndo_set_rx_mode when the flags are changed, but apparently not when > the driver is suspended and resumed. > > Th

  1   2   3   4   >