[PATCH v2] net: ipv4: remove unused arg exact_dif in compute_score

2020-08-30 Thread Miaohe Lin
The arg exact_dif is not used anymore, remove it. inet_exact_dif_match() is no longer needed after the above is removed, so remove it too. Signed-off-by: Miaohe Lin --- include/net/tcp.h | 10 -- net/ipv4/inet_hashtables.c | 6 ++ 2 files changed, 2 insertions(+), 14 deleti

[PATCH v2] net: ipv6: remove unused arg exact_dif in compute_score

2020-08-30 Thread Miaohe Lin
The arg exact_dif is not used anymore, remove it. inet6_exact_dif_match() is no longer needed after the above is removed, remove it too. Signed-off-by: Miaohe Lin --- include/linux/ipv6.h| 11 --- net/ipv6/inet6_hashtables.c | 6 ++ 2 files changed, 2 insertions(+), 15 delet

Re: rtnl_lock deadlock with tg3 driver

2020-08-30 Thread Michael Chan
On Fri, Aug 28, 2020 at 5:40 PM Baptiste Covolato wrote: > > Hi David, Michael, > > I am contacting you because I'm experiencing an issue that seems to be > awfully close to what David attempted to fix related to the tg3 driver > infinite sleep while holding rtnl_lock > (https://lkml.org/lkml/2020

Re: [PATCH bpf-next] bpf: Fix build without BPF_SYSCALL, but with BPF_JIT.

2020-08-30 Thread Paul E. McKenney
On Sun, Aug 30, 2020 at 05:53:21PM -0700, Alexei Starovoitov wrote: > On Sun, Aug 30, 2020 at 03:03:13PM -0700, Paul E. McKenney wrote: > > On Sun, Aug 30, 2020 at 01:43:28PM -0700, Alexei Starovoitov wrote: > > > From: Alexei Starovoitov > > > > > > When CONFIG_BPF_SYSCALL is not set, but CONFIG

Re: memory leak in do_seccomp

2020-08-30 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:dcc5c6f0 Merge tag 'x86-urgent-2020-08-30' of git://git.ke.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=10b297d590 kernel config: https://syzkaller.appspot.com/x/.config?x=903b9fe

Re: [PATCH V1 1/4] net: qrtr: Do not send packets before hello negotiation

2020-08-30 Thread David Miller
A proper patch series must provide a header "[PATCH 0/N ..." posting which explains what the patch series does, at a high level, how it does it, and why it does it that way. You must also explicitly state the target GIT tree your changes are for in the subject line, f.e. "[PATCH net-next M/N] ..

Re: [net] tipc: fix using smp_processor_id() in preemptible

2020-08-30 Thread David Miller
From: Tuong Lien Date: Sun, 30 Aug 2020 02:37:55 +0700 > The 'this_cpu_ptr()' is used to obtain the AEAD key' TFM on the current > CPU for encryption, however the execution can be preemptible since it's > actually user-space context, so the 'using smp_processor_id() in > preemptible' has been obs

Re: [PATCH] veth: fix memory leak in veth_newlink()

2020-08-30 Thread Toshiaki Makita
On 2020/08/31 9:51, Rustam Kovhaev wrote: On Mon, Aug 31, 2020 at 09:16:32AM +0900, Toshiaki Makita wrote: On 2020/08/30 22:13, Rustam Kovhaev wrote: when register_netdevice(dev) fails we should check whether struct veth_rq has been allocated via ndo_init callback and free it, because, dependin

Re: [PATCH] net: ipv4: remove unused arg exact_dif in compute_score

2020-08-30 Thread linmiaohe
David Ahern wrote: >On 8/29/20 3:01 AM, Miaohe Lin wrote: >> @@ -277,15 +277,13 @@ static struct sock *inet_lhash2_lookup(struct net *net, >> const __be32 daddr, const unsigned short hnum, >> const int dif, const int sdif) >> { >> -boo

Re: [PATCH bpf-next] bpf: Fix build without BPF_SYSCALL, but with BPF_JIT.

2020-08-30 Thread Alexei Starovoitov
On Sun, Aug 30, 2020 at 03:03:13PM -0700, Paul E. McKenney wrote: > On Sun, Aug 30, 2020 at 01:43:28PM -0700, Alexei Starovoitov wrote: > > From: Alexei Starovoitov > > > > When CONFIG_BPF_SYSCALL is not set, but CONFIG_BPF_JIT=y > > the kernel build fails: > > In file included from ../kernel/bpf

Re: [PATCH] veth: fix memory leak in veth_newlink()

2020-08-30 Thread Rustam Kovhaev
On Mon, Aug 31, 2020 at 09:16:32AM +0900, Toshiaki Makita wrote: > On 2020/08/30 22:13, Rustam Kovhaev wrote: > > when register_netdevice(dev) fails we should check whether struct > > veth_rq has been allocated via ndo_init callback and free it, because, > > depending on the code path, register_net

Re: [PATCH] veth: fix memory leak in veth_newlink()

2020-08-30 Thread Toshiaki Makita
On 2020/08/30 22:13, Rustam Kovhaev wrote: when register_netdevice(dev) fails we should check whether struct veth_rq has been allocated via ndo_init callback and free it, because, depending on the code path, register_netdevice() might not call priv_destructor() callback AFAICS, register_netdevi

[PATCH bpf v1] libbpf: fix build failure from uninitialized variable warning

2020-08-30 Thread Tony Ambardar
While compiling libbpf, some GCC versions (at least 8.4.0) have difficulty determining control flow and a emit warning for potentially uninitialized usage of 'map', which results in a build error if using "-Werror": In file included from libbpf.c:56: libbpf.c: In function '__bpf_object__open': lib

Re: [PATCH RFC leds + net-next v4 0/2] Add support for LEDs on Marvell PHYs

2020-08-30 Thread Marek Behun
On Tue, 25 Aug 2020 10:13:59 +0200 Matthias Schiffer wrote: > On Tue, 2020-07-28 at 17:05 +0200, Marek Behún wrote: > > Hi, > > > > this is v4 of my RFC adding support for LEDs connected to Marvell > > PHYs. > > > > Please note that if you want to test this, you still need to first > > apply >

REPLY

2020-08-30 Thread Marcus
My Greetings, I am a banker, a Chief Auditor in our bank, I have the ability to transfer unclaimed funds that belong to one of our late customer died in a car crash along with his family and no one came to put claim the funds, if left unclaimed the fund will be transferred to the state treasury in

Re: [PATCH bpf-next] bpf: Fix build without BPF_SYSCALL, but with BPF_JIT.

2020-08-30 Thread Paul E. McKenney
On Sun, Aug 30, 2020 at 01:43:28PM -0700, Alexei Starovoitov wrote: > From: Alexei Starovoitov > > When CONFIG_BPF_SYSCALL is not set, but CONFIG_BPF_JIT=y > the kernel build fails: > In file included from ../kernel/bpf/trampoline.c:11: > ../kernel/bpf/trampoline.c: In function ‘bpf_trampoline_up

[PATCH v2] net: openvswitch: pass NULL for unused parameters

2020-08-30 Thread trix
From: Tom Rix clang static analysis flags these problems flow_table.c:713:2: warning: The expression is an uninitialized value. The computed value will also be garbage (*n_mask_hit)++; ^~~ flow_table.c:748:5: warning: The expression is an uninitialized value. The

Re: drivers/of/of_mdio.c needs a small modification

2020-08-30 Thread Adam Rudziński
W dniu 2020-08-30 o 01:16, Andrew Lunn pisze: I meant that with the split description of the mdio node the mdio bus for use in the system would be selected almost automatically. Suppose that I can do the device tree "my way": &fec2 { ...     mdio { phy2 ... }; ... }; &fec1 { ...     mdio { phy1

[PATCH bpf-next] bpf: Fix build without BPF_SYSCALL, but with BPF_JIT.

2020-08-30 Thread Alexei Starovoitov
From: Alexei Starovoitov When CONFIG_BPF_SYSCALL is not set, but CONFIG_BPF_JIT=y the kernel build fails: In file included from ../kernel/bpf/trampoline.c:11: ../kernel/bpf/trampoline.c: In function ‘bpf_trampoline_update’: ../kernel/bpf/trampoline.c:220:39: error: ‘call_rcu_tasks_trace’ undeclar

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer deref in hci_phy_link_complete_evt

2020-08-30 Thread Anmol Karn
On Sun, Aug 30, 2020 at 07:30:10PM +0200, Greg KH wrote: > On Sun, Aug 30, 2020 at 05:56:23PM +0530, Anmol Karn wrote: > > On Sun, Aug 30, 2020 at 11:19:17AM +0200, Greg KH wrote: > > > On Sat, Aug 29, 2020 at 10:27:12PM +0530, Anmol Karn wrote: > > > > Fix null pointer deref in hci_phy_link_comple

Re: [PATCH] net: openvswitch: pass NULL for unused parameters

2020-08-30 Thread Tom Rix
On 8/30/20 1:02 PM, Andy Shevchenko wrote: > On Sun, Aug 30, 2020 at 6:17 PM wrote: >> From: Tom Rix >> >> clang static analysis flags these problems >> >> flow_table.c:713:2: warning: The expression is an uninitialized >> value. The computed value will also be garbage >> (*n_mask_hit

Re: [PATCH] net: openvswitch: pass NULL for unused parameters

2020-08-30 Thread Andy Shevchenko
On Sun, Aug 30, 2020 at 6:17 PM wrote: > > From: Tom Rix > > clang static analysis flags these problems > > flow_table.c:713:2: warning: The expression is an uninitialized > value. The computed value will also be garbage > (*n_mask_hit)++; > ^~~ > flow_table.c:748:5:

[PATCH v3 3/3] brcmfmac: set F2 SDIO block size to 128 bytes for BCM4329

2020-08-30 Thread Dmitry Osipenko
Setting F2 block size to 128 bytes for BCM4329 allows to significantly improve RX throughput on NVIDIA Tegra20. Before this change the throughput was capped to 30 Mbit/s on Tegra, now throughput is at 40 Mbit/s, which is a maximum throughput for the BCM4329 chip. The F2 block size is borrowed from

[PATCH v3 0/3] Fixes and improvements for brcmfmac driver

2020-08-30 Thread Dmitry Osipenko
Hello! Recently I was debugging WiFi performance problems on Acer A500 tablet device that got upstreamed recently. This is an older Android device from 2011-2012 that is powered by NVIDIA Tegra20 SoC and it has BCM4329 chip that provides WiFi (SDIO) and Bluetooth (UART). I noticed that WiFi throug

[PATCH v3 2/3] brcmfmac: drop chip id from debug messages

2020-08-30 Thread Dmitry Osipenko
The chip ID was already printed out at the time when debug message about the changed F2 watermark is printed, hence let's drop the unnecessary part of the debug messages. This cleans code a tad and also allows to re-use the F2 watermark debug messages by multiple chips. Suggested-by: Arend van Spr

[PATCH v3 1/3] brcmfmac: increase F2 watermark for BCM4329

2020-08-30 Thread Dmitry Osipenko
This patch fixes SDHCI CRC errors during of RX throughput testing on BCM4329 chip if SDIO BUS is clocked above 25MHz. In particular the checksum problem is observed on NVIDIA Tegra20 SoCs. The good watermark value is borrowed from downstream BCMDHD driver and it's matching to the value that is alre

[PATCH RFC v3 net-next] net/tls: Implement getsockopt SOL_TLS TLS_RX

2020-08-30 Thread Yutaro Hayakawa
From: Yutaro Hayakawa Implement the getsockopt SOL_TLS TLS_RX which is currently missing. The primary usecase is to use it in conjunction with TCP_REPAIR to checkpoint/restore the TLS record layer state. TLS connection state usually exists on the user space library. So basically we can easily ex

Re: [PATCH RFC v2 net-next] net/tls: Implement getsockopt SOL_TLS TLS_RX

2020-08-30 Thread Yutaro Hayakawa
Apology. Kernel Test Robot just pointed out that the v2 patch has a compilation error. My local compilation tests have passed because I didn't enable the kTLS kernel option. Let me resubmit the fixed version soon. Yutaro 2020年8月30日(日) 23:02 Yutaro Hayakawa : > > From: Yutaro Hayakawa > > Impleme

[PATCH] net: ethernet: ti: am65-cpsw: fix rmii 100Mbit link mode

2020-08-30 Thread Grygorii Strashko
In RMII link mode it's required to set bit 15 IFCTL_A in MAC_SL MAC_CONTROL register to enable support for 100Mbit link speed. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nus

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer deref in hci_phy_link_complete_evt

2020-08-30 Thread Greg KH
On Sun, Aug 30, 2020 at 05:56:23PM +0530, Anmol Karn wrote: > On Sun, Aug 30, 2020 at 11:19:17AM +0200, Greg KH wrote: > > On Sat, Aug 29, 2020 at 10:27:12PM +0530, Anmol Karn wrote: > > > Fix null pointer deref in hci_phy_link_complete_evt, there was no > > > checking there for the hcon->amp_mgr-

[PATCH net-next RFC v3 04/14] net/mlx5: Add functions to set/query MFRL register

2020-08-30 Thread Moshe Shemesh
Add functions to query and set the MFRL reset options supported by firmware. Signed-off-by: Moshe Shemesh --- .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../ethernet/mellanox/mlx5/core/fw_reset.c| 46 +++ .../ethernet/mellanox/mlx5/core/fw_reset.h| 13 ++

[PATCH net-next RFC v3 08/14] net/mlx5: Handle sync reset abort event

2020-08-30 Thread Moshe Shemesh
If firmware sends sync_reset_abort to driver the driver should clear the reset requested mode as reset is not expected any more. Signed-off-by: Moshe Shemesh --- .../net/ethernet/mellanox/mlx5/core/fw_reset.c| 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/eth

[PATCH net-next RFC v3 10/14] devlink: Add enable_remote_dev_reset generic parameter

2020-08-30 Thread Moshe Shemesh
The enable_remote_dev_reset devlink param flags that the host admin allows device resets that can be initiated by other hosts. This parameter is useful for setups where a device is shared by different hosts, such as multi-host setup. Once the user set this parameter to false, the driver should NACK

[PATCH net-next RFC v3 05/14] net/mlx5: Set cap for pci sync for fw update event

2020-08-30 Thread Moshe Shemesh
Set capability to notify the firmware that this host driver is capable of handling pci sync for firmware update events. Signed-off-by: Moshe Shemesh --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/m

[PATCH net-next RFC v3 07/14] net/mlx5: Handle sync reset now event

2020-08-30 Thread Moshe Shemesh
On sync_reset_now event the driver does reload and PCI link toggle to activate firmware upgrade reset. When the firmware sends this event it syncs the event on all PFs, so all PFs will do PCI link toggle at once. To do PCI link toggle, the driver ensures that no other device ID under the same bridg

[PATCH net-next RFC v3 02/14] devlink: Add reload actions counters

2020-08-30 Thread Moshe Shemesh
Add reload actions counters to hold the history per reload action type. For example, the number of times fw_activate has been done on this device since the driver module was added or if the firmware activation was done with or without reset. The function devlink_reload_actions_cnts_update() is expo

[PATCH net-next RFC v3 13/14] net/mlx5: Add support for devlink reload action fw activate no reset

2020-08-30 Thread Moshe Shemesh
Add support for devlink reload action fw_activation_no_reset which does firmware live patching, updating the firmware image without reset. The driver checks if the firmware is capable of handling the pending firmware changes as a live patch. If it is then it triggers firmware live patching flow. S

[PATCH net-next RFC v3 01/14] devlink: Add reload action option to devlink reload command

2020-08-30 Thread Moshe Shemesh
Add devlink reload action to allow the user to request a specific reload action. The action parameter is optional, if not specified then devlink driver re-init action is used (backward compatible). Note that when required to do firmware activation some drivers may need to reload the driver. On the

[PATCH net-next RFC v3 06/14] net/mlx5: Handle sync reset request event

2020-08-30 Thread Moshe Shemesh
Once the driver gets sync_reset_request from firmware it prepares for the coming reset and sends acknowledge. After getting this event the driver expects device reset, either it will trigger PCI reset on sync_reset_now event or such PCI reset will be triggered by another PF of the same device. So i

[PATCH net-next RFC v3 09/14] net/mlx5: Add support for devlink reload action fw activate

2020-08-30 Thread Moshe Shemesh
Add support for devlink reload action fw_activate. To activate firmware image the mlx5 driver resets the firmware and reloads it from flash. If a new image was stored on flash it will be loaded. Once this reload command is executed the driver initiates fw sync reset flow, where the firmware synchro

[PATCH net-next RFC v3 12/14] net/mlx5: Add support for fw live patch event

2020-08-30 Thread Moshe Shemesh
Firmware live patch event notifies the driver that the firmware was just updated using live patch. In such case the driver should not reload or re-initiate entities, part to updating the firmware version and re-initiate the firmware tracer which can be updated by live patch with new strings databas

[PATCH net-next RFC v3 03/14] devlink: Add reload actions counters to dev get

2020-08-30 Thread Moshe Shemesh
Expose devlink reload actions counters to the user through devlink dev get command. Examples: $ devlink dev show pci/:82:00.0: reload_actions_stats: driver_reinit 2 fw_activate 1 fw_activate_no_reset 0 pci/:82:00.1: reload_actions_stats: driver_reinit 1 fw_activate

[PATCH net-next RFC v3 14/14] devlink: Add Documentation/networking/devlink/devlink-reload.rst

2020-08-30 Thread Moshe Shemesh
Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- v2 -> v3: - Devlink reload returns the actions done - Replace fw_live_patch action by fw_activate_no_reset - Explain fw_activate meaning v1 -> v2: - Instead of reload levels driver,fw_rese

[PATCH net-next RFC v3 11/14] net/mlx5: Add devlink param enable_remote_dev_reset support

2020-08-30 Thread Moshe Shemesh
The enable_remote_dev_reset devlink param flags that the host admin allows resets by other hosts. In case it is cleared mlx5 host PF driver will send NACK on pci sync for firmware update reset request and the command will fail. By default enable_remote_dev_reset parameter is true, so pci sync for f

[PATCH net-next RFC v3 00/14] Add devlink reload action option

2020-08-30 Thread Moshe Shemesh
Introduce new option on devlink reload API to enable the user to select the reload action required. Complete support for all actions in mlx5. The following reload actions are supported: driver_reinit: driver entities re-initialization, applying devlink-param and devlink-resource

[PATCH] net: openvswitch: pass NULL for unused parameters

2020-08-30 Thread trix
From: Tom Rix clang static analysis flags these problems flow_table.c:713:2: warning: The expression is an uninitialized value. The computed value will also be garbage (*n_mask_hit)++; ^~~ flow_table.c:748:5: warning: The expression is an uninitialized value. The

tc filter create hash table and filter rule

2020-08-30 Thread Denis Gubin
Good day! I want to understand how tc fitler works. Could you please give me some advice for it? I want to add and delete fitler rule by full handle but I can't do it. I need some article where I can read about tc utility. For instance I want create one filter rule and then delete it. The comma

[PATCH V1 1/4] net: qrtr: Do not send packets before hello negotiation

2020-08-30 Thread Deepak Kumar Singh
From: Chris Lew There is a race where broadcast packets can be sent to a node that has not sent the hello message to the remote processor. This breaks the protocol expectation. Add a status variable to track when the hello packet has been sent. An alternative solution attempted was to remove the

[PATCH V1 2/4] net: qrtr: Add socket mode optimization

2020-08-30 Thread Deepak Kumar Singh
From: Chris Lew A remote endpoint should not need to know when a client socket is freed if the socket never established commnication with the endpoint. Add a mode to keep track of which endpoints a socket communicates with. There are three modes a socket can be in: INIT - Socket has no

[PATCH V1 4/4] net: qrtr: Check function pointer before calling

2020-08-30 Thread Deepak Kumar Singh
From: Arun Kumar Neelakantam sk_error_report callback function called without validating cause the NULL pointer dereference. Validate function pointer before using for error report. --- net/qrtr/qrtr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/qrtr/qrtr.c b/net/q

[PATCH V1 3/4] net: qrtr: Change port allocation to use cyclic idr

2020-08-30 Thread Deepak Kumar Singh
From: Chris Lew There is a race for clients that open sockets before the control port is bound. If a client gets an idr that was allocated before the control port is bound, there is a chance the previous address owner sent lookup packets to the control port. The new address owner will get residua

[PATCH RFC v2 net-next] net/tls: Implement getsockopt SOL_TLS TLS_RX

2020-08-30 Thread Yutaro Hayakawa
From: Yutaro Hayakawa Implement the getsockopt SOL_TLS TLS_RX which is currently missing. The primary usecase is to use it in conjunction with TCP_REPAIR to checkpoint/restore the TLS record layer state. TLS connection state usually exists on the user space library. So basically we can easily ex

[PATCH] veth: fix memory leak in veth_newlink()

2020-08-30 Thread Rustam Kovhaev
when register_netdevice(dev) fails we should check whether struct veth_rq has been allocated via ndo_init callback and free it, because, depending on the code path, register_netdevice() might not call priv_destructor() callback Reported-and-tested-by: syzbot+59ef240dd8f0ed759...@syzkaller.appspotm

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer deref in hci_phy_link_complete_evt

2020-08-30 Thread Anmol Karn
On Sun, Aug 30, 2020 at 11:19:17AM +0200, Greg KH wrote: > On Sat, Aug 29, 2020 at 10:27:12PM +0530, Anmol Karn wrote: > > Fix null pointer deref in hci_phy_link_complete_evt, there was no > > checking there for the hcon->amp_mgr->l2cap_conn->hconn, and also > > in hci_cmd_work, for hdev->sent_cm

Re: [PATCH RFC leds + net-next v4 0/2] Add support for LEDs on Marvell PHYs

2020-08-30 Thread Pavel Machek
Hi! > > > The phydev name is not particularly nice: > > > > > > !mdio-mux!mdio@1!switch@0!mdio:00 ... > > > 400d.ethernet-1:00 > > > 400d.ethernet-1:01 > > > fixed-0:00 > > > > Not nice, I see. In particular, it contains ":"... which would be a > > problem. > > > > > The interface name

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer deref in hci_phy_link_complete_evt

2020-08-30 Thread Greg KH
On Sat, Aug 29, 2020 at 10:27:12PM +0530, Anmol Karn wrote: > Fix null pointer deref in hci_phy_link_complete_evt, there was no > checking there for the hcon->amp_mgr->l2cap_conn->hconn, and also > in hci_cmd_work, for hdev->sent_cmd. > > To fix this issue Add pointer checking in hci_cmd_work an

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer deref in hci_phy_link_complete_evt

2020-08-30 Thread Greg KH
On Sat, Aug 29, 2020 at 10:27:12PM +0530, Anmol Karn wrote: > Fix null pointer deref in hci_phy_link_complete_evt, there was no > checking there for the hcon->amp_mgr->l2cap_conn->hconn, and also > in hci_cmd_work, for hdev->sent_cmd. > > To fix this issue Add pointer checking in hci_cmd_work an

Re: sysfs output without newlines

2020-08-30 Thread Greg Kroah-Hartman
On Sat, Aug 29, 2020 at 11:23:43AM -0700, Joe Perches wrote: > While doing an investigation for a possible treewide conversion of > sysfs output using sprintf/snprintf/scnprintf, I discovered > several instances of sysfs output without terminating newlines. > > It seems likely all of these should

Re: [PATCH v3 1/2] net: add support for threaded NAPI polling

2020-08-30 Thread Sebastian Gottschall
Am 22.08.2020 um 03:49 schrieb Jakub Kicinski: On Fri, 21 Aug 2020 21:01:50 +0200 Felix Fietkau wrote: For some drivers (especially 802.11 drivers), doing a lot of work in the NAPI poll function does not perform well. Since NAPI poll is bound to the CPU it was scheduled from, we can easily end

[PATCH net-next v5 3/5] net: mdiobus: add clause 45 mdiobus write accessor

2020-08-30 Thread Ioana Ciornei
Add the locked variant of the clause 45 mdiobus write accessor - mdiobus_c45_write(). Signed-off-by: Ioana Ciornei Reviewed-by: Russell King --- Changes in v5: - none include/linux/mdio.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/mdio.h b/include/linux/mdio.h inde

[PATCH net-next v5 4/5] net: phy: add Lynx PCS module

2020-08-30 Thread Ioana Ciornei
Add a Lynx PCS module which exposes the necessary operations to drive the PCS using phylink. The majority of the code is extracted from the Felix DSA driver, which will be also modified in a later patch, and exposed as a separate module for code reusability purposes. As such, this aims at feature

[PATCH net-next v5 2/5] net: phylink: consider QSGMII interface mode in phylink_mii_c22_pcs_get_state

2020-08-30 Thread Ioana Ciornei
The same link partner advertisement word is used for both QSGMII and SGMII, thus treat both interface modes using the same phylink_decode_sgmii_word() function. Signed-off-by: Ioana Ciornei Reviewed-by: Russell King --- Changes in v5: - none drivers/net/phy/phylink.c | 1 + 1 file changed, 1 i

[PATCH net-next v5 5/5] net: dsa: ocelot: use the Lynx PCS helpers in Felix and Seville

2020-08-30 Thread Ioana Ciornei
Use the helper functions introduced by the newly added Lynx PCS MDIO module in the Felix VSC9959 and Seville VSC9953. Instead of representing the PCS as a phy_device, a mdio_device structure will be passed to the Lynx module which is now actually implementing all the PCS configuration and status r

[PATCH net-next v5 1/5] net: phylink: add helper function to decode USXGMII word

2020-08-30 Thread Ioana Ciornei
With the new addition of the USXGMII link partner ability constants we can now introduce a phylink helper that decodes the USXGMII word and populates the appropriate fields in the phylink_link_state structure based on them. Signed-off-by: Ioana Ciornei Reviewed-by: Russell King --- Changes in v5

[PATCH net-next v5 0/5] net: phy: add Lynx PCS MDIO module

2020-08-30 Thread Ioana Ciornei
Add support for the Lynx PCS as a separate module in drivers/net/phy/. The advantage of this structure is that multiple ethernet or switch drivers used on NXP hardware (ENETC, Seville, Felix DSA switch etc) can share the same implementation of PCS configuration and runtime management. The module i

Re: [net-next v5 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-08-30 Thread Vadym Kochan
Hi Chris, On Wed, Aug 26, 2020 at 04:30:35AM +, Chris Packham wrote: > Hi Vadym, > > On 26/08/20 12:20 am, Vadym Kochan wrote: > > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely > > wireless SMB deploym

Re: [EXT] [PATCH] bnx2x: correct a mistake when show error code

2020-08-30 Thread Igor Russkikh
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c > b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c > index 1426c691c7c4..0346771396ce 100644 > --- a/drivers/net/e

Re: [net-next v5 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-30 Thread Vadym Kochan
Hi David, On Wed, Aug 26, 2020 at 07:34:46AM -0700, David Miller wrote: > From: Vadym Kochan > Date: Wed, 26 Aug 2020 11:17:44 +0300 > > > Initially there was (in RFC patch set), not locking, but _rcu list API > > used, because the port list is modified only by 1 writer when creating > > the por