Re: [virtio-dev] Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-26 Thread Jason Wang
On 2021/2/26 2:53 上午, Michael S. Tsirkin wrote: On Thu, Feb 25, 2021 at 12:36:07PM +0800, Jason Wang wrote: On 2021/2/24 7:12 下午, Cornelia Huck wrote: On Wed, 24 Feb 2021 17:29:07 +0800 Jason Wang wrote: On 2021/2/23 6:58 下午, Cornelia Huck wrote: On Tue, 23 Feb 2021 18:31:07 +0800 Jason W

Re: [PATCH v2 5/6] can: c_can: prepare to up the message objects number

2021-02-26 Thread Marc Kleine-Budde
On 25.02.2021 22:51:54, Dario Binacchi wrote: > As pointed by commit c0a9f4d396c9 ("can: c_can: Reduce register access") > the "driver casts the 16 message objects in stone, which is completely > braindead as contemporary hardware has up to 128 message objects". > > The patch prepares the module t

Re: [PATCH v2 6/6] can: c_can: add support to 64 message objects

2021-02-26 Thread Marc Kleine-Budde
On 25.02.2021 22:51:55, Dario Binacchi wrote: > --- a/drivers/net/can/c_can/c_can.h > +++ b/drivers/net/can/c_can/c_can.h > @@ -22,8 +22,6 @@ > #ifndef C_CAN_H > #define C_CAN_H > > -#define C_CAN_NO_OF_OBJECTS 32 > - > enum reg { > C_CAN_CTRL_REG = 0, > C_CAN_CTRL_EX_REG, > @@ -6

Re: [PATCH v2 3/6] can: c_can: fix control interface used by c_can_do_tx

2021-02-26 Thread Marc Kleine-Budde
On 25.02.2021 22:51:52, Dario Binacchi wrote: > According to commit 640916db2bf7 ("can: c_can: Make it SMP safe") let RX use > IF1 (i.e. IF_RX) and TX use IF2 (i.e. IF_TX). Is this a fix? Marc > > Signed-off-by: Dario Binacchi > --- > > (no changes since v1) > > drivers/net/can/c_can/c_can.

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Daniel González Cabanelas
El vie, 26 feb 2021 a las 8:13, Heiner Kallweit () escribió: > > On 25.02.2021 23:28, Daniel González Cabanelas wrote: > > El jue, 25 feb 2021 a las 21:05, Heiner Kallweit > > () escribió: > >> > >> On 25.02.2021 17:36, Daniel González Cabanelas wrote: > >>> El jue, 25 feb 2021 a las 8:22, Heiner K

Re: [RFC PATCH v2 net-next 01/17] net: dsa: reference count the host mdb addresses

2021-02-26 Thread Tobias Waldekranz
On Wed, Feb 24, 2021 at 13:43, Vladimir Oltean wrote: > From: Vladimir Oltean > > Currently any DSA switch that is strict when implementing the mdb > operations prints these benign errors after the addresses expire, with > at least 2 ports bridged: > > [ 286.013814] mscc_felix :00:00.5 swp3:

Re: [PATCH v2 5/6] can: c_can: prepare to up the message objects number

2021-02-26 Thread Marc Kleine-Budde
On 25.02.2021 22:51:54, Dario Binacchi wrote: > --- a/drivers/net/can/c_can/c_can.c > +++ b/drivers/net/can/c_can/c_can.c [...] > -struct net_device *alloc_c_can_dev(void) > +struct net_device *alloc_c_can_dev(int msg_obj_num) > { > struct net_device *dev; > struct c_can_priv *priv; >

Re: [PATCH 2/2] mt76: mt7921: remove incorrect error handling

2021-02-26 Thread Kalle Valo
Arnd Bergmann wrote: > From: Arnd Bergmann > > Clang points out a mistake in the error handling in > mt7921_mcu_tx_rate_report(), which tries to dereference a pointer that > cannot be initialized because of the error that is being handled: > > drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:40

Re: [PATCH 1/2] mt76: mt7915: fix unused 'mode' variable

2021-02-26 Thread Kalle Valo
Arnd Bergmann wrote: > From: Arnd Bergmann > > clang points out a possible corner case in the mt7915_tm_set_tx_cont() > function if called with invalid arguments: > > drivers/net/wireless/mediatek/mt76/mt7915/testmode.c:593:2: warning: variable > 'mode' is used uninitialized whenever switch d

[PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-02-26 Thread Oleksij Rempel
There are two ref count variables controlling the free()ing of a socket: - struct sock::sk_refcnt - which is changed by sock_hold()/sock_put() - struct sock::sk_wmem_alloc - which accounts the memory allocated by the skbs in the send path. In case there are still TX skbs on the fly and the socke

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Heiner Kallweit
On 26.02.2021 10:10, Daniel González Cabanelas wrote: > El vie, 26 feb 2021 a las 8:13, Heiner Kallweit > () escribió: >> >> On 25.02.2021 23:28, Daniel González Cabanelas wrote: >>> El jue, 25 feb 2021 a las 21:05, Heiner Kallweit >>> () escribió: On 25.02.2021 17:36, Daniel González Cab

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Heiner Kallweit
On 26.02.2021 10:32, Heiner Kallweit wrote: > On 26.02.2021 10:10, Daniel González Cabanelas wrote: >> El vie, 26 feb 2021 a las 8:13, Heiner Kallweit >> () escribió: >>> >>> On 25.02.2021 23:28, Daniel González Cabanelas wrote: El jue, 25 feb 2021 a las 21:05, Heiner Kallweit () escribió

[PATCH net 0/2] bnxt_en: Error recovery bug fixes.

2021-02-26 Thread Michael Chan
Two error recovery related bug fixes for 2 corner cases. Please queue patch #2 for -stable. Thanks. Edwin Peer (1): bnxt_en: reliably allocate IRQ table on reset to avoid crash Vasundhara Volam (1): bnxt_en: Fix race between firmware reset and driver remove. drivers/net/ethernet/broadcom/

[PATCH net 2/2] bnxt_en: reliably allocate IRQ table on reset to avoid crash

2021-02-26 Thread Michael Chan
From: Edwin Peer The following trace excerpt corresponds with a NULL pointer dereference of 'bp->irq_tbl' in bnxt_setup_inta() on an Aarch64 system after many device resets: Unable to handle kernel NULL pointer dereference at ... 00d ... pc : string+0x3c/0x80 lr : vsnprintf+0

[PATCH net 1/2] bnxt_en: Fix race between firmware reset and driver remove.

2021-02-26 Thread Michael Chan
From: Vasundhara Volam The driver's error recovery reset sequence can take many seconds to complete and only the critical sections are protected by rtnl_lock. A recent change has introduced a regression in this sequence. bnxt_remove_one() may be called while the recovery is in progress. Normally

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Daniel González Cabanelas
El vie, 26 feb 2021 a las 10:32, Heiner Kallweit () escribió: > > On 26.02.2021 10:10, Daniel González Cabanelas wrote: > > El vie, 26 feb 2021 a las 8:13, Heiner Kallweit > > () escribió: > >> > >> On 25.02.2021 23:28, Daniel González Cabanelas wrote: > >>> El jue, 25 feb 2021 a las 21:05, Heiner

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Heiner Kallweit
On 26.02.2021 10:49, Daniel González Cabanelas wrote: > El vie, 26 feb 2021 a las 10:32, Heiner Kallweit > () escribió: >> >> On 26.02.2021 10:10, Daniel González Cabanelas wrote: >>> El vie, 26 feb 2021 a las 8:13, Heiner Kallweit >>> () escribió: On 25.02.2021 23:28, Daniel González Cab

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Daniel González Cabanelas
El vie, 26 feb 2021 a las 11:08, Heiner Kallweit () escribió: > > On 26.02.2021 10:49, Daniel González Cabanelas wrote: > > El vie, 26 feb 2021 a las 10:32, Heiner Kallweit > > () escribió: > >> > >> On 26.02.2021 10:10, Daniel González Cabanelas wrote: > >>> El vie, 26 feb 2021 a las 8:13, Heiner

[PATCH bpf-next v2 0/5] PROG_TEST_RUN support for sk_lookup programs

2021-02-26 Thread Lorenz Bauer
We don't have PROG_TEST_RUN support for sk_lookup programs at the moment. So far this hasn't been a problem, since we can run our tests in a separate network namespace. For benchmarking it's nice to have PROG_TEST_RUN, so I've gone and implemented it. Based on discussion on the v1 I've dropped sup

[PATCH bpf-next v2 1/4] bpf: consolidate shared test timing code

2021-02-26 Thread Lorenz Bauer
Share the timing / signal interruption logic between different implementations of PROG_TEST_RUN. There is a change in behaviour as well. We check the loop exit condition before checking for pending signals. This resolves an edge case where a signal arrives during the last iteration. Instead of abor

[PATCH bpf-next v2 2/4] bpf: add PROG_TEST_RUN support for sk_lookup programs

2021-02-26 Thread Lorenz Bauer
Allow to pass sk_lookup programs to PROG_TEST_RUN. User space provides the full bpf_sk_lookup struct as context. Since the context includes a socket pointer that can't be exposed to user space we define that PROG_TEST_RUN returns the cookie of the selected socket or zero in place of the socket poin

[PATCH bpf-next v2 3/4] selftests: bpf: convert sk_lookup ctx access tests to PROG_TEST_RUN

2021-02-26 Thread Lorenz Bauer
Convert the selftests for sk_lookup narrow context access to use PROG_TEST_RUN instead of creating actual sockets. This ensures that ctx is populated correctly when using PROG_TEST_RUN. Assert concrete values since we now control remote_ip and remote_port. Signed-off-by: Lorenz Bauer --- .../se

[PATCH bpf-next v2 4/4] selftests: bpf: check that PROG_TEST_RUN repeats as requested

2021-02-26 Thread Lorenz Bauer
Extend a simple prog_run test to check that PROG_TEST_RUN adheres to the requested repetitions. Convert it to use BPF skeleton. Signed-off-by: Lorenz Bauer --- .../selftests/bpf/prog_tests/prog_run_xattr.c | 51 +++ 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/t

[PATCH] inetpeer: use else if instead of if to reduce judgment

2021-02-26 Thread Yejune Deng
In inet_initpeers(), if si.totalram <= (8192*1024)/PAGE_SIZE, it will be judged three times. Use else if instead of if, it only needs to be judged once. Signed-off-by: Yejune Deng --- net/ipv4/inetpeer.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/ipv4/inet

Re: [RFC PATCH v2 net-next 06/17] net: dsa: add addresses obtained from RX filtering to host addresses

2021-02-26 Thread Tobias Waldekranz
On Wed, Feb 24, 2021 at 13:43, Vladimir Oltean wrote: > From: Vladimir Oltean > > In case we have ptp4l running on a bridged DSA switch interface, the PTP > traffic is classified as link-local (in the default profile, the MAC > addresses are 01:1b:19:00:00:00 and 01:80:c2:00:00:0e), which means i

[PATCH bpf-next v4 0/2] Optimize bpf_redirect_map()/xdp_do_redirect()

2021-02-26 Thread Björn Töpel
Hi XDP-folks, This two patch series contain two optimizations for the bpf_redirect_map() helper and the xdp_do_redirect() function. The bpf_redirect_map() optimization is about avoiding the map lookup dispatching. Instead of having a switch-statement and selecting the correct lookup function, we

[PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread Björn Töpel
From: Björn Töpel Currently the bpf_redirect_map() implementation dispatches to the correct map-lookup function via a switch-statement. To avoid the dispatching, this change adds bpf_redirect_map() as a map operation. Each map provides its bpf_redirect_map() version, and correct function is autom

[PATCH bpf-next v4 2/2] bpf, xdp: restructure redirect actions

2021-02-26 Thread Björn Töpel
From: Björn Töpel The XDP_REDIRECT implementations for maps and non-maps are fairly similar, but obviously need to take different code paths depending on if the target is using a map or not. Today, the redirect targets for XDP either uses a map, or is based on ifindex. Here, an explicit redirect

Re: [PATCH bpf-next v4 0/2] Optimize bpf_redirect_map()/xdp_do_redirect()

2021-02-26 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > Hi XDP-folks, > > This two patch series contain two optimizations for the > bpf_redirect_map() helper and the xdp_do_redirect() function. > > The bpf_redirect_map() optimization is about avoiding the map lookup > dispatching. Instead of having a switch-statement and selectin

Re: [PATCH bpf-next v4 0/2] Optimize bpf_redirect_map()/xdp_do_redirect()

2021-02-26 Thread Björn Töpel
On 2021-02-26 12:35, Toke Høiland-Jørgensen wrote: Björn Töpel writes: Hi XDP-folks, This two patch series contain two optimizations for the bpf_redirect_map() helper and the xdp_do_redirect() function. The bpf_redirect_map() optimization is about avoiding the map lookup dispatching. Instead

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > From: Björn Töpel > > Currently the bpf_redirect_map() implementation dispatches to the > correct map-lookup function via a switch-statement. To avoid the > dispatching, this change adds bpf_redirect_map() as a map > operation. Each map provides its bpf_redirect_map() versi

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread Björn Töpel
On 2021-02-26 12:37, Toke Høiland-Jørgensen wrote: Björn Töpel writes: From: Björn Töpel Currently the bpf_redirect_map() implementation dispatches to the correct map-lookup function via a switch-statement. To avoid the dispatching, this change adds bpf_redirect_map() as a map operation. Eac

Re: [PATCH bpf-next v4 0/2] Optimize bpf_redirect_map()/xdp_do_redirect()

2021-02-26 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > On 2021-02-26 12:35, Toke Høiland-Jørgensen wrote: >> Björn Töpel writes: >> >>> Hi XDP-folks, >>> >>> This two patch series contain two optimizations for the >>> bpf_redirect_map() helper and the xdp_do_redirect() function. >>> >>> The bpf_redirect_map() optimization is a

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread Björn Töpel
On 2021-02-26 12:40, Björn Töpel wrote: On 2021-02-26 12:37, Toke Høiland-Jørgensen wrote: [...] (That last paragraph above is why I asked if you updated the performance numbers in the cover letter; removing an additional function call should affect those, right?) Yeah, it should. Let m

Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-02-26 Thread Heiner Kallweit
On 26.02.2021 08:12, Kalle Valo wrote: > Kai-Heng Feng writes: > >> Now we have a generic D3 shutdown quirk, so convert the original >> approach to a PCI quirk. >> >> Signed-off-by: Kai-Heng Feng >> --- >> drivers/net/wireless/realtek/rtw88/pci.c | 2 -- >> drivers/pci/quirks.c

Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-02-26 Thread Kai-Heng Feng
On Fri, Feb 26, 2021 at 8:10 PM Heiner Kallweit wrote: > > On 26.02.2021 08:12, Kalle Valo wrote: > > Kai-Heng Feng writes: > > > >> Now we have a generic D3 shutdown quirk, so convert the original > >> approach to a PCI quirk. > >> > >> Signed-off-by: Kai-Heng Feng > >> --- > >> drivers/net/wi

Re: [RFC PATCH v2 net-next 15/17] net: dsa: replay port and local fdb entries when joining the bridge

2021-02-26 Thread Tobias Waldekranz
On Wed, Feb 24, 2021 at 13:43, Vladimir Oltean wrote: > From: Vladimir Oltean > > When a DSA port joins a LAG that already had an FDB entry pointing to it: > > ip link set bond0 master br0 > bridge fdb add dev bond0 00:01:02:03:04:05 master static > ip link set swp0 master bond0 > > the DSA port

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > On 2021-02-26 12:40, Björn Töpel wrote: >> On 2021-02-26 12:37, Toke Høiland-Jørgensen wrote: > > [...] > >>> >>> (That last paragraph above is why I asked if you updated the performance >>> numbers in the cover letter; removing an additional function call should >>> affect

[PATCH] [v14] wireless: Initial driver submission for pureLiFi STA devices

2021-02-26 Thread Srinivasan Raju
This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC and LiFi-XL USB devices. This driver implementation has been based on the zd1211rw driver. Driver is based on 802.11 softMAC Architecture and uses native 802.11 for configuration and management. The driver is compiled and tested in ARM

[PATCH net] net: broadcom: bcm4908_enet: enable RX after processing packets

2021-02-26 Thread Rafał Miłecki
From: Rafał Miłecki When receiving a lot of packets hardware may run out of free descriptiors and stop RX ring. Enable it every time after handling received packets. Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver") Signed-off-by: Rafał Miłecki --- drivers/net/

Re: [RFC PATCH v2 net-next 06/17] net: dsa: add addresses obtained from RX filtering to host addresses

2021-02-26 Thread Vladimir Oltean
On Fri, Feb 26, 2021 at 11:59:36AM +0100, Tobias Waldekranz wrote: > On Wed, Feb 24, 2021 at 13:43, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > In case we have ptp4l running on a bridged DSA switch interface, the PTP > > traffic is classified as link-local (in the default profile, th

Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-02-26 Thread Heiner Kallweit
On 26.02.2021 13:18, Kai-Heng Feng wrote: > On Fri, Feb 26, 2021 at 8:10 PM Heiner Kallweit wrote: >> >> On 26.02.2021 08:12, Kalle Valo wrote: >>> Kai-Heng Feng writes: >>> Now we have a generic D3 shutdown quirk, so convert the original approach to a PCI quirk. Signed-off-by

Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-02-26 Thread Kalle Valo
Heiner Kallweit writes: > On 26.02.2021 13:18, Kai-Heng Feng wrote: >> On Fri, Feb 26, 2021 at 8:10 PM Heiner Kallweit wrote: >>> >>> On 26.02.2021 08:12, Kalle Valo wrote: Kai-Heng Feng writes: > Now we have a generic D3 shutdown quirk, so convert the original > approach to a

Similar functions in net/core/dev.c

2021-02-26 Thread Vinicius Tinti
Hi, All these functions in net/core/dev.c are very similar. __netdev_walk_all_upper_dev netdev_walk_all_upper_dev_rcu netdev_walk_all_lower_dev __netdev_walk_all_lower_dev netdev_walk_all_lower_dev_rcu Can they be merged in one function? Are they a hot path? Regards, Vinicius

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Andrew Lunn
> > OK, I see. Then there's no reason to complain upstream. > > Either use the mainline B53 DSA driver of fix interrupt mode > > downstream. > > I agree. > > This b53 driver has one PHY with the same BCM63XX phy_id, causing a > double probe. I'll send the original patch to the OpenWrt project. H

Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames

2021-02-26 Thread Martin Schiller
On 2021-02-22 09:56, Xie He wrote: On Sun, Feb 21, 2021 at 11:14 PM Martin Schiller wrote: I'm not really happy with this change because it breaks compatibility. We then suddenly have 2 interfaces; the X.25 routings are to be set via the "new" hdlc_x25 interfaces instead of the hdlc interfac

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread Jesper Dangaard Brouer
On Fri, 26 Feb 2021 12:40:33 +0100 Björn Töpel wrote: > @Jesper Do you have a CPUMAP benchmark that you can point me to? I just > did functional testing for CPUMAP I usually just use the xdp_redirect_cpu samples/bpf program. Your optimization will help the RX enqueue side, but the bottleneck fo

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Heiner Kallweit
On 26.02.2021 15:16, Andrew Lunn wrote: >>> OK, I see. Then there's no reason to complain upstream. >>> Either use the mainline B53 DSA driver of fix interrupt mode >>> downstream. >> >> I agree. >> >> This b53 driver has one PHY with the same BCM63XX phy_id, causing a >> double probe. I'll send th

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread Jesper Dangaard Brouer
On Fri, 26 Feb 2021 12:37:40 +0100 Toke Høiland-Jørgensen wrote: > Björn Töpel writes: > > > From: Björn Töpel > > > > Currently the bpf_redirect_map() implementation dispatches to the > > correct map-lookup function via a switch-statement. To avoid the > > dispatching, this change adds bpf_re

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread Jesper Dangaard Brouer
On Fri, 26 Feb 2021 13:26:22 +0100 Toke Høiland-Jørgensen wrote: > Björn Töpel writes: > > > On 2021-02-26 12:40, Björn Töpel wrote: > >> On 2021-02-26 12:37, Toke Høiland-Jørgensen wrote: > > > > [...] > > > >>> > >>> (That last paragraph above is why I asked if you updated the performan

Re: [PATCH RFC net-next 2/3] net: page_pool: use alloc_pages_bulk in refill code path

2021-02-26 Thread Jesper Dangaard Brouer
On Wed, 24 Feb 2021 22:15:22 +0200 Ilias Apalodimas wrote: > Hi Jesper, > > On Wed, Feb 24, 2021 at 07:56:46PM +0100, Jesper Dangaard Brouer wrote: > > There are cases where the page_pool need to refill with pages from the > > page allocator. Some workloads cause the page_pool to release pages

Re: [PATCH RFC net-next 3/3] mm: make zone->free_area[order] access faster

2021-02-26 Thread Jesper Dangaard Brouer
On Thu, 25 Feb 2021 15:38:15 + Mel Gorman wrote: > On Thu, Feb 25, 2021 at 04:16:33PM +0100, Jesper Dangaard Brouer wrote: > > > On Wed, Feb 24, 2021 at 07:56:51PM +0100, Jesper Dangaard Brouer wrote: > > > > Avoid multiplication (imul) operations when accessing: > > > > zone->free_area[or

RE: TCP stall issue

2021-02-26 Thread David Laight
Some thoughts... Does a non-android linux system behave correctly through the same NAT gateways? Particularly with a similar kernel version. If you have a USB OTG cable and USB ethernet dongle you may be able to get android to use a wired ethernet connection - excluding any WiFi issues. (OTG usua

Re: [PATCH] inetpeer: use else if instead of if to reduce judgment

2021-02-26 Thread Eric Dumazet
On 2/26/21 11:57 AM, Yejune Deng wrote: > In inet_initpeers(), if si.totalram <= (8192*1024)/PAGE_SIZE, it will > be judged three times. Use else if instead of if, it only needs to be > judged once. > > Signed-off-by: Yejune Deng > --- > net/ipv4/inetpeer.c | 10 +- > 1 file changed,

Re: [PATCH v2 1/1] net: fec: ptp: avoid register access when ipg clock is disabled

2021-02-26 Thread Richard Cochran
On Thu, Feb 25, 2021 at 10:15:16PM +0100, Heiko Thiery wrote: > When accessing the timecounter register on an i.MX8MQ the kernel hangs. > This is only the case when the interface is down. This can be reproduced > by reading with 'phc_ctrl eth0 get'. > > Like described in the change in 91c0d987a978

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread kernel test robot
Hi "Björn, I love your patch! Perhaps something to improve: [auto build test WARNING on 9c8f21e6f8856a96634e542a58ef3abf27486801] url: https://github.com/0day-ci/linux/commits/Bj-rn-T-pel/Optimize-bpf_redirect_map-xdp_do_redirect/20210226-192840

[PATCH net] net: phy: ti: take into account all possible interrupt sources

2021-02-26 Thread Ioana Ciornei
From: Ioana Ciornei The previous implementation of .handle_interrupt() did not take into account the fact that all the interrupt status registers should be acknowledged since multiple interrupt sources could be asserted. Fix this by reading all the status registers before exiting with IRQ_NONE o

Re: Spurious TCP retransmissions on ack vs kfree_skb reordering

2021-02-26 Thread Jakub Kicinski
On Fri, 26 Feb 2021 11:41:22 +0100 Eric Dumazet wrote: > On Fri, Feb 26, 2021 at 11:05 AM Eric Dumazet wrote: > > > > On Fri, Feb 26, 2021 at 4:15 AM Jakub Kicinski wrote: > > > > > > On Thu, 25 Feb 2021 15:25:15 -0800 Jakub Kicinski wrote: > > > > Hi! > > > > > > > > We see large (4-8x) incr

Re: Spurious TCP retransmissions on ack vs kfree_skb reordering

2021-02-26 Thread Jakub Kicinski
On Fri, 26 Feb 2021 11:41:22 +0100 Eric Dumazet wrote: > > > Seems like I'm pretty lost here and the tcp:tcp_retransmit_skb events > > > are less spurious than I thought. Looking at some tcpdump traces we see: > > > > > > 0.045277 IP6 A > B: Flags [SEW], seq 2248382925:2248383296, win 61920, > > >

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Daniel González Cabanelas
I could update the BCM5365 phy_id in the downstream B53 driver to fix it and avoid any kind of future conflicts if the driver is upstreamed. Accordingly to documentation the whole BCM5365 UID (not masked) is 0x00406370. PHYID HIGH[15:0] = OUI[21:6] PHYID LOW[15:0] = OUI[5:0] + MODEL[5:0] + REV[3:0]

Re: TCP stall issue

2021-02-26 Thread Gil Pedersen
> On 26 Feb 2021, at 15.39, David Laight wrote: > > Some thoughts... > > Does a non-android linux system behave correctly through the same NAT > gateways? > Particularly with a similar kernel version. > > If you have a USB OTG cable and USB ethernet dongle you may be able to get > android to

pull-request: wireless-drivers-2021-02-26

2021-02-26 Thread Kalle Valo
Hi, here's a pull request to net tree, more info below. Please let me know if there are any problems. Kalle The following changes since commit 773dc50d71690202afd7b5017c060c6ca8c75dd9: Merge branch 'Xilinx-axienet-updates' (2021-02-12 17:38:53 -0800) are available in the git repository at:

Re: Spurious TCP retransmissions on ack vs kfree_skb reordering

2021-02-26 Thread Jakub Kicinski
On Fri, 26 Feb 2021 17:35:11 +0100 Eric Dumazet wrote: > On Fri, Feb 26, 2021 at 5:09 PM Jakub Kicinski wrote: > > On Fri, 26 Feb 2021 11:41:22 +0100 Eric Dumazet wrote: > > > Yes, this packetdrill test confirms TCP INFO stuff seems correct . > > > > Looks like it's TcpExtTCPSpuriousRtxHostQue

Re: [PATCH bpf-next] bpf: fix missing * in bpf.h

2021-02-26 Thread Quentin Monnet
2021-02-24 10:59 UTC-0800 ~ Andrii Nakryiko > On Wed, Feb 24, 2021 at 7:55 AM Daniel Borkmann wrote: >> >> On 2/23/21 3:43 PM, Jesper Dangaard Brouer wrote: >>> On Tue, 23 Feb 2021 20:45:54 +0800 >>> Hangbin Liu wrote: >>> Commit 34b2021cc616 ("bpf: Add BPF-helper for MTU checking") lost a

Re: [PATCH v2] bcm63xx_enet: fix internal phy IRQ assignment

2021-02-26 Thread Florian Fainelli
On 2/26/2021 8:14 AM, Daniel González Cabanelas wrote: > I could update the BCM5365 phy_id in the downstream B53 driver to fix > it and avoid any kind of future conflicts if the driver is upstreamed. > Accordingly to documentation the whole BCM5365 UID (not masked) is > 0x00406370. > PHYID HIGH[

Re: [PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-02-26 Thread Oliver Hartkopp
On 26.02.21 10:24, Oleksij Rempel wrote: There are two ref count variables controlling the free()ing of a socket: - struct sock::sk_refcnt - which is changed by sock_hold()/sock_put() - struct sock::sk_wmem_alloc - which accounts the memory allocated by the skbs in the send path. In case t

[PATCH v2 0/3] Add lockdep_assert_not_held()

2021-02-26 Thread Shuah Khan
Some kernel functions must not be called holding a specific lock. Doing so could lead to locking problems. Currently these routines call lock_is_held() to check for lock hold followed by WARN_ON. Adding a common lockdep interface will help reduce the duplication of this logic in the rest of the ke

[PATCH v2 2/3] lockdep: add lockdep lock state defines

2021-02-26 Thread Shuah Khan
Adds defines for lock state returns from lock_is_held_type() based on Johannes Berg's suggestions as it make it easier to read and maintain the lock states. These are defines and a enum to avoid changes to lock_is_held_type() and lockdep_is_held() return types. Link: https://lore.kernel.org/lkml/

[PATCH v2 1/3] lockdep: add lockdep_assert_not_held()

2021-02-26 Thread Shuah Khan
Some kernel functions must be called without holding a specific lock. Add lockdep_assert_not_held() to be used in these functions to detect incorrect calls while holding a lock. lockdep_assert_not_held() provides the opposite functionality of lockdep_assert_held() which is used to assert calls tha

[PATCH v2 3/3] ath10k: detect conf_mutex held ath10k_drain_tx() calls

2021-02-26 Thread Shuah Khan
ath10k_drain_tx() must not be called with conf_mutex held as workers can use that also. Add call to lockdep_assert_not_held() on conf_mutex to detect if conf_mutex is held by the caller. The idea for this patch stemmed from coming across the comment block above the ath10k_drain_tx() while reviewin

Re: [PATCH 5/5] ath10k: reduce invalid ht params rate message noise

2021-02-26 Thread Shuah Khan
On 2/11/21 4:24 AM, Kalle Valo wrote: Shuah Khan writes: On 2/10/21 1:28 AM, Kalle Valo wrote: Wen Gong writes: On 2021-02-10 08:42, Shuah Khan wrote: ath10k_mac_get_rate_flags_ht() floods dmesg with the following messages, when it fails to find a match for mcs=7 and rate=1440. supported

Re: [PATCH v2 2/3] lockdep: add lockdep lock state defines

2021-02-26 Thread Johannes Berg
> @@ -5475,7 +5476,7 @@ noinstr int lock_is_held_type(const struct lockdep_map > *lock, int read) > /* avoid false negative lockdep_assert_not_held() >* and lockdep_assert_held() >*/ > - return -1; > + return LOCK_STATE_UNKNOW

Re: [RFC PATCH v2 net-next 15/17] net: dsa: replay port and local fdb entries when joining the bridge

2021-02-26 Thread Vladimir Oltean
On Fri, Feb 26, 2021 at 01:23:23PM +0100, Tobias Waldekranz wrote: > If VLAN filtering is enabled, we would also have to replay that. Port > attributes also, right? > > I like the pull model, because it saves the bridge from doing lots of > dumpster diving. However, should there be a single `bridg

Re: [RFC PATCH net-next 08/12] Documentation: networking: dsa: add paragraph for the LAG offload

2021-02-26 Thread Vladimir Oltean
On Thu, Feb 25, 2021 at 09:42:28PM +0100, Tobias Waldekranz wrote: > On Sun, Feb 21, 2021 at 23:33, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > Add a short summary of the methods that a driver writer must implement > > for offloading a link aggregation group, and what is still missin

Re: [RFC PATCH net-next 02/12] Documentation: networking: dsa: rewrite chapter about tagging protocol

2021-02-26 Thread Vladimir Oltean
On Thu, Feb 25, 2021 at 09:29:21PM +0100, Tobias Waldekranz wrote: > This is not strictly true for mv88e6xxx. The connection between the tree > and the CPU may use Ethertyped DSA tags, while inter-switch links use > regular DSA tags. > > However, I think it is better to keep this definition short,

Re: [PATCH net-next 4/4] net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge

2021-02-26 Thread Vladimir Oltean
On Thu, Feb 25, 2021 at 08:25:23PM +0100, Tobias Waldekranz wrote: > On Sun, Feb 14, 2021 at 17:53, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > DSA has gained the recent ability to deal gracefully with upper > > interfaces it cannot offload, such as the bridge, bonding or team > > dr

Re: [PATCH v2 2/3] lockdep: add lockdep lock state defines

2021-02-26 Thread Shuah Khan
On 2/26/21 11:03 AM, Johannes Berg wrote: @@ -5475,7 +5476,7 @@ noinstr int lock_is_held_type(const struct lockdep_map *lock, int read) /* avoid false negative lockdep_assert_not_held() * and lockdep_assert_held() */ - return -1;

Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-02-26 Thread Bjorn Helgaas
On Fri, Feb 26, 2021 at 02:31:31PM +0100, Heiner Kallweit wrote: > On 26.02.2021 13:18, Kai-Heng Feng wrote: > > On Fri, Feb 26, 2021 at 8:10 PM Heiner Kallweit > > wrote: > >> > >> On 26.02.2021 08:12, Kalle Valo wrote: > >>> Kai-Heng Feng writes: > >>> > Now we have a generic D3 shutdown

[PATCH] net/core/skbuff.c: __netdev_alloc_skb fix when len is greater than KMALLOC_MAX_SIZE

2021-02-26 Thread Pavel Skripkin
syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. It was caused by __netdev_alloc_skb(), which doesn't check len value after adding NET_SKB_PAD. Order will be >= MAX_ORDER and passed to __alloc_pages_nodemask() if size > KMALLOC_MAX_SIZE. static void *kmalloc_large_nod

Re: [PATCH bpf-next] bpf: fix missing * in bpf.h

2021-02-26 Thread Andrii Nakryiko
On Fri, Feb 26, 2021 at 8:50 AM Quentin Monnet wrote: > > 2021-02-24 10:59 UTC-0800 ~ Andrii Nakryiko > > On Wed, Feb 24, 2021 at 7:55 AM Daniel Borkmann > > wrote: > >> > >> On 2/23/21 3:43 PM, Jesper Dangaard Brouer wrote: > >>> On Tue, 23 Feb 2021 20:45:54 +0800 > >>> Hangbin Liu wrote: > >

Re: [PATCH v6 bpf-next 0/6] bpf: enable task local storage for tracing programs

2021-02-26 Thread Alexei Starovoitov
On Thu, Feb 25, 2021 at 4:04 PM Martin KaFai Lau wrote: > > On Thu, Feb 25, 2021 at 03:43:13PM -0800, Song Liu wrote: > > This set enables task local storage for non-BPF_LSM programs. > > > > It is common for tracing BPF program to access per-task data. Currently, > > these data are stored in hash

Re: [PATCH/v3] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-02-26 Thread Cong Wang
On Thu, Feb 25, 2021 at 7:59 PM Xuesen Huang wrote: > v3: > - Fix the code format. > > v2: > Suggested-by: Willem de Bruijn > - Add a new flag to specify the type of the inner packet. These need to be moved after '---', otherwise it would be merged into the final git log. > > Suggested-by: Will

Re: [PATCH] net: bridge: Fix jump_label config

2021-02-26 Thread Cong Wang
On Thu, Feb 25, 2021 at 5:39 PM Kefeng Wang wrote: > > > On 2021/2/26 5:22, Cong Wang wrote: > > On Wed, Feb 24, 2021 at 8:03 AM Kefeng Wang > > wrote: > >> HAVE_JUMP_LABLE is removed by commit e9666d10a567 ("jump_label: move > >> 'asm goto' support test to Kconfig"), use CONFIG_JUMP_LABLE inste

Re: [PATCH v4] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle

2021-02-26 Thread Marcel Holtmann
Hi Miao-chen, > This moves msft_do_close() from hci_dev_do_close() to > hci_unregister_dev() to avoid clearing MSFT extension info. This also > re-reads MSFT info upon every msft_do_open() even if MSFT extension has > been initialized. > > The following test steps were performed. > (1) boot the t

Re: [Patch bpf-next v7 0/9] sock_map: clean up and refactor code for BPF_SK_SKB_VERDICT

2021-02-26 Thread Alexei Starovoitov
On Tue, Feb 23, 2021 at 10:51 AM Cong Wang wrote: > > From: Cong Wang > > This patchset is the first series of patches separated out from > the original large patchset, to make reviews easier. This patchset > does not add any new feature or change any functionality but merely > cleans up the exis

Re: [PATCH bpf-next v2 0/5] PROG_TEST_RUN support for sk_lookup programs

2021-02-26 Thread Alexei Starovoitov
On Fri, Feb 26, 2021 at 2:31 AM Lorenz Bauer wrote: > > We don't have PROG_TEST_RUN support for sk_lookup programs at the > moment. So far this hasn't been a problem, since we can run our > tests in a separate network namespace. For benchmarking it's nice > to have PROG_TEST_RUN, so I've gone and

Re: [PATCH] iwlwifi: mvm: add terminate entry for dmi_system_id tables

2021-02-26 Thread Nathan Chancellor
On Tue, Feb 23, 2021 at 02:00:39PM +, Wei Yongjun wrote: > Make sure dmi_system_id tables are NULL terminated. > > Fixes: a2ac0f48a07c ("iwlwifi: mvm: implement approved list for the PPAG > feature") > Reported-by: Hulk Robot > Signed-off-by: Wei Yongjun We received a report about a crash

Re: [PATCH v2 1/3] lockdep: add lockdep_assert_not_held()

2021-02-26 Thread Peter Zijlstra
On Fri, Feb 26, 2021 at 10:52:13AM -0700, Shuah Khan wrote: > + /* avoid false negative lockdep_assert_not_held() > + * and lockdep_assert_held() > + */ That's a coding style fail.

Re: [PATCH v2 1/3] lockdep: add lockdep_assert_not_held()

2021-02-26 Thread Shuah Khan
On 2/26/21 2:07 PM, Peter Zijlstra wrote: On Fri, Feb 26, 2021 at 10:52:13AM -0700, Shuah Khan wrote: + /* avoid false negative lockdep_assert_not_held() +* and lockdep_assert_held() +*/ That's a coding style fail. Checkpatch didn't complain. Wh

[PATCH net] net: Fix gro aggregation for udp encaps with zero csum

2021-02-26 Thread Daniel Borkmann
We noticed a GRO issue for UDP-based encaps such as vxlan/geneve when the csum for the UDP header itself is 0. In that case, GRO aggregation does not take place on the phys dev, but instead is deferred to the vxlan/geneve driver (see trace below). The reason is essentially that GRO aggregation bai

Re: [PATCH] net: always use icmp{,v6}_ndo_send from ndo_start_xmit

2021-02-26 Thread Willem de Bruijn
On Thu, Feb 25, 2021 at 6:46 PM Jason A. Donenfeld wrote: > > There were a few remaining tunnel drivers that didn't receive the prior > conversion to icmp{,v6}_ndo_send. Knowing now that this could lead to > memory corrution (see ee576c47db60 ("net: icmp: pass zeroed opts from > icmp{,v6}_ndo_send

Re: [PATCH/v3] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-02-26 Thread Willem de Bruijn
On Fri, Feb 26, 2021 at 3:15 PM Cong Wang wrote: > > On Thu, Feb 25, 2021 at 7:59 PM Xuesen Huang wrote: > > v3: > > - Fix the code format. > > > > v2: > > Suggested-by: Willem de Bruijn > > - Add a new flag to specify the type of the inner packet. > > These need to be moved after '---', otherwi

Re: [PATCH 2/3] net: dsa: tag_ocelot_8021q: fix driver dependency

2021-02-26 Thread Vladimir Oltean
On Thu, Feb 25, 2021 at 03:38:32PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > When the ocelot driver code is in a library, the dsa tag > code cannot be built-in: > > ld.lld: error: undefined symbol: ocelot_can_inject > >>> referenced by tag_ocelot_8021q.c > >>> dsa/tag_o

[PATCH ipsec 1/2] vti: fix ipv4 pmtu check to honor ip header df

2021-02-26 Thread Eyal Birger
Frag needed should only be sent if the header enables DF. This fix allows packets larger than MTU to pass the vti interface and be fragmented after encapsulation, aligning behavior with non-vti xfrm. Fixes: d6af1a31cc72 ("vti: Add pmtu handling to vti_xmit.") Signed-off-by: Eyal Birger --- net/

[PATCH ipsec 2/2] vti6: fix ipv4 pmtu check to honor ip header df

2021-02-26 Thread Eyal Birger
Frag needed should only be sent if the header enables DF. This fix allows IPv4 packets larger than MTU to pass the vti6 interface and be fragmented after encapsulation, aligning behavior with non-vti6 xfrm. Fixes: ccd740cbc6e0 ("vti6: Add pmtu handling to vti6_xmit.") Signed-off-by: Eyal Birger

[PATCH ipsec 0/2] vti(6): fix ipv4 pmtu check to honor ip header df

2021-02-26 Thread Eyal Birger
This series aligns vti(6) handling of non-df IPv4 packets exceeding the size of the tunnel MTU to avoid sending "Frag needed" and instead fragment the packets after encapsulation. Eyal Birger (2): vti: fix ipv4 pmtu check to honor ip header df vti6: fix ipv4 pmtu check to honor ip header df

Re: [PATCH net] net: fix race between napi kthread mode and busy poll

2021-02-26 Thread Jakub Kicinski
On Fri, 26 Feb 2021 10:28:00 -0800 Wei Wang wrote: > Hi Martin, > Could you help try the following new patch on your setup and let me > know if there are still issues? FWIW your email got line wrapped for me. > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index ddf4cfc1261

Re: [PATCH] iwlwifi: mvm: add terminate entry for dmi_system_id tables

2021-02-26 Thread vic . michel . web
This fixes a BUG triggered when loading the iwlwifi driver, which reproduces consistently when I compile the kernel with LTO_CLANG_THIN. Tested-by: Victor Michel

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-02-26 Thread Daniel Borkmann
On 2/26/21 12:23 PM, Björn Töpel wrote: From: Björn Töpel Currently the bpf_redirect_map() implementation dispatches to the correct map-lookup function via a switch-statement. To avoid the dispatching, this change adds bpf_redirect_map() as a map operation. Each map provides its bpf_redirect_ma

Re: [PATCH 0/2] More strict error checking in bpf_asm (v3).

2021-02-26 Thread Daniel Borkmann
On 2/24/21 10:24 PM, Ian Denhardt wrote: Gah, managed to typo my own name in the v2 patch >.< This one should be good :/ Ian Denhardt (2): tools, bpf_asm: Hard error on out of range jumps. tools, bpf_asm: exit non-zero on errors. tools/bpf/bpf_exp.y | 14 -- 1 file changed

  1   2   >