[RFC PATCH net-next 2/3] use netdev_notify_peers_locked in ibmvnic

2020-12-05 Thread Lijun Pan
Start to use the lockless version of netdev_notify_peers. Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index df589ad6f271..25d6

[RFC PATCH net-next 3/3] use netdev_notify_peers_locked in hyperv

2020-12-05 Thread Lijun Pan
Start to use the lockless version of netdev_notify_peers. Cc: Haiyang Zhang Signed-off-by: Lijun Pan --- drivers/net/hyperv/netvsc_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 261e6e55a907

[RFC PATCH net-next 0/3] lockless version of

2020-12-05 Thread Lijun Pan
This series introduce the lockless version of netdev_notify_peers and then apply it to the relevant drivers. Lijun Pan (3): net: core: introduce netdev_notify_peers_locked use netdev_notify_peers_locked in ibmvnic use netdev_notify_peers_locked in hyperv drivers/net/ethernet/ibm/ibmvnic.c

[RFC PATCH net-next 1/3] net: core: introduce netdev_notify_peers_locked

2020-12-05 Thread Lijun Pan
There are some use cases for netdev_notify_peers in the context when rtnl lock is already held. Introduce lockless version of netdev_notify_peers call to save the extra code to call call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, dev); call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev)

Re: [pull request][for-next] mlx5-next auxbus support

2020-12-05 Thread Leon Romanovsky
On Sat, Dec 05, 2020 at 04:19:21PM -0800, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 15:35:45 -0800 Jakub Kicinski wrote: > > On Fri, 4 Dec 2020 10:29:52 -0800 Saeed Mahameed wrote: > > > This pull request is targeting net-next and rdma-next branches. > > > > > > This series provides mlx5 support f

Re: [PATCH v1 bpf-next 11/11] bpf: Test BPF_SK_REUSEPORT_SELECT_OR_MIGRATE.

2020-12-05 Thread Kuniyuki Iwashima
I'm sending this mail just for logging because I failed to send mails only to LKML, netdev, and bpf yesterday. From: Martin KaFai Lau Date: Fri, 4 Dec 2020 17:50:00 -0800 > On Tue, Dec 01, 2020 at 11:44:18PM +0900, Kuniyuki Iwashima wrote: > > This patch adds a test for BPF_SK_REUSEPORT_SEL

Re: [PATCH v1 bpf-next 03/11] tcp: Migrate TCP_ESTABLISHED/TCP_SYN_RECV sockets in accept queues.

2020-12-05 Thread Kuniyuki Iwashima
I'm sending this mail just for logging because I failed to send mails only to LKML, netdev, and bpf yesterday. From: Martin KaFai Lau Date: Fri, 4 Dec 2020 17:42:41 -0800 > On Tue, Dec 01, 2020 at 11:44:10PM +0900, Kuniyuki Iwashima wrote: > [ ... ] > > diff --git a/net/core/sock_reuseport.

Re: [PATCH v1 bpf-next 01/11] tcp: Keep TCP_CLOSE sockets in the reuseport group.

2020-12-05 Thread Kuniyuki Iwashima
I'm sending this mail just for logging because I failed to send mails only to LKML, netdev, and bpf yesterday. From: Martin KaFai Lau Date: Fri, 4 Dec 2020 17:31:03 -0800 > On Tue, Dec 01, 2020 at 11:44:08PM +0900, Kuniyuki Iwashima wrote: > > This patch is a preparation patch to migrate in

Re: [PATCH v1 bpf-next 09/11] bpf: Support bpf_get_socket_cookie_sock() for BPF_PROG_TYPE_SK_REUSEPORT.

2020-12-05 Thread Kuniyuki Iwashima
I'm sending this mail just for logging because I failed to send mails only to LKML, netdev, and bpf yesterday. From: Martin KaFai Lau Date: Fri, 4 Dec 2020 11:58:07 -0800 > On Tue, Dec 01, 2020 at 11:44:16PM +0900, Kuniyuki Iwashima wrote: > > We will call sock_reuseport.prog for socket mig

Re: [PATCH v1 bpf-next 06/11] bpf: Introduce two attach types for BPF_PROG_TYPE_SK_REUSEPORT.

2020-12-05 Thread Kuniyuki Iwashima
I'm sending this mail just for logging because I failed to send mails only to LKML, netdev, and bpf yesterday. From: Martin KaFai Lau Date: Thu, 3 Dec 2020 21:56:53 -0800 > On Thu, Dec 03, 2020 at 11:16:08PM +0900, Kuniyuki Iwashima wrote: > > From: Martin KaFai Lau > > Date: Wed, 2 Dec

[PATCH net v1 2/2] lan743x: boost performance: limit PCIe bandwidth requirement

2020-12-05 Thread Sven Van Asbroeck
From: Sven Van Asbroeck To support jumbo frames, each rx ring dma buffer is 9K in size. But the chip only stores a single frame per dma buffer. When the chip is working with the default 1500 byte MTU, a 9K dma buffer goes from chip -> cpu per 1500 byte frame. This means that to get 1G/s ethernet

[PATCH net v1 1/2] lan743x: improve performance: fix rx_napi_poll/interrupt ping-pong

2020-12-05 Thread Sven Van Asbroeck
From: Sven Van Asbroeck Even if the rx ring is completely full, and there is more rx data waiting on the chip, the rx napi poll fn will never run more than once - it will always immediately bail out and re-enable interrupts. Which results in ping-pong between napi and interrupt. This defeats the

[PATCH V2 net-next 2/3] net: hns3: add priv flags support to switch limit promisc mode

2020-12-05 Thread Huazhong Tan
From: Jian Shen Currently, the tx unicast promisc is always enabled when promisc mode on. If tx unicast promisc on, a function will receive all unicast packet from other functions belong to the same port. Add a ethtool private flag to control whether enable tx unicast promisc. Then the function i

[PATCH V2 net-next 3/3] net: hns3: refine the VLAN tag handle for port based VLAN

2020-12-05 Thread Huazhong Tan
From: Guojia Liao For DEVICE_VERSION_V2, the hardware only supports max two layer VLAN tags, including port based tag inserted by hardware, tag in tx buffer descriptor(get from skb->tci) and tag in packet. For transmit packet: If port based VLAN disabled, and vf driver gets a VLAN tag from skb,

[PATCH V2 net-next 0/3] net: hns3: updates for -next

2020-12-05 Thread Huazhong Tan
There are some updates for the HNS3 ethernet driver. #1 supports an extended promiscuous command which makes promiscuous configuration more flexible, #2 adds ethtool private flags to control whether enable tx unicast promisc. #3 refine the vlan tag handling for port based vlan. change log: V2: mo

[PATCH V2 net-next 1/3] net: hns3: add support for extended promiscuous command

2020-12-05 Thread Huazhong Tan
From: Guojia Liao For DEVICE_VERSION_V2, the hardware supports enable tx and rx promiscuous separately. But tx or rx promiscuous is active for unicast, multicast and broadcast promiscuous simultaneously. To support traffics between functions belong to the same port, we always enable tx promiscuou

Re: [PATCH net-next 3/3] net: hns3: refine the VLAN tag handle for port based VLAN

2020-12-05 Thread tanhuazhong
On 2020/12/5 10:22, Jakub Kicinski wrote: On Thu, 3 Dec 2020 20:18:56 +0800 Huazhong Tan wrote: tranmist Please spell check the commit messages and comments. will fix spelling mistakes, thanks .

Re: [PATCH net-next 2/3] net: hns3: add priv flags support to switch limit promisc mode

2020-12-05 Thread tanhuazhong
On 2020/12/5 10:24, Jakub Kicinski wrote: On Thu, 3 Dec 2020 20:18:55 +0800 Huazhong Tan wrote: @@ -224,6 +224,7 @@ static int hclge_map_unmap_ring_to_vf_vector(struct hclge_vport *vport, bool en, static int hclge_set_vf_promisc_mode(struct hclge_vport *vport,

Re: [PATCH v2 bpf-next 0/3] bpf: support module BTF in BTF display helpers

2020-12-05 Thread Alan Maguire
On Sat, 5 Dec 2020, Yonghong Song wrote: > > > __builtin_btf_type_id() is really only supported in llvm12 > and 64bit return value support is pushed to llvm12 trunk > a while back. The builtin is introduced in llvm11 but has a > corner bug, so llvm12 is recommended. So if people use the builti

Re: [PATCH bpf-next] libbpf: support module BTF for BPF_TYPE_ID_TARGET CO-RE relocation

2020-12-05 Thread Alan Maguire
On Fri, 4 Dec 2020, Andrii Nakryiko wrote: > When Clang emits ldimm64 instruction for BPF_TYPE_ID_TARGET CO-RE relocation, > put module BTF FD, containing target type, into upper 32 bits of imm64. > > Because this FD is internal to libbpf, it's very cumbersome to test this in > selftests. Manual

Re: [PATCH net-next 0/2] r8169: improve rtl_rx and NUM_RX_DESC handling

2020-12-05 Thread David Miller
From: Heiner Kallweit Date: Sun, 6 Dec 2020 00:58:12 +0100 > This series improves rtl_rx() and the handling of NUM_RX_DESC. Series applied, thanks Heiner!

Re: [resend/standalone PATCH v4] Add auxiliary bus support

2020-12-05 Thread Dan Williams
On Sat, Dec 5, 2020 at 4:24 PM David Ahern wrote: > > On 12/2/20 5:54 PM, Dan Williams wrote: > > diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig > > index 8d7001712062..040be48ce046 100644 > > --- a/drivers/base/Kconfig > > +++ b/drivers/base/Kconfig > > @@ -1,6 +1,9 @@ > > # SPDX-Licen

Re: [resend/standalone PATCH v4] Add auxiliary bus support

2020-12-05 Thread David Ahern
On 12/2/20 5:54 PM, Dan Williams wrote: > diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig > index 8d7001712062..040be48ce046 100644 > --- a/drivers/base/Kconfig > +++ b/drivers/base/Kconfig > @@ -1,6 +1,9 @@ > # SPDX-License-Identifier: GPL-2.0 > menu "Generic Driver Options" > > +conf

Re: [pull request][for-next] mlx5-next auxbus support

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 15:35:45 -0800 Jakub Kicinski wrote: > On Fri, 4 Dec 2020 10:29:52 -0800 Saeed Mahameed wrote: > > This pull request is targeting net-next and rdma-next branches. > > > > This series provides mlx5 support for auxiliary bus devices. > > > > It starts with a merge commit of tag '

Re: [PATCH V4 net-next 7/9] net: ena: introduce XDP redirect implementation

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 14:11:13 +0200 akiy...@amazon.com wrote: > + case XDP_REDIRECT: > + xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog); > + xdp_stat = &rx_ring->rx_stats.xdp_redirect; > + break; Don't you have to check if xdp_do_redirect() returned an error

Re: LRO: creating vlan subports affects parent port's LRO settings

2020-12-05 Thread Jarod Wilson
On Mon, Nov 23, 2020 at 7:27 PM Jakub Kicinski wrote: > > On Thu, 19 Nov 2020 20:37:27 -0500 Limin Wang wrote: > > Under relatively recent kernels (v4.4+), creating a vlan subport on a > > LRO supported parent NIC may turn LRO off on the parent port and > > further render its LRO feature practical

[PATCH net-next 1/2] r8169: improve rtl_rx

2020-12-05 Thread Heiner Kallweit
There's no need to check min(budget, NUM_RX_DESC). At first budget (NAPI_POLL_WEIGHT = 64) is less then NUM_RX_DESC (256). And more important: Even in case of budget > NUM_RX_DESC we could safely continue processing descriptors as long as they are owned by the CPU. In addition replace rx_left with

[PATCH net-next 2/2] r8169: make NUM_RX_DESC a signed int

2020-12-05 Thread Heiner Kallweit
After recent changes there's no need any longer to define NUM_RX_DESC as an unsigned value. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/

[PATCH net-next 0/2] r8169: improve rtl_rx and NUM_RX_DESC handling

2020-12-05 Thread Heiner Kallweit
This series improves rtl_rx() and the handling of NUM_RX_DESC. Heiner Kallweit (2): r8169: improve rtl_rx r8169: make NUM_RX_DESC a signed int drivers/net/ethernet/realtek/r8169_main.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) -- 2.29.2

Re: [PATCH v3 0/7] Improve s0ix flows for systems i219LM

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 14:38:03 -0800 Alexander Duyck wrote: > > > The patches look good to me. Just need to address the minor issue that > > > seems to have been present prior to the introduction of this patch > > > set. > > > > > > Reviewed-by: Alexander Duyck > > > > Thanks for your review. Just

[PATCH net] bonding: reduce rtnl lock contention in mii monitor thread

2020-12-05 Thread Jarod Wilson
I'm seeing a system get stuck unable to bring a downed interface back up when it's got an updelay value set, behavior which ceased when logging spew was removed from bond_miimon_inspect(). I'm monitoring logs on this system over another network connection, and it seems that the act of spewing logs

Re: [PATCH net] net: mscc: ocelot: fix dropping of unknown IPv4 multicast on Seville

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 19:13:29 +0100 Alexandre Belloni wrote: > On 04/12/2020 19:54:16+0200, Vladimir Oltean wrote: > > The current assumption is that the felix DSA driver has flooding knobs > > per traffic class, while ocelot switchdev has a single flooding knob. > > This was correct for felix VSC995

Re: [pull request][for-next] mlx5-next auxbus support

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 20:26:42 -0400 Jason Gunthorpe wrote: > Jakub a few notes on shared branch process here.. > > In general Linus's advice has been to avoid unnecessary merges so > Saeed/Leon have tended to send PRs to one tree or the other based on > need and that PR might have a "catch up" from

Re: [pull request][for-next] mlx5-next auxbus support

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 10:29:52 -0800 Saeed Mahameed wrote: > This pull request is targeting net-next and rdma-next branches. > > This series provides mlx5 support for auxiliary bus devices. > > It starts with a merge commit of tag 'auxbus-5.11-rc1' from > gregkh/driver-core into mlx5-next, then the

Re: [PATCH] ch_ktls: fix build warning for ipv4-only config

2020-12-05 Thread Jakub Kicinski
On Sun, 6 Dec 2020 00:18:44 +0100 Arnd Bergmann wrote: > > This is for evrey clang build or just W=1+? Would be annoying if clang > > produced this on every build with 5.10 (we need to decide fix vs -next). > > The -Wsometimes-uninitialized is enabled unconditionally for clang, > but this only h

Re: [PATCH v5 0/9] "Task_isolation" mode

2020-12-05 Thread Thomas Gleixner
Pavel, On Sat, Dec 05 2020 at 21:40, Pavel Machek wrote: > So... what kind of guarantees does this aim to provide / what tasks it > is useful for? > > For real time response, we have other approaches. Depends on your requirements. Some problems are actually better solved with busy polling. See be

Re: [PATCH] ch_ktls: fix build warning for ipv4-only config

2020-12-05 Thread Arnd Bergmann
On Sat, Dec 5, 2020 at 2:57 AM Jakub Kicinski wrote: > > On Thu, 3 Dec 2020 23:26:16 +0100 Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > When CONFIG_IPV6 is disabled, clang complains that a variable > > is uninitialized for non-IPv4 data: > > > > drivers/net/ethernet/chelsio/inline_crypto

Re: [PATCH] net: fix spelling mistake "wil" -> "will" in Kconfig

2020-12-05 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 4 Dec 2020 19:45:49 + you wrote: > From: Colin Ian King > > There is a spelling mistake in the Kconfig help text. Fix it. > > Signed-off-by: Colin Ian King > --- > drivers/net/Kconfig | 2 +- > 1 file chan

Re: [PATCH 0/8] pull request for net-next: batman-adv 2020-12-04

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 16:46:23 +0100 Simon Wunderlich wrote: > This cleanup patchset includes the following patches: > > - bump version strings, by Simon Wunderlich > > - update include for min/max helpers, by Sven Eckelmann > > - add infrastructure and netlink functions for routing algo select

Re: [PATCH] enetc: Fix unused var build warning for CONFIG_OF

2020-12-05 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 4 Dec 2020 14:08:00 +0200 you wrote: > From: Arnd Bergmann > > When CONFIG_OF is disabled, there is a harmless warning about > an unused variable: > > enetc_pf.c: In function 'enetc_phylink_create': > enetc_pf.c

Re: [PATCH] [v2] enetc: fix build warning

2020-12-05 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 4 Dec 2020 20:28:59 +0100 you wrote: > From: Arnd Bergmann > > When CONFIG_OF is disabled, there is a harmless warning about > an unused variable: > > enetc_pf.c: In function 'enetc_phylink_create': > enetc_pf.c

Re: [PATCH] octeontx2-pf: Add RSS multi group support

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 14:54:51 +0530 Geetha sowjanya wrote: > Hardware supports 8 RSS groups per interface. Currently we are using > only group '0'. This patch allows user to create new RSS groups/contexts > and use the same as destination for flow steering rules. > > usage: > To steer the traffic t

Re: [PATCH net] net: marvell: prestera: Fix error return code in prestera_port_create()

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 16:49:42 +0800 Zhang Changzhong wrote: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 501ef3066c89 ("net: marvell: prestera: Add driver for Prestera family > ASIC devices") > Reported-by: Hulk Ro

Re: [PATCH 1/1 v3 net-next] ptp: Add clock driver for the OpenCompute TimeCard.

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 13:57:18 -0800 Jakub Kicinski wrote: > On Thu, 3 Dec 2020 19:51:28 -0800 Jonathan Lemon wrote: > > +static int __init > > +ptp_ocp_init(void) > > +{ > > + int err; > > + > > + err = pci_register_driver(&ptp_ocp_driver); > > + return err; > > +} > > + > > +static void __exit

Re: [PATCH 1/1 v3 net-next] ptp: Add clock driver for the OpenCompute TimeCard.

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 05:40:11 -0800 Richard Cochran wrote: > On Thu, Dec 03, 2020 at 07:51:28PM -0800, Jonathan Lemon wrote: > > The OpenCompute time card is an atomic clock along with > > a GPS receiver that provides a Grandmaster clock source > > for a PTP enabled network. > > > > More information

Re: [PATCH 1/1 v3 net-next] ptp: Add clock driver for the OpenCompute TimeCard.

2020-12-05 Thread Jakub Kicinski
On Thu, 3 Dec 2020 19:51:28 -0800 Jonathan Lemon wrote: > +static int __init > +ptp_ocp_init(void) > +{ > + int err; > + > + err = pci_register_driver(&ptp_ocp_driver); > + return err; > +} > + > +static void __exit > +ptp_ocp_fini(void) > +{ > + pci_unregister_driver(&ptp_ocp_drive

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Rasmus Villemoes
> I only noticed because I needed to add a free of the ug_info in a later > patch. Where, ironically, I add a use-after-free bug by freeing ug_info before the ucc_geth_memclean() call. :facepalm:

Re: [PATCH net] vrf: packets with lladdr src needs dst at input with orig_iif when needs strict

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 19:22:27 -0500 Stephen Suryaputra wrote: > On Fri, Dec 04, 2020 at 03:37:48PM -0800, Jakub Kicinski wrote: > > On Fri, 4 Dec 2020 09:32:04 -0700 David Ahern wrote: > > > On 12/3/20 8:06 PM, Stephen Suryaputra wrote: > > > > Depending on the order of the routes to fe80::/64 ar

Re: [PATCH V2 0/5] patches for stmmac

2020-12-05 Thread Jakub Kicinski
On Fri, 4 Dec 2020 10:46:33 +0800 Joakim Zhang wrote: > A patch set for stmmac, fix some driver issues. These don't apply cleanly to the net tree where fixes go: https://patchwork.kernel.org/project/netdevbpf/list/?delegate=netdevĀ¶m=1&order=date Please rebase / retest / repost.

Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Rasmus Villemoes
On 05/12/2020 22.27, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 22:11:39 +0100 Rasmus Villemoes wrote: >>> rebase (retest) and post them against the net tree: >>> >>> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/ >> >> So I thought this would go through Li Yang's tree. That's wh

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Rasmus Villemoes
On 05/12/2020 22.19, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 22:04:28 +0100 Rasmus Villemoes wrote: >> On 05/12/2020 21.48, Jakub Kicinski wrote: >>> On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote: - unregister_netdev(dev); - free_netdev(dev); ucc_geth_memclean(u

[PATCH] net: stmmac: dwmac-meson8b: fix mask definition of the m250_sel mux

2020-12-05 Thread Martin Blumenstingl
The m250_sel mux clock uses bit 4 in the PRG_ETH0 register. Fix this by shifting the PRG_ETH0_CLK_M250_SEL_MASK accordingly as the "mask" in struct clk_mux expects the mask relative to the "shift" field in the same struct. While here, get rid of the PRG_ETH0_CLK_M250_SEL_SHIFT macro and use __ffs(

Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 22:11:39 +0100 Rasmus Villemoes wrote: > > Looks like a nice clean up on a quick look. > > > > Please separate patches 1 and 11 (which are the two bug fixes I see) > > I think patch 2 is a bug fix as well, but I'd like someone from NXP to > comment. Sure, makes sense. > > r

Re: [net 3/3] can: isotp: add SF_BROADCAST support for functional addressing

2020-12-05 Thread Marc Kleine-Budde
On 12/5/20 10:09 PM, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 21:56:33 +0100 Marc Kleine-Budde wrote: >> On 12/5/20 9:33 PM, Jakub Kicinski wrote: What about the (incremental?) change that Thomas Wagner posted? https://lore.kernel.org/r/20201204135557.55599-1-th...@web.de >>> >>>

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 22:04:28 +0100 Rasmus Villemoes wrote: > On 05/12/2020 21.48, Jakub Kicinski wrote: > > On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote: > >> - unregister_netdev(dev); > >> - free_netdev(dev); > >>ucc_geth_memclean(ugeth); > >>if (of_phy_is_fixed_link(np)) >

[PATCH iproute2-next v2 7/7] lib: Move get_size() from tc here

2020-12-05 Thread Petr Machata
The function get_size() serves for parsing of sizes using a handly notation that supports units and their prefixes, such as 10Kbit. This will be useful for the DCB buffer size parsing. Move the function from TC to the general library, so that it can be reused. Signed-off-by: Petr Machata --- inc

[PATCH iproute2-next v2 0/7] Move rate and size parsing and output to lib

2020-12-05 Thread Petr Machata
The DCB tool will have commands that deal with buffer sizes and traffic rates. TC is another tool that has a number of such commands, and functions to support them: get_size(), get_rate/64(), s/print_size() and s/print_rate(). In this patchset, these functions are moved from TC to lib/ for possible

[PATCH iproute2-next v2 3/7] lib: Move sprint_size() from tc here, add print_size()

2020-12-05 Thread Petr Machata
When displaying sizes of various sorts, tc commonly uses the function sprint_size() to format the size into a buffer as a human-readable string. This string is then displayed either using print_string(), or in some code even fprintf(). As a result, a typical sequence of code when formatting a size

[PATCH iproute2-next v2 2/7] lib: Move print_rate() from tc here; modernize

2020-12-05 Thread Petr Machata
The functions print_rate() and sprint_rate() are useful for formatting rate-like values. The DCB tool would find these useful in the maxrate subtool. However, the current interface to these functions uses a global variable use_iec as a flag indicating whether 1024- or 1000-based powers should be us

[PATCH iproute2-next v2 5/7] lib: print_color_rate(): Fix formatting small rates in IEC mode

2020-12-05 Thread Petr Machata
ISO/IEC units are distinguished from the decadic ones by using a prefixes like "Ki", "Mi" instead of "K" and "M". The current code inserts the letter "i" after the decadic unit when in IEC mode. However it does so even when the prefix is an empty string, formatting 1Kbit in IEC mode as "1000ibit".

[PATCH iproute2-next v2 6/7] lib: Move get_rate(), get_rate64() from tc here

2020-12-05 Thread Petr Machata
The functions get_rate() and get_rate64() are useful for parsing rate-like values. The DCB tool will find these useful in the maxrate subtool. Move them over to lib so that they can be easily reused. Signed-off-by: Petr Machata --- include/utils.h | 2 ++ lib/utils.c | 79 ++

[PATCH iproute2-next v2 4/7] lib: sprint_size(): Uncrustify the code a bit

2020-12-05 Thread Petr Machata
Ideally this and the rate printing would both be converted to a common helper, but unfortunately the two format differently and this would break tests and scripts out there. So just make the code look less like a wad of hay. Signed-off-by: Petr Machata --- Notes: v2: - This patch is new.

[PATCH iproute2-next v2 1/7] Move the use_iec declaration to the tools

2020-12-05 Thread Petr Machata
The tools "ip" and "tc" use a flag "use_iec", which indicates whether, when formatting rate values, the prefixes "K", "M", etc. should refer to powers of 1024, or powers of 1000. The flag is currently kept as a global variable in "ip" and "tc", but is nonetheless declared in util.h. Instead, move

Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Rasmus Villemoes
On 05/12/2020 21.53, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 20:17:23 +0100 Rasmus Villemoes wrote: >> While trying to figure out how to allow bumping the MTU with the >> ucc_geth driver, I fell into a rabbit hole and stumbled on a whole >> bunch of issues of varying importance - some are outri

Re: [net 3/3] can: isotp: add SF_BROADCAST support for functional addressing

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 21:56:33 +0100 Marc Kleine-Budde wrote: > On 12/5/20 9:33 PM, Jakub Kicinski wrote: > >> What about the (incremental?) change that Thomas Wagner posted? > >> > >> https://lore.kernel.org/r/20201204135557.55599-1-th...@web.de > > > > That settles it :) This change needs to got

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Rasmus Villemoes
On 05/12/2020 21.48, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote: >> -unregister_netdev(dev); >> -free_netdev(dev); >> ucc_geth_memclean(ugeth); >> if (of_phy_is_fixed_link(np)) >> of_phy_deregister_fixed_link(np); >> of_node

Re: [PATCH] ch_ktls: fix build warning for ipv4-only config

2020-12-05 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 3 Dec 2020 23:26:16 +0100 you wrote: > From: Arnd Bergmann > > When CONFIG_IPV6 is disabled, clang complains that a variable > is uninitialized for non-IPv4 data: > > drivers/net/ethernet/chelsio/inline_crypto/ch_ktl

Re: [PATCH AUTOSEL 5.9 22/33] vhost scsi: add lun parser helper

2020-12-05 Thread Sasha Levin
On Fri, Dec 04, 2020 at 06:08:13PM +0100, Paolo Bonzini wrote: On 04/12/20 16:49, Sasha Levin wrote: On Fri, Dec 04, 2020 at 09:27:28AM +0100, Paolo Bonzini wrote: On 01/12/20 00:59, Sasha Levin wrote: It's quite easy to NAK a patch too, just reply saying "no" and it'll be dropped (just like

Re: [net 3/3] can: isotp: add SF_BROADCAST support for functional addressing

2020-12-05 Thread Marc Kleine-Budde
On 12/5/20 9:33 PM, Jakub Kicinski wrote: >> What about the (incremental?) change that Thomas Wagner posted? >> >> https://lore.kernel.org/r/20201204135557.55599-1-th...@web.de > > That settles it :) This change needs to got into -next and 5.11. Ok. Can you take patch 1, which is a real fix: htt

Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 20:17:23 +0100 Rasmus Villemoes wrote: > While trying to figure out how to allow bumping the MTU with the > ucc_geth driver, I fell into a rabbit hole and stumbled on a whole > bunch of issues of varying importance - some are outright bug fixes, > while most are a matter of simp

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote: > - unregister_netdev(dev); > - free_netdev(dev); > ucc_geth_memclean(ugeth); > if (of_phy_is_fixed_link(np)) > of_phy_deregister_fixed_link(np); > of_node_put(ugeth->ug_info->tbi_node); > of_no

Re: [PATCH v5 0/9] "Task_isolation" mode

2020-12-05 Thread Pavel Machek
Hi! > General description > > This is the result of development and maintenance of task isolation > functionality that originally started based on task isolation patch > v15 and was later updated to include v16. It provided predictable > environment for userspace tasks running on arm64 processors

Re: [PATCH v2 bpf-next 0/3] bpf: support module BTF in BTF display helpers

2020-12-05 Thread Yonghong Song
On 12/5/20 12:35 PM, Yonghong Song wrote: On 12/4/20 10:48 AM, Alan Maguire wrote: This series aims to add support to bpf_snprintf_btf() and bpf_seq_printf_btf() allowing them to store string representations of module-specific types, as well as the kernel-specific ones they currently suppor

Re: [PATCH v2 bpf-next 0/3] bpf: support module BTF in BTF display helpers

2020-12-05 Thread Yonghong Song
On 12/4/20 10:48 AM, Alan Maguire wrote: This series aims to add support to bpf_snprintf_btf() and bpf_seq_printf_btf() allowing them to store string representations of module-specific types, as well as the kernel-specific ones they currently support. Patch 1 removes the btf_module_mutex, as

Re: [net 3/3] can: isotp: add SF_BROADCAST support for functional addressing

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 21:24:42 +0100 Marc Kleine-Budde wrote: > On 12/5/20 12:26 PM, Oliver Hartkopp wrote: > > On 05.12.20 04:44, Jakub Kicinski wrote: > >> On Fri, 4 Dec 2020 14:35:08 +0100 Marc Kleine-Budde wrote: > >>> From: Oliver Hartkopp > >>> > >>> When CAN_ISOTP_SF_BROADCAST is set in t

Re: [PATCH net-next v4] devlink: Add devlink port documentation

2020-12-05 Thread Jakub Kicinski
On Thu, 3 Dec 2020 20:02:55 +0200 Parav Pandit wrote: > Added documentation for devlink port and port function related commands. > > Signed-off-by: Parav Pandit > Reviewed-by: Jiri Pirko > Reviewed-by: Jacob Keller > + > +Devlink Port > + > + > +``devlink-port`` is a po

Re: [net 3/3] can: isotp: add SF_BROADCAST support for functional addressing

2020-12-05 Thread Marc Kleine-Budde
On 12/5/20 12:26 PM, Oliver Hartkopp wrote: > > > On 05.12.20 04:44, Jakub Kicinski wrote: >> On Fri, 4 Dec 2020 14:35:08 +0100 Marc Kleine-Budde wrote: >>> From: Oliver Hartkopp >>> >>> When CAN_ISOTP_SF_BROADCAST is set in the CAN_ISOTP_OPTS flags the CAN_ISOTP >>> socket is switched into fun

Re: vlan_filtering=1 breaks all traffic

2020-12-05 Thread Rasmus Villemoes
On 05/12/2020 20.03, Vladimir Oltean wrote: > Hi Rasmus, > > On Sat, Dec 05, 2020 at 03:49:02PM +0100, Rasmus Villemoes wrote: >> So I'm out of ideas. I also tried booting a 5.3, but that had some >> horrible UBI/nand failure, > > Test with a ramdisk maybe? > >> and since the mv88e6250 support o

Re: [PATCH] net: stmmac: implement .set_intf_mode() callback for imx8dxl

2020-12-05 Thread Jakub Kicinski
On Thu, 3 Dec 2020 12:10:38 +0800 Joakim Zhang wrote: > From: Fugang Duan > > Implement .set_intf_mode() callback for imx8dxl. > > Signed-off-by: Fugang Duan > Signed-off-by: Joakim Zhang Couple minor issues. > @@ -86,7 +88,37 @@ imx8dxl_set_intf_mode(struct plat_stmmacenet_data > *plat_da

Re: [PATCH net-next] bonding: correct rr balancing during link failure

2020-12-05 Thread Jakub Kicinski
On Wed, 02 Dec 2020 20:55:57 + Lars Everbrand wrote: > This patch updates the sending algorithm for roundrobin to avoid > over-subscribing interface(s) when one or more interfaces in the bond is > not able to send packets. This happened when order was not random and > more than 2 interfaces wer

Re: [resend/standalone PATCH v4] Add auxiliary bus support

2020-12-05 Thread Greg KH
On Fri, Dec 04, 2020 at 08:41:09AM -0800, Dan Williams wrote: > On Fri, Dec 4, 2020 at 3:41 AM Greg KH wrote: > > > > On Wed, Dec 02, 2020 at 04:54:24PM -0800, Dan Williams wrote: > > > From: Dave Ertman > > > > > > Add support for the Auxiliary Bus, auxiliary_device and auxiliary_driver. > > > I

[PATCH 01/20] ethernet: ucc_geth: set dev->max_mtu to 1518

2020-12-05 Thread Rasmus Villemoes
All the buffers and registers are already set up appropriately for an MTU slightly above 1500, so we just need to expose this to the networking stack. AFAICT, there's no need to implement .ndo_change_mtu when the receive buffers are always set up to support the max_mtu. This fixes several warnings

[PATCH 13/20] ethernet: ucc_geth: constify ugeth_primary_info

2020-12-05 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index 700eafef4921..a06744d8b4af 100644 --- a/drivers/net/ethern

[PATCH 14/20] ethernet: ucc_geth: don't statically allocate eight ucc_geth_info

2020-12-05 Thread Rasmus Villemoes
struct ucc_geth_info is somewhat large, and on systems with only one or two UCC instances, that just wastes a few KB of memory. So allocate and populate a chunk of memory at probe time instead of initializing them all during driver init. Note that the existing "ug_info == NULL" check was dead code

[PATCH 20/20] ethernet: ucc_geth: simplify rx/tx allocations

2020-12-05 Thread Rasmus Villemoes
Since kmalloc() is nowadays [1] guaranteed to return naturally aligned (i.e., aligned to the size itself) memory for power-of-2 sizes, we don't need to over-allocate the align amount, compute an aligned address within the allocation, and (for later freeing) also storing the original pointer [2]. I

[PATCH 17/20] ethernet: ucc_geth: replace kmalloc_array()+for loop by kcalloc()

2020-12-05 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index c9f619908561..3aebea191b52 100644 --- a/dr

[PATCH 16/20] ethernet: ucc_geth: remove bd_mem_part and all associated code

2020-12-05 Thread Rasmus Villemoes
The bd_mem_part member of ucc_geth_info always has the value MEM_PART_SYSTEM, and AFAICT, there has never been any code setting it to any other value. Moreover, muram is a somewhat precious resource, so there's no point using that when normal memory serves just as well. Apart from removing a lot o

[PATCH 19/20] ethernet: ucc_geth: inform the compiler that numQueues is always 1

2020-12-05 Thread Rasmus Villemoes
The numQueuesTx and numQueuesRx members of struct ucc_geth_info are never set to anything but 1, and never have been. It's unclear how well the code supporting multiple queues would work. Until somebody wants to play with enabling that, help the compiler eliminate a lot of dead code and loops that

[PATCH 18/20] ethernet: ucc_geth: add helper to replace repeated switch statements

2020-12-05 Thread Rasmus Villemoes
The translation from the ucc_geth_num_of_threads enum value to the actual count can be written somewhat more compactly with a small lookup table, allowing us to replace the four switch statements. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 100 +--

[PATCH 15/20] ethernet: ucc_geth: use UCC_GETH_{RX,TX}_BD_RING_ALIGNMENT macros directly

2020-12-05 Thread Rasmus Villemoes
These macros both have the value 32, there's no point first initializing align to a lower value. If anything, one could throw in a BUILD_BUG_ON(UCC_GETH_TX_BD_RING_ALIGNMENT < 4), but it's not worth it - lots of code depends on named constants having sensible values. Signed-off-by: Rasmus Villemo

[PATCH 10/20] ethernet: ucc_geth: remove {rx,tx}_glbl_pram_offset from struct ucc_geth_private

2020-12-05 Thread Rasmus Villemoes
These fields are only used within ucc_geth_startup(), so they might as well be local variables in that function rather than being stashed in struct ucc_geth_private. Aside from making that struct a tiny bit smaller, it also shortens some lines (getting rid of pointless casts while here), and fixes

[PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Rasmus Villemoes
ugeth is the netdiv_priv() part of the netdevice. Accessing the memory pointed to by ugeth (such as done by ucc_geth_memclean() and the two of_node_puts) after free_netdev() is thus use-after-free. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 4 ++-- 1 file cha

[PATCH 12/20] ethernet: ucc_geth: factor out parsing of {rx,tx}-clock{,-name} properties

2020-12-05 Thread Rasmus Villemoes
Reduce the code duplication a bit by moving the parsing of rx-clock-name and the fallback handling to a helper function. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 79 ++- 1 file changed, 35 insertions(+), 44 deletions(-) diff --git a/dri

[PATCH 07/20] ethernet: ucc_geth: use qe_muram_free_addr()

2020-12-05 Thread Rasmus Villemoes
This removes the explicit NULL checks, and allows us to stop storing at least some of the _offset values separately. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 77 ++- 1 file changed, 33 insertions(+), 44 deletions(-) diff --git a/drivers

[PATCH 08/20] ethernet: ucc_geth: remove unnecessary memset_io() calls

2020-12-05 Thread Rasmus Villemoes
These buffers have all just been handed out from qe_muram_alloc(), aka cpm_muram_alloc(), and the helper cpm_muram_alloc_common() already does memset_io(cpm_muram_addr(start), 0, size); Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 19 --

[PATCH 09/20] ethernet: ucc_geth: replace kmalloc+memset by kzalloc

2020-12-05 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index f854ff90f238..e1574c14b7e5 100644 --- a/drivers/net/et

[PATCH 02/20] ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram

2020-12-05 Thread Rasmus Villemoes
Table 8-53 in the QUICC Engine Reference manual shows definitions of fields up to a size of 192 bytes, not just 128. But in table 8-111, one does find the text Base Address of the Global Transmitter Parameter RAM Page. [...] The user needs to allocate 128 bytes for this page. The address must

[PATCH 03/20] ethernet: ucc_geth: remove unused read of temoder field

2020-12-05 Thread Rasmus Villemoes
In theory, such a read-after-write might be required by the hardware, but nothing in the data sheet suggests that to be the case. The name test also suggests that it's some debug leftover. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 3 --- 1 file changed, 3 de

[PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Rasmus Villemoes
While trying to figure out how to allow bumping the MTU with the ucc_geth driver, I fell into a rabbit hole and stumbled on a whole bunch of issues of varying importance - some are outright bug fixes, while most are a matter of simplifying the code to make it more accessible. At the end of digging

Re: [PATCH bpf] tools/bpftool: fix PID fetching with a lot of results

2020-12-05 Thread Yonghong Song
On 12/4/20 3:20 PM, Andrii Nakryiko wrote: In case of having so many PID results that they don't fit into a singe page (4096) bytes, bpftool will erroneously conclude that it got corrupted data due to 4096 not being a multiple of struct pid_iter_entry, so the last entry will be partially trunc

  1   2   >