Re: [PATCH V1 net-next 5/9] net: ena: aggregate stats increase into a function

2020-11-25 Thread Heiner Kallweit
Am 25.11.2020 um 23:51 schrieb akiy...@amazon.com: > From: Arthur Kiyanovski > > Introduce ena_increase_stat_atomic() function to increase statistics by > certain number. > The function includes the > - lock aquire > - stat increase > - lock release > Having "atomic" in the name may

[PATCH] NFC:Fix Warning: Comparison to bool

2020-11-25 Thread Runzhe Wang
This patch uses the shdlc->rnr variable as a judgment condition of statement, rather than compares with bool. Signed-off-by: Runzhe Wang Reported-by: Abaci --- net/nfc/hci/llc_shdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_s

Re: [PATCH bpf-next v3 1/5] selftests/bpf: xsk selftests framework

2020-11-25 Thread Yonghong Song
On 11/25/20 10:37 AM, Weqaar Janjua wrote: This patch adds AF_XDP selftests framework under selftests/bpf. Topology: - --- --- | xskX | - | xskY | --- | --- | | | -

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

2020-11-25 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (htmldocs) produced this warning: include/linux/phy.h:869: warning: Function parameter or member 'config_intr' not described in 'phy_driver' Introduced by commit 6527b938426f ("net: phy: remove the .did_interrupt() and .ack_in

[PATCH net-next v7 5/5] net/x25: remove x25_kill_by_device()

2020-11-25 Thread Martin Schiller
Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 16 1 file changed, 16 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 313a6222ded9..1432a05805ab 100644 --- a/net/x25/af_x25.c +++ b

[PATCH net-next v7 4/5] net/x25: fix restart request/confirm handling

2020-11-25 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 41 + 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/x25/x25_link.c b/net/x25/x25_link.

[PATCH net-next v7 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-25 Thread Martin Schiller
1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller --- net/lapb/lapb_timer.c | 11 +-- 1 file changed, 9 i

[PATCH net-next v7 2/5] net/lapb: support netdev events

2020-11-25 Thread Martin Schiller
This patch allows layer2 (LAPB) to react to netdev events itself and avoids the detour via layer3 (X.25). 1. Establish layer2 on NETDEV_UP events, if the carrier is already up. 2. Call lapb_disconnect_request() on NETDEV_GOING_DOWN events to signal the peer that the connection will go down.

[PATCH net-next v7 1/5] net/x25: handle additional netdev events

2020-11-25 Thread Martin Schiller
1. Add / remove x25_link_device by NETDEV_REGISTER/UNREGISTER and also by NETDEV_POST_TYPE_CHANGE/NETDEV_PRE_TYPE_CHANGE. This change is needed so that the x25_neigh struct for an interface is already created when it shows up and is kept independently if the interface goes UP or DOWN.

[PATCH net-next v7 0/5] net/x25: netdev event handling

2020-11-25 Thread Martin Schiller
--- Changes to v6: o integrated some code styling suggestions by Jakub. Changes to v5: o fix numbering in commit message of patch 2/5. Changes to v4: o also establish layer2 (LAPB) on NETDEV_UP events, if the carrier is already UP. Changes to v3: o another complete rework of the patch-set to

Re: [RFC][PATCH 00/18] crypto: Add generic Kerberos library

2020-11-25 Thread Herbert Xu
On Thu, Nov 12, 2020 at 12:57:45PM +, David Howells wrote: > > Hi Herbert, Bruce, > > Here's my first cut at a generic Kerberos crypto library in the kernel so > that I can share code between rxrpc and sunrpc (and cifs?). Hi David: I can't find the bit where you are actually sharing this co

Re: [PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-25 Thread Martin Schiller
On 2020-11-26 01:08, Xie He wrote: Hi Martin, Since we are going to assume lapb->state would remain in LAPB_STATE_0 when the carrier is down (as understood by me. Right?), could we add a check in lapb_connect_request to reject the upper layer's "connect" instruction when the carrier is down?

[PATCH 1/2][v2] e1000e: Assign DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME to speed up s2ram

2020-11-25 Thread Chen Yu
The NIC is put in runtime suspend status when there is no cable connected. As a result, it is safe to keep non-wakeup NIC in runtime suspended during s2ram because the system does not rely on the NIC plug event nor WoL to wake up the system. Besides that, unlike the s2idle, s2ram does not need to m

[PATCH 2/2][v2] e1000e: Remove the runtime suspend restriction on CNP+

2020-11-25 Thread Chen Yu
Although there is platform issue of runtime suspend support on CNP, it would be more flexible to let the user decide whether to disable runtime or not because: 1. This can be done in userspace via echo on > /sys/devices/pci\:00/\:00\:1f.d/power/control 2. More and more NICs would support

[PATCH 0/2][v2] Leverage runtime suspend to speed up the s2ram on e1000e

2020-11-25 Thread Chen Yu
The NIC is put in runtime suspend status when there is no cable connected. As a result, it is safe to keep non-wakeup NIC in runtime suspended during s2ram because the system does not rely on the NIC plug event nor WoL to wake up the system. After doing this, the s2ram could speed up the suspend/re

Re: [PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-25 Thread Martin Schiller
On 2020-11-25 22:49, Jakub Kicinski wrote: On Tue, 24 Nov 2020 10:39:35 +0100 Martin Schiller wrote: This patch allows layer2 (LAPB) to react to netdev events itself and avoids the detour via layer3 (X.25). 1. Establish layer2 on NETDEV_UP events, if the carrier is already up. 2. Call lapb_dis

linux-next: manual merge of the userns tree with the bpf-next tree

2020-11-25 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the userns tree got a conflict in: kernel/bpf/task_iter.c between commit: 91b2db27d3ff ("bpf: Simplify task_file_seq_get_next()") from the bpf-next tree and commit: edc52f17257a ("bpf/task_iter: In task_file_seq_get_next use task_lookup_next_fd_rcu")

Re: [PATCH v4 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-25 Thread Cong Wang
On Wed, Nov 25, 2020 at 12:04 PM Marcelo Ricardo Leitner wrote: > > On Wed, Nov 25, 2020 at 12:01:23PM +0800, we...@ucloud.cn wrote: > > From: wenxu > > > > Currently kernel tc subsystem can do conntrack in cat_ct. But when several >typo ^^^ > > > f

Re: [PATCH v4 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-25 Thread Cong Wang
On Wed, Nov 25, 2020 at 11:11 AM Jakub Kicinski wrote: > > On Wed, 25 Nov 2020 12:01:23 +0800 we...@ucloud.cn wrote: > > From: wenxu > > > > Currently kernel tc subsystem can do conntrack in cat_ct. But when several > > fragment packets go through the act_ct, function tcf_ct_handle_fragments > >

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

2020-11-25 Thread Srinivasan Raju
> I haven't had a chance to review this yet but we have some documentation for > new drivers: > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#new_driver > Is the firmware publically available? Thanks Kalle, We will make the firmware available in our website fo

Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-25 Thread Andrew Lunn
On Wed, Nov 25, 2020 at 05:30:04PM -0800, Florian Fainelli wrote: > > > On 11/25/2020 4:00 PM, Andrew Lunn wrote: > > On Thu, Nov 26, 2020 at 12:24:55AM +0100, Lukasz Majewski wrote: > >> This is the first attempt to add support for L2 switch available on some > >> NXP > >> devices - i.e. iMX287

Re: [PATCH bpf-next v8 06/34] bpf: prepare for memcg-based memory accounting for bpf maps

2020-11-25 Thread Roman Gushchin
On Thu, Nov 26, 2020 at 01:21:41AM +0100, Daniel Borkmann wrote: > On 11/25/20 4:00 AM, Roman Gushchin wrote: > > In the absolute majority of cases if a process is making a kernel > > allocation, it's memory cgroup is getting charged. > > > > Bpf maps can be updated from an interrupt context and i

Re: [PATCH net-next v2 2/3] net: dsa: add Arrow SpeedChips XRS700x driver

2020-11-25 Thread George McCollister
On Wed, Nov 25, 2020 at 7:42 PM Jakub Kicinski wrote: > > On Wed, 25 Nov 2020 13:37:39 -0600 George McCollister wrote: > > Add a driver with initial support for the Arrow SpeedChips XRS7000 > > series of gigabit Ethernet switch chips which are typically used in > > critical networking applications

Re: [net-next v2 0/3][pull request] 40GbE Intel Wired LAN Driver Updates 2020-11-24

2020-11-25 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Tue, 24 Nov 2020 08:52:42 -0800 you wrote: > This series contains updates to i40e and igbvf drivers. > > Marek removes a redundant assignment for i40e. > > Stefan Assmann corrects reporting of VF link speed for i40e.

Re: [net-next PATCH v5 0/4] net: dsa: mv88e6xxx: serdes link without phy

2020-11-25 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Tue, 24 Nov 2020 17:34:36 +1300 you wrote: > This small series gets my hardware into a working state. The key points are to > make sure we don't force the link and that we ask the MAC for the link status. > I also have

Re: [PATCH net-next 0/4] dt-bindings: net: dsa: microchip: convert KSZ bindings to yaml

2020-11-25 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 20 Nov 2020 12:21:03 +0100 you wrote: > These patches are orginally from the series > > "net: dsa: microchip: PTP support for KSZ956x" > > As the the device tree conversion to yaml is not really related to the >

Re: [net v2] ch_ktls: lock is not freed

2020-11-25 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 25 Nov 2020 12:56:26 +0530 you wrote: > Currently lock gets freed only if timeout expires, but missed a > case when HW returns failure and goes for cleanup. > > Fixes: efca3878a5fb ("ch_ktls: Issue if connection offload

Re: [PATCH net-next v2 2/3] net: dsa: add Arrow SpeedChips XRS700x driver

2020-11-25 Thread Jakub Kicinski
On Wed, 25 Nov 2020 13:37:39 -0600 George McCollister wrote: > Add a driver with initial support for the Arrow SpeedChips XRS7000 > series of gigabit Ethernet switch chips which are typically used in > critical networking applications. > > The switches have up to three RGMII ports and one RMII por

Re: [PATCH net v2 0/2] devlink port attribute fixes

2020-11-25 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Wed, 25 Nov 2020 11:16:18 +0200 you wrote: > This patchset contains 2 small fixes for devlink port attributes. > > Patch summary: > Patch-1 synchronize the devlink port attribute reader > with net namespace change o

Re: [PATCH V2 net] net/tls: Protect from calling tls_dev_del for TLS RX twice

2020-11-25 Thread Jakub Kicinski
On Wed, 25 Nov 2020 14:18:10 -0800 Saeed Mahameed wrote: > From: Maxim Mikityanskiy > > tls_device_offload_cleanup_rx doesn't clear tls_ctx->netdev after > calling tls_dev_del if TLX TX offload is also enabled. Clearing > tls_ctx->netdev gets postponed until tls_device_gc_task. It leaves a > time

Re: [PATCH net-next v2 1/3] dsa: add support for Arrow XRS700x tag trailer

2020-11-25 Thread Florian Fainelli
On 11/25/2020 11:37 AM, George McCollister wrote: > Add support for Arrow SpeedChips XRS700x single byte tag trailer. This > is modeled on tag_trailer.c which works in a similar way. > > Signed-off-by: George McCollister Reviewed-by: Florian Fainelli -- Florian

Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-25 Thread Florian Fainelli
On 11/25/2020 4:00 PM, Andrew Lunn wrote: > On Thu, Nov 26, 2020 at 12:24:55AM +0100, Lukasz Majewski wrote: >> This is the first attempt to add support for L2 switch available on some NXP >> devices - i.e. iMX287 or VF610. This patch set uses common FEC and DSA code. > > Interesting. I need to

Re: [PATCH net-next v2 3/3] dt-bindings: net: dsa: add bindings for xrs700x switches

2020-11-25 Thread Florian Fainelli
On 11/25/2020 11:37 AM, George McCollister wrote: > Add documentation and an example for Arrow SpeedChips XRS7000 Series > single chip Ethernet switches. > > Signed-off-by: George McCollister Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v3 net] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-25 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 24 Nov 2020 21:58:35 -0500 you wrote: > From: Min Li > > Feed kstrtou8 with NULL terminated string. > > Changes since v1: > -Use sscanf to get rid of adhoc string parse. > Changes since v2: > -Check if sscanf returns

Re: [PATCH V1 net-next 0/9] XDP Redirect implementation for ENA driver

2020-11-25 Thread Jakub Kicinski
On Thu, 26 Nov 2020 00:51:39 +0200 akiy...@amazon.com wrote: > This series requires the patchset sent to 'net' to be applied cleanly. Decided > to send this one up front to reduce the risk of not getting XDP Redirect in > next > version. Netdev maintainers don't track dependencies between series.

Re: [PATCH v3 net-next] net: phy: realtek: read actual speed on rtl8211f to detect downshift

2020-11-25 Thread Yonglong Liu
Hi, Russell:     I found this message in kernel log, thanks! On 2020/11/26 1:07, Russell King - ARM Linux admin wrote: On Thu, Nov 26, 2020 at 12:57:37AM +0800, Yonglong Liu wrote: Hi, Antonio:     Could you help to provide a downshift warning message when this happen?     It's a little st

Re: [PATCH net-next v5 12/14] net/smc: Add SMC-D Linkgroup diagnostic support

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 18:50:45 +0100 Karsten Graul wrote: > +static int smc_nl_fill_smcd_lgr(struct smc_link_group *lgr, > + struct sk_buff *skb, > + struct netlink_callback *cb) > +{ > + char smc_host[SMC_MAX_HOSTNAME_LEN + 1]; > + char

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Finn Thain
On Wed, 25 Nov 2020, Nick Desaulniers wrote: > On Wed, Nov 25, 2020 at 1:33 PM Finn Thain wrote: > > > > Or do you think that a codebase can somehow satisfy multiple checkers > > and their divergent interpretations of the language spec? > > Have we found any cases yet that are divergent? I d

Re: [PATCH net-next v5 10/14] net/smc: Introduce SMCR get linkgroup command

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 18:50:43 +0100 Karsten Graul wrote: > +static int smc_nl_fill_lgr(struct smc_link_group *lgr, > +struct sk_buff *skb, > +struct netlink_callback *cb) > +{ > + char smc_target[SMC_MAX_PNETID_LEN + 1]; > + struct nlattr *attr

Re: [PATCH net-next v5 09/14] net/smc: Add support for obtaining system information

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 18:50:42 +0100 Karsten Graul wrote: > @@ -214,6 +217,67 @@ static void smc_lgr_unregister_conn(struct > smc_connection *conn) > conn->lgr = NULL; > } > > +int smc_nl_get_sys_info(struct sk_buff *skb, struct netlink_callback *cb) > +{ > + struct smc_nl_dmp_ctx *cb_c

Re: [PATCH bpf-next v8 06/34] bpf: prepare for memcg-based memory accounting for bpf maps

2020-11-25 Thread Daniel Borkmann
On 11/25/20 4:00 AM, Roman Gushchin wrote: In the absolute majority of cases if a process is making a kernel allocation, it's memory cgroup is getting charged. Bpf maps can be updated from an interrupt context and in such case there is no process which can be charged. It makes the memory account

Re: [net-next v3 0/8] seg6: add support for SRv6 End.DT4/DT6 behavior

2020-11-25 Thread Andrea Mayer
Hi Jakub, On Tue, 24 Nov 2020 15:49:04 -0800 Jakub Kicinski wrote: > LGTM! Please address the nit and repost without the iproute2 patch. Thanks for the review of the patchset. > Mixing the iproute2 patch in has confused patchwork: > > https://patchwork.kernel.org/project/netdevbpf/list/?serie

Re: [PATCH net-next v5 08/14] net/smc: Introduce generic netlink interface for diagnostic purposes

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 18:50:41 +0100 Karsten Graul wrote: > From: Guvenc Gulce > > Introduce generic netlink interface infrastructure to expose > the diagnostic information regarding smc linkgroups, links and devices. > > Signed-off-by: Guvenc Gulce > Signed-off-by: Karsten Graul > @@ -2494,6 +

[PATCH net v3 1/9] ibmvnic: handle inconsistent login with reset

2020-11-25 Thread Dany Madden
Inconsistent login with the vnicserver is causing the device to be removed. This does not give the device a chance to recover from error state. This patch schedules a FATAL reset instead to bring the adapter up. Fixes: 032c5e82847a2 ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Dany M

[PATCH net v3 8/9] ibmvnic: no reset timeout for 5 seconds after reset

2020-11-25 Thread Dany Madden
Reset timeout is going off right after adapter reset. This patch ensures that timeout is scheduled if it has been 5 seconds since the last reset. 5 seconds is the default watchdog timeout. Fixes: ed651a10875f1 ("ibmvnic: Updated reset handling") Signed-off-by: Dany Madden --- drivers/net/etherne

[PATCH net v3 4/9] ibmvnic: restore adapter state on failed reset

2020-11-25 Thread Dany Madden
In a failed reset, driver could end up in VNIC_PROBED or VNIC_CLOSED state and cannot recover in subsequent resets, leaving it offline. This patch restores the adapter state to reset_state, the original state when reset was called. Fixes: b27507bb59ed5 ("net/ibmvnic: unlock rtnl_lock in reset so

[PATCH net v3 2/9] ibmvnic: stop free_all_rwi on failed reset

2020-11-25 Thread Dany Madden
When ibmvnic fails to reset, it breaks out of the reset loop and frees all of the remaining resets from the workqueue. Doing so prevents the adapter from recovering if no reset is scheduled after that. Instead, have the driver continue to process resets on the workqueue. Remove the no longer need

[PATCH net v3 3/9] ibmvnic: avoid memset null scrq msgs

2020-11-25 Thread Dany Madden
scrq->msgs could be NULL during device reset, causing Linux to crash. So, check before memset scrq->msgs. Fixes: c8b2ad0a4a901 ("ibmvnic: Sanitize entire SCRQ buffer on reset") Signed-off-by: Dany Madden Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 19 +++ 1

[PATCH net v3 9/9] ibmvnic: reduce wait for completion time

2020-11-25 Thread Dany Madden
Reduce the wait time for Command Response Queue response from 30 seconds to 20 seconds, as recommended by VIOS and Power Hypervisor teams. Fixes: bd0b672313941 ("ibmvnic: Move login and queue negotiation into ibmvnic_open") Fixes: 53da09e92910f ("ibmvnic: Add set_link_state routine for setting ad

[PATCH net v3 0/9] ibmvnic: assorted bug fixes

2020-11-25 Thread Dany Madden
Assorted fixes for ibmvnic originated from "[PATCH net 00/15] ibmvnic: assorted bug fixes" sent by Lijun Pan. v3 Changes as suggested by Jakub Kicinski: - Add a space between variable declaration and code in patch 3/9. Checkpatch does not catch this. - Unwrapped FIXES lines in patch 9/9. - Remov

[PATCH net v3 6/9] ibmvnic: track pending login

2020-11-25 Thread Dany Madden
From: Sukadev Bhattiprolu If after ibmvnic sends a LOGIN it gets a FAILOVER, it is possible that the worker thread will start reset process and free the login response buffer before it gets a (now stale) LOGIN_RSP. The ibmvnic tasklet will then try to access the login response buffer and crash.

[PATCH net v3 5/9] ibmvnic: delay next reset if hard reset fails

2020-11-25 Thread Dany Madden
From: Sukadev Bhattiprolu If auto-priority failover is enabled, the backing device needs time to settle if hard resetting fails for any reason. Add a delay of 60 seconds before retrying the hard-reset. Fixes: 2770a7984db5 ("ibmvnic: Introduce hard reset recovery") Signed-off-by: Sukadev Bhattipr

[PATCH net v3 7/9] ibmvnic: send_login should check for crq errors

2020-11-25 Thread Dany Madden
send_login() does not check for the result of ibmvnic_send_crq() of the login request. This results in the driver needlessly retrying the login 10 times even when CRQ is no longer active. Check the return code and give up in case of errors in sending the CRQ. The only time we want to retry is if w

Re: [PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-25 Thread Xie He
Hi Martin, Since we are going to assume lapb->state would remain in LAPB_STATE_0 when the carrier is down (as understood by me. Right?), could we add a check in lapb_connect_request to reject the upper layer's "connect" instruction when the carrier is down? Like this: diff --git a/include/linux/l

Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-25 Thread Andrew Lunn
On Thu, Nov 26, 2020 at 12:24:55AM +0100, Lukasz Majewski wrote: > This is the first attempt to add support for L2 switch available on some NXP > devices - i.e. iMX287 or VF610. This patch set uses common FEC and DSA code. Interesting. I need to take another look at the Vybrid manual. Last time i

Re: [PATCH] net/af_unix: don't create a path for a binded socket

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 15:24:21 +0300 Denis Kirjanov wrote: > in the case of the socket which is bound to an adress > there is no sense to create a path in the next attempts > diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c > index 41c3303c3357..fd76a8fe3907 100644 > --- a/net/unix/af_unix.c > +

[RFC 4/4] ARM: dts: imx28: Add description for L2 switch on XEA board

2020-11-25 Thread Lukasz Majewski
The 'eth_switch' node is now used to enable support for L2 switch. Moreover, a separate 'switch' node was introduced to keep the code more clean. Signed-off-by: Lukasz Majewski --- arch/arm/boot/dts/imx28-xea.dts | 55 + 1 file changed, 55 insertions(+) diff --gi

[RFC 2/4] net: dsa: Provide DSA driver for NXP's More Than IP L2 switch

2020-11-25 Thread Lukasz Majewski
This change provides driver for DSA (Distributed Switch Architecture) subsystem for i.MX28 SoC (imx287 to be precise). This code just is responsible for configuring this device as L2 bridge (no vlan, port separation supported). This driver shall be regarded as a complementary one for NXP's FEC (f

[RFC 1/4] net: fec: Move some defines to ./drivers/net/ethernet/freescale/fec.h header

2020-11-25 Thread Lukasz Majewski
After this change ECR (control register) defines are moved to fec.h, so they can be reused by L2 switch code. Signed-off-by: Lukasz Majewski --- drivers/net/ethernet/freescale/fec.h | 3 +++ drivers/net/ethernet/freescale/fec_main.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)

[RFC 3/4] net: imx: l2switch: Adjust fec_main.c to provide support for L2 switch

2020-11-25 Thread Lukasz Majewski
This patch provides the code for re-using generic FEC i.MX code for L2 switch. The trick here is to set eth0 controller as a "fixed-link" and then use DSA subsystem to create lan{12} network devices for ports. The internal connection diagram can be found here [0]. This code has been developed on

[RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-25 Thread Lukasz Majewski
This is the first attempt to add support for L2 switch available on some NXP devices - i.e. iMX287 or VF610. This patch set uses common FEC and DSA code. This code provides _very_ basic switch functionality (packets are passed between lan1 and lan2 ports and it is possible to send packets via eth0

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Finn Thain
On Wed, 25 Nov 2020, Nick Desaulniers wrote: > On Wed, Nov 25, 2020 at 1:33 PM Finn Thain > wrote: > > > > Or do you think that a codebase can somehow satisfy multiple checkers > > and their divergent interpretations of the language spec? > > Have we found any cases yet that are divergent? I d

Re: [PATCH net-next v3 1/2] lockdep: Introduce in_softirq lockdep assert

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 18:49:28 +0800 Yunsheng Lin wrote: > The current semantic for napi_consume_skb() is that caller need > to provide non-zero budget when calling from NAPI context, and > breaking this semantic will cause hard to debug problem, because > _kfree_skb_defer() need to run in atomic con

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Edward Cree
On 24/11/2020 21:25, Kees Cook wrote: > I still think this isn't right -- it's a case statement that runs off > the end without an explicit flow control determination. Proves too much — for instance case foo: case bar: thing; break; doesn't require a fallthrough; after cas

Re: Hardcoded multicast queue length in macvlan.c driver causes poor multicast receive performance

2020-11-25 Thread Jakub Kicinski
On Wed, 25 Nov 2020 23:15:39 +0100 Thomas Karlsson wrote: > >> This is my first time ever attemting a contribution to the kernel so > >> I'm quite happy to keep it simple like that too :) > > > > Module params are highly inflexible, we have a general policy not > > to accept them in the netdev

Re: [PATCH net-next 0/2] enetc: Clean endianness warnings up

2020-11-25 Thread Jakub Kicinski
On Wed, 18 Nov 2020 09:54:35 -0800 Jakub Kicinski wrote: > On Wed, 18 Nov 2020 09:52:58 -0800 Jakub Kicinski wrote: > > On Tue, 17 Nov 2020 20:20:02 +0200 Claudiu Manoil wrote: > > > Cleanup patches to address the outstanding endianness issues > > > in the driver reported by sparse. > > > >

Re: [PATCH net-next 0/5] mlxsw: Update adjacency index more efficiently

2020-11-25 Thread David Ahern
On 11/25/20 12:35 PM, Ido Schimmel wrote: > Example: > > 8k IPv6 routes were added in an alternating manner to two VRFs. All the > routes are using the same nexthop object ('nhid 1'). > > Before: > > # perf stat -e devlink:devlink_hwmsg --filter='incoming==0' -- ip nexthop > replace id 1 via 20

[PATCH V1 net-next 9/9] net: ena: introduce ndo_xdp_xmit() function for XDP_REDIRECT

2020-11-25 Thread akiyano
From: Arthur Kiyanovski This patch implements the ndo_xdp_xmit() net_device function which is called when a packet is redirected to this driver using an XDP_REDIRECT directive. The function receives an array of xdp frames that it needs to xmit. The TX queues that are used to xmit these frames ar

[PATCH V1 net-next 8/9] net: ena: use xdp_return_frame() to free xdp frames

2020-11-25 Thread akiyano
From: Arthur Kiyanovski XDP subsystem has a function to free XDP frames and their associated pages. Using this function would help the driver's XDP implementation to adjust to new changes in the XDP subsystem in the kernel (e.g. introduction of XDP MB). Also, remove 'xdp_rx_page' field from ena_

[PATCH V1 net-next 5/9] net: ena: aggregate stats increase into a function

2020-11-25 Thread akiyano
From: Arthur Kiyanovski Introduce ena_increase_stat_atomic() function to increase statistics by certain number. The function includes the - lock aquire - stat increase - lock release line sequence that is ubiquitous across the driver. The function increases a single stat at a time.

[PATCH V1 net-next 2/9] net: ena: add device distinct log prefix to files

2020-11-25 Thread akiyano
From: Arthur Kiyanovski ENA logs are adjusted to display the full ENA representation to distinct each ENA device in case of multiple interfaces. Using netdev_err/warn and dev_info functions for logging provides uniform printing with clear distinction of the device and interface. This patch chang

[PATCH V1 net-next 6/9] net: ena: use xdp_frame in XDP TX flow

2020-11-25 Thread akiyano
From: Arthur Kiyanovski Rename the ena_xdp_xmit_buff() function to ena_xdp_xmit_frame() and pass it an xdp_frame struct instead of xdp_buff. This change lays the ground for XDP redirect implementation which uses xdp_frames when 'xmit'ing packets. Signed-off-by: Shay Agroskin Signed-off-by: Arth

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

2020-11-25 Thread akiyano
From: Arthur Kiyanovski This patch adds a partial support for the XDP_REDIRECT directive which instructs the driver to pass the packet to an interface specified by the program. The directive is passed to the driver by calling bpf_redirect() or bpf_redirect_map() functions from the eBPF program.

[PATCH V1 net-next 4/9] net: ena: fix coding style nits

2020-11-25 Thread akiyano
From: Arthur Kiyanovski This commit fixes two nits, but it does not generate any change to binary because of the optimization of gcc. - use `count` instead of `channels->combined_count` - change return type from `int` to `bool` Also add spaces and change macro order in OR assignment to make

[PATCH V1 net-next 3/9] net: ena: add explicit casting to variables

2020-11-25 Thread akiyano
From: Arthur Kiyanovski This patch adds explicit casting to some implicit conversions in the ena driver. The implicit conversions fail some of our static checkers that search for accidental conversions in our driver. Adding this cast won't affect the end results, and would sooth the checkers. Si

[PATCH V1 net-next 0/9] XDP Redirect implementation for ENA driver

2020-11-25 Thread akiyano
From: Arthur Kiyanovski Hi all, ENA is adding XDP Redirect support for its driver and some other small tweaks. This series adds the following: - Make log messages in the driver have a uniform format using netdev_* function - Improve code readability and add explicit masking - Add support for XD

[PATCH V1 net-next 1/9] net: ena: use constant value for net_device allocation

2020-11-25 Thread akiyano
From: Arthur Kiyanovski The patch changes the maximum number of RX/TX queues it advertises to the kernel (via alloc_etherdev_mq()) from a value received from the device to a constant value which is the minimum between 128 and the number of CPUs in the system. By allocating the net_device struct

Re: [PATCH net-next 1/2] soc: qcom: ipa: Constify static qmi structs

2020-11-25 Thread Jakub Kicinski
On Wed, 25 Nov 2020 15:45:05 -0600 Alex Elder wrote: > On 11/22/20 5:40 PM, Rikard Falkeborn wrote: > > These are only used as input arguments to qmi_handle_init() which > > accepts const pointers to both qmi_ops and qmi_msg_handler. Make them > > const to allow the compiler to put them in read-onl

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Edward Cree
On 25/11/2020 00:32, Miguel Ojeda wrote: > I have said *authoring* lines of *this* kind takes a minute per line. > Specifically: lines fixing the fallthrough warning mechanically and > repeatedly where the compiler tells you to, and doing so full-time for > a month. > It is useful since it makes i

[PATCH V2 net] net/tls: Protect from calling tls_dev_del for TLS RX twice

2020-11-25 Thread Saeed Mahameed
From: Maxim Mikityanskiy tls_device_offload_cleanup_rx doesn't clear tls_ctx->netdev after calling tls_dev_del if TLX TX offload is also enabled. Clearing tls_ctx->netdev gets postponed until tls_device_gc_task. It leaves a time frame when tls_device_down may get called and call tls_dev_del for R

Re: Hardcoded multicast queue length in macvlan.c driver causes poor multicast receive performance

2020-11-25 Thread Thomas Karlsson
On 2020-11-25 19:07, Jakub Kicinski wrote: > On Wed, 25 Nov 2020 18:12:34 +0100 Thomas Karlsson wrote: For this reason I would like to know if you would consider merging a patch using the module_param(...) variant instead? I would argue that this still makes the situation better

Re: [PATCH net 1/2] net/tls: Protect from calling tls_dev_del for TLS RX twice

2020-11-25 Thread Saeed Mahameed
On Wed, 2020-11-18 at 17:13 -0800, Jakub Kicinski wrote: > On Tue, 17 Nov 2020 12:33:54 -0800 Saeed Mahameed wrote: > > From: Maxim Mikityanskiy > > > > tls_device_offload_cleanup_rx doesn't clear tls_ctx->netdev after > > calling tls_dev_del if TLX TX offload is also enabled. Clearing > > tls_ct

Re: [PATCH net 2/2] net: Call skb destructor on NAPI_GRO_FREE_STOLEN_HEAD

2020-11-25 Thread Saeed Mahameed
On Wed, 2020-11-18 at 21:21 +0100, Eric Dumazet wrote: > On Wed, Nov 18, 2020 at 9:14 PM Jakub Kicinski > wrote: > > On Wed, 18 Nov 2020 21:02:29 +0100 Eric Dumazet wrote: > > > On Wed, Nov 18, 2020 at 8:22 PM Jakub Kicinski > > > wrote: > > > > On Tue, 17 Nov 2020 12:33:55 -0800 Saeed Mahameed w

[PATCH net-next v2] macvlan: Support for high multicast packet rate

2020-11-25 Thread Thomas Karlsson
Background: Broadcast and multicast packages are enqueued for later processing. This queue was previously hardcoded to 1000. This proved insufficient for handling very high packet rates. This resulted in packet drops for multicast. While at the same time unicast worked fine. The change: This patc

[PATCH net] chelsio/chtls: fix panic during unload reload chtls

2020-11-25 Thread Vinay Kumar Yadav
there is kernel panic in inet_twsk_free() while chtls module unload when socket is in TIME_WAIT state because sk_prot_creator was not preserved on connection socket. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Udai Sharma Signed-off-by: Vinay Kumar Yadav --- d

Re: [PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 10:39:35 +0100 Martin Schiller wrote: > This patch allows layer2 (LAPB) to react to netdev events itself and > avoids the detour via layer3 (X.25). > > 1. Establish layer2 on NETDEV_UP events, if the carrier is already up. > > 2. Call lapb_disconnect_request() on NETDEV_GOING_

Re: [PATCH net-next 1/2] soc: qcom: ipa: Constify static qmi structs

2020-11-25 Thread Alex Elder
On 11/22/20 5:40 PM, Rikard Falkeborn wrote: These are only used as input arguments to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Good idea. Thanks

Re: [PATCH net-next v2] mptcp: be careful on MPTCP-level ack.

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 22:51:24 +0100 Paolo Abeni wrote: > We can enter the main mptcp_recvmsg() loop even when > no subflows are connected. As note by Eric, that would > result in a divide by zero oops on ack generation. > > Address the issue by checking the subflow status before > sending the ack.

Re: [PATCH net-next v2] bridge: mrp: Implement LC mode for MRP

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 09:25:25 +0100 Horatiu Vultur wrote: > Extend MRP to support LC mode(link check) for the interconnect port. > This applies only to the interconnect ring. > > Opposite to RC mode(ring check) the LC mode is using CFM frames to > detect when the link goes up or down and based on t

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Finn Thain
On Wed, 25 Nov 2020, Nick Desaulniers wrote: > So developers and distributions using Clang can't have > -Wimplicit-fallthrough enabled because GCC is less strict (which has > been shown in this thread to lead to bugs)? We'd like to have nice > things too, you know. > Apparently the GCC devel

Re: [PATCH v7 3/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 13:03:30 +0100 Łukasz Stelmach wrote: > ASIX AX88796[1] is a versatile ethernet adapter chip, that can be > connected to a CPU with a 8/16-bit bus or with an SPI. This driver > supports SPI connection. > > The driver has been ported from the vendor kernel for ARTIK5[2] > boards

Re: [PATCH v7 3/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 13:03:30 +0100 Łukasz Stelmach wrote: > +static int > +ax88796c_start_xmit(struct sk_buff *skb, struct net_device *ndev) > +{ > + struct ax88796c_device *ax_local = to_ax88796c_device(ndev); > + > + skb_queue_tail(&ax_local->tx_wait_q, skb); > + if (skb_queue_len(&ax

Re: [PATCH mlx5-next 11/16] net/mlx5: Add VDPA priority to NIC RX namespace

2020-11-25 Thread Jason Gunthorpe
On Wed, Nov 25, 2020 at 10:54:22AM -0800, Jakub Kicinski wrote: > > RDMA covers a wide range of accelerated networking these days.. Where > > else are you going to put this stuff in the kernel? > > IDK what else you got in there :) It's probably a case by case answer. Hmm, yes, it seems endless

Re: [PATCH bpf-next v3 06/10] xsk: propagate napi_id to XDP socket Rx path

2020-11-25 Thread Michael S. Tsirkin
On Thu, Nov 19, 2020 at 09:30:20AM +0100, Björn Töpel wrote: > From: Björn Töpel > > Add napi_id to the xdp_rxq_info structure, and make sure the XDP > socket pick up the napi_id in the Rx path. The napi_id is used to find > the corresponding NAPI structure for socket busy polling. > > Acked-by:

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Kees Cook
On Tue, Nov 24, 2020 at 11:05:35PM -0800, James Bottomley wrote: > Now, what we have seems to be about 6 cases (at least what's been shown > in this thread) where a missing break would cause potentially user > visible issues. That means the value of this isn't zero, but it's not > a no-brainer mas

Re: [PATCH net-next v3 00/12] net: dsa: microchip: PTP support for KSZ956x

2020-11-25 Thread Christian Eggers
I need some help from Microchip, please read below. On Thursday, 19 November 2020, 19:51:15 CET, tristram...@microchip.com wrote: > There is one more requirement that is a little difficult to do. The > calculated peer delay > needs to be programmed in hardware register, but the regular PTP stack

Re: [PATCH net-next v2] ibmvnic: process HMC disable command

2020-11-25 Thread Jakub Kicinski
On Mon, 23 Nov 2020 18:58:41 -0500 Dany Madden wrote: > Currently ibmvnic does not support the "Disable vNIC" command from > the Hardware Management Console. The HMC uses this command to disconnect > the adapter from the network if the adapter is misbehaving or sending > malicious traffic. The effe

Re: BUG: receive list entry not found for dev vxcan1, id 002, mask C00007FF

2020-11-25 Thread Oliver Hartkopp
Hi Dmitry, On 25.11.20 19:48, Dmitry Vyukov wrote: On Wed, Nov 25, 2020 at 5:04 PM Oliver Hartkopp wrote: This seems to be very seldom but it does not break anything. Would removing the WARN(1) or replacing it with pr_warn() be ok to close this issue? Yes, this is the intended way to d

Re: [PATCH net v2 3/9] ibmvnic: avoid memset null scrq msgs

2020-11-25 Thread Jakub Kicinski
On Mon, 23 Nov 2020 18:57:51 -0500 Dany Madden wrote: > scrq->msgs could be NULL during device reset, causing Linux to crash. > So, check before memset scrq->msgs. > > Fixes: c8b2ad0a4a901 ("ibmvnic: Sanitize entire SCRQ buffer on reset") > > Signed-off-by: Dany Madden Thanks for the Fixes tags

[PATCH net-next 4/6] net: ipa: add support to code for IPA v4.5

2020-11-25 Thread Alex Elder
Update the IPA code to make use of the updated IPA v4.5 register definitions. Generally what this patch does is, if IPA v4.5 hardware is in use: - Ensure new registers or fields in IPA v4.5 are updated where required - Ensure registers or fields not supported in IPA v4.5 are not examin

  1   2   3   >