Re: [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-12 Thread Vadym Kochan
On Tue, May 12, 2020 at 07:55:36AM +0200, Jiri Pirko wrote: > Mon, May 11, 2020 at 09:24:22PM CEST, vadym.koc...@plvision.eu wrote: > >On Mon, May 11, 2020 at 02:57:23PM +0200, Jiri Pirko wrote: > >> [...] > >> > >> >diff --git a/drivers/net/ethernet/marvell/prestera/prestera_dsa.c > >> >b/driver

[PATCH net-next v2] dt-bindings: net: Convert UniPhier AVE4 controller to json-schema

2020-05-12 Thread Kunihiko Hayashi
Convert the UniPhier AVE4 controller binding to DT schema format. Signed-off-by: Kunihiko Hayashi --- Changes since v1: - Set true to phy-mode and phy-handle instead of $ref - Add mac-address and local-mac-address for existing dts warning .../bindings/net/socionext,uniphier-ave4.txt | 6

RE: [PATCH net-next v9 2/2] xen networking: add XDP offset adjustment to xen-netback

2020-05-12 Thread Paul Durrant
> -Original Message- > From: Denis Kirjanov > Sent: 11 May 2020 18:22 > To: p...@xen.org > Cc: netdev@vger.kernel.org; bro...@redhat.com; jgr...@suse.com; > wei@kernel.org; > ilias.apalodi...@linaro.org > Subject: Re: [PATCH net-next v9 2/2] xen networking: add XDP offset > adjustmen

Re: [PATCH] carl9170: Replace zero-length array with flexible-array

2020-05-12 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: > > struct foo { > int

Re: [PATCH net-next 1/2] ath10k: fix gcc-10 zero-length-bounds warnings

2020-05-12 Thread Kalle Valo
Arnd Bergmann wrote: > gcc-10 started warning about out-of-bounds access for zero-length > arrays: > > In file included from drivers/net/wireless/ath/ath10k/core.h:18, > from drivers/net/wireless/ath/ath10k/htt_rx.c:8: > drivers/net/wireless/ath/ath10k/htt_rx.c: In function > '

Re: [PATCH][next] ath11k: remove redundant initialization of pointer info

2020-05-12 Thread Kalle Valo
Colin King wrote: > Pointer info is being assigned twice, once at the start of the function > and secondly when it is just about to be accessed. Remove the redundant > initialization and keep the original assignment to info that is close > to the memcpy that uses it. > > Addresses-Coverity: ("Un

Re: [PATCH] wil6210: Replace zero-length array with flexible-array

2020-05-12 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: > > struct foo { > int

Re: [PATCH 13/17] staging: wfx: fix endianness of the field 'len'

2020-05-12 Thread Geert Uytterhoeven
Hi Jerome, On Mon, May 11, 2020 at 5:53 PM Jerome Pouiller wrote: > From: Jérôme Pouiller > > The struct hif_msg is received from the hardware. So, it declared as > little endian. However, it is also accessed from many places in the > driver. Sparse complains about that: > > drivers/staging/

Re: [PATCH] dt-bindings: sh_eth: Sort compatible string in increasing number of the SoC

2020-05-12 Thread Sergei Shtylyov
Hello! On 12.05.2020 0:22, Rob Herring wrote: Sort the items in the compatible string list in increasing number of SoC. Signed-off-by: Lad Prabhakar --- Documentation/devicetree/bindings/net/renesas,ether.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks! M

[PATCH V2] ifcvf: move IRQ request/free to status change handlers

2020-05-12 Thread Zhu Lingshan
This commit move IRQ request and free operations from probe() to VIRTIO status change handler to comply with VIRTIO spec. VIRTIO spec 1.1, section 2.1.2 Device Requirements: Device Status Field The device MUST NOT consume buffers or send any used buffer notifications to the driver before DRIVER_OK

RE: [PATCH net-next] net/ipv4/raw Optimise ipv4 raw sends when IP_HDRINCL set.

2020-05-12 Thread David Laight
From: David Miller > Sent: 12 May 2020 00:10 > From: David Laight > Date: Mon, 11 May 2020 21:28:18 + > > > In this case the "modified in userspace meanwhile" just breaks the > > application - it isn't any kind of security issue. > > The kernel must provide correct behavior based upon the s

Re: signal quality and cable diagnostic

2020-05-12 Thread Oleksij Rempel
On Mon, May 11, 2020 at 04:33:37PM +0200, Andrew Lunn wrote: > On Mon, May 11, 2020 at 04:13:10PM +0200, Oleksij Rempel wrote: > > Hi Andrew, > > > > First of all, great work! As your cable diagnostic patches are in > > net-next now and can be used as base for the follow-up discussion. > > > > Do

Re: [PATCH 1/3] net: add a CMSG_USER_DATA macro

2020-05-12 Thread Sergei Shtylyov
Hello! On 11.05.2020 14:59, Christoph Hellwig wrote: Add a variant of CMSG_DATA that operates on user pointer to avoid sparse warnings about casting to/from user pointers. Also fix up CMSG_DATA to rely on the gcc extension that allows void pointer arithmetics to cut down on the amount of casts

Re: stable/linux-4.4.y bisection: baseline.login on at91-sama5d4_xplained

2020-05-12 Thread Greg Kroah-Hartman
On Tue, May 12, 2020 at 06:54:29AM +0100, Guillaume Tucker wrote: > Please see the bisection report below about a boot failure. > > Reports aren't automatically sent to the public while we're > trialing new bisection features on kernelci.org but this one > looks valid. > > It appears to be due to

Re: bpf: ability to attach freplace to multiple parents

2020-05-12 Thread Toke Høiland-Jørgensen
Alexei Starovoitov writes: >> > Currently fentry/fexit/freplace progs have single prog->aux->linked_prog >> > pointer. >> > It just needs to become a linked list. >> > The api extension could be like this: >> > bpf_raw_tp_open(prog_fd, attach_prog_fd, attach_btf_id); >> > (currently it's just bp

Re: [PATCH net v3] net: ethernet: ti: fix build and remove TI_CPTS_MOD workaround

2020-05-12 Thread Grygorii Strashko
Hi Arnd, On 08/05/2020 14:25, Arnd Bergmann wrote: On Fri, May 8, 2020 at 1:14 PM Grygorii Strashko wrote: On 08/05/2020 13:10, Arnd Bergmann wrote: On Fri, May 8, 2020 at 11:59 AM Grygorii Strashko That's because TI_CPTS_MOD (which is the symbol gating the _compilation_ of cpts.c) now dep

Re: [PATCH net v3] net: ethernet: ti: fix build and remove TI_CPTS_MOD workaround

2020-05-12 Thread Arnd Bergmann
On Tue, May 12, 2020 at 10:35 AM Grygorii Strashko wrote: > > Hi Arnd, > > On 08/05/2020 14:25, Arnd Bergmann wrote: > > On Fri, May 8, 2020 at 1:14 PM Grygorii Strashko > > wrote: > >> On 08/05/2020 13:10, Arnd Bergmann wrote: > >>> On Fri, May 8, 2020 at 11:59 AM Grygorii Strashko > > > Th

Re: [PATCH -next] brcmfmac: make non-global functions static

2020-05-12 Thread Kalle Valo
Chen Zhou wrote: > Fix sparse warning: > drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:2206:5: > warning: symbol 'brcmf_p2p_get_conn_idx' was not declared. Should it be > static? > > Reported-by: Hulk Robot > Signed-off-by: Chen Zhou > Reviewed-by: Wright Feng Patch applied t

Re: [PATCH][next] rndis_wlan: Remove logically dead code

2020-05-12 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > caps_buf is always of size sizeof(*caps) because > sizeof(caps->auth_encr_pair) * 16 is always zero. Notice > that when using zero-length arrays, sizeof evaluates to zero[1]. > > So, the code introduced by > commit 0308383f9591 ("rndis_wlan: get max_num_pmkids fro

Re: [PATCH v2] brcmfmac: remove Comparison to bool in brcmf_p2p_send_action_frame()

2020-05-12 Thread Kalle Valo
Jason Yan wrote: > Fix the following coccicheck warning: > > drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1785:5-8: > WARNING: Comparison to bool > > Signed-off-by: Jason Yan > Reviewed-by: Chi-hsien Lin Patch applied to wireless-drivers-next.git, thanks. 78a6fb42f67c brcmfmac: re

Re: signal quality and cable diagnostic

2020-05-12 Thread Robert Schwebel
On Tue, May 12, 2020 at 10:22:01AM +0200, Oleksij Rempel wrote: > > Pair A: OK > > Pair A: Signal Quality Index class D > > At least for automotive, avionics, (rockets till it is deployed :D) > etc... the cable integrity will probably not change, except we have some > sudden water infiltration int

Re: [PATCH] b43: remove dead function b43_rssinoise_postprocess()

2020-05-12 Thread Kalle Valo
Jason Yan wrote: > This function is dead for more than 10 years. Remove it. > > Signed-off-by: Jason Yan Patch applied to wireless-drivers-next.git, thanks. f2cd32a443da rndis_wlan: Remove logically dead code -- https://patchwork.kernel.org/patch/11533111/ https://wireless.wiki.kernel.org/

Re: [PATCH] ipw2x00: Fix comment for CLOCK_BOOTTIME constant

2020-05-12 Thread Kalle Valo
Pali Rohár wrote: > Correct name of constant is CLOCK_BOOTTIME and not CLOCK_BOOTIME. > > Signed-off-by: Pali Rohár Patch applied to wireless-drivers-next.git, thanks. 5bb4e125815a ipw2x00: Fix comment for CLOCK_BOOTTIME constant -- https://patchwork.kernel.org/patch/11537529/ https://wire

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

2020-05-12 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 --- v4: Preserve errno

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

2020-05-12 Thread Eelco Chaudron
On 11 May 2020, at 22:43, Yonghong Song wrote: On 5/11/20 5:40 AM, Eelco Chaudron wrote: 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 resp

RE: [EXT] Re: [PATCH v1 net-next 3/3] net: dsa: felix: add support Credit Based Shaper(CBS) for hardware offload

2020-05-12 Thread Xiaoliang Yang
Hi Vinicius, On Tue, 12 May 2020 9:42:23 Vinicius Costa Gomes wrote: > > + > > + /* Rate unit is 100 kbps */ > > + cir = DIV_ROUND_UP(cbs_qopt->idleslope, 100); > > + cir = (cir ? cir : 1); > > + cir = min_t(u32, GENMASK(14, 0), cir); > > Please rename 'cir' to "rate" or "idleslop

Re: [PATCH 13/17] staging: wfx: fix endianness of the field 'len'

2020-05-12 Thread Jérôme Pouiller
On Tuesday 12 May 2020 09:43:34 CEST Geert Uytterhoeven wrote: > Hi Jerome, > > On Mon, May 11, 2020 at 5:53 PM Jerome Pouiller > wrote: > > From: Jérôme Pouiller > > > > The struct hif_msg is received from the hardware. So, it declared as > > little endian. However, it is also accessed from man

Re: net: phylink: supported modes set to 0 with genphy sfp module

2020-05-12 Thread Julien Beraud
On 11/05/2020 21:06, Florian Fainelli wrote: On 5/11/2020 11:29 AM, Russell King - ARM Linux admin wrote: On Mon, May 11, 2020 at 05:45:02PM +0200, Julien Beraud wrote: Following commit: commit 52c956003a9d5bcae1f445f9dfd42b624adb6e87 Author: Russell King Date: Wed Dec 11 10:56:45 2019

Re: bpf: ability to attach freplace to multiple parents

2020-05-12 Thread Alan Maguire
On Tue, 12 May 2020, Toke Høiland-Jørgensen wrote: > Alexei Starovoitov writes: > > >> > Currently fentry/fexit/freplace progs have single prog->aux->linked_prog > >> > pointer. > >> > It just needs to become a linked list. > >> > The api extension could be like this: > >> > bpf_raw_tp_open(pro

[PATCH net v4] net: ethernet: ti: Remove TI_CPTS_MOD workaround

2020-05-12 Thread Grygorii Strashko
From: Clay McClure My recent commit b6d49cab44b5 ("net: Make PTP-specific drivers depend on PTP_1588_CLOCK") exposes a missing dependency in defconfigs that select TI_CPTS without selecting PTP_1588_CLOCK, leading to linker errors of the form: drivers/net/ethernet/ti/cpsw.o: in function `cpsw_nd

Re: [PATCH net v4] net: ethernet: ti: Remove TI_CPTS_MOD workaround

2020-05-12 Thread Arnd Bergmann
On Tue, May 12, 2020 at 12:02 PM Grygorii Strashko wrote: > > From: Clay McClure > > My recent commit b6d49cab44b5 ("net: Make PTP-specific drivers depend on > PTP_1588_CLOCK") exposes a missing dependency in defconfigs that select > TI_CPTS without selecting PTP_1588_CLOCK, leading to linker err

[PATCH] net: phy: realtek: clear interrupt during init for rtl8211f

2020-05-12 Thread Jisheng Zhang
The PHY Register Accessible Interrupt is enabled by default, so there's such an interrupt during init. In PHY POLL mode case, the INTB/PMEB pin is alway active, it is not good. Clear the interrupt by calling rtl8211f_ack_interrupt(). Signed-off-by: Jisheng Zhang --- drivers/net/phy/realtek.c | 4

Re: [PATCH bpf-next] samples/bpf: xdp_redirect_cpu: set MAX_CPUS according to NR_CPUS

2020-05-12 Thread Lorenzo Bianconi
> > > On 5/11/20 1:24 PM, Lorenzo Bianconi wrote: > > xdp_redirect_cpu is currently failing in bpf_prog_load_xattr() > > allocating cpu_map map if CONFIG_NR_CPUS is less than 64 since > > cpu_map_alloc() requires max_entries to be less than NR_CPUS. > > Set cpu_map max_entries according to NR_CPU

Re: stable/linux-4.4.y bisection: baseline.login on at91-sama5d4_xplained

2020-05-12 Thread Alexandre Belloni
Hi, On 12/05/2020 06:54:29+0100, Guillaume Tucker wrote: > Please see the bisection report below about a boot failure. > > Reports aren't automatically sent to the public while we're > trialing new bisection features on kernelci.org but this one > looks valid. > > It appears to be due to the fac

Re: [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-12 Thread Jiri Pirko
Tue, May 12, 2020 at 09:15:52AM CEST, vadym.koc...@plvision.eu wrote: >On Tue, May 12, 2020 at 07:55:36AM +0200, Jiri Pirko wrote: >> Mon, May 11, 2020 at 09:24:22PM CEST, vadym.koc...@plvision.eu wrote: >> >On Mon, May 11, 2020 at 02:57:23PM +0200, Jiri Pirko wrote: >> >> [...] >> >> >> >> >diff

[PATCH -next] net/wireless/rtl8225: Remove unused variable rtl8225z2_tx_power_ofdm

2020-05-12 Thread ChenTao
Fix the following warning: drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c:609:17: warning: ‘rtl8225z2_tx_power_ofdm’ defined but not used static const u8 rtl8225z2_tx_power_ofdm[] = { Reported-by: Hulk Robot Signed-off-by: ChenTao --- drivers/net/wireless/realtek/rtl818x/rtl8187/rtl82

Re: [PATCH bpf-next v2 00/17] Run a BPF program on socket lookup

2020-05-12 Thread Jakub Sitnicki
On Mon, May 11, 2020 at 09:45 PM CEST, Martin KaFai Lau wrote: > On Mon, May 11, 2020 at 08:52:01PM +0200, Jakub Sitnicki wrote: > > [ ... ] > >> Performance considerations >> == >> >> Patch set adds new code on receive hot path. This comes with a cost, >> especially in a sc

Re: [PATCH net-next v9 2/2] xen networking: add XDP offset adjustment to xen-netback

2020-05-12 Thread Denis Kirjanov
On 5/12/20, Paul Durrant wrote: >> -Original Message- >> From: Denis Kirjanov >> Sent: 11 May 2020 18:22 >> To: p...@xen.org >> Cc: netdev@vger.kernel.org; bro...@redhat.com; jgr...@suse.com; >> wei@kernel.org; >> ilias.apalodi...@linaro.org >> Subject: Re: [PATCH net-next v9 2/2] xen

Re: [PATCH net-next v9 1/2] xen networking: add basic XDP support for xen-netfront

2020-05-12 Thread Denis Kirjanov
On 5/12/20, Jürgen Groß wrote: > On 11.05.20 19:27, Denis Kirjanov wrote: >> On 5/11/20, Jürgen Groß wrote: >>> On 11.05.20 12:22, Denis Kirjanov wrote: The patch adds a basic XDP processing to xen-netfront driver. We ran an XDP program for an RX response received from netback

Re: net: phylink: supported modes set to 0 with genphy sfp module

2020-05-12 Thread Russell King - ARM Linux admin
On Tue, May 12, 2020 at 11:28:40AM +0200, Julien Beraud wrote: > > > On 11/05/2020 21:06, Florian Fainelli wrote: > > > > > > On 5/11/2020 11:29 AM, Russell King - ARM Linux admin wrote: > > > On Mon, May 11, 2020 at 05:45:02PM +0200, Julien Beraud wrote: > > > > Following commit: > > > > > >

Re: [PATCH net-next v9 1/2] xen networking: add basic XDP support for xen-netfront

2020-05-12 Thread Jürgen Groß
On 12.05.20 14:27, Denis Kirjanov wrote: On 5/12/20, Jürgen Groß wrote: On 11.05.20 19:27, Denis Kirjanov wrote: On 5/11/20, Jürgen Groß wrote: On 11.05.20 12:22, Denis Kirjanov wrote: The patch adds a basic XDP processing to xen-netfront driver. We ran an XDP program for an RX response re

[PATCH net] netlabel: cope with NULL catmap

2020-05-12 Thread Paolo Abeni
The cipso and calipso code can set the MLS_CAT attribute on successful parsing, even if the corresponding catmap has not been allocated, as per current configuration and external input. Later, selinux code tries to access the catmap if the MLS_CAT flag is present via netlbl_catmap_getlong(). That

[question] net: phy: rtl8211f: link speed shows 1000Mb/s but actual link speed in phy is 100Mb/s

2020-05-12 Thread Yonglong Liu
I use two devices, both support 1000M speed, they are directly connected with a network cable. Two devices enable autoneg, and then do the following test repeatedly: ifconfig eth5 down ifconfig eth5 up sleep $((RANDOM%6)) ifconfig eth5 down ifconfig eth5 up

Re: [PATCH v5 bpf-next 2/3] bpf: implement CAP_BPF

2020-05-12 Thread Jordan Glover
On Tuesday, May 12, 2020 2:36 AM, Alexei Starovoitov wrote: > On Mon, May 11, 2020 at 05:12:10PM -0700, s...@google.com wrote: > > > On 05/08, Alexei Starovoitov wrote: > > > > > From: Alexei Starovoitov a...@kernel.org > > > [..] > > > @@ -3932,7 +3977,7 @@ SYSCALL_DEFINE3(bpf, int, cmd, union

Re: [PATCH net-next v2] dt-bindings: net: Convert UniPhier AVE4 controller to json-schema

2020-05-12 Thread Rob Herring
On Tue, May 12, 2020 at 2:27 AM Kunihiko Hayashi wrote: > > Convert the UniPhier AVE4 controller binding to DT schema format. > > Signed-off-by: Kunihiko Hayashi > --- > > Changes since v1: > - Set true to phy-mode and phy-handle instead of $ref > - Add mac-address and local-mac-address for exist

Re: [PATCH net-next 2/8] sfc: make capability checking a nic_type function

2020-05-12 Thread Edward Cree
On 11/05/2020 23:36, Jakub Kicinski wrote: > Also with W=1: > > ../drivers/net/ethernet/sfc/siena.c:951:14: warning: symbol > 'siena_check_caps' was not declared. Should it be static? > 1a3,5 > ../drivers/net/ethernet/sfc/siena.c:951:14: warning: no previous prototype > for ‘siena_check_capsâ

Re: bpf: ability to attach freplace to multiple parents

2020-05-12 Thread Toke Høiland-Jørgensen
Alan Maguire writes: > On Tue, 12 May 2020, Toke Høiland-Jørgensen wrote: > >> Alexei Starovoitov writes: >> >> >> > Currently fentry/fexit/freplace progs have single >> >> > prog->aux->linked_prog pointer. >> >> > It just needs to become a linked list. >> >> > The api extension could be like

Re: signal quality and cable diagnostic

2020-05-12 Thread Andrew Lunn
> > As for getting / setting the threshold, perhaps ETHTOOL_MSG_LINKINFO_GET > > and ETHTOOL_MSG_LINKINFO_SET. Unless you expect more configurable > > parameters like this in which case we may want to consider adding new > > request type (e.g. link params or link management). > > Currently in my s

Re: [PATCH net-next v9 1/2] xen networking: add basic XDP support for xen-netfront

2020-05-12 Thread Denis Kirjanov
On 5/12/20, Jürgen Groß wrote: > On 12.05.20 14:27, Denis Kirjanov wrote: >> On 5/12/20, Jürgen Groß wrote: >>> On 11.05.20 19:27, Denis Kirjanov wrote: On 5/11/20, Jürgen Groß wrote: > On 11.05.20 12:22, Denis Kirjanov wrote: >> The patch adds a basic XDP processing to xen-netfront

[PATCH net-next 0/2] sfc: siena_check_caps fixups

2020-05-12 Thread Edward Cree
Fix a bug and a build warning introduced in a recent refactor. Edward Cree (2): sfc: actually wire up siena_check_caps() sfc: siena_check_caps() can be static drivers/net/ethernet/sfc/siena.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[PATCH net-next 1/2] sfc: actually wire up siena_check_caps()

2020-05-12 Thread Edward Cree
Assign it to siena_a0_nic_type.check_caps function pointer. Fixes: be904b855200 ("sfc: make capability checking a nic_type function") Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/siena.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net

[PATCH net-next 2/2] sfc: siena_check_caps() can be static

2020-05-12 Thread Edward Cree
Reported-by: Jakub Kicinski Reported-by: kbuild test robot Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/siena.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c index d8b052979b1b..891e9fb6abec

Re: [PATCH net-next v9 1/2] xen networking: add basic XDP support for xen-netfront

2020-05-12 Thread Jürgen Groß
On 12.05.20 15:21, Denis Kirjanov wrote: On 5/12/20, Jürgen Groß wrote: On 12.05.20 14:27, Denis Kirjanov wrote: On 5/12/20, Jürgen Groß wrote: On 11.05.20 19:27, Denis Kirjanov wrote: On 5/11/20, Jürgen Groß wrote: On 11.05.20 12:22, Denis Kirjanov wrote: The patch adds a basic XDP proc

Re: [PATCH bpf-next v2 05/17] inet: Run SK_LOOKUP BPF program on socket lookup

2020-05-12 Thread Jakub Sitnicki
On Mon, May 11, 2020 at 10:44 PM CEST, Alexei Starovoitov wrote: > On Mon, May 11, 2020 at 08:52:06PM +0200, Jakub Sitnicki wrote: >> Run a BPF program before looking up a listening socket on the receive path. >> Program selects a listening socket to yield as result of socket lookup by >> calling b

Re: [question] net: phy: rtl8211f: link speed shows 1000Mb/s but actual link speed in phy is 100Mb/s

2020-05-12 Thread Andrew Lunn
On Tue, May 12, 2020 at 08:48:21PM +0800, Yonglong Liu wrote: > I use two devices, both support 1000M speed, they are directly connected > with a network cable. Two devices enable autoneg, and then do the following > test repeatedly: > ifconfig eth5 down > ifconfig eth5 up > sleep

KMSAN: uninit-value in inet_gro_receive (3)

2020-05-12 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:21c44613 kmsan: page_alloc: more assuring comment git tree: https://github.com/google/kmsan.git master console output: https://syzkaller.appspot.com/x/log.txt?x=1533f00c10 kernel config: https://syzkaller.appspot.com/x/.config

[RFC PATCH 3/3] mptcp: cope better with MP_JOIN failure

2020-05-12 Thread Paolo Abeni
Currently, on MP_JOIN failure we reset the child socket, but leave the request socket untouched. tcp_check_req will deal with it according to the 'tcp_abort_on_overflow' sysctl value - by default the req socket will stay alive. The above leads to inconsistent behavior on MP JOIN failure, and bad

[RFC PATCH 2/3] inet_connection_sock: factor out destroy helper.

2020-05-12 Thread Paolo Abeni
Move the steps to prepare an inet_connection_sock for forced disposal inside a separate helper. No functional changes inteded, this will just simplify the next patch. Suggested-by: Christoph Paasch Signed-off-by: Paolo Abeni --- include/net/inet_connection_sock.h | 8 net/ipv4/inet_con

[RFC PATCH 1/3] mptcp: add new sock flag to deal with join subflows

2020-05-12 Thread Paolo Abeni
MP_JOIN subflows must not land into the accept queue. Currently tcp_check_req() calls an mptcp specific helper to detect such scenario. Such helper leverages the subflow context to check for MP_JOIN subflows. We need to deal also with MP JOIN failures, even when the subflow context is not availabl

[RFC PATCH 0/3] mptcp: fix MP_JOIN failure handling

2020-05-12 Thread Paolo Abeni
Currently if we hit an MP_JOIN failure on the third ack, the child socket is closed with reset, but the request socket is not deleted, causing weird behaviors. The main problem is that MPTCP's MP_JOIN code needs to plug it's own 'valid 3rd ack' checks and the current TCP callbacks do not allow tha

Re: [PATCH bpf-next 02/17] bpf: Introduce SK_LOOKUP program type with a dedicated attach point

2020-05-12 Thread Jakub Sitnicki
On Mon, May 11, 2020 at 10:54 PM CEST, Martin KaFai Lau wrote: > On Mon, May 11, 2020 at 09:26:02PM +0200, Jakub Sitnicki wrote: >> On Mon, May 11, 2020 at 08:59 PM CEST, Martin KaFai Lau wrote: >> > On Mon, May 11, 2020 at 11:08:15AM +0200, Jakub Sitnicki wrote: >> >> On Fri, May 08, 2020 at 08:39

Re: [PATCH net v4] net: ethernet: ti: Remove TI_CPTS_MOD workaround

2020-05-12 Thread Tony Lindgren
Hi, * Grygorii Strashko [200512 10:03]: > From: Clay McClure > > My recent commit b6d49cab44b5 ("net: Make PTP-specific drivers depend on > PTP_1588_CLOCK") exposes a missing dependency in defconfigs that select > TI_CPTS without selecting PTP_1588_CLOCK, leading to linker errors of the > form:

Re: [PATCH bpf-next] samples/bpf: xdp_redirect_cpu: set MAX_CPUS according to NR_CPUS

2020-05-12 Thread Yonghong Song
On 5/12/20 3:51 AM, Lorenzo Bianconi wrote: On 5/11/20 1:24 PM, Lorenzo Bianconi wrote: xdp_redirect_cpu is currently failing in bpf_prog_load_xattr() allocating cpu_map map if CONFIG_NR_CPUS is less than 64 since cpu_map_alloc() requires max_entries to be less than NR_CPUS. Set cpu_map max

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

2020-05-12 Thread Yonghong Song
On 5/12/20 2:04 AM, Eelco Chaudron wrote: 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-

Multicast from underlying MACVLAN interface towards MACVLAN

2020-05-12 Thread Alexander Sverdlin
Dear Network Core developers! I've been debugging an issue with Multicast replies from underlying interface of MACVLAN towards MACVLAN. These SKBs never contain a MAC header and therefore cannot be properly processed by MACVLAN. The usecase is following: eth1 <-- eth1.212 <-- macvlan@eth1.212 (in

Re: [PATCH net v4] net: ethernet: ti: Remove TI_CPTS_MOD workaround

2020-05-12 Thread Grygorii Strashko
On 12/05/2020 17:22, Tony Lindgren wrote: Hi, * Grygorii Strashko [200512 10:03]: From: Clay McClure My recent commit b6d49cab44b5 ("net: Make PTP-specific drivers depend on PTP_1588_CLOCK") exposes a missing dependency in defconfigs that select TI_CPTS without selecting PTP_1588_CLOCK, l

Re: [PATCH v5 bpf-next 2/3] bpf: implement CAP_BPF

2020-05-12 Thread Daniel Borkmann
On 5/8/20 11:53 PM, Alexei Starovoitov wrote: From: Alexei Starovoitov Implement permissions as stated in uapi/linux/capability.h In order to do that the verifier allow_ptr_leaks flag is split into allow_ptr_leaks and bpf_capable flags and they are set as: env->allow_ptr_leaks = perfmon_capa

Re: [PATCH v2 bpf-next 1/3] selftests/bpf: add benchmark runner infrastructure

2020-05-12 Thread Yonghong Song
On 5/11/20 8:29 PM, Andrii Nakryiko wrote: On Sat, May 9, 2020 at 10:10 AM Yonghong Song wrote: On 5/8/20 4:20 PM, Andrii Nakryiko wrote: While working on BPF ringbuf implementation, testing, and benchmarking, I've developed a pretty generic and modular benchmark runner, which seems to b

[PATCH bpf-next 0/3] samples: bpf: refactor kprobe tracing progs with libbpf

2020-05-12 Thread Daniel T. Lee
Currently, the kprobe BPF program attachment method for bpf_load is pretty outdated. The implementation of bpf_load "directly" controls and manages(create, delete) the kprobe events of DEBUGFS. On the other hand, using using the libbpf automatically manages the kprobe event. (under bpf_link interfa

[PATCH bpf-next 1/3] samples: bpf: refactor kprobe tracing user progs with libbpf

2020-05-12 Thread Daniel T. Lee
Currently, the kprobe BPF program attachment method for bpf_load is quite old. The implementation of bpf_load "directly" controls and manages(create, delete) the kprobe events of DEBUGFS. On the other hand, using using the libbpf automatically manages the kprobe event. (under bpf_link interface) B

[PATCH bpf-next 2/3] samples: bpf: refactor tail call user progs with libbpf

2020-05-12 Thread Daniel T. Lee
BPF tail call uses the BPF_MAP_TYPE_PROG_ARRAY type map for calling into other BPF programs and this PROG_ARRAY should be filled prior to use. Currently, samples with the PROG_ARRAY type MAP fill this program array with bpf_load. For bpf_load to fill this map, kernel BPF program must specify the se

[PATCH bpf-next 3/3] samples: bpf: refactor kprobe, tail call kern progs map definition

2020-05-12 Thread Daniel T. Lee
Because the previous two commit replaced the bpf_load implementation of the user program with libbpf, the corresponding kernel program's MAP definition can be replaced with new BTF-defined map syntax. This commit only updates the samples which uses libbpf API for loading bpf program not with bpf_l

bpf selftest execution issues

2020-05-12 Thread Alan Maguire
When running BPF tests I ran into some issues and couldn't get a clean set of results on the bpf-next master branch. Just wanted to check if anyone else is seeing any of these failures. 1. Timeouts. When running "make run_tests" in tools/testing/selftests/bpf, the kselftest runner uses an over-ag

Re: [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-12 Thread Vadym Kochan
On Mon, May 11, 2020 at 02:57:23PM +0200, Jiri Pirko wrote: > [...] > > >+netdev_tx_t prestera_rxtx_xmit(struct prestera_port *port, struct sk_buff > >*skb) > > Why this has "rx" in the name?? This is just a following of a module prefix which is prestera_rxtx_, do you think it is better to avoi

Re: [PATCH net v4] net: ethernet: ti: Remove TI_CPTS_MOD workaround

2020-05-12 Thread Tony Lindgren
* Grygorii Strashko [200512 14:35]: > On 12/05/2020 17:22, Tony Lindgren wrote: > > However, there's at least one more issue left that shows up at least > > on ti81xx dra62x-j5eco-evm on v5.7-rc5 that has commit b46b2b7ba6e1 > > ("ARM: dts: Fix dm814x Ethernet by changing to use rgmii-id mode"). >

Re: [PATCH RFC v2 01/11] dt-bindings: net: meson-dwmac: Add the amlogic,rx-delay-ns property

2020-05-12 Thread Rob Herring
On Wed, Apr 29, 2020 at 10:16:34PM +0200, Martin Blumenstingl wrote: > The PRG_ETHERNET registers on Meson8b and newer SoCs can add an RX > delay. Add a property with the known supported values so it can be > configured according to the board layout. > > Signed-off-by: Martin Blumenstingl > --- >

Re: [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-12 Thread Vadym Kochan
On Mon, May 11, 2020 at 12:32:22PM +0200, Jiri Pirko wrote: [...] > > This is RCU list. Treat it accordingly. > > > >+spin_unlock(&sw->ports_lock); > > I don't follow, why do you need to protect the list by spinlock here? > More to that, why do you need the port_list reader-writer > prote

Re: [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-12 Thread Jiri Pirko
Tue, May 12, 2020 at 04:50:37PM CEST, vadym.koc...@plvision.eu wrote: >On Mon, May 11, 2020 at 02:57:23PM +0200, Jiri Pirko wrote: >> [...] >> > >> >+netdev_tx_t prestera_rxtx_xmit(struct prestera_port *port, struct sk_buff >> >*skb) >> >> Why this has "rx" in the name?? >This is just a followin

Re: [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-12 Thread Jiri Pirko
Tue, May 12, 2020 at 04:53:52PM CEST, vadym.koc...@plvision.eu wrote: >On Mon, May 11, 2020 at 12:32:22PM +0200, Jiri Pirko wrote: > >[...] > >> >> This is RCU list. Treat it accordingly. >> >> >> >+ spin_unlock(&sw->ports_lock); >> >> I don't follow, why do you need to protect the list by sp

[PATCH v2 03/17] staging: wfx: fix cast operator

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller Sparse detects that le16_to_cpup() expects a __le16 * as argument. Change the cast operator to be compliant with sparse. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 2 +- drivers/staging/wfx/traces.h | 2 +- 2 files changed, 2 insertions(+), 2 delet

[PATCH v2 14/17] staging: wfx: fix endianness of the field 'status'

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The field 'status' appears in most of structs returned by the hardware. This field is encoded as little endian. Sparse complains this field is not always correctly accessed: drivers/staging/wfx/data_rx.c:53:16: warning: restricted __le32 degrades to integer drivers

[PATCH v2 09/17] staging: wfx: fix access to le32 attribute 'event_id'

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The attribute event_id is little-endian. We have to take to the endianness when we access it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/st

[PATCH v2 10/17] staging: wfx: fix access to le32 attribute 'indication_type'

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The attribute indication_type is little-endian. We have to take to the endianness when we access it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_rx.c b/

[PATCH v2 05/17] staging: wfx: fix output of rx_stats on big endian hosts

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The struct hif_rx_stats contains only little endian values. Thus, it is necessary to fix byte ordering before to use them. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/driver

[PATCH v2 04/17] staging: wfx: fix wrong bytes order

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The field wakeup_period_max from struct hif_mib_beacon_wake_up_period is a u8. So, assigning it a __le16 produces a nasty bug on big-endian architectures. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v2 12/17] staging: wfx: fix endianness of the struct hif_ind_startup

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The struct hif_ind_startup is received from the hardware. So it is declared as little endian. However, it is also stored in the main driver structure and used on different places in the driver. Sparse complains about that: drivers/staging/wfx/data_tx.c:388:43: warning:

Re: [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-12 Thread Vadym Kochan
On Tue, May 12, 2020 at 05:03:06PM +0200, Jiri Pirko wrote: > Tue, May 12, 2020 at 04:53:52PM CEST, vadym.koc...@plvision.eu wrote: > >On Mon, May 11, 2020 at 12:32:22PM +0200, Jiri Pirko wrote: > > > >[...] > > > >> > >> This is RCU list. Treat it accordingly. > >> > >> > >> >+ spin_unlock(&sw-

[PATCH v2 15/17] staging: wfx: fix endianness of the field 'num_tx_confs'

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The field 'num_tx_confs' from the struct hif_cnf_multi_transmit is a __le32. Sparse complains this field is not always correctly accessed: drivers/staging/wfx/hif_rx.c:82:9: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:87:29: warning:

Re: [PATCH v5 bpf-next 2/3] bpf: implement CAP_BPF

2020-05-12 Thread Daniel Borkmann
On 5/8/20 11:53 PM, Alexei Starovoitov wrote: From: Alexei Starovoitov Implement permissions as stated in uapi/linux/capability.h In order to do that the verifier allow_ptr_leaks flag is split into allow_ptr_leaks and bpf_capable flags and they are set as: env->allow_ptr_leaks = perfmon_capa

[PATCH v2 13/17] staging: wfx: fix access to le32 attribute 'len'

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller Sparse complains about the accesses to the field 'len' from struct hif_msg: drivers/staging/wfx/bh.c:88:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:88:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:9

[PATCH v2 08/17] staging: wfx: fix access to le32 attribute 'ps_mode_error'

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The attribute ps_mode_error is little-endian. We have to take to the endianness when we access it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/hif_rx.c b/dri

[PATCH v2 16/17] staging: wfx: fix endianness of the field 'channel_number'

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The field 'channel_number' from the structs hif_ind_rx and hif_req_start is a __le32. Sparse complains this field is not always correctly accessed: drivers/staging/wfx/data_rx.c:95:55: warning: incorrect type in argument 1 (different base types) drivers/staging/wfx

[PATCH v2 06/17] staging: wfx: fix endianness of fields media_delay and tx_queue_delay

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The struct hif_cnf_tx contains only little endian values. Thus, it is necessary to fix byte ordering before to use them. Especially, sparse detected wrong access to fields media_delay and tx_queue_delay. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 3

[PATCH v2 01/17] staging: wfx: fix use of cpu_to_le32 instead of le32_to_cpu

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller Sparse detected that le32_to_cpu should be used instead of cpu_to_le32. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hwio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index d878cb3e

[PATCH v2 00/17] staging: wfx: fix support for big-endian hosts

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller Hello, As already discussed here[1], this series improves support for big endian hosts. All warnings raised by sparse are now fixed. Note, this series aims to be applied on top of PR named "staging: wfx: fix Out-Of-Band IRQ" [1] https://lore.kernel.org/lkml/201920285

[PATCH v2 11/17] staging: wfx: declare the field 'packet_id' with native byte order

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The field packet_id is not interpreted by the device. It is only used as identifier for the device answer. So it is not necessary to declare it little endian. It fixes some warnings raised by Sparse without complexifying the code. Signed-off-by: Jérôme Pouiller --- driver

[PATCH v2 07/17] staging: wfx: fix endianness of hif_req_read_mib fields

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller The structs hif_{req,cnf}_read_mib contain only little endian values. Thus, it is necessary to fix byte ordering before to use them. Especially, sparse detected wrong accesses to fields mib_id and length. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 1

[PATCH v2 02/17] staging: wfx: take advantage of le32_to_cpup()

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller le32_to_cpu(*x) can be advantageously converted in le32_to_cpup(x). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index ac4ec4

[PATCH v2 17/17] staging: wfx: update TODO

2020-05-12 Thread Jerome Pouiller
From: Jérôme Pouiller Update the TODO list associated to the wfx driver with the last progresses. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/TODO | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/staging/wfx/TODO b/drivers/staging/wfx/TODO index fca333

Re: [RFC PATCH 1/3] mptcp: add new sock flag to deal with join subflows

2020-05-12 Thread Paolo Abeni
Hi, On Tue, 2020-05-12 at 07:46 -0700, Eric Dumazet wrote: > On Tue, May 12, 2020 at 7:11 AM Paolo Abeni wrote: > > MP_JOIN subflows must not land into the accept queue. > > Currently tcp_check_req() calls an mptcp specific helper > > to detect such scenario. > > > > Such helper leverages the su

  1   2   3   4   >