Re: [Patch net-next 2/2] bonding: remove useless stats_lock_key

2020-04-30 Thread Taehee Yoo
On Tue, 28 Apr 2020 at 15:02, Cong Wang wrote: > Hi Cong, Thank you for this work! > After commit b3e80d44f5b1 > ("bonding: fix lockdep warning in bond_get_stats()") the dynamic > key is no longer necessary, as we compute nest level at run-time. > So, we can just remove it to save some lockdep k

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

2020-04-30 Thread Yonghong Song
On 4/29/20 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 enable_stats -v test_enable_stats:PASS:skel

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

2020-04-30 Thread Song Liu
> On Apr 30, 2020, at 12:02 AM, Yonghong Song wrote: > > > > On 4/29/20 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

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

2020-04-30 Thread Song Liu
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:attach_raw_tp 0 nsec test_enable_stats:PASS:get_prog_info 0 nse

[PATCH v9 bpf-next 0/3] bpf: sharing bpf runtime stats with

2020-04-30 Thread Song Liu
run_time_ns is a useful stats for BPF programs. However, it is gated by sysctl kernel.bpf_stats_enabled. When multiple user space tools are toggling kernl.bpf_stats_enabled at the same time, they may confuse each other. Solve this problem with a new BPF command BPF_ENABLE_STATS. Changes v8 => v9:

[PATCH v9 bpf-next 2/3] libbpf: add support for command BPF_ENABLE_STATS

2020-04-30 Thread Song Liu
bpf_enable_stats() is added to enable given stats. Signed-off-by: Song Liu --- tools/lib/bpf/bpf.c | 10 ++ tools/lib/bpf/bpf.h | 1 + tools/lib/bpf/libbpf.map | 1 + 3 files changed, 12 insertions(+) diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index 8f2f0958d446.

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

2020-04-30 Thread Song Liu
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 program run_time_ns again, calculate the di

RE: [PATCH] net: ena: fix gcc-4.8 missing-braces warning

2020-04-30 Thread Jubran, Samih
> -Original Message- > From: Arnd Bergmann > Sent: Wednesday, April 29, 2020 12:51 AM > To: Belgazal, Netanel ; Kiyanovski, Arthur > ; David S. Miller ; Alexei > Starovoitov ; Daniel Borkmann ; > Jakub Kicinski ; Jesper Dangaard Brouer > ; John Fastabend ; Jubran, > Samih > Cc: Arnd Ber

Re: [Patch net-next 1/2] net: partially revert dynamic lockdep key changes

2020-04-30 Thread Taehee Yoo
On Tue, 28 Apr 2020 at 15:02, Cong Wang wrote: > Hi Cong, Thank you so much for this work! > This patch reverts the folowing commits: > > commit 064ff66e2bef84f1153087612032b5b9eab005bd > "bonding: add missing netdev_update_lockdep_key()" > > commit 53d374979ef147ab51f5d632dfe20b14aebeccd0 > "ne

RE: Re: [v4,net-next 2/4] net: schedule: add action gate offloading

2020-04-30 Thread Po Liu
Hi Vlad, > -Original Message- > From: Vlad Buslov > Sent: 2020年4月30日 1:41 > 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;

Re: [PATCH v1] net: macb: Fix runtime PM refcounting

2020-04-30 Thread Claudiu.Beznea
On 27.04.2020 13:51, Andy Shevchenko wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > The commit e6a41c23df0d, while trying to fix an issue, > > ("net: macb: ensure interface is not suspended on at91rm9200") > > introduced a refcoun

[PATCH v2 net-next 00/17] net: atlantic: A2 support

2020-04-30 Thread Igor Russkikh
This patchset adds support for the new generation of Atlantic NICs. Chip generations are mostly compatible register-wise, but there are still some differences. Therefore we've made some of first generation (A1) code non-static to re-use it where possible. Some pieces are A2 specific, in which cas

[PATCH v2 net-next 06/17] net: atlantic: make hw_get_regs optional

2020-04-30 Thread Igor Russkikh
From: Mark Starovoytov This patch fixes potential crash in case if hw_get_regs is NULL. Signed-off-by: Mark Starovoytov --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/e

[PATCH v2 net-next 05/17] net: atlantic: simplify hw_get_fw_version() usage

2020-04-30 Thread Igor Russkikh
From: Nikita Danilov hw_get_fw_version() never fails, so this patch simplifies its usage by utilizing return value instead of output argument. Signed-off-by: Nikita Danilov Signed-off-by: Mark Starovoytov --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h| 2 +- drivers/net/ethern

[PATCH v2 net-next 07/17] net: atlantic: move IS_CHIP_FEATURE to aq_hw.h

2020-04-30 Thread Igor Russkikh
From: Mark Starovoytov IS_CHIP feature will be used to differentiate between A1 and A2, where necessary. Thus, move it to aq_hw.h, rename it and make it accept the 'hw' pointer. Signed-off-by: Mark Starovoytov --- .../net/ethernet/aquantia/atlantic/aq_hw.h| 13 +++ .../aquantia/atlanti

[PATCH v2 net-next 01/17] net: atlantic: update company name in the driver description

2020-04-30 Thread Igor Russkikh
Aquantia is now part of Marvell. Thus, update the driver description. Signed-off-by: Igor Russkikh Signed-off-by: Mark Starovoytov --- drivers/net/ethernet/aquantia/atlantic/aq_cfg.h| 4 ++-- drivers/net/ethernet/aquantia/atlantic/aq_common.h | 2 +- 2 files changed, 3 insertions(+), 3 dele

[PATCH v2 net-next 02/17] net: atlantic: add A2 device IDs

2020-04-30 Thread Igor Russkikh
Adding device ids for the new generation of atlantic nic. Signed-off-by: Igor Russkikh Signed-off-by: Mark Starovoytov --- drivers/net/ethernet/aquantia/atlantic/aq_common.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_common.h b/drivers/

[PATCH v2 net-next 04/17] net: atlantic: add hw_soft_reset, hw_prepare to hw_ops

2020-04-30 Thread Igor Russkikh
From: Mark Starovoytov A2 will have a different implementation of these 2 APIs, so this patch moves them to hw_ops in preparation for A2. Signed-off-by: Mark Starovoytov Co-developed-by: Dmitry Bezrukov Signed-off-by: Dmitry Bezrukov --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 5

[PATCH v2 net-next 03/17] net: atlantic: add defines for 10M and EEE 100M link mode

2020-04-30 Thread Igor Russkikh
This patch adds defines for 10M and EEE 100M link modes, which are supported by A2. 10M support is added in this patch series. EEE is out of scope, but will be added in a follow-up series. Signed-off-by: Igor Russkikh Signed-off-by: Mark Starovoytov --- .../ethernet/aquantia/atlantic/aq_common

[PATCH v2 net-next 13/17] net: atlantic: add A2 RPF hw_ops

2020-04-30 Thread Igor Russkikh
This patch adds RPF-related hw_ops, which are needed for basic functionality. Signed-off-by: Igor Russkikh Co-developed-by: Dmitry Bogdanov Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov --- .../aquantia/atlantic/hw_atl/hw_atl_utils.h | 2 + .../aquantia/atlantic/hw_atl2/h

[PATCH v2 net-next 09/17] net: atlantic: minimal A2 HW bindings required for fw_ops

2020-04-30 Thread Igor Russkikh
From: Dmitry Bogdanov This patch adds the bare minimum of A2 HW bindings required to get fw_ops working. Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov --- .../net/ethernet/aquantia/atlantic/Makefile | 1 + .../net/ethernet/aquantia/atlantic/aq_hw.h| 1 + .../aquantia/

[PATCH v2 net-next 12/17] net: atlantic: HW bindings for A2 RFP

2020-04-30 Thread Igor Russkikh
RPF is one of the modules which has been significantly changed/extended on A2. This patch adds the necessary A2 register definitions for RPF, which are used in follow-up patches. Signed-off-by: Igor Russkikh Co-developed-by: Dmitry Bogdanov Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark St

[PATCH v2 net-next 08/17] net: atlantic: A2 driver-firmware interface

2020-04-30 Thread Igor Russkikh
From: Dmitry Bogdanov This patch adds the driver<->firmware interface for A2 Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov --- .../aquantia/atlantic/hw_atl2/hw_atl2_utils.h | 593 ++ 1 file changed, 593 insertions(+) create mode 100644 drivers/net/ethernet/a

[PATCH v2 net-next 14/17] net: atlantic: HW bindings for basic A2 init/deinit hw_ops

2020-04-30 Thread Igor Russkikh
From: Dmitry Bogdanov This patch adds A2 register definitions for basic A2 HW initialization / deinitialization. Signed-off-by: Dmitry Bogdanov Co-developed-by: Egor Pomozov Signed-off-by: Egor Pomozov Co-developed-by: Igor Russkikh Signed-off-by: Igor Russkikh Co-developed-by: Nikita Danil

[PATCH v2 net-next 11/17] net: atlantic: A2 hw_ops skeleton

2020-04-30 Thread Igor Russkikh
This patch adds basic hw_ops layout for A2. Actual implementation will be added in the follow-up patches. Signed-off-by: Igor Russkikh Signed-off-by: Mark Starovoytov --- .../net/ethernet/aquantia/atlantic/Makefile | 1 + .../net/ethernet/aquantia/atlantic/aq_hw.h| 1 + .../ethernet/

[PATCH v2 net-next 10/17] net: atlantic: minimal A2 fw_ops

2020-04-30 Thread Igor Russkikh
From: Dmitry Bogdanov This patch adds the minimum set of FW ops for A2. Signed-off-by: Dmitry Bogdanov Co-developed-by: Igor Russkikh Signed-off-by: Igor Russkikh Signed-off-by: Mark Starovoytov --- .../net/ethernet/aquantia/atlantic/Makefile | 1 + .../atlantic/hw_atl2/hw_atl2_internal

[PATCH v2 net-next 16/17] net: atlantic: basic A2 init/deinit hw_ops

2020-04-30 Thread Igor Russkikh
This patch adds basic A2 HW initialization / deinitialization. Signed-off-by: Igor Russkikh Co-developed-by: Dmitry Bogdanov Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov --- .../net/ethernet/aquantia/atlantic/aq_nic.c | 3 +- .../aquantia/atlantic/hw_atl/hw_atl_b0.c

[PATCH v2 net-next 17/17] net: atlantic: A2 ingress / egress hw configuration

2020-04-30 Thread Igor Russkikh
Chip generations are mostly compatible register-wise, but there are still some differences. Therefore we've made some of first generation (A1) code non-static to re-use it where possible. Some pieces are A2 specific, in which case we redefine/extend such APIs. Signed-off-by: Igor Russkikh Signed

[PATCH v2 net-next 15/17] net: atlantic: common functions needed for basic A2 init/deinit hw_ops

2020-04-30 Thread Igor Russkikh
From: Dmitry Bogdanov This patch adds common functions (mostly FW-related), which are needed for basic A2 HW initialization / deinitialization. Signed-off-by: Dmitry Bogdanov Co-developed-by: Igor Russkikh Signed-off-by: Igor Russkikh Signed-off-by: Mark Starovoytov --- .../net/ethernet/aqu

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

2020-04-30 Thread Jakub Sitnicki
On Thu, Apr 30, 2020 at 04:14 AM CEST, 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. > > Signed-off-by: Andrii Nakryiko > --- > tools/lib/bpf/libbpf.c | 2 +- > 1 file changed, 1 ins

[PATCH -next] bpf: fix error return code in map_lookup_and_delete_elem()

2020-04-30 Thread Wei Yongjun
Fix to return negative error code -EFAULT from the copy_to_user() error handling case instead of 0, as done elsewhere in this function. Fixes: bd513cd08f10 ("bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall") Signed-off-by: Wei Yongjun --- kernel/bpf/syscall.c | 4 +++- 1 file changed, 3 insertions(+

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

2020-04-30 Thread Michal Kubecek
On Thu, Apr 30, 2020 at 07:00:58AM +0200, Oleksij Rempel wrote: > > > diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h > > > index 92f737f101178..eb680e3d6bda5 100644 > > > --- a/include/uapi/linux/ethtool.h > > > +++ b/include/uapi/linux/ethtool.h > > > @@ -1666,6 +1666,31

[PATCH net-next 0/2] net: dsa: mv88e6xxx: augment phylink support for 10G

2020-04-30 Thread Russell King - ARM Linux admin
Hi, This series adds phylink 10G support for the 88E6390 series switches, as suggested by Andrew Lunn. The first patch cleans up the code to use generic definitions for the registers in a similar way to what was done with the initial conversion of 1G serdes support. The second patch adds the nec

[PATCH net-next 2/2] net: dsa: mv88e6xxx: 88e6390 10G serdes support

2020-04-30 Thread Russell King
Add support for reading and reporting the 10G link status on the 88e6390 in addition to the 1000BASE-X/2500BASE-X/SGMII status. Signed-off-by: Russell King --- drivers/net/dsa/mv88e6xxx/serdes.c | 43 -- drivers/net/dsa/mv88e6xxx/serdes.h | 1 + 2 files changed, 42 i

[PATCH net-next 1/2] net: dsa: mv88e6xxx: use generic clause 45 definitions

2020-04-30 Thread Russell King
The private MV88E6390_PCS_CONTROL_1 definitions in serdes.h reflects the IEEE 802.3 standard PCS control register 1 definitions, only offset by 0x1000 in the PHYXS register space. Rather than inventing our own, use those that already exist, and name the register MV88E6390_10G_CTRL1. Signed-off-by

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

2020-04-30 Thread Tariq Toukan
On 4/30/2020 3:12 AM, Jakub Kicinski wrote: 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. Hi Jakub, The HW spec requires the DUMP size to be no

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

2020-04-30 Thread Stefano Garzarella
Hi Jia, thanks for the patch, some comments below: On Thu, Apr 30, 2020 at 10:13:14AM +0800, Jia He wrote: > 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 vsoc

Re: [PATCH net] mptcp: fix uninitialized value access

2020-04-30 Thread Paolo Abeni
hi, On Wed, 2020-04-29 at 11:56 -0700, David Miller wrote: > From: Paolo Abeni > Date: Wed, 29 Apr 2020 12:50:37 +0200 > > > Fixes: 20882e2cb904 ("mptcp: avoid flipping mp_capable field in > > syn_recv_sock()") > > [davem@localhost net]$ git describe 20882e2cb904 > fatal: Not a valid object na

Re: [PATCH net 2/5] mptcp: move option parsing into mptcp_incoming_options()

2020-04-30 Thread Paolo Abeni
On Wed, 2020-04-29 at 11:54 -0700, Mat Martineau wrote: > On Wed, 29 Apr 2020, Paolo Abeni wrote: [...] > > Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") > > Signed-off-by: Paolo Abeni > > --- > > Hi Paolo - > > This doesn't apply cleanly to the net tree. I'm sorry, I had local u

RE: [EXTERNAL] Re: [PATCH 1/2] Revert commit 1b0a83ac04e383e3bed21332962b90710fcf2828

2020-04-30 Thread Badel, Laurent
Thank you Andrew, I will do that. Sorry for the trouble. Best regards, Laurent > - Eaton Industries Manufacturing GmbH ~ Registered place of business: Route de la Longeraie 7, 1110, Morges, Switzerland - -Original Message- > F

[PATCH net-next v5 1/3] net: phy: mdio: add IPQ4019 MDIO driver

2020-04-30 Thread Robert Marko
This patch adds the driver for the MDIO interface inside of Qualcomm IPQ40xx series SoC-s. Signed-off-by: Christian Lamparter Signed-off-by: Robert Marko Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Cc: Luka Perkov --- Changes from v3 to v4: * Change compatible and references to

[PATCH net-next v5 0/3] net: phy: mdio: add IPQ40xx MDIO support

2020-04-30 Thread Robert Marko
This patch series provides support for the IPQ40xx built-in MDIO interface. Included are driver, devicetree bindings for it and devicetree node. Robert Marko (3): net: phy: mdio: add IPQ4019 MDIO driver dt-bindings: add Qualcomm IPQ4019 MDIO bindings ARM: dts: qcom: ipq4019: add MDIO node

[PATCH net-next v5 2/3] dt-bindings: add Qualcomm IPQ4019 MDIO bindings

2020-04-30 Thread Robert Marko
This patch adds the binding document for the IPQ40xx MDIO driver. Signed-off-by: Robert Marko Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Cc: Luka Perkov --- Changes from v3 to v4: * Change compatible to IPQ4019 Changes from v2 to v3: * Remove status from example .../bindings/net

[PATCH net-next v5 3/3] ARM: dts: qcom: ipq4019: add MDIO node

2020-04-30 Thread Robert Marko
This patch adds the necessary MDIO interface node to the Qualcomm IPQ4019 DTSI. Built-in QCA8337N switch is managed using it, and since we have a driver for it lets add it. Signed-off-by: Christian Lamparter Signed-off-by: Robert Marko Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Cc

Re: [PATCH][next] rtw88: fix spelling mistake "fimrware" -> "firmware"

2020-04-30 Thread Sebastian Andrzej Siewior
On 2020-04-24 09:47:33 [+0100], Colin King wrote: > From: Colin Ian King > > There are spelling mistakes in two rtw_err error messages. Fix them. > > Signed-off-by: Colin Ian King Acked-by: Sebastian Andrzej Siewior Sebastian

RE: [EXTERNAL] Re: [PATCH 2/2] Reset PHY in phy_init_hw() before interrupt configuration

2020-04-30 Thread Badel, Laurent
> - Eaton Industries Manufacturing GmbH ~ Registered place of business: Route de la Longeraie 7, 1110, Morges, Switzerland - -Original Message- > From: Heiner Kallweit > Sent: Wednesday, April 29, 2020 7:06 PM > To: Badel, Laur

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

2020-04-30 Thread Dan Carpenter
On Wed, Apr 29, 2020 at 09:33:04PM -0400, Rylan Dmello wrote: > 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_mai

KASAN: use-after-free Write in bpf_link_put

2020-04-30 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:449e14bf bpf: Fix unused variable warning git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=109eb5f810 kernel config: https://syzkaller.appspot.com/x/.config?x=16d87c420507d444 dashboard link: https:

Re: [PATCH net-next 20/33] vhost_net: also populate XDP frame size

2020-04-30 Thread Jesper Dangaard Brouer
On Mon, 27 Apr 2020 13:50:15 +0800 Jason Wang wrote: > On 2020/4/23 上午12:09, Jesper Dangaard Brouer wrote: > > In vhost_net_build_xdp() the 'buf' that gets queued via an xdp_buff > > have embedded a struct tun_xdp_hdr (located at xdp->data_hard_start) > > which contains the buffer length 'buflen'

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

2020-04-30 Thread Joe Perches
On Thu, 2020-04-30 at 12:38 +0300, Dan Carpenter wrote: > On Wed, Apr 29, 2020 at 09:33:04PM -0400, Rylan Dmello wrote: > > 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. [] > > d

Re: [RFC PATCH bpf-next 0/6] bpf, printk: add BTF-based type printing

2020-04-30 Thread Alan Maguire
On Mon, 20 Apr 2020, Joe Perches wrote: > On Mon, 2020-04-20 at 16:29 +0100, Alan Maguire wrote: > > On Sat, 18 Apr 2020, Alexei Starovoitov wrote: > > > > > On Fri, Apr 17, 2020 at 11:42:34AM +0100, Alan Maguire wrote: > > > > The printk family of functions support printing specific pointer type

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

2020-04-30 Thread Justin He
Hi Stefano > -Original Message- > From: Stefano Garzarella > Sent: Thursday, April 30, 2020 4:26 PM > To: Justin He > Cc: Stefan Hajnoczi ; Michael S. Tsirkin > ; Jason Wang ; > k...@vger.kernel.org; virtualizat...@lists.linux-foundation.org; > netdev@vger.kernel.org; linux-ker...@vger.k

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

2020-04-30 Thread Dan Carpenter
On Thu, Apr 30, 2020 at 03:03:07AM -0700, Joe Perches wrote: > On Thu, 2020-04-30 at 12:38 +0300, Dan Carpenter wrote: > > On Wed, Apr 29, 2020 at 09:33:04PM -0400, Rylan Dmello wrote: > > > As suggested by Joe Perches, this patch removes the 'exit' label > > > from the ql_set_mac_addr_reg function

Re: [PATCH net-next 21/33] virtio_net: add XDP frame size in two code paths

2020-04-30 Thread Jesper Dangaard Brouer
On Tue, 28 Apr 2020 17:50:11 +0800 Jason Wang wrote: > We tried to reserve space for vnet header before > xdp.data_hard_start. But this is useless since the packet could be > modified by XDP which may invalidate the information stored in the > header and there's no way for XDP to know the existen

[PATCH net-next] net: caif: Fix use correct return type for ndo_start_xmit()

2020-04-30 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- net/caif/chnl_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c

[PATCH bpf-next] libbpf: fix probe code to return EPERM if encountered

2020-04-30 Thread Eelco Chaudron
When the probe code was failing for any reason ENOTSUP was returned, even if this was due to no having enough lock space. This patch fixes this by returning EPERM to the user application, so it can respond and increase the RLIMIT_MEMLOCK size. Signed-off-by: Eelco Chaudron --- tools/lib/bpf/libb

Re: [PATCH v1] net: macb: Fix runtime PM refcounting

2020-04-30 Thread Andy Shevchenko
On Thu, Apr 30, 2020 at 07:59:41AM +, claudiu.bez...@microchip.com wrote: > > > On 27.04.2020 13:51, Andy Shevchenko wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > > content is safe > > > > The commit e6a41c23df0d, while trying to fix an issue, > >

Re: [RFC PATCH v11 5/9] psci: Add hypercall service for ptp_kvm.

2020-04-30 Thread Mark Rutland
On Tue, Apr 28, 2020 at 07:14:52AM +0100, Jianyong Wu wrote: > On 2020/4/24 6:39 PM, Mark Rutland wrote: > > On Fri, Apr 24, 2020 at 03:50:22AM +0100, Jianyong Wu wrote: > >> On 2020/4/21 5:57 PM, Mark Rutland wrote: > >>> On Tue, Apr 21, 2020 at 11:23:00AM +0800, Jianyong Wu wrote: > diff --g

[PATCH] cxgb4/chcr: avoid -Wreturn-local-addr warning

2020-04-30 Thread Arnd Bergmann
gcc-10 warns about functions that return a pointer to a stack variable. In chcr_write_cpl_set_tcb_ulp(), this does not actually happen, but it's too hard to see for the compiler: drivers/crypto/chelsio/chcr_ktls.c: In function 'chcr_write_cpl_set_tcb_ulp.constprop': drivers/crypto/chelsio/chcr_kt

[PATCH bpf-next] selftests/bpf: Test allowed maps for bpf_sk_select_reuseport

2020-04-30 Thread Jakub Sitnicki
Check that verifier allows passing a map of type: BPF_MAP_TYPE_REUSEPORT_SOCKARRARY, or BPF_MAP_TYPE_SOCKMAP, or BPF_MAP_TYPE_SOCKHASH ... to bpf_sk_select_reuseport helper. Suggested-by: John Fastabend Signed-off-by: Jakub Sitnicki --- tools/testing/selftests/bpf/test_verifier.c | 12

Re: [PATCH bpf-next] libbpf: fix probe code to return EPERM if encountered

2020-04-30 Thread Toke Høiland-Jørgensen
Eelco Chaudron writes: > When the probe code was failing for any reason ENOTSUP was returned, even > if this was due to no having enough lock space. This patch fixes this by > returning EPERM to the user application, so it can respond and increase > the RLIMIT_MEMLOCK size. > > Signed-off-by: Eel

Re: [PATCH bpf-next 2/3] selftests/bpf: Test that lookup on SOCKMAP/SOCKHASH is allowed

2020-04-30 Thread Jakub Sitnicki
On Wed, Apr 29, 2020 at 09:23 PM CEST, John Fastabend wrote: > Jakub Sitnicki wrote: >> Now that bpf_map_lookup_elem() is white-listed for SOCKMAP/SOCKHASH, >> replace the tests which check that verifier prevents lookup on these map >> types with ones that ensure that lookup operation is permitted,

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

2020-04-30 Thread Ido Schimmel
On Wed, Apr 29, 2020 at 10:52:35PM +0200, 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

Re: [PATCH net-next 2/3] net/mlx5e: Introduce mlx5e_eswitch_rep_uplink_priv helper

2020-04-30 Thread Roi Dayan
On 2020-04-28 8:24 AM, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > Introduce the mlx5e_eswitch_rep_uplink_priv helper > to make the codes readable. > > Signed-off-by: Tonghao Zhang > --- > drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 4 +-- > drivers/net/ethernet/mell

Re: [PATCH net-next 3/3] net/mlx5e: Fix the code style

2020-04-30 Thread Roi Dayan
On 2020-04-28 8:24 AM, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > Signed-off-by: Tonghao Zhang > --- > drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c >

[PATCH net-next v2 02/33] bnxt: add XDP frame size to driver

2020-04-30 Thread Jesper Dangaard Brouer
This driver uses full PAGE_SIZE pages when XDP is enabled. In case of XDP uses driver uses __bnxt_alloc_rx_page which does full page DMA-map. Thus, xdp_adjust_tail grow is DMA compliant for XDP_TX action that does DMA-sync. Cc: Michael Chan Cc: Andy Gospodarek Signed-off-by: Jesper Dangaard Bro

[PATCH net-next v2 08/33] xdp: cpumap redirect use frame_sz and increase skb_tailroom

2020-04-30 Thread Jesper Dangaard Brouer
Knowing the memory size backing the packet/xdp_frame data area, and knowing it already have reserved room for skb_shared_info, simplifies using build_skb significantly. With this change we no-longer lie about the SKB truesize, but more importantly a significant larger skb_tailroom is now provided,

[PATCH net-next v2 03/33] sfc: add XDP frame size

2020-04-30 Thread Jesper Dangaard Brouer
This driver uses RX page-split when possible. It was recently fixed in commit 86e85bf6981c ("sfc: fix XDP-redirect in this driver") to add needed tailroom for XDP-redirect. After the fix efx->rx_page_buf_step is the frame size, with enough head and tail-room for XDP-redirect. Signed-off-by: Jespe

[PATCH net-next v2 01/33] xdp: add frame size to xdp_buff

2020-04-30 Thread Jesper Dangaard Brouer
XDP have evolved to support several frame sizes, but xdp_buff was not updated with this information. The frame size (frame_sz) member of xdp_buff is introduced to know the real size of the memory the frame is delivered in. When introducing this also make it clear that some tailroom is reserved/req

[PATCH net-next v2 04/33] mvneta: add XDP frame size to driver

2020-04-30 Thread Jesper Dangaard Brouer
This marvell driver mvneta uses PAGE_SIZE frames, which makes it really easy to convert. Driver updates rxq and now frame_sz once per NAPI call. This driver takes advantage of page_pool PP_FLAG_DMA_SYNC_DEV that can help reduce the number of cache-lines that need to be flushed when doing DMA sync

[PATCH net-next v2 07/33] xdp: xdp_frame add member frame_sz and handle in convert_to_xdp_frame

2020-04-30 Thread Jesper Dangaard Brouer
Use hole in struct xdp_frame, when adding member frame_sz, which keeps same sizeof struct (32 bytes) Drivers ixgbe and sfc had bug cases where the necessary/expected tailroom was not reserved. This can lead to some hard to catch memory corruption issues. Having the drivers frame_sz this can be det

[PATCH net-next v2 06/33] net: XDP-generic determining XDP frame size

2020-04-30 Thread Jesper Dangaard Brouer
The SKB "head" pointer points to the data area that contains skb_shared_info, that can be found via skb_end_pointer(). Given xdp->data_hard_start have been established (basically pointing to skb->head), frame size is between skb_end_pointer() and data_hard_start, plus the size reserved to skb_share

[PATCH net-next v2 09/33] veth: adjust hard_start offset on redirect XDP frames

2020-04-30 Thread Jesper Dangaard Brouer
When native XDP redirect into a veth device, the frame arrives in the xdp_frame structure. It is then processed in veth_xdp_rcv_one(), which can run a new XDP bpf_prog on the packet. Doing so requires converting xdp_frame to xdp_buff, but the tricky part is that xdp_frame memory area is located in

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

2020-04-30 Thread Nikolay Aleksandrov
On 30/04/2020 13:55, Ido Schimmel wrote: > On Wed, Apr 29, 2020 at 10:52:35PM +0200, 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] >> >> .

[PATCH net-next v2 05/33] net: netsec: Add support for XDP frame size

2020-04-30 Thread Jesper Dangaard Brouer
From: Ilias Apalodimas This driver takes advantage of page_pool PP_FLAG_DMA_SYNC_DEV that can help reduce the number of cache-lines that need to be flushed when doing DMA sync for_device. Due to xdp_adjust_tail can grow the area accessible to the by the CPU (can possibly write into), then max syn

[PATCH net-next v2 19/33] tun: add XDP frame size

2020-04-30 Thread Jesper Dangaard Brouer
The tun driver have two code paths for running XDP (bpf_prog_run_xdp). In both cases 'buflen' contains enough tailroom for skb_shared_info. Cc: Jason Wang Signed-off-by: Jesper Dangaard Brouer Acked-by: Jason Wang --- drivers/net/tun.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/d

[PATCH net-next v2 13/33] qlogic/qede: add XDP frame size to driver

2020-04-30 Thread Jesper Dangaard Brouer
The driver qede uses a full page, when XDP is enabled. The drivers value in rx_buf_seg_size (struct qede_rx_queue) will be PAGE_SIZE when an XDP bpf_prog is attached. Cc: Ariel Elior Cc: gr-everest-linux...@marvell.com Signed-off-by: Jesper Dangaard Brouer --- drivers/net/ethernet/qlogic/qede/q

[PATCH net-next v2 18/33] nfp: add XDP frame size to netronome driver

2020-04-30 Thread Jesper Dangaard Brouer
The netronome nfp driver use PAGE_SIZE when xdp_prog is set, but xdp.data_hard_start begins at offset NFP_NET_RX_BUF_HEADROOM. Thus, adjust for this when setting xdp.frame_sz, as it counts from data_hard_start. When doing XDP_TX this driver is smart and instead of a full DMA-map does a DMA-sync on

[PATCH net-next v2 16/33] mlx4: add XDP frame size and adjust max XDP MTU

2020-04-30 Thread Jesper Dangaard Brouer
The mlx4 drivers size of memory backing the RX packet is stored in frag_stride. For XDP mode this will be PAGE_SIZE (normally 4096). For normal mode frag_stride is 2048. Also adjust MLX4_EN_MAX_XDP_MTU to take tailroom into account. Cc: Tariq Toukan Cc: Saeed Mahameed Signed-off-by: Jesper Dang

[PATCH net-next v2 12/33] hv_netvsc: add XDP frame size to driver

2020-04-30 Thread Jesper Dangaard Brouer
The hyperv NIC drivers XDP implementation is rather disappointing as it will be a slowdown to enable XDP on this driver, given it will allocate a new page for each packet and copy over the payload, before invoking the XDP BPF-prog. The positive thing it that its easy to determine the xdp.frame_sz.

[PATCH net-next v2 10/33] veth: xdp using frame_sz in veth driver

2020-04-30 Thread Jesper Dangaard Brouer
The veth driver can run XDP in "native" mode in it's own NAPI handler, and since commit 9fc8d518d9d5 ("veth: Handle xdp_frames in xdp napi ring") packets can come in two forms either xdp_frame or skb, calling respectively veth_xdp_rcv_one() or veth_xdp_rcv_skb(). For packets to arrive in xdp_frame

[PATCH net-next v2 15/33] ena: add XDP frame size to amazon NIC driver

2020-04-30 Thread Jesper Dangaard Brouer
Frame size ENA_PAGE_SIZE is limited to 16K on systems with larger PAGE_SIZE than 16K. Change ENA_XDP_MAX_MTU to also take into account the reserved tailroom. Cc: Arthur Kiyanovski Acked-by: Sameeh Jubran Signed-off-by: Jesper Dangaard Brouer --- drivers/net/ethernet/amazon/ena/ena_netdev.c |

[PATCH net-next v2 17/33] net: thunderx: add XDP frame size

2020-04-30 Thread Jesper Dangaard Brouer
To help reviewers these are the defines related to RCV_FRAG_LEN #define DMA_BUFFER_LEN 1536 /* In multiples of 128bytes */ #define RCV_FRAG_LEN (SKB_DATA_ALIGN(DMA_BUFFER_LEN + NET_SKB_PAD) + \ SKB_DATA_ALIGN(sizeof(struct skb_shared_info))) Cc: Sunil Goutham Cc: Rob

[PATCH net-next v2 11/33] dpaa2-eth: add XDP frame size

2020-04-30 Thread Jesper Dangaard Brouer
The dpaa2-eth driver reserve some headroom used for hardware and software annotation area in RX/TX buffers. Thus, xdp.data_hard_start doesn't start at page boundary. When XDP is configured the area reserved via dpaa2_fd_get_offset(fd) is 448 bytes of which XDP have reserved 256 bytes. As frame_sz

[PATCH net-next v2 20/33] vhost_net: also populate XDP frame size

2020-04-30 Thread Jesper Dangaard Brouer
In vhost_net_build_xdp() the 'buf' that gets queued via an xdp_buff have embedded a struct tun_xdp_hdr (located at xdp->data_hard_start) which contains the buffer length 'buflen' (with tailroom for skb_shared_info). Also storing this buflen in xdp->frame_sz, does not obsolete struct tun_xdp_hdr, as

[PATCH net-next v2 14/33] net: ethernet: ti: add XDP frame size to driver cpsw

2020-04-30 Thread Jesper Dangaard Brouer
The driver code cpsw.c and cpsw_new.c both use page_pool with default order-0 pages or their RX-pages. Cc: Grygorii Strashko Cc: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c |1 + drivers/net/ethernet/ti/cpsw_

[PATCH net-next v2 21/33] virtio_net: add XDP frame size in two code paths

2020-04-30 Thread Jesper Dangaard Brouer
The virtio_net driver is running inside the guest-OS. There are two XDP receive code-paths in virtio_net, namely receive_small() and receive_mergeable(). The receive_big() function does not support XDP. In receive_small() the frame size is available in buflen. The buffer backing these frames are a

[PATCH net-next v2 24/33] ixgbevf: add XDP frame size to VF driver

2020-04-30 Thread Jesper Dangaard Brouer
This patch mirrors the changes to ixgbe in previous patch. This VF driver doesn't support XDP_REDIRECT, but correct tailroom is still necessary for BPF-helper xdp_adjust_tail. In legacy-mode + larger PAGE_SIZE, due to lacking tailroom, we accept that xdp_adjust_tail shrink doesn't work. Cc: inte

[PATCH net-next v2 22/33] ixgbe: fix XDP redirect on archs with PAGE_SIZE above 4K

2020-04-30 Thread Jesper Dangaard Brouer
The ixgbe driver have another memory model when compiled on archs with PAGE_SIZE above 4096 bytes. In this mode it doesn't split the page in two halves, but instead increment rx_buffer->page_offset by truesize of packet (which include headroom and tailroom for skb_shared_info). This is done correc

[PATCH net-next v2 31/33] bpf: add xdp.frame_sz in bpf_prog_test_run_xdp().

2020-04-30 Thread Jesper Dangaard Brouer
Update the memory requirements, when adding xdp.frame_sz in BPF test_run function bpf_prog_test_run_xdp() which e.g. is used by XDP selftests. Specifically add the expected reserved tailroom, but also allocated a larger memory area to reflect that XDP frames usually comes in this format. Limit the

[PATCH net-next v2 33/33] selftests/bpf: xdp_adjust_tail add grow tail tests

2020-04-30 Thread Jesper Dangaard Brouer
Extend BPF selftest xdp_adjust_tail with grow tail tests, which is added as subtest's. The first grow test stays in same form as original shrink test. The second grow test use the newer bpf_prog_test_run_xattr() calls, and does extra checking of data contents. Signed-off-by: Jesper Dangaard Brouer

[PATCH net-next v2 29/33] xdp: allow bpf_xdp_adjust_tail() to grow packet size

2020-04-30 Thread Jesper Dangaard Brouer
Finally, after all drivers have a frame size, allow BPF-helper bpf_xdp_adjust_tail() to grow or extend packet size at frame tail. Remember that helper/macro xdp_data_hard_end have reserved some tailroom. Thus, this helper makes sure that the BPF-prog don't have access to this tailroom area. V2:

[PATCH net-next v2 30/33] xdp: clear grow memory in bpf_xdp_adjust_tail()

2020-04-30 Thread Jesper Dangaard Brouer
Clearing memory of tail when grow happens, because it is too easy to write a XDP_PASS program that extend the tail, which expose this memory to users that can run tcpdump. Signed-off-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen --- net/core/filter.c |4 1 file changed, 4

[PATCH net-next v2 28/33] mlx5: rx queue setup time determine frame_sz for XDP

2020-04-30 Thread Jesper Dangaard Brouer
The mlx5 driver have multiple memory models, which are also changed according to whether a XDP bpf_prog is attached. The 'rx_striding_rq' setting is adjusted via ethtool priv-flags e.g.: # ethtool --set-priv-flags mlx5p2 rx_striding_rq off On the general case with 4K page_size and regular MTU pa

[PATCH net-next v2 27/33] xdp: for Intel AF_XDP drivers add XDP frame_sz

2020-04-30 Thread Jesper Dangaard Brouer
Intel drivers implement native AF_XDP zerocopy in separate C-files, that have its own invocation of bpf_prog_run_xdp(). The setup of xdp_buff is also handled in separately from normal code path. This patch update XDP frame_sz for AF_XDP zerocopy drivers i40e, ice and ixgbe, as the code changes nee

[PATCH net-next v2 25/33] i40e: add XDP frame size to driver

2020-04-30 Thread Jesper Dangaard Brouer
This driver uses different memory models depending on PAGE_SIZE at compile time. For PAGE_SIZE 4K it uses page splitting, meaning for normal MTU frame size is 2048 bytes (and headroom 192 bytes). For larger MTUs the driver still use page splitting, by allocating order-1 pages (8192 bytes) for RX fr

[PATCH net-next v2 23/33] ixgbe: add XDP frame size to driver

2020-04-30 Thread Jesper Dangaard Brouer
This driver uses different memory models depending on PAGE_SIZE at compile time. For PAGE_SIZE 4K it uses page splitting, meaning for normal MTU frame size is 2048 bytes (and headroom 192 bytes). For larger MTUs the driver still use page splitting, by allocating order-1 pages (8192 bytes) for RX fr

[PATCH net-next v2 32/33] selftests/bpf: adjust BPF selftest for xdp_adjust_tail

2020-04-30 Thread Jesper Dangaard Brouer
Current selftest for BPF-helper xdp_adjust_tail only shrink tail. Make it more clear that this is a shrink test case. Signed-off-by: Jesper Dangaard Brouer --- .../selftests/bpf/prog_tests/xdp_adjust_tail.c |9 +- .../testing/selftests/bpf/progs/test_adjust_tail.c | 30

[PATCH net-next v2 26/33] ice: add XDP frame size to driver

2020-04-30 Thread Jesper Dangaard Brouer
This driver uses different memory models depending on PAGE_SIZE at compile time. For PAGE_SIZE 4K it uses page splitting, meaning for normal MTU frame size is 2048 bytes (and headroom 192 bytes). For larger MTUs the driver still use page splitting, by allocating order-1 pages (8192 bytes) for RX fr

[PATCH net-next] rionet: Fix use correct return type for ndo_start_xmit()

2020-04-30 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/rionet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/rionet.c b/drivers/net/rionet

  1   2   3   4   5   6   >