Re: [PATCH net-next 13/15] mlxsw: spectrum_router_xm: Introduce basic XM cache flushing

2020-12-14 Thread Jiri Pirko
Sat, Dec 12, 2020 at 06:25:02PM CET, ido...@idosch.org wrote: >On Fri, Dec 11, 2020 at 08:24:27PM -0800, Jakub Kicinski wrote: >> On Fri, 11 Dec 2020 19:04:11 +0200 Ido Schimmel wrote: >> > From: Jiri Pirko >> > >> > Upon route insertion and removal, it is needed to flush possibly cached >> > ent

Re: [PATCH net-next v3 0/4] vsock: Add flags field in the vsock address

2020-12-14 Thread Stefano Garzarella
On Sat, Dec 12, 2020 at 09:16:08AM -0800, Jakub Kicinski wrote: On Fri, 11 Dec 2020 16:24:13 +0100 Stefano Garzarella wrote: On Fri, Dec 11, 2020 at 12:32:37PM +0200, Andra Paraschiv wrote: >vsock enables communication between virtual machines and the host they are >running on. Nested VMs can be

Re: [PATCH] bpf,x64: pad NOPs to make images converge more easily

2020-12-14 Thread Gary Lin
On Mon, Dec 14, 2020 at 11:56:22AM +0800, Gary Lin wrote: > On Fri, Dec 11, 2020 at 09:05:05PM +0100, Daniel Borkmann wrote: > > On 12/11/20 9:19 AM, Gary Lin wrote: > > > The x64 bpf jit expects bpf images converge within the given passes, but > > > it could fail to do so with some corner cases. F

Re: [PATCH net-next v2] GTP: add support for flow based tunneling API

2020-12-14 Thread Jonas Bonn
Hi Pravin, On 13/12/2020 20:32, Pravin Shelar wrote: On Sat, Dec 12, 2020 at 11:56 PM Jonas Bonn wrote: Hi Pravin, I've been thinking a bit about this and find it more and more interesting. Could you post a bit of information about the ip-route changes you'll make in order to support GTP LW

Re: [PATCH ethtool] ethtool: do_sset return correct value on fail

2020-12-14 Thread Michal Kubecek
On Sun, Dec 13, 2020 at 04:25:03PM +0200, Tariq Toukan wrote: > From: Roy Novich > > The return value for do_sset was constant and returned 0. > This value is misleading when returned on operation failure. > Changed return value to the correct function err status. > > Fixes: 32c8037055f5 ("Initi

[PATCH bpf] xsk: fix memory leak for failed bind

2020-12-14 Thread Magnus Karlsson
From: Magnus Karlsson Fix a possible memory leak when a bind of an AF_XDP socket fails. When the fill and completion rings are created, they are tied to the socket. But when the buffer pool is later created at bind time, the ownership of these two rings are transferred to the buffer pool as they

Re: [PATCH bpf] xsk: fix race in SKB mode transmit with shared cq

2020-12-14 Thread Magnus Karlsson
On Fri, Dec 11, 2020 at 8:47 AM Magnus Karlsson wrote: > > On Thu, Dec 10, 2020 at 10:53 PM Alexei Starovoitov > wrote: > > > > On Thu, Dec 10, 2020 at 7:36 AM Magnus Karlsson > > wrote: > > > > > > From: Magnus Karlsson > > > > > > Fix a race when multiple sockets are simultaneously calling se

linux-next: build warnings after merge of the net-next tree

2020-12-14 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (htmldocs) produced these warnings: include/net/cfg80211.h:1759: warning: Cannot understand * @struct cfg80211_sar_chan_ranges - sar frequency ranges on line 1759 - I thought it was a doc line include/net/cfg80211.h:1759: warnin

Re: [PATCH v2 3/3] net: mhi: Add dedicated alloc thread

2020-12-14 Thread Loic Poulain
Hi Jakub, On Sat, 12 Dec 2020 at 21:55, Jakub Kicinski wrote: > > On Thu, 10 Dec 2020 12:15:51 +0100 Loic Poulain wrote: > > The buffer allocation for RX path is currently done by a work executed > > in the system workqueue. The work to do is quite simple and consists > > mostly in allocating and

Re: [PATCH 1/3] PCI/ASPM: Use the path max in L1 ASPM latency check

2020-12-14 Thread Ian Kumlien
On Mon, Dec 14, 2020 at 6:44 AM Bjorn Helgaas wrote: > > [+cc Jesse, Tony, David, Jakub, Heiner, lists in case there's an ASPM > issue with I211 or Realtek NICs. Beginning of thread: > https://lore.kernel.org/r/20201024205548.1837770-1-ian.kuml...@gmail.com > > Short story: Ian has: > > Root Po

[PATCH 00/25] net: stmmac: Fix clocks/reset-related procedures

2020-12-14 Thread Serge Semin
Baikal-T1 SoC is equipped with two Synopsys DesignWare GMAC v3.73a-based ethernet interfaces with no internal Ethernet PHY attached. The IP-cores are configured as GMAC-AXI with CSR interface clocked by a dedicated signal. Each of which has got Rx/Tx FIFOs of 16KB, up to 8 MAC addresses capability,

Re: [PATCH v17 3/3] bus: mhi: Add userspace client interface driver

2020-12-14 Thread Daniele Palmas
Hello, Il giorno dom 13 dic 2020 alle ore 15:22 Manivannan Sadhasivam ha scritto: > > On Fri, Dec 11, 2020 at 08:08:16PM -0800, Jakub Kicinski wrote: > > On Fri, 11 Dec 2020 11:37:34 -0600 Dan Williams wrote: > > > Just to re-iterate: QMI ~= AT commands ~= MBIM (not quite, but same > > > level) >

[PATCH 11/25] net: stmmac: dwmac-stm32: Cleanup STMMAC DT-config in remove cb

2020-12-14 Thread Serge Semin
The stmmac_remove_config_dt() method needs to be called on the device remove procedure otherwise for at least some of device-nodes will be left requested. Fixes: d2ed0a7755fe ("net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks") Signed-off-by: Serge Semin --- drivers/net/ethernet/s

[PATCH 05/25] dt-bindings: net: dwmac: Elaborate stmmaceth/pclk description

2020-12-14 Thread Serge Semin
Current clocks description doesn't provide a comprehensive notion about what "stmmaceth" and "pclk" actually represent from the IP-core manual point of view. The bindings file states: stmmaceth - "GMAC main clock", apb - "Peripheral registers interface clock". It isn't that easy to understand what

[PATCH 12/25] net: stmmac: Directly call reverse methods in stmmac_probe_config_dt()

2020-12-14 Thread Serge Semin
Calling an antagonistic method from the corresponding protagonist isn't good from maintainability point of view, since prevents us from directly adding a functionality in the later, which needs to be reverted in the former. Since that's what we are about to do in order to fix the commit 573c0b9c4e0

[PATCH 07/25] dt-bindings: net: dwmac: Detach Generic DW MAC bindings

2020-12-14 Thread Serge Semin
Currently the snps,dwmac.yaml DT bindings file is used for both DT nodes describing generic DW MAC devices and as DT schema with common properties to be evaluated against a vendor-specific DW MAC IP-cores. Due to such dual-purpose design the "compatible" property of the common DW MAC schema needs t

[PATCH 20/25] net: stmmac: Add Tx/Rx platform clocks support

2020-12-14 Thread Serge Semin
Depending on the DW *MAC configuration it can be at least connected to an external Transmit clock, but in some cases to an external Receive clock generator. In order to simplify/unify the sub-drivers code and to prevent having the same clocks named differently add the Tx/Rx clocks support to the ge

[PATCH 17/25] net: stmmac: Use optional reset control API to work with stmmaceth

2020-12-14 Thread Serge Semin
Replace the manual implementation of the optional device reset control functionality with using the devm_reset_control_get_optional() method in order to improve the code maintainability and fix a potential bug. It will come out if the reset control handler has been specified, but the reset framewor

[PATCH 23/25] net: stmmac: Call stmmaceth clock as system clock in warn-message

2020-12-14 Thread Serge Semin
By all means of the stmmac_clk clock usage it isn't CSR clock, but the system or application clock, which in particular cases can be used as a clock source for the CSR interface. Make sure the warning message correctly identify the clock. Signed-off-by: Serge Semin --- drivers/net/ethernet/stmic

[PATCH 18/25] net: stmmac: dwc-qos: Cleanup STMMAC platform data clock pointers

2020-12-14 Thread Serge Semin
The pointers need to be nullified otherwise the stmmac_remove_config_dt() method called after them being initialized will disable the clocks. That then will cause a WARN() backtrace being printed since the clocks would be also disabled in the locally defined remove method. Signed-off-by: Serge Sem

[PATCH 16/25] net: stmmac: Use optional clock request method to get ptp_clk

2020-12-14 Thread Serge Semin
Let's replace the manual implementation of the optional ptp_clk functionality with method devm_clk_get_optional() provided by the common clock kernel framework. First of all it will be better from maintainability point of view. Secondly by doing so we'll also fix a potential problem, which will com

[PATCH 24/25] net: stmmac: Use pclk to set MDC clock frequency

2020-12-14 Thread Serge Semin
In accordance with [1] the MDC clock frequency is supposed to be selected with respect to the CSR clock frequency. CSR clock can be either tied to the DW MAC system clock (GMAC main clock) or supplied via a dedicated clk_csr_i signal. Current MDC clock selection procedure handles the former case wh

[PATCH 03/25] dt-bindings: net: dwmac: Fix the TSO property declaration

2020-12-14 Thread Serge Semin
Indeed the STMMAC driver doesn't take the vendor-specific compatible string into account to parse the "snps,tso" boolean property. It just makes sure the node is compatible with DW MAC 4.x, 5.x and DW xGMAC IP-cores. Fix the conditional statement so the TSO-property would be evaluated for the compa

[PATCH 04/25] dt-bindings: net: dwmac: Refactor snps,*-config properties

2020-12-14 Thread Serge Semin
Currently the "snps,axi-config", "snps,mtl-rx-config" and "snps,mtl-tx-config" properties are declared as a single phandle reference to a node with corresponding parameters defined. That's not good for several reasons. First of all scattering around a device tree some particular device-specific con

[PATCH 06/25] dt-bindings: net: dwmac: Add Tx/Rx clock sources

2020-12-14 Thread Serge Semin
Generic DW *MAC can be connected to an external Tramit and Receive clock generators. Add the corresponding clocks description and clock-names to the generic bindings schema so new DW *MAC-based bindings wouldn't declare its own names of the same clocks. Signed-off-by: Serge Semin --- .../devicet

[PATCH 14/25] net: stmmac: Use optional clock request method to get stmmaceth

2020-12-14 Thread Serge Semin
The "stmmaceth" clock is expected to be optional by the current driver design, but there are several problems in the implementation. First if the clock is specified, but failed to be requested due to an internal error or due to not being ready yet for configuration, then the DT-probe procedure will

[PATCH 09/25] net: stmmac: dwmac-rk: Cleanup STMMAC DT-config in remove cb

2020-12-14 Thread Serge Semin
The stmmac_remove_config_dt() method needs to be called on the device remove procedure otherwise for at least some of device-nodes will be left requested. Fixes: d2ed0a7755fe ("net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks") Signed-off-by: Serge Semin --- drivers/net/ethernet/s

[PATCH 13/25] net: stmmac: Fix clocks left enabled on glue-probes failure

2020-12-14 Thread Serge Semin
The generic clocks request and preparation have been moved from stmmac_dvr_probe()/stmmac_init_ptp() to the stmmac_probe_config_dt() method in the framework of commit f573c0b9c4e0 ("stmmac: move stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to platform structure"). At the same time the clocks disabl

[PATCH 19/25] net: stmmac: dwc-qos: Use dev_err_probe() for probe errors handling

2020-12-14 Thread Serge Semin
There is a very handy dev_err_probe() method to handle the deferred probe error number. It reduces the code size, uniforms error handling, records the defer probe reason, etc. Use it to print the probe callback error message. Signed-off-by: Serge Semin Cc: Anson Huang --- drivers/net/ethernet/s

[PATCH 25/25] net: stmmac: dwc-qos: Save master/slave clocks in the plat-data

2020-12-14 Thread Serge Semin
Currently the "master_bus" clock of the DW QoS Eth controller isn't preserved in the STMMAC platform data, while the "slave_bus" clock is assigned to the stmmaceth clock pointer. It isn't correct from the platform clock bindings point of view. The "stmmaceth" clock is supposed to be the system cloc

[PATCH 15/25] net: stmmac: Use optional clock request method to get pclk

2020-12-14 Thread Serge Semin
Let's replace the manual implementation of the optional "pclk" functionality with using devm_clk_get_optional(). By doing so we'll improve the code maintainability, and fix a hidden bug which will cause problems if the "pclk" clock has been actually passed to the device, but the clock framework fai

[PATCH 10/25] net: stmmac: dwmac-sti: Cleanup STMMAC DT-config in remove cb

2020-12-14 Thread Serge Semin
The stmmac_remove_config_dt() method needs to be called on the device remove procedure otherwise for at least some of device-nodes will be left requested. Fixes: d2ed0a7755fe ("net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks") Signed-off-by: Serge Semin --- drivers/net/ethernet/s

[RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-14 Thread Serge Semin
Hello folks, I've got a problem, which has been blowing by head up for more than three weeks now, and I'm desperately need your help in that matter. See our Baikal-T1 SoC is created with two DW GMAC v3.73a IP-cores. Each core has been synthesized with two GPIOs: one as GPI and another as GPO. Ther

[PATCH 21/25] net: stmmac: dwc-qos: Discard Tx/Rx clocks request

2020-12-14 Thread Serge Semin
Since the Tx/Rx clocks with the same names are now requested and enabled/disabled in the STMMAC DT-based platform config method, there is no need in duplicating the same procedures in the DWC QoS Eth sub-driver. Discard it then, but make sure the denoted clocks have been specified for the platform.

[PATCH 22/25] net: stmmac: dwmac-imx: Discard Tx clock request

2020-12-14 Thread Serge Semin
Since the Tx clock is now requested and enabled/disabled in the STMMAC DT-based platform config method, there is no need in duplicating the same procedures in the DW MAC iMX sub-driver. Signed-off-by: Serge Semin --- .../net/ethernet/stmicro/stmmac/dwmac-imx.c | 21 +-- 1 file

[PATCH 08/25] net: stmmac: Add snps,*-config sub-nodes support

2020-12-14 Thread Serge Semin
Currently the "snps,axi-config", "snps,mtl-rx-config" and "snps,mtl-tx-config" DT node properties are marked as deprecated when being defined as a phandle reference to a node with parameters. The new way of defining the DW MAC interfaces config is to add an eponymous sub-nodes to the DW MAC device

[PATCH 02/25] dt-bindings: net: dwmac: Extend number of PBL values

2020-12-14 Thread Serge Semin
In accordance with [1] the permitted PBL values can be set as one of [1, 2, 4, 8, 16, 32]. The rest of the values results in undefined behavior. At the same time some of the permitted values can be also invalid depending on the controller FIFOs size and the data bus width. Seeing due to having too

[PATCH 01/25] dt-bindings: net: dwmac: Validate PBL for all IP-cores

2020-12-14 Thread Serge Semin
Indeed the maximum DMA burst length can be programmed not only for DW xGMACs, Allwinner EMACs and Spear SoC GMAC, but in accordance with [1] for Generic DW *MAC IP-cores. Moreover the STMMAC set of drivers parse the property and then apply the configuration for all supported DW MAC devices. All of

Re: [PATCH v3 net-next 2/4] net: dsa: Link aggregation support

2020-12-14 Thread Tobias Waldekranz
On Sun, Dec 13, 2020 at 22:18, Tobias Waldekranz wrote: > On Sat, Dec 12, 2020 at 16:26, Vladimir Oltean wrote: >> On Fri, Dec 11, 2020 at 09:50:24PM +0100, Tobias Waldekranz wrote: >>> 2. The issue Vladimir mentioned above. This is also a straight forward >>>fix, I have patch for tag_dsa, ma

Re: [PATCH bpf] xsk: fix memory leak for failed bind

2020-12-14 Thread Björn Töpel
On 2020-12-14 09:51, Magnus Karlsson wrote: From: Magnus Karlsson Fix a possible memory leak when a bind of an AF_XDP socket fails. When the fill and completion rings are created, they are tied to the socket. But when the buffer pool is later created at bind time, the ownership of these two rin

Re: [PATCH] net: korina: remove busy skb free

2020-12-14 Thread Julian Wiedmann
On 13.12.20 18:20, Vincent Stehlé wrote: > The ndo_start_xmit() method must not attempt to free the skb to transmit > when returning NETDEV_TX_BUSY. Fix the korina_send_packet() function > accordingly. > > Fixes: ef11291bcd5f ("Add support the Korina (IDT RC32434) Ethernet MAC") > Signed-off-by: V

Re: [RFC] ravb: Add support for optional txc_refclk

2020-12-14 Thread Geert Uytterhoeven
Hi Adam, On Sun, Dec 13, 2020 at 5:18 PM Adam Ford wrote: > The SoC expects the txv_refclk is provided, but if it is provided > by a programmable clock, there needs to be a way to get and enable > this clock to operate. It needs to be optional since it's only > necessary for those with programma

[PATCH v2] net/mlx4: Use true,false for bool variable

2020-12-14 Thread Vasyl Gomonovych
It is fix for semantic patch warning available in scripts/coccinelle/misc/boolinit.cocci Fix en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable Fix main.c:4465:5-13: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Vasyl Gomonovych --- - Add coccicheck script name - Simplif

INFO: task hung in cfg80211_event_work

2020-12-14 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:a68a0262 mm/madvise: remove racy mm ownership check git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15bb941350 kernel config: https://syzkaller.appspot.com/x/.config?x=59df2a4dced5f928 dashboard li

[PATCH iproute2-next v2] iplink:macvlan: Added bcqueuelen parameter

2020-12-14 Thread Thomas Karlsson
This patch allows the user to set and retrieve the IFLA_MACVLAN_BC_QUEUE_LEN parameter via the bcqueuelen command line argument This parameter controls the requested size of the queue for broadcast and multicast packages in the macvlan driver. If not specified, the driver default (1000) will be u

Re: [RFC] net: stmmac: Problem with adding the native GPIOs support

2020-12-14 Thread Alexandre Torgue
Hi Serge, Sorry I never used GPIO provided by DWMAC IP. Obviously, I think is to late for you to use GPIOs provided by your SoC directly. Unfortunately, it seems to be a "perfect" chicken and eggs problem :(. Do you have possibilty to "play" with gpio setting. I mean change configuration of

[PATCH] samples/bpf/Makefile: Create tools/testing/selftests/bpf dir

2020-12-14 Thread Hui Zhu
From: Hui Zhu Got an error when I built samples/bpf in a separate directory: make O=../bk/ defconfig make -j64 bzImage make headers_install make V=1 M=samples/bpf ... ... make -C /home/teawater/kernel/linux/samples/bpf/../..//tools/build CFLAGS= LDFLAGS= fixdep make -f /home/teawater/kernel/linux

Re: [PATCH v2] net/mlx4: Use true,false for bool variable

2020-12-14 Thread Leon Romanovsky
On Mon, Dec 14, 2020 at 11:30:08AM +0100, Vasyl Gomonovych wrote: > It is fix for semantic patch warning available in > scripts/coccinelle/misc/boolinit.cocci > Fix en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable > Fix main.c:4465:5-13: WARNING: Comparison of 0/1 to bool variable > >

Re: [PATCH bpf] xsk: fix memory leak for failed bind

2020-12-14 Thread Maciej Fijalkowski
On Mon, Dec 14, 2020 at 09:51:27AM +0100, Magnus Karlsson wrote: > From: Magnus Karlsson > > Fix a possible memory leak when a bind of an AF_XDP socket fails. When > the fill and completion rings are created, they are tied to the > socket. But when the buffer pool is later created at bind time, t

[PATCH] devlink: use _BITUL() macro instead of BIT() in the UAPI header

2020-12-14 Thread Tobias Klauser
The BIT() macro is not available for the UAPI headers. Moreover, it can be defined differently in user space headers. Thus, replace its usage with the _BITUL() macro which is already used in other macro definitions in . Fixes: dc64cc7c6310 ("devlink: Add devlink reload limit option") Signed-off-by

[PATCH net-next v2 00/15] mlxsw: Introduce initial XM router support

2020-12-14 Thread Ido Schimmel
From: Ido Schimmel This patch set implements initial eXtended Mezzanine (XM) router support. The XM is an external device connected to the Spectrum-{2,3} ASICs using dedicated Ethernet ports. Its purpose is to increase the number of routes that can be offloaded to hardware. This is achieved by h

[PATCH net-next v2 12/15] mlxsw: reg: Add Router LPM Cache Enable Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The RLPMCE allows disabling the LPM cache. Can be changed on the fly. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/net/ethernet/mellanox

[PATCH net-next v2 05/15] mlxsw: Ignore ports that are connected to eXtended mezanine

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko Use the info stored in the bus_info struct about the eXtended mezanine connected ports and don't expose them. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c | 12 drivers/net/ethernet/mellanox/mlxsw/core.h

[PATCH net-next v2 11/15] mlxsw: reg: Add Router LPM Cache ML Delete Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The RLCMLD register is used to bulk delete the XLT-LPM cache ML entries. This can be used by SW when L is increased or decreased, thus need to remove entries with old ML values. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.

[PATCH net-next v2 15/15] mlxsw: spectrum_router: Use eXtended mezzanine to offload IPv4 router

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko In case the eXtended mezzanine is present on the system, use it for IPv4 router offload. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c| 4 +++- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h| 1 +

[PATCH net-next v2 04/15] mlxsw: pci: Obtain info about ports used by eXtended mezanine

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The output of boardinfo command was extended to contain information about XM. Indicates if is present and in case it is, tells which localports are used for the connection. So parse this info and store it in bus_info passed up to the driver. Signed-off-by: Jiri Pirko Signed-off

[PATCH net-next v2 02/15] mlxsw: reg: Add Router XLT Enable Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The RXLTE enables XLT (eXtended Lookup Table) LPM lookups if a capable XM is present on the system. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 44 +++ 1 file changed, 44 insertions(+) diff --git a

Re: [PATCH bpf] xsk: fix memory leak for failed bind

2020-12-14 Thread Magnus Karlsson
On Mon, Dec 14, 2020 at 12:19 PM Maciej Fijalkowski wrote: > > On Mon, Dec 14, 2020 at 09:51:27AM +0100, Magnus Karlsson wrote: > > From: Magnus Karlsson > > > > Fix a possible memory leak when a bind of an AF_XDP socket fails. When > > the fill and completion rings are created, they are tied to

[PATCH net-next v2 06/15] mlxsw: reg: Add Router XLT M select Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The RXLTM configures and selects the M for the XM lookups. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 32 +++ 1 file changed, 32 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.

[PATCH net-next v2 08/15] mlxsw: spectrum_router: Introduce per-ASIC XM initialization

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko During the router init flow, call into XM code and initialize couple of items needed for XM functionality: 1) Query the capabilities and sizes. Check the XM device id. 2) Initialize the M-value. Note that currently the M-value is set fixed to 16 for IPv4. In future this may c

[PATCH net-next v2 10/15] mlxsw: spectrum_router_xm: Implement L-value tracking for M-index

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko There is a table that assigns L-value per M-index. The L is always the biggest from the currently inserted prefixes. Setup a hashtable to track the M-index information and the prefixes that are related to it. Ensure the L-value is always correctly set. Signed-off-by: Jiri Pirko

[PATCH net-next v2 13/15] mlxsw: spectrum_router_xm: Introduce basic XM cache flushing

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko Upon route insertion and removal, it is needed to flush possibly cached entries from the XM cache. Extend XM op context to carry information needed for the flush. Implement the flush in delayed work since for HW design reasons there is a need to wait 50usec before the flush can b

[PATCH net-next v2 14/15] mlxsw: spectrum: Set KVH XLT cache mode for Spectrum2/3

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko Set a profile option to instruct FW to use 1/2 of KVH for XLT cache, not the whole one. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/cmd.h | 13 + drivers/net/ethernet/mellanox/mlxsw/core.h | 4 +++- drive

[PATCH net-next v2 09/15] mlxsw: reg: Add XM Router M Table Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The XRMT configures the M-Table for the XLT-LPM. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 33 +-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxs

[PATCH net-next v2 01/15] mlxsw: reg: Add XM Direct Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The XMDR allows direct access to the XM device via the switch. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 274 +- 1 file changed, 271 insertions(+), 3 deletions(-) diff --git a/drivers/net/etherne

[PATCH net-next v2 03/15] mlxsw: spectrum_router: Introduce XM implementation of router low-level ops

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko In order to offload entries to XM, implement a set of low-level functions to work with LPM trees in XM and also to pack and write FIB entries into XM. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/Makefile | 1 + .../ethernet

[PATCH net-next v2 07/15] mlxsw: reg: Add XM Lookup Table Query Register

2020-12-14 Thread Ido Schimmel
From: Jiri Pirko The XLTQ is used to query HW for XM-related info. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 66 +-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx

Re: [PATCH v3 net-next 2/4] net: dsa: Link aggregation support

2020-12-14 Thread Ido Schimmel
On Mon, Dec 14, 2020 at 02:12:31AM +0200, Vladimir Oltean wrote: > On Sun, Dec 13, 2020 at 10:18:27PM +0100, Tobias Waldekranz wrote: > > On Sat, Dec 12, 2020 at 16:26, Vladimir Oltean wrote: > > > On Fri, Dec 11, 2020 at 09:50:24PM +0100, Tobias Waldekranz wrote: > > >> 2. The issue Vladimir ment

[PATCH net-next] nfc: s3fwrn5: Remove unused nci prop commands

2020-12-14 Thread Bongsu Jeon
From: Bongsu Jeon remove the unused nci prop commands that samsung driver doesn't use. Signed-off-by: Bongsu Jeon --- drivers/nfc/s3fwrn5/nci.c | 25 - drivers/nfc/s3fwrn5/nci.h | 22 -- 2 files changed, 47 deletions(-) diff --git a/drivers/nfc/s3fw

Re: [PATCH] net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function

2020-12-14 Thread Dan Carpenter
On Sun, Dec 13, 2020 at 12:48:38PM +0100, Christophe JAILLET wrote: > In case of error after calling 'ocelot_init()', it must be undone by a > corresponding 'ocelot_deinit()' call, as already done in the remove > function. > This changes the behavior slightly in another way as well, but it's prob

Re: [PATCH bpf-next V7 4/8] bpf: add BPF-helper for MTU checking

2020-12-14 Thread Jesper Dangaard Brouer
On Thu, 3 Dec 2020 10:25:41 -0800 s...@google.com wrote: > > +BPF_CALL_5(bpf_skb_check_mtu, struct sk_buff *, skb, > > + u32, ifindex, u32 *, mtu_len, s32, len_diff, u64, flags) > > +{ > > + int ret = BPF_MTU_CHK_RET_FRAG_NEEDED; > > + struct net_device *dev = skb->dev; > > + int len; >

[PATCH net-next] MAINTAINERS: Update maintainer for SAMSUNG S3FWRN5 NFC

2020-12-14 Thread Bongsu Jeon
From: Bongsu Jeon add an email to look after the SAMSUNG NFC driver. Signed-off-by: Bongsu Jeon --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5c1a6ba5ef26..cb1634eb010d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15425,6 +15425,7 @@ F:

Re: [PATCH bpf] xsk: fix memory leak for failed bind

2020-12-14 Thread magnus.karlsson
On Mon, Dec 14, 2020 at 12:33 PM Magnus Karlsson wrote: > > On Mon, Dec 14, 2020 at 12:19 PM Maciej Fijalkowski > wrote: > > > > On Mon, Dec 14, 2020 at 09:51:27AM +0100, Magnus Karlsson wrote: > > > From: Magnus Karlsson > > > > > > Fix a possible memory leak when a bind of an AF_XDP socket fai

Re: [PATCH net-next] sfc: backport XDP EV queue sharing from the out-of-tree driver

2020-12-14 Thread Martin Habets
On Sun, Dec 13, 2020 at 10:44:56AM -0800, Ivan Babrou wrote: > On Sun, Dec 13, 2020 at 4:23 AM Martin Habets > wrote: > > > > On Thu, Dec 10, 2020 at 04:18:53PM -0800, Ivan Babrou wrote: > > > Queue sharing behaviour already exists in the out-of-tree sfc driver, > > > available under xdp_alloc_tx

[PATCH net] ethtool: fix string set id check

2020-12-14 Thread Michal Kubecek
Syzbot reported a shift of a u32 by more than 31 in strset_parse_request() which is undefined behavior. This is caused by range check of string set id using variable ret (which is always 0 at this point) instead of id (string set id from request). Fixes: 71921690f974 ("ethtool: provide string sets

pull-request: can-next 2020-12-14

2020-12-14 Thread Marc Kleine-Budde
ommit 13458ffe0a953e17587f172a8e5059c243e6850a: net: x25: Remove unimplemented X.25-over-LLC code stubs (2020-12-12 17:15:33 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git tags/linux-can-next-for-5.11-20201214 for you to fetch ch

[net-next 1/7] can: m_can: update link to M_CAN user manual

2020-12-14 Thread Marc Kleine-Budde
Old versions of the user manual are regularly depublished, so change link to the linux-can github page, which has a mirror off all published datasheets. Link: https://lore.kernel.org/r/20201212175518.139651-2-...@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Ma

[net-next 5/7] can: m_can: m_can_clk_start(): make use of pm_runtime_resume_and_get()

2020-12-14 Thread Marc Kleine-Budde
With patch | dd8088d5a896 PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter the usual pm_runtime_get_sync() and pm_runtime_put_noidle() in-case-of-error dance is no longer needed. Convert the m_can driver to use this function. Link: https://lore.kernel.org/r/20201212175518.1

[net-next 6/7] can: m_can: let m_can_class_allocate_dev() allocate driver specific private data

2020-12-14 Thread Marc Kleine-Budde
This patch enhances m_can_class_allocate_dev() to allocate driver specific private data. The driver's private data struct must contain struct m_can_classdev as its first member followed by the remaining private data. Link: https://lore.kernel.org/r/20201212175518.139651-7-...@pengutronix.de Review

[net-next 7/7] can: m_can: use struct m_can_classdev as drvdata

2020-12-14 Thread Marc Kleine-Budde
The m_can driver's suspend and resume functions (m_can_class_suspend() and m_can_class_resume()) make use of dev_get_drvdata() and assume that the drvdata is a pointer to the struct net_device. With upcoming conversion of the tcan4x5x driver to pm_runtime this assumption is no longer valid. As the

[net-next 4/7] can: m_can: m_can_config_endisable(): mark as static

2020-12-14 Thread Marc Kleine-Budde
The function m_can_config_endisable() is not used outside of the m_can driver, so mark it as static. Link: https://lore.kernel.org/r/20201212175518.139651-5-...@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde --- drivers/net/can/m_can/m_can.c

[net-next 2/7] can: m_can: convert indention to kernel coding style

2020-12-14 Thread Marc Kleine-Budde
This patch converts the indention in the m_can driver to kernel coding style. Link: https://lore.kernel.org/r/20201212175518.139651-3-...@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde --- drivers/net/can/m_can/m_can.c | 88 +

[net-next 3/7] can: m_can: use cdev as name for struct m_can_classdev uniformly

2020-12-14 Thread Marc Kleine-Budde
This patch coverts the m_can driver to use cdev as name for struct m_can_classdev uniformly throughout the whole driver. Link: https://lore.kernel.org/r/20201212175518.139651-4-...@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde --- drivers/ne

[PATCH] xfrm: Fix oops in xfrm_replay_advance_bmp

2020-12-14 Thread Shmulik Ladkani
When setting xfrm replay_window to values higher than 32, a rare page-fault occurs in xfrm_replay_advance_bmp: BUG: unable to handle page fault for address: 8af350ad7920 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD ad001067 P4D ad001067 PUD

[PATCH -next] nfc/pn533/usb: convert comma to semicolon

2020-12-14 Thread Zheng Yongjun
Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun --- drivers/nfc/pn533/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/pn533/usb.c b/drivers/nfc/pn533/usb.c index 84f2983bf384..84d2bfabf42b 100644 --- a/drivers/nfc/p

Re: [PATCH bpf-next V8 4/8] bpf: add BPF-helper for MTU checking

2020-12-14 Thread Jesper Dangaard Brouer
On Thu, 3 Dec 2020 00:23:14 +0100 Daniel Borkmann wrote: > On 11/27/20 7:06 PM, Jesper Dangaard Brouer wrote: > [...] > > +static struct net_device *__dev_via_ifindex(struct net_device *dev_curr, > > + u32 ifindex) > > +{ > > + struct net *netns = dev_net(d

Re: [PATCH 1/3] PCI/ASPM: Use the path max in L1 ASPM latency check

2020-12-14 Thread Bjorn Helgaas
On Mon, Dec 14, 2020 at 10:14:18AM +0100, Ian Kumlien wrote: > On Mon, Dec 14, 2020 at 6:44 AM Bjorn Helgaas wrote: > > > > [+cc Jesse, Tony, David, Jakub, Heiner, lists in case there's an ASPM > > issue with I211 or Realtek NICs. Beginning of thread: > > https://lore.kernel.org/r/20201024205548.

Re: [PATCH 04/25] dt-bindings: net: dwmac: Refactor snps,*-config properties

2020-12-14 Thread Rob Herring
On Mon, Dec 14, 2020 at 12:15:54PM +0300, Serge Semin wrote: > Currently the "snps,axi-config", "snps,mtl-rx-config" and > "snps,mtl-tx-config" properties are declared as a single phandle reference > to a node with corresponding parameters defined. That's not good for > several reasons. First of al

Re: [PATCH net-next v2 2/4] sch_htb: Hierarchical QoS hardware offload

2020-12-14 Thread Maxim Mikityanskiy
On 2020-12-11 21:16, Cong Wang wrote: On Fri, Dec 11, 2020 at 7:26 AM Maxim Mikityanskiy wrote: HTB doesn't scale well because of contention on a single lock, and it also consumes CPU. This patch adds support for offloading HTB to hardware that supports hierarchical rate limiting. This soluti

Re: [PATCH net-next 5/8] ice: move skb pointer from rx_buf to rx_ring

2020-12-14 Thread Maciej Fijalkowski
On Fri, Dec 11, 2020 at 08:23:15PM -0800, Jakub Kicinski wrote: > On Fri, 11 Dec 2020 17:49:53 +0100 Maciej Fijalkowski wrote: > > @@ -864,14 +865,12 @@ ice_reuse_rx_page(struct ice_ring *rx_ring, struct > > ice_rx_buf *old_buf) > > * for use by the CPU. > > */ > > static struct ice_rx_buf *

[PATCH v2 net-next 0/8] i40e/ice cleanups

2020-12-14 Thread Maciej Fijalkowski
Hi, This series is mostly about the cleanups on Rx (ZC/normal) paths both in ice and i40e drivers. Things that stand out are the simplifactions of ice_change_mtu and i40e_xdp_setup. Thanks! v2: fix kdoc in patch 5 (Jakub) Björn Töpel (1): i40e, xsk: Simplify the do-while allocation loop Maci

[PATCH v2 net-next 1/8] i40e: drop redundant check when setting xdp prog

2020-12-14 Thread Maciej Fijalkowski
Net core handles the case where netdev has no xdp prog attached and current prog is NULL. Therefore, remove such check within i40e_xdp_setup. Signed-off-by: Maciej Fijalkowski --- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethern

[PATCH v2 net-next 2/8] i40e: drop misleading function comments

2020-12-14 Thread Maciej Fijalkowski
i40e_cleanup_headers has a statement about check against skb being linear or not which is not relevant anymore, so let's remove it. Same case for i40e_can_reuse_rx_page, it references things that are not present there anymore. Signed-off-by: Maciej Fijalkowski --- drivers/net/ethernet/intel/i40

[PATCH v2 net-next 3/8] i40e: adjust i40e_is_non_eop

2020-12-14 Thread Maciej Fijalkowski
i40e_is_non_eop had a leftover comment and unused skb argument which was used for placing the skb onto rx_buf in case when current buffer was non-eop one. This is not relevant anymore as commit e72e56597ba1 ("i40e/i40evf: Moves skb from i40e_rx_buffer to i40e_ring") pulled the non-complete skb hand

[PATCH v2 net-next 5/8] ice: move skb pointer from rx_buf to rx_ring

2020-12-14 Thread Maciej Fijalkowski
Similar thing has been done in i40e, as there is no real need for having the sk_buff pointer in each rx_buf. Non-eop frames can be simply handled on that pointer moved upwards to rx_ring. Signed-off-by: Maciej Fijalkowski --- drivers/net/ethernet/intel/ice/ice_txrx.c | 29 ++-

[PATCH v2 net-next 4/8] ice: simplify ice_run_xdp

2020-12-14 Thread Maciej Fijalkowski
There's no need for 'result' variable, we can directly return the internal status based on action returned by xdp prog. Signed-off-by: Maciej Fijalkowski --- drivers/net/ethernet/intel/ice/ice_txrx.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net

[PATCH v2 net-next 7/8] ice: skip NULL check against XDP prog in ZC path

2020-12-14 Thread Maciej Fijalkowski
Whole zero-copy variant of clean Rx irq is executed when xsk_pool is attached to rx_ring and it can happen only when XDP program is present on interface. Therefore it is safe to assume that program is always !NULL and there is no need for checking it in ice_run_xdp_zc. Signed-off-by: Maciej Fijalk

[PATCH v2 net-next 8/8] i40e, xsk: Simplify the do-while allocation loop

2020-12-14 Thread Maciej Fijalkowski
From: Björn Töpel Fold the count decrement into the while-statement. Signed-off-by: Björn Töpel --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i4

[PATCH v2 net-next 6/8] ice: remove redundant checks in ice_change_mtu

2020-12-14 Thread Maciej Fijalkowski
dev_validate_mtu checks that mtu value specified by user is not less than min mtu and not greater than max allowed mtu. It is being done before calling the ndo_change_mtu exposed by driver, so remove these redundant checks in ice_change_mtu. Signed-off-by: Maciej Fijalkowski --- drivers/net/ethe

[PATCH bpf 1/2] xsk: fix race in SKB mode transmit with shared cq

2020-12-14 Thread Magnus Karlsson
From: Magnus Karlsson Fix a race when multiple sockets are simultaneously calling sendto() when the completion ring is shared in the SKB case. This is the case when you share the same netdev and queue id through the XDP_SHARED_UMEM bind flag. The problem is that multiple processes can be in xsk_g

  1   2   3   4   >