[PATCH net-next v4 3/5] net: mhi: Create mhi.h

2021-02-07 Thread Loic Poulain
Move mhi-net shared structures to mhi header, that will be used by upcoming proto(s). Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 36 drivers/net/mhi/net.c | 33 ++--- 2 files changed, 38 insertions(+), 31 deletions(-)

[PATCH net-next v4 5/5] net: mhi: Add mbim proto

2021-02-07 Thread Loic Poulain
MBIM has initially been specified by USB-IF for transporting data (IP) between a modem and a host over USB. However some modern modems also support MBIM over PCIe (via MHI). In the same way as QMAP(rmnet), it allows to aggregate IP packets and to perform context multiplexing. This change adds mini

[PATCH net-next v4 4/5] net: mhi: Add rx_length_errors stat

2021-02-07 Thread Loic Poulain
This can be used by proto when packet len is incorrect. Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 1 + drivers/net/mhi/net.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/mhi/mhi.h b/drivers/net/mhi/mhi.h index 5050e4a..82210e0 100644 --- a/drivers/net/mhi/mhi.h

[PATCH net-next v4 2/5] net: mhi: Add dedicated folder

2021-02-07 Thread Loic Poulain
Create a dedicated mhi directory for mhi-net, mhi-net is going to be split into differente files (for additional protocol support). Signed-off-by: Loic Poulain --- drivers/net/Makefile | 2 +- drivers/net/mhi/Makefile | 3 + drivers/net/mhi/net.c| 429

[PATCH net-next v4 1/5] net: mhi: Add protocol support

2021-02-07 Thread Loic Poulain
MHI can transport different protocols, some are handled at upper level, like IP and QMAP(rmnet/netlink), but others will need to be inside MHI net driver, like mbim. This change adds support for protocol rx and tx_fixup callbacks registration, that can be used to encode/decode the targeted protocol

[PATCH net-next v4 0/5] Add MBIM over MHI support

2021-02-07 Thread Loic Poulain
This patch adds MBIM decoding/encoding support to mhi-net, using mhi-net rx and tx_fixup 'proto' callbacks introduced in the series. v2: - net.c: mhi_net_dev as rx/tx_fixup parameter - mbim: Check nth size/sequence in nth16_verify - mbim: Add netif_dbg message for verbose error - mbim:

[PATCH v2 2/2] mei: bus: change remove callback to return void

2021-02-07 Thread Uwe Kleine-König
The driver core ignores the return value of mei_cl_device_remove() so passing an error value doesn't solve any problem. As most mei drivers' remove callbacks return 0 unconditionally and returning a different value doesn't have any effect, change this prototype to return void and return 0 unconditi

[PATCH v2 0/2] mei: bus: Some cleanups

2021-02-07 Thread Uwe Kleine-König
Hello, changes since v1: - Added a missing ; found by kernel test robot, thanks - Added an Ack for Guenter rangediff can be found below. Uwe Kleine-König (2): mei: bus: simplify mei_cl_device_remove() mei: bus: change remove callback to return void drivers/misc/mei/bus.c | 11 +

[PATCH v2 1/2] mei: bus: simplify mei_cl_device_remove()

2021-02-07 Thread Uwe Kleine-König
The driver core only calls a bus' remove function when there is actually a driver and a device. So drop the needless check and assign cldrv earlier. (Side note: The check for cldev being non-NULL is broken anyhow, because to_mei_cl_device() is a wrapper around container_of() for a member that is n

RE: [PATCH] seccomp: Improve performance by optimizing memory barrier

2021-02-07 Thread Wanghongzhe (Hongzhe, EulerOS)
> From: Leon Romanovsky [mailto:l...@kernel.org] > Sent: Monday, February 8, 2021 2:44 PM > To: Wanghongzhe (Hongzhe, EulerOS) > Cc: keesc...@chromium.org; l...@amacapital.net; w...@chromium.org; > a...@kernel.org; dan...@iogearbox.net; and...@kernel.org; ka...@fb.com; > songliubrav...@fb.com; y..

Re: [PATCH net-next v4] net: psample: Introduce stubs to remove NIC driver dependency

2021-02-07 Thread Leon Romanovsky
On Mon, Feb 01, 2021 at 08:08:37PM +0200, Ido Schimmel wrote: > On Mon, Feb 01, 2021 at 09:37:11AM +0800, Chris Mi wrote: > > Hi Ido, > > > > On 1/30/2021 10:42 PM, Ido Schimmel wrote: > > > On Fri, Jan 29, 2021 at 12:30:09PM -0800, Jakub Kicinski wrote: > > > > On Fri, 29 Jan 2021 14:08:39 +0800 C

Re: [PATCH] seccomp: Improve performance by optimizing memory barrier

2021-02-07 Thread Leon Romanovsky
On Mon, Feb 01, 2021 at 08:49:41PM +0800, wanghongzhe wrote: > If a thread(A)'s TSYNC flag is set from seccomp(), then it will > synchronize its seccomp filter to other threads(B) in same thread > group. To avoid race condition, seccomp puts rmb() between > reading the mode and filter in seccomp ch

Re: [PATCH v1] vdpa/mlx5: Restore the hardware used index after change map

2021-02-07 Thread Eli Cohen
On Mon, Feb 08, 2021 at 12:27:18PM +0800, Jason Wang wrote: > > On 2021/2/6 上午7:07, Si-Wei Liu wrote: > > > > > > On 2/3/2021 11:36 PM, Eli Cohen wrote: > > > When a change of memory map occurs, the hardware resources are destroyed > > > and then re-created again with the new memory map. In such

Re: [RFC PATCH v4 00/17] virtio/vsock: introduce SOCK_SEQPACKET support

2021-02-07 Thread Arseny Krasnov
On 07.02.2021 19:20, Michael S. Tsirkin wrote: > On Sun, Feb 07, 2021 at 06:12:56PM +0300, Arseny Krasnov wrote: >> This patchset impelements support of SOCK_SEQPACKET for virtio >> transport. >> As SOCK_SEQPACKET guarantees to save record boundaries, so to >> do it, two new packet oper

Re: [PATCH] i2c: mv64xxx: Fix check for missing clock

2021-02-07 Thread Samuel Holland
On 2/8/21 12:28 AM, Samuel Holland wrote: > In commit e5c02cf54154 ("i2c: mv64xxx: Add runtime PM support"), error > pointers to optional clocks were replaced by NULL to simplify the resume > callback implementation. However, that commit missed that the IS_ERR > check in mv64xxx_of_config should be

[PATCH net-next RESEND 5/5] net: stmmac: dwmac-sun8i: Add a shutdown callback

2021-02-07 Thread Samuel Holland
The Ethernet MAC and PHY are usually major consumers of power on boards which may not be able to fully power off (those with no PMIC). Powering down the MAC and internal PHY saves power while these boards are "off". Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/net/etherne

[PATCH net-next RESEND 4/5] net: stmmac: dwmac-sun8i: Minor probe function cleanup

2021-02-07 Thread Samuel Holland
Adjust the spacing and use an explicit "return 0" in the success path to make the function easier to parse. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH net-next RESEND 0/5] dwmac-sun8i cleanup and shutdown hook

2021-02-07 Thread Samuel Holland
These patches clean up some things I noticed while fixing suspend/resume behavior. The first four are minor code improvements. The last one adds a shutdown hook to minimize power consumption on boards without a PMIC. Now that the fixes series is merged, I'm resending this series rebased on top of

[PATCH net-next RESEND 2/5] net: stmmac: dwmac-sun8i: Remove unnecessary PHY power check

2021-02-07 Thread Samuel Holland
sun8i_dwmac_unpower_internal_phy already checks if the PHY is powered, so there is no need to do it again here. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a

[PATCH net-next RESEND 1/5] net: stmmac: dwmac-sun8i: Return void from PHY unpower

2021-02-07 Thread Samuel Holland
This is a deinitialization function that always returned zero, and that return value was always ignored. Have it return void instead. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 5 ++--- 1 file changed, 2 insertions(+), 3 delet

[PATCH net-next RESEND 3/5] net: stmmac: dwmac-sun8i: Use reset_control_reset

2021-02-07 Thread Samuel Holland
Use the appropriate function instead of reimplementing it, and update the error message to match the code. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/driv

[PATCH] i2c: mv64xxx: Fix check for missing clock

2021-02-07 Thread Samuel Holland
In commit e5c02cf54154 ("i2c: mv64xxx: Add runtime PM support"), error pointers to optional clocks were replaced by NULL to simplify the resume callback implementation. However, that commit missed that the IS_ERR check in mv64xxx_of_config should be replaced with a NULL check. As a result, the chec

[PATCH] nfc: st-nci: Remove unnecessary variable

2021-02-07 Thread samirweng1979
From: wengjianfeng The variable r is defined at the beginning and initialized to 0 until the function returns r, and the variable r is not reassigned.Therefore, we do not need to define the variable r, just return 0 directly at the end of the function. Signed-off-by: wengjianfeng --- drivers/n

Re: [PATCH 3/3] mlx5_vdpa: defer clear_virtqueues to until DRIVER_OK

2021-02-07 Thread Eli Cohen
On Sat, Feb 06, 2021 at 04:29:24AM -0800, Si-Wei Liu wrote: > While virtq is stopped, get_vq_state() is supposed to > be called to get sync'ed with the latest internal > avail_index from device. The saved avail_index is used > to restate the virtq once device is started. Commit > b35ccebe3

Re: [PATCH 1/3] mlx5_vdpa: should exclude header length and fcs from mtu

2021-02-07 Thread Eli Cohen
On Sat, Feb 06, 2021 at 04:29:22AM -0800, Si-Wei Liu wrote: > When feature VIRTIO_NET_F_MTU is negotiated on mlx5_vdpa, > 22 extra bytes worth of MTU length is shown in guest. > This is because the mlx5_query_port_max_mtu API returns > the "hardware" MTU value, which does not just contain the > Eth

Re: [PATCH 2/3] mlx5_vdpa: fix feature negotiation across device reset

2021-02-07 Thread Eli Cohen
On Sat, Feb 06, 2021 at 04:29:23AM -0800, Si-Wei Liu wrote: > The mlx_features denotes the capability for which > set of virtio features is supported by device. In > principle, this field needs not be cleared during > virtio device reset, as this capability is static > and does not change across re

Re: [PATCH 1/3] mlx5_vdpa: should exclude header length and fcs from mtu

2021-02-07 Thread Jason Wang
On 2021/2/6 下午8:29, Si-Wei Liu wrote: When feature VIRTIO_NET_F_MTU is negotiated on mlx5_vdpa, 22 extra bytes worth of MTU length is shown in guest. This is because the mlx5_query_port_max_mtu API returns the "hardware" MTU value, which does not just contain the Ethernet payload, but includes

Re: [PATCH v4 bpf-next 4/4] selftests/bpf: add test for bpf_iter_task_vma

2021-02-07 Thread Yonghong Song
On 2/4/21 12:50 PM, Song Liu wrote: The test dumps information similar to /proc/pid/maps. The first line of the output is compared against the /proc file to make sure they match. Signed-off-by: Song Liu --- .../selftests/bpf/prog_tests/bpf_iter.c | 114 -- tools/test

Re: [PATCH 3/3] mlx5_vdpa: defer clear_virtqueues to until DRIVER_OK

2021-02-07 Thread Jason Wang
On 2021/2/6 下午8:29, Si-Wei Liu wrote: While virtq is stopped, get_vq_state() is supposed to be called to get sync'ed with the latest internal avail_index from device. The saved avail_index is used to restate the virtq once device is started. Commit b35ccebe3ef7 introduced the clear_vir

Re: [PATCH 2/3] mlx5_vdpa: fix feature negotiation across device reset

2021-02-07 Thread Jason Wang
On 2021/2/6 下午8:29, Si-Wei Liu wrote: The mlx_features denotes the capability for which set of virtio features is supported by device. In principle, this field needs not be cleared during virtio device reset, as this capability is static and does not change across reset. In fact, the current c

Re: [PATCH v4 bpf-next 1/4] bpf: introduce task_vma bpf_iter

2021-02-07 Thread Yonghong Song
On 2/4/21 12:49 PM, Song Liu wrote: Introduce task_vma bpf_iter to print memory information of a process. It can be used to print customized information similar to /proc//maps. Current /proc//maps and /proc//smaps provide information of vma's of a process. However, these information are not f

Re: [PATCH v1] vdpa/mlx5: Restore the hardware used index after change map

2021-02-07 Thread Jason Wang
On 2021/2/6 上午7:07, Si-Wei Liu wrote: On 2/3/2021 11:36 PM, Eli Cohen wrote: When a change of memory map occurs, the hardware resources are destroyed and then re-created again with the new memory map. In such case, we need to restore the hardware available and used indices. The driver failed

[PATCH RESEND] rsi: remove redundant assignment

2021-02-07 Thread samirweng1979
From: wengjianfeng INVALID_QUEUE has been used as a return value,it is not necessary to assign it to q_num,so just return INVALID_QUEUE. Signed-off-by: wengjianfeng --- drivers/net/wireless/rsi/rsi_91x_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wir

Re: [PATCH net] virtio-net: suppress bad irq warning for tx napi

2021-02-07 Thread Jason Wang
On 2021/2/5 上午4:50, Willem de Bruijn wrote: On Wed, Feb 3, 2021 at 10:06 PM Jason Wang wrote: On 2021/2/4 上午2:28, Willem de Bruijn wrote: On Wed, Feb 3, 2021 at 12:33 AM Jason Wang wrote: On 2021/2/2 下午10:37, Willem de Bruijn wrote: On Mon, Feb 1, 2021 at 10:09 PM Jason Wang wrote: On

[PATCH RESEND] mwl8k: assign value when defining variables

2021-02-07 Thread samirweng1979
From: wengjianfeng define refilled and then assign value to it, which should do that at the same time. Signed-off-by: wengjianfeng --- drivers/net/wireless/marvell/mwl8k.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/

[PATCH RESEND] wl1251: cmd: remove redundant assignment

2021-02-07 Thread samirweng1979
From: wengjianfeng -ENOMEM has been used as a return value,it is not necessary to assign it, and if kzalloc fail,not need free it,so just return -ENOMEM when kzalloc fail. Signed-off-by: wengjianfeng --- drivers/net/wireless/ti/wl1251/cmd.c | 36 1 file cha

net-next build error (3)

2021-02-07 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:e93fac3b drivers: net: xen-netfront: Simplify the calculat.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=160930c4d0 kernel config: https://syzkaller.appspot.com/x/.config?x=9804f8fe1c4e3869 das

[PATCH net-next] net: octeontx2: Fix the confusion in buffer alloc failure path

2021-02-07 Thread Kevin Hao
Pavel pointed that the return of dma_addr_t in otx2_alloc_rbuf/__otx2_alloc_rbuf() seem suspicious because a negative error code may be returned in some cases. For a dma_addr_t, the error code such as -ENOMEM does seem a valid value, so we can't judge if the buffer allocation fail or not based on t

Re: [PATCH v1 2/2] mei: bus: change remove callback to return void

2021-02-07 Thread kernel test robot
Hi "Uwe, I love your patch! Yet something to improve: [auto build test ERROR on 5c8fe583cce542aa0b84adc939ce85293de36e5e] url: https://github.com/0day-ci/linux/commits/Uwe-Kleine-K-nig/mei-bus-simplify-mei_cl_device_remove/20210208-062551 base: 5c8fe583cce542aa0b84adc939ce85293de36e5e conf

Re: [PATCH v1 2/2] mei: bus: change remove callback to return void

2021-02-07 Thread kernel test robot
Hi "Uwe, I love your patch! Yet something to improve: [auto build test ERROR on 5c8fe583cce542aa0b84adc939ce85293de36e5e] url: https://github.com/0day-ci/linux/commits/Uwe-Kleine-K-nig/mei-bus-simplify-mei_cl_device_remove/20210208-062551 base: 5c8fe583cce542aa0b84adc939ce85293de36e5e conf

Re: [PATCH v1 2/2] mei: bus: change remove callback to return void

2021-02-07 Thread kernel test robot
Hi "Uwe, I love your patch! Yet something to improve: [auto build test ERROR on 5c8fe583cce542aa0b84adc939ce85293de36e5e] url: https://github.com/0day-ci/linux/commits/Uwe-Kleine-K-nig/mei-bus-simplify-mei_cl_device_remove/20210208-062551 base: 5c8fe583cce542aa0b84adc939ce85293de36e5e conf

Re: [PATCH v1 2/2] mei: bus: change remove callback to return void

2021-02-07 Thread Guenter Roeck
On 2/7/21 2:22 PM, Uwe Kleine-König wrote: > The driver core ignores the return value of mei_cl_device_remove() so > passing an error value doesn't solve any problem. As most mei drivers' > remove callbacks return 0 unconditionally and returning a different value > doesn't have any effect, change t

RE: [EXT] Re: [PATCH v9 net-next 01/15] doc: marvell: add CM3 address space and PPv2.3 description

2021-02-07 Thread Stefan Chulski
> > @@ -12,7 +13,7 @@ Required properties: > > - common controller registers > > - LMS registers > > - one register area per Ethernet port > > - For "marvell,armada-7k-pp2", must contain the following register > > + For "marvell,armada-7k-pp2" used by 7K/8K and CN913X, must contain >

[PATCH net-next 9/9] net: mscc: ocelot: support multiple bridges

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean The ocelot switches are a bit odd in that they do not have an STP state to put the ports into. Instead, the forwarding configuration is delayed from the typical port_bridge_join into stp_state_set, when the port enters the BR_STATE_FORWARDING state. I can only guess that th

[PATCH net-next 8/9] net: mscc: ocelot: offload bridge port flags to device

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean We should not be unconditionally enabling address learning, since doing that is actively detrimential when a port is standalone and not offloading a bridge. Namely, if a port in the switch is standalone and others are offloading the bridge, then we could enter a situation wh

[PATCH net-next 7/9] net: mscc: ocelot: use separate flooding PGID for broadcast

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean In preparation of offloading the bridge port flags which have independent settings for unknown multicast and for broadcast, we should also start reserving one destination Port Group ID for the flooding of broadcast packets, to allow configuring it individually. Signed-off-b

[PATCH net-next 6/9] net: bridge: stop treating EOPNOTSUPP as special in br_switchdev_set_port_flag

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean It is customary to return -EOPNOTSUPP when an operation is not supported. Sometimes the fact that an operation is not supported is irrelevant to upper layers, and in that case the return code is ignored. However, in the case of br_switchdev_set_port_flag, it took it upon it

[PATCH net-next 5/9] net: squash switchdev attributes PRE_BRIDGE_FLAGS and BRIDGE_FLAGS

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean There does not appear to be any strong reason why br_switchdev_set_port_flag issues a separate notification for checking the supported brport flags rather than just attempting to apply them and propagating the error if that fails. However, there is a reason why this switchd

[PATCH net-next 4/9] net: dsa: kill .port_egress_floods overengineering

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean The bridge offloads the port flags through a single bit mask using switchdev, which among others, contains learning and flooding settings. The commit 57652796aa97 ("net: dsa: add support for bridge flags") missed one crucial aspect of the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS

[PATCH net-next 3/9] net: dsa: stop setting initial and final brport flags

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean With the bridge driver doing that for us now, we can simplify our mid-layer logic a little bit, which would have otherwise needed some tuning for the disabling of address learning that is necessary in standalone mode. Signed-off-by: Vladimir Oltean --- net/dsa/port.c | 12

[PATCH net-next 2/9] net: bridge: offload initial and final port flags through switchdev

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean It must first be admitted that switchdev device drivers have a life beyond the bridge, and when they aren't offloading the bridge driver they are operating with forwarding disabled between ports, emulating as closely as possible N standalone network interfaces. Now it must

[PATCH net-next 1/9] net: bridge: don't print in br_switchdev_set_port_flag

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean Currently br_switchdev_set_port_flag has two options for error handling and neither is good: - The driver returns -EOPNOTSUPP in PRE_BRIDGE_FLAGS if it doesn't support offloading that flag, and this gets silently ignored and converted to an errno of 0. Nobody does this.

[PATCH net-next 0/9] Cleanup in brport flags switchdev offload for DSA

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean The initial goal of this series was to have better support for standalone ports mode and multiple bridges on the Ocelot/Felix DSA driver. Proper support for standalone mode requires disabling address learning, which in turn requires interaction with the switchdev notifier, w

Re: [PATCH 0/3] Fix some seq_file users that were recently broken

2021-02-07 Thread NeilBrown
On Fri, Feb 05 2021, Andrew Morton wrote: > On Fri, 05 Feb 2021 11:36:30 +1100 NeilBrown wrote: > >> A recent change to seq_file broke some users which were using seq_file >> in a non-"standard" way ... though the "standard" isn't documented, so >> they can be excused. The result is a possible

[PATCH V2 net-next 2/2] net: broadcom: bcm4908enet: add BCM4908 controller driver

2021-02-07 Thread Rafał Miłecki
From: Rafał Miłecki BCM4908 SoCs family uses Ethernel controller that includes UniMAC but uses different DMA engine (than other controllers) and requires different programming. Signed-off-by: Rafał Miłecki --- V2: Use cpu_to_le32() Reported-by: kernel test robot Add "depends" to the Kc

[PATCH V2 net-next 1/2] dt-bindings: net: document BCM4908 Ethernet controller

2021-02-07 Thread Rafał Miłecki
From: Rafał Miłecki BCM4908 is a family of SoCs with integrated Ethernet controller. Signed-off-by: Rafał Miłecki --- .../bindings/net/brcm,bcm4908enet.yaml| 45 +++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm4908e

[PATCH v1 1/2] mei: bus: simplify mei_cl_device_remove()

2021-02-07 Thread Uwe Kleine-König
The driver core only calls a bus' remove function when there is actually a driver and a device. So drop the needless check and assign cldrv earlier. (Side note: The check for cldev being non-NULL is broken anyhow, because to_mei_cl_device() is a wrapper around container_of() for a member that is n

[PATCH v1 2/2] mei: bus: change remove callback to return void

2021-02-07 Thread Uwe Kleine-König
The driver core ignores the return value of mei_cl_device_remove() so passing an error value doesn't solve any problem. As most mei drivers' remove callbacks return 0 unconditionally and returning a different value doesn't have any effect, change this prototype to return void and return 0 unconditi

Re: [PATCH v9 net-next 03/15] net: mvpp2: add CM3 SRAM memory map

2021-02-07 Thread Andrew Lunn
> +static int mvpp2_get_sram(struct platform_device *pdev, > + struct mvpp2 *priv) > +{ > + struct resource *res; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 2); > + if (!res) { > + if (has_acpi_companion(&pdev->dev)) > +

Re: [PATCH v9 net-next 01/15] doc: marvell: add CM3 address space and PPv2.3 description

2021-02-07 Thread Andrew Lunn
On Sun, Feb 07, 2021 at 08:38:43PM +0200, stef...@marvell.com wrote: > From: Stefan Chulski > > Patch adds CM3 address space PPv2.3 description. > > Signed-off-by: Stefan Chulski > --- > Documentation/devicetree/bindings/net/marvell-pp2.txt | 5 +++-- > 1 file changed, 3 insertions(+), 2 delet

Re: [PATCH 0/3] Fix some seq_file users that were recently broken

2021-02-07 Thread Andrew Morton
On Sat, 6 Feb 2021 14:29:24 -0800 Jakub Kicinski wrote: > On Fri, 5 Feb 2021 14:35:50 -0800 Andrew Morton wrote: > > On Fri, 05 Feb 2021 11:36:30 +1100 NeilBrown wrote: > > > > > A recent change to seq_file broke some users which were using seq_file > > > in a non-"standard" way ... though the

Re: [PATCH 0/3] drivers/net/ethernet/amd: Follow style guide

2021-02-07 Thread Amy Parker
On Sat, Feb 6, 2021 at 12:07 PM Jakub Kicinski wrote: > > On Fri, 5 Feb 2021 16:01:43 -0800 Amy Parker wrote: > > This patchset updates atarilance.c and sun3lance.c to follow the kernel > > style guide. Each patch tackles a different issue in the style guide. > > These are very, very old drivers,

Re: [vdpa_sim_net] 79991caf52: net/ipv4/ipmr.c:#RCU-list_traversed_in_non-reader_section

2021-02-07 Thread Dongli Zhang
Is it possible that the issue is not due to this change? This change is just to call different API to allocate memory, which is equivalent to kzalloc()+vzalloc(). Before the change: try kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); ... and then below if the former is fa

[PATCH net] net: bridge: use switchdev for port flags set through sysfs too

2021-02-07 Thread Vladimir Oltean
From: Vladimir Oltean Looking through patchwork I don't see that there was any consensus to use switchdev notifiers only in case of netlink provided port flags but not sysfs (as a sort of deprecation, punishment or anything like that), so we should probably keep the user interface consistent in t

Re: [PATCH net 1/4] netfilter: xt_recent: Fix attempt to update deleted entry

2021-02-07 Thread Jozsef Kadlecsik
On Sun, 7 Feb 2021, Reindl Harald wrote: > > well, the most important thing is that the firewall-vm stops to > > kernel-panic > > why is that still not part of 5.10.14 given how old that issue is :-( > > https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.10.14 Probably we missed the wind

Re: [PATCH net 1/4] netfilter: xt_recent: Fix attempt to update deleted entry

2021-02-07 Thread Jozsef Kadlecsik
On Fri, 5 Feb 2021, Reindl Harald wrote: > what makes me thinking about the ones without --reap - how is it > handeled in that case, i mean there must be some LRU logic present > anyways given that --reap is not enabled by default (otherwise that bug > would not have hitted me so long randomly)

[PATCH v9 net-next 15/15] net: mvpp2: add TX FC firmware check

2021-02-07 Thread stefanc
From: Stefan Chulski Patch check that TX FC firmware is running in CM3. If not, global TX FC would be disabled. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 42 2 files changed,

[PATCH v9 net-next 05/15] net: mvpp2: add PPv23 version definition

2021-02-07 Thread stefanc
From: Stefan Chulski This patch add PPv23 version definition. PPv23 is new packet processor in CP115. Everything that supported by PPv22, also supported by PPv23. No functional changes in this stage. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 24 +++

[PATCH v9 net-next 14/15] net: mvpp2: set 802.3x GoP Flow Control mode

2021-02-07 Thread stefanc
From: Stefan Chulski This patch fix GMAC TX flow control autoneg. Flow control autoneg wrongly were disabled with enabled TX flow control. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH v9 net-next 08/15] net: mvpp2: add FCA RXQ non occupied descriptor threshold

2021-02-07 Thread stefanc
From: Stefan Chulski The firmware needs to monitor the RX Non-occupied descriptor bits for flow control to move to XOFF mode. These bits need to be unmasked to be functional, but they will not raise interrupts as we leave the RX exception summary bit in MVPP2_ISR_RX_TX_MASK_REG clear. Signed-off

[PATCH v9 net-next 11/15] net: mvpp2: add ethtool flow control configuration support

2021-02-07 Thread stefanc
From: Stefan Chulski This patch add ethtool flow control configuration support. Tx flow control retrieved correctly by ethtool get function. FW per port ethtool configuration capability added. Patch also takes care about mtu change procedure, if PPv2 switch BM pools during mtu change. Signed-o

[PATCH v9 net-next 13/15] net: mvpp2: add PPv23 RX FIFO flow control

2021-02-07 Thread stefanc
From: Stefan Chulski New FIFO flow control feature was added in PPv23. PPv2 FIFO polled by HW and trigger pause frame if FIFO fill level is below threshold. FIFO HW flow control enabled with CM3 RXQ&BM flow control with ethtool. Current FIFO thresholds is: 9KB for port with maximum speed 10Gb/s

[PATCH v9 net-next 06/15] net: mvpp2: increase BM pool and RXQ size

2021-02-07 Thread stefanc
From: Stefan Chulski BM pool and RXQ size increased to support Firmware Flow Control. Minimum depletion thresholds to support FC are 1024 buffers. BM pool size increased to 2048 to have some 1024 buffers space between depletion thresholds and BM pool size. Jumbo frames require a 9888B buffer, so

[PATCH v9 net-next 12/15] net: mvpp2: add BM protection underrun feature support

2021-02-07 Thread stefanc
From: Stefan Chulski The PP2v23 hardware supports a feature allowing to double the size of BPPI by decreasing number of pools from 16 to 8. Increasing of BPPI size protect BM drop from BPPI underrun. Underrun could occurred due to stress on DDR and as result slow buffer transition from BPPE to BP

[PATCH v9 net-next 10/15] net: mvpp2: add RXQ flow control configurations

2021-02-07 Thread stefanc
From: Stefan Chulski This patch adds RXQ flow control configurations. Flow control disabled by default. Minimum ring size limited to 1024 descriptors. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 35 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

[PATCH v9 net-next 09/15] net: mvpp2: enable global flow control

2021-02-07 Thread stefanc
From: Stefan Chulski This patch enables global flow control in FW and in the phylink validate mask. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 11 +-- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 30 +++- 2 files changed, 37 ins

[PATCH v9 net-next 07/15] net: mvpp2: add FCA periodic timer configurations

2021-02-07 Thread stefanc
From: Stefan Chulski Flow Control periodic timer would be used if port in XOFF to transmit periodic XOFF frames. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 13 ++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 45 2 files cha

[PATCH v9 net-next 04/15] net: mvpp2: always compare hw-version vs MVPP21

2021-02-07 Thread stefanc
From: Stefan Chulski Currently we have PP2v1 and PP2v2 hw-versions, with some different handlers depending upon condition hw_version = MVPP21/MVPP22. In a future there will be also PP2v3. Let's use now the generic "if equal/notEqual MVPP21" for all cases instead of "if MVPP22". This patch does n

[PATCH v9 net-next 03/15] net: mvpp2: add CM3 SRAM memory map

2021-02-07 Thread stefanc
From: Stefan Chulski This patch adds CM3 memory map and CM3 read/write callbacks. Signed-off-by: Stefan Chulski --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 26 2 files changed, 27 insertions(+) diff --git a

[PATCH v9 net-next 02/15] dts: marvell: add CM3 SRAM memory to cp11x ethernet device tree

2021-02-07 Thread stefanc
From: Konstantin Porotchkin CM3 SRAM address space would be used for Flow Control configuration. Signed-off-by: Stefan Chulski Signed-off-by: Konstantin Porotchkin --- arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/

[PATCH v9 net-next 01/15] doc: marvell: add CM3 address space and PPv2.3 description

2021-02-07 Thread stefanc
From: Stefan Chulski Patch adds CM3 address space PPv2.3 description. Signed-off-by: Stefan Chulski --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Docume

[PATCH v9 net-next 00/15] net: mvpp2: Add TX Flow Control support

2021-02-07 Thread stefanc
From: Stefan Chulski Armada hardware has a pause generation mechanism in GOP (MAC). The GOP generate flow control frames based on an indication programmed in Ports Control 0 Register. There is a bit per port. However assertion of the PortX Pause bits in the ports control 0 register only sends a

[RFC PATCH v3 00/11] NVMeTCP Offload ULP and QEDN Device Driver

2021-02-07 Thread Shai Malin
With the goal of enabling a generic infrastructure that allows NVMe/TCP offload devices like NICs to seamlessly plug into the NVMe-oF stack, this patch series introduces the nvme-tcp-offload ULP host layer, which will be a new transport type called "tcp-offload" and will serve as an abstracti

[RFC PATCH v3 11/11] nvme-qedn: Add IRQ and fast-path resources initializations

2021-02-07 Thread Shai Malin
This patch will present the adding of qedn_fp_queue - this is a per cpu core element which handles all of the connections on that cpu core. The qedn_fp_queue will handle a group of connections (NVMeoF QPs) which are handled on the same cpu core, and will only use the same FW-driver resources with n

[RFC PATCH v3 10/11] nvme-qedn: Add qedn probe

2021-02-07 Thread Shai Malin
As part of the qedn init, the driver will register as a pci device and will work with the Marvell fastlinQ NICs. The HW ops- qed_nvmetcp_ops are similar to other "qed_*_ops" which are used by the qede, qedr, qedf and qedi device drivers. Struct qedn_ctx is per pci physical function (PF) container

[RFC PATCH v3 09/11] net-qed: Add NVMeTCP Offload PF Level FW and HW HSI

2021-02-07 Thread Shai Malin
This patch introduces the NVMeTCP device and PF level HSI and HSI functionality in order to initialize and interact with the HW device. This patch is based on the qede, qedr, qedi, qedf drivers HSI. Signed-off-by: Dean Balandin Signed-off-by: Michal Kalderon Signed-off-by: Shai Malin --- driv

[RFC PATCH v3 08/11] nvme-qedn: Add qedn - Marvell's NVMeTCP HW offload vendor driver

2021-02-07 Thread Shai Malin
This patch will present the skeleton of the qedn driver. The new driver will be added under "drivers/nvme/hw/qedn" and will be enabled by the Kconfig "Marvell NVM Express over Fabrics TCP offload". The internal implementation: - qedn.h: Includes all common structs to be used by the qedn vendor d

[RFC PATCH v3 06/11] nvme-tcp-offload: Add queue level implementation

2021-02-07 Thread Shai Malin
From: Dean Balandin In this patch we implement queue level functionality. The implementation is similar to the nvme-tcp module, the main difference being that we call the vendor specific create_queue op which creates the TCP connection, and NVMeTPC connection including icreq+icresp negotiation. O

[RFC PATCH v3 07/11] nvme-tcp-offload: Add IO level implementation

2021-02-07 Thread Shai Malin
From: Dean Balandin In this patch, we present the IO level functionality. The nvme-tcp-offload shall work on the IO-level, meaning the nvme-tcp-offload ULP module shall pass the request to the nvme-tcp-offload vendor driver and shall expect for the request compilation. No additional handling is n

[RFC PATCH v3 04/11] nvme-tcp-offload: Add controller level implementation

2021-02-07 Thread Shai Malin
From: Arie Gershberg In this patch we implement controller level functionality including: - create_ctrl. - delete_ctrl. - free_ctrl. The implementation is similar to other nvme fabrics modules, the main difference being that the nvme-tcp-offload ULP calls the vendor specific claim_dev() op with

[RFC PATCH v3 02/11] nvme-fabrics: Move NVMF_ALLOWED_OPTS and NVMF_REQUIRED_OPTS definitions

2021-02-07 Thread Shai Malin
From: Arie Gershberg Move NVMF_ALLOWED_OPTS and NVMF_REQUIRED_OPTS definitions to header file, so it can be used by transport modules. Signed-off-by: Arie Gershberg Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin --- drivers/nvme/host/fabrics.c | 7 --

[RFC PATCH v3 01/11] nvme-tcp-offload: Add nvme-tcp-offload - NVMeTCP HW offload ULP

2021-02-07 Thread Shai Malin
This patch will present the structure for the NVMeTCP offload common layer driver. This module is added under "drivers/nvme/host/" and future offload drivers which will register to it will be placed under "drivers/nvme/hw". This new driver will be enabled by the Kconfig "NVM Express over Fabrics TC

[RFC PATCH v3 03/11] nvme-tcp-offload: Add device scan implementation

2021-02-07 Thread Shai Malin
From: Dean Balandin This patch implements the create_ctrl skeleton, specifcially to demonstrate how the claim_dev op will be used. The driver scans the registered devices and calls the claim_dev op on each of them, to find the first devices that matches the connection params. Once the correct de

[RFC PATCH v3 05/11] nvme-tcp-offload: Add controller level error recovery implementation

2021-02-07 Thread Shai Malin
From: Arie Gershberg In this patch, we implement controller level error handling and recovery. Upon an error discovered by the ULP or reset controller initiated by the nvme-core (using reset_ctrl workqueue), the ULP will initiate a controller recovery which includes teardown and re-connect of all

Re: [RFC PATCH 14/16] gtp: add support for flow based tunneling

2021-02-07 Thread Pravin Shelar
On Sat, Feb 6, 2021 at 10:06 AM Jonas Bonn wrote: > > Hi Pravin et al; > > TL;DR: we don't need to introduce an entire collect_md mode to the > driver; we just need to tweak what we've got so that metadata is > "always" added on RX and respected on TX; make the userspace socket > optional and dum

Re: [net-next v2] tcp: Explicitly mark reserved field in tcp_zerocopy_receive args.

2021-02-07 Thread David Ahern
On 2/7/21 10:49 AM, David Ahern wrote: > On 2/6/21 1:36 PM, Arjun Roy wrote: >> From: Arjun Roy >> >> Explicitly define reserved field and require it to be 0-valued. >> >> Fixes: 7eeba1706eba ("tcp: Add receive timestamp support for receive >> zerocopy.") >> Signed-off-by: Arjun Roy >> Signed-of

Re: [net-next v2] tcp: Explicitly mark reserved field in tcp_zerocopy_receive args.

2021-02-07 Thread David Ahern
On 2/6/21 1:36 PM, Arjun Roy wrote: > From: Arjun Roy > > Explicitly define reserved field and require it to be 0-valued. > > Fixes: 7eeba1706eba ("tcp: Add receive timestamp support for receive > zerocopy.") > Signed-off-by: Arjun Roy > Signed-off-by: Eric Dumazet > Signed-off-by: Soheil Has

Re: [PATCH net-next v2] seg6: fool-proof the processing of SRv6 behavior attributes

2021-02-07 Thread David Ahern
On 2/6/21 10:09 AM, Andrea Mayer wrote: > The set of required attributes for a given SRv6 behavior is identified > using a bitmap stored in an unsigned long, since the initial design of SRv6 > networking in Linux. Recently the same approach has been used for > identifying the optional attributes. >

RE: [EXT] Re: [RESEND PATCH v8 net-next 03/15] net: mvpp2: add CM3 SRAM memory map

2021-02-07 Thread Stefan Chulski
> > + priv->sram_pool = of_gen_pool_get(dn, "cm3-mem", 0); > > + if (!priv->sram_pool) { > > + if (!defer_once) { > > + defer_once = true; > > + /* Try defer once */ > > + return -EPR

Re: [RESEND PATCH v8 net-next 03/15] net: mvpp2: add CM3 SRAM memory map

2021-02-07 Thread Andrew Lunn
On Sun, Feb 07, 2021 at 10:19:12AM +0200, stef...@marvell.com wrote: > From: Stefan Chulski > > This patch adds CM3 memory map and CM3 read/write callbacks. > No functionality changes. > > Signed-off-by: Stefan Chulski > --- > drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 7 +++ > drivers

  1   2   >