[PATCH v9,net-next,08/12] crypto: octeontx2: add LF framework

2020-11-09 Thread Srujana Challa
CPT RVU Local Functions(LFs) needs to be attached to the PF/VF to submit the instructions to CPT. This patch adds the interface to initialize and attach the LFs. It also adds interface to register the LF's interrupts. Signed-off-by: Suheil Chandran Signed-off-by: Lukasz Bartosik Signed-off-by: S

[PATCH v9,net-next,11/12] crypto: octeontx2: add support to process the crypto request

2020-11-09 Thread Srujana Challa
Attach LFs to CPT VF to process the crypto requests and register LF interrupts. Signed-off-by: Suheil Chandran Signed-off-by: Lukasz Bartosik Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile | 2 +- .../marvell/octeontx2/otx2_cpt_common.h | 3 + .../mar

Re: [Linux-kernel-mentees] [PATCH net v2] Bluetooth: Fix slab-out-of-bounds read in hci_le_direct_adv_report_evt()

2020-11-09 Thread Marcel Holtmann
Hi Peilin, > `num_reports` is not being properly checked. A malformed event packet with > a large `num_reports` number makes hci_le_direct_adv_report_evt() read out > of bounds. Fix it. > > Cc: sta...@vger.kernel.org > Fixes: 2f010b55884e ("Bluetooth: Add support for handling LE Direct > Adverti

Re: [PATCH v7 1/5] Bluetooth: Interleave with allowlist scan

2020-11-09 Thread Marcel Holtmann
Hi Howard, > This patch implements the interleaving between allowlist scan and > no-filter scan. It'll be used to save power when at least one monitor is > registered and at least one pending connection or one device to be > scanned for. > > The durations of the allowlist scan and the no-filter s

Re: [PATCH v7 2/5] Bluetooth: Handle system suspend resume case

2020-11-09 Thread Marcel Holtmann
Hi Howard, > This patch adds code to handle the system suspension during interleave > scan. The interleave scan will be canceled when the system is going to > sleep, and will be restarted after waking up. > > Commit-changes 5: > - Remove the change in hci_req_config_le_suspend_scan this does not

Re: [PATCH v7 4/5] mgmt: Add supports of variable length parameter in mgmt_config

2020-11-09 Thread Marcel Holtmann
Hi Howard, > This adds support of variable length parameter in mgmt_config. I don’t see how this commit message describes the change correctly. > > Signed-off-by: Howard Chung > --- > > (no changes since v1) > > net/bluetooth/mgmt_config.c | 140 +--- > 1 file

[PATCH ethtool 0/2] netlink: data lifetime error fixes

2020-11-09 Thread Michal Kubecek
Fixes of two data lifetime bugs found by testing with valgrind: one use after free, one memory leak. Michal Kubecek (2): netlink: fix use after free in netlink_run_handler() netlink: fix leaked instances of struct nl_socket netlink/netlink.c | 21 +++-- netlink/nlsock.c | 3

[PATCH ethtool 1/2] netlink: fix use after free in netlink_run_handler()

2020-11-09 Thread Michal Kubecek
Valgrind detected use after free in netlink_run_handler(): some members of struct nl_context are accessed after the netlink context is freed by netlink_done(). Use local variables to store the two flags and check them instead. Fixes: 6c19c0d559c8 ("netlink: use genetlink ops information to decide

[PATCH ethtool 2/2] netlink: fix leaked instances of struct nl_socket

2020-11-09 Thread Michal Kubecek
Valgrind detected memory leaks caused by missing cleanup of netlink context's ethnl_socket, ethnl2_socket and rtnl_socket. Also, contrary to its description, nlsock_done() does not free struct nl_socket itself. Fix nlsock_done() to free the structure and use it to dispose of sockets pointed to by s

Re: [RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-09 Thread Vladimir Oltean
On Mon, Nov 09, 2020 at 12:05:19PM +0100, Tobias Waldekranz wrote: > On Mon, Nov 09, 2020 at 12:03, Vladimir Oltean wrote: > > On Mon, Nov 09, 2020 at 09:09:37AM +0100, Tobias Waldekranz wrote: > >> one. But now you have also increased the background load of an already > >> choked resource, the MD

Re: [PATCH] Bluetooth: Resume advertising after LE connection

2020-11-09 Thread Marcel Holtmann
Hi Daniel, > When an LE connection request is made, advertising is disabled and never > resumed. When a client has an active advertisement, this is disruptive. > This change adds resume logic for client-configured (non-directed) > advertisements after the connection attempt. > > The patch was tes

Re: [RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-09 Thread Vladimir Oltean
On Mon, Nov 09, 2020 at 02:31:11PM +0200, Vladimir Oltean wrote: > I need to sit on this for a while. How many DSA drivers do we have that > don't do SA learning in hardware for CPU-injected packets? ocelot/felix > and mv88e6xxx? Who else? Because if there aren't that many (or any at > all except f

[PATCH][next] net: dsa: fix unintended sign extension on a u16 left shift

2020-11-09 Thread Colin King
From: Colin Ian King The left shift of u16 variable high is promoted to the type int and then sign extended to a 64 bit u64 value. If the top bit of high is set then the upper 32 bits of the result end up being set by the sign extension. Fix this by explicitly casting the value in high to a u64

[PATCH net-next 1/1] net: phy: Allow mdio buses to probe C45 before falling back to C22

2020-11-09 Thread Wong Vee Khee
This patch makes mdiobus_scan() to try on C45 first as C45 can access all devices. This allows the function available for the PHY that supports for both C45 and C22. Reviewed-by: Voon Weifeng Reviewed-by: Ong Boon Leong Signed-off-by: Wong Vee Khee --- drivers/net/phy/mdio_bus.c | 5 + inc

Re: [PATCH stable] net: sch_generic: fix the missing new qdisc assignment bug

2020-11-09 Thread Greg KH
On Tue, Nov 03, 2020 at 11:25:38AM +0800, Yunsheng Lin wrote: > commit 2fb541c862c9 ("net: sch_generic: aviod concurrent reset and enqueue op > for lockless qdisc") > > When the above upstream commit is backported to stable kernel, > one assignment is missing, which causes two problems reported >

Re: [PATCH][next] net: dsa: fix unintended sign extension on a u16 left shift

2020-11-09 Thread Kurt Kanzenbach
On Mon Nov 09 2020, Colin King wrote: > From: Colin Ian King > > The left shift of u16 variable high is promoted to the type int and > then sign extended to a 64 bit u64 value. If the top bit of high is > set then the upper 32 bits of the result end up being set by the > sign extension. Fix this

[PATCH][next] mptcp: fix a dereference of pointer before msk is null checked.

2020-11-09 Thread Colin King
From: Colin Ian King Currently the assignment of pointer net from the sock_net(sk) call is potentially dereferencing a null pointer sk. sk points to the same location as pointer msk and msk is being null checked after the sock_net call. Fix this by calling sock_net after the null check on pointe

[PATCH] net: tcp: ratelimit warnings in tcp_recvmsg

2020-11-09 Thread menglong8 . dong
From: Menglong Dong 'before(*seq, TCP_SKB_CB(skb)->seq) == true' means that one or more skbs are lost somehow. Once this happen, it seems that it will never recover automatically. As a result, a warning will be printed and a '-EAGAIN' will be returned in non-block mode. As a general suituation,

Re: [PATCH V3] fsl/fman: add missing put_devcie() call in fman_port_probe()

2020-11-09 Thread yukuai (C)
在 2020/11/08 6:09, Jakub Kicinski 写道: On Sat, 7 Nov 2020 17:09:25 +0800 Yu Kuai wrote: if of_find_device_by_node() succeed, fman_port_probe() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 0572054617f3 ("fsl

BUG: sleeping function called from invalid context in corrupted

2020-11-09 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:bf3e7628 Merge branch 'mtd/fixes' of git://git.kernel.org/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=16d76e2a50 kernel config: https://syzkaller.appspot.com/x/.config?x=e791ddf0875adf65 das

答复: [PATCH 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread zhangqilong
Hi > > On Mon, Nov 9, 2020 at 9:05 AM Zhang Qilong > wrote: > > > > In many case, we need to check return value of pm_runtime_get_sync, > > but it brings a trouble to the usage counter processing. Many callers > > forget to decrease the usage counter when it failed. It has been > > discussed a lo

Re: [PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread Vlad Buslov
On Sun 08 Nov 2020 at 01:30, we...@ucloud.cn wrote: > From: wenxu > > Currently kernel tc subsystem can do conntrack in act_ct. But when several > fragment packets go through the act_ct, function tcf_ct_handle_fragments > will defrag the packets to a big one. But the last action will redirect > mi

[PATCH V2] memory: tegra: add missing put_devcie() call in error path of tegra_emc_probe()

2020-11-09 Thread Yu Kuai
The reference to device obtained with of_find_device_by_node() should be dropped. Thus add jump target to fix the exception handling for this function implementation. Fixes: 73a7f0a90641("memory: tegra: Add EMC (external memory controller) driver") Signed-off-by: Yu Kuai --- drivers/memory/tegr

Re: [PATCH][next] net: dsa: fix unintended sign extension on a u16 left shift

2020-11-09 Thread Kurt Kanzenbach
On Mon Nov 09 2020, Colin King wrote: > From: Colin Ian King > > The left shift of u16 variable high is promoted to the type int and > then sign extended to a 64 bit u64 value. If the top bit of high is > set then the upper 32 bits of the result end up being set by the > sign extension. Fix this

Re: [PATCH 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Rafael J. Wysocki
On Mon, Nov 9, 2020 at 2:24 PM zhangqilong wrote: > > Hi > > > > On Mon, Nov 9, 2020 at 9:05 AM Zhang Qilong > > wrote: > > > > > > In many case, we need to check return value of pm_runtime_get_sync, > > > but it brings a trouble to the usage counter processing. Many callers > > > forget to decre

[PATCH ethtool 2/2] ethtool: Improve compatibility between netlink and ioctl interfaces

2020-11-09 Thread Michal Kubecek
From: Ido Schimmel With the ioctl interface, when autoneg is enabled, but without specifying speed, duplex or link modes, the advertised link modes are set to the supported link modes by the ethtool user space utility. This does not happen when using the netlink interface. Fix this incompatibili

[PATCH ethtool 1/2] netlink: do not send messages and process replies in nl_parser()

2020-11-09 Thread Michal Kubecek
When called with group_style = PARSER_GROUP_MSG, nl_parser() not only parses the command line and composes the messages but also sends them to kernel and processes the replies. This is inconsistent with other modes and also impractical as it takes the control over the process from caller where it b

[PATCH ethtool 0/2] netlink: improve compatibility with ioctl interface

2020-11-09 Thread Michal Kubecek
Restore special behavior of "ethtool -s autoneg on" if no advertised modes, speed and duplex are requested: ioctl code enables all link modes supported by the device. This is most important for network devices which report no advertised modes when autonegotiation is disabled. First patch cleans u

Re: [PATCH net-next 1/1] net: phy: Allow mdio buses to probe C45 before falling back to C22

2020-11-09 Thread Andrew Lunn
On Mon, Nov 09, 2020 at 08:43:47PM +0800, Wong Vee Khee wrote: > This patch makes mdiobus_scan() to try on C45 first as C45 can access > all devices. This allows the function available for the PHY that > supports for both C45 and C22. > > Reviewed-by: Voon Weifeng > Reviewed-by: Ong Boon Leong >

re: net: dsa: hellcreek: Add support for hardware timestamping

2020-11-09 Thread Colin Ian King
Hi Static analysis on linux-next with Coverity has detected a potential null pointer dereference issue on the following commit: commit f0d4ba9eff75a79fccb7793f4d9f12303d458603 Author: Kamil Alkhouri Date: Tue Nov 3 08:10:58 2020 +0100 net: dsa: hellcreek: Add support for hardware timestam

Re: [PATCH v4 4/7] can: replace can_dlc as variable/element for payload length

2020-11-09 Thread Vincent MAILHOL
On Mon. 9 Nov 2020 at 19:26, Oliver Hartkopp wrote: > diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h > index b2e8df8e4cb0..72671184a7a2 100644 > --- a/include/linux/can/dev.h > +++ b/include/linux/can/dev.h > @@ -183,12 +183,12 @@ static inline void can_set_static_ctrlmode(struct >

Re: [PATCH 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Rafael J. Wysocki
On Mon, Nov 9, 2020 at 9:05 AM Zhang Qilong wrote: > > In many case, we need to check return value of pm_runtime_get_sync, but > it brings a trouble to the usage counter processing. Many callers forget > to decrease the usage counter when it failed. It has been discussed a > lot[0][1]. So we add a

答复: [PATCH 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread zhangqilong
Hi, > > On Mon, Nov 9, 2020 at 2:24 PM zhangqilong > wrote: > > > > Hi > > > > > > On Mon, Nov 9, 2020 at 9:05 AM Zhang Qilong > > > > > > wrote: > > > > > > > > In many case, we need to check return value of > > > > pm_runtime_get_sync, but it brings a trouble to the usage counter > > > > proc

Re: [PATCH v2] Bluetooth: Move force_bredr_smp debugfs into hci_debugfs_create_bredr

2020-11-09 Thread Marcel Holtmann
Hi Claire, > Avoid multiple attempts to create the debugfs entry, force_bredr_smp, > by moving it from the SMP registration to the BR/EDR controller init > section. hci_debugfs_create_bredr is only called when HCI_SETUP and > HCI_CONFIG is not set. > > Signed-off-by: Claire Chang > --- > v2: cor

Re: [RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-09 Thread Tobias Waldekranz
On Mon Nov 9, 2020 at 3:38 PM CET, Vladimir Oltean wrote: > On Mon, Nov 09, 2020 at 02:31:11PM +0200, Vladimir Oltean wrote: > > I need to sit on this for a while. How many DSA drivers do we have that > > don't do SA learning in hardware for CPU-injected packets? ocelot/felix > > and mv88e6xxx? Who

re: net: dsa: hellcreek: Add support for hardware timestamping

2020-11-09 Thread Kurt Kanzenbach
Hi Colin, On Mon Nov 09 2020, Colin Ian King wrote: > Hi > > Static analysis on linux-next with Coverity has detected a potential > null pointer dereference issue on the following commit: > > commit f0d4ba9eff75a79fccb7793f4d9f12303d458603 > Author: Kamil Alkhouri > Date: Tue Nov 3 08:10:58 202

[MPTCP][PATCH net 1/2] mptcp: fix static checker warnings in mptcp_pm_add_timer

2020-11-09 Thread Geliang Tang
Fix the following Smatch complaint: net/mptcp/pm_netlink.c:213 mptcp_pm_add_timer() warn: variable dereferenced before check 'msk' (see line 208) net/mptcp/pm_netlink.c 207 struct mptcp_sock *msk = entry->sock; 208 struct sock *sk = (struct sock *)msk; 209

Re: [PATCH v2 net] ethtool: netlink: add missing netdev_features_change() call

2020-11-09 Thread Michal Kubecek
On Sun, Nov 08, 2020 at 12:46:15AM +, Alexander Lobakin wrote: > After updating userspace Ethtool from 5.7 to 5.9, I noticed that > NETDEV_FEAT_CHANGE is no more raised when changing netdev features > through Ethtool. > That's because the old Ethtool ioctl interface always calls > netdev_featur

[MPTCP][PATCH net 2/2] mptcp: cleanup for mptcp_pm_alloc_anno_list

2020-11-09 Thread Geliang Tang
This patch added NULL pointer check for mptcp_pm_alloc_anno_list, and avoided similar static checker warnings in mptcp_pm_add_timer. Signed-off-by: Geliang Tang Reviewed-by: Dan Carpenter --- net/mptcp/pm_netlink.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/mp

[MPTCP][PATCH net 0/2] fix static checker warnings in

2020-11-09 Thread Geliang Tang
This patchset fixed static checker warnings in mptcp_pm_add_timer and mptcp_pm_alloc_anno_list. Geliang Tang (2): mptcp: fix static checker warnings in mptcp_pm_add_timer mptcp: cleanup for mptcp_pm_alloc_anno_list net/mptcp/pm_netlink.c | 9 + 1 file changed, 5 insertions(+), 4 dele

[PATCH net] tipc: fix memory leak in tipc_topsrv_start()

2020-11-09 Thread Wang Hai
kmemleak report a memory leak as follows: unreferenced object 0x88810a596800 (size 512): comm "ip", pid 21558, jiffies 4297568990 (age 112.120s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .N.. ff ff ff ff ff ff ff ff 00 83 60 b0 ff ff ff

Re: [PATCH 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Rafael J. Wysocki
On Mon, Nov 9, 2020 at 2:46 PM zhangqilong wrote: > > Hi, > > > > > On Mon, Nov 9, 2020 at 2:24 PM zhangqilong > > wrote: > > > > > > Hi > > > > > > > > On Mon, Nov 9, 2020 at 9:05 AM Zhang Qilong > > > > > > > > wrote: > > > > > > > > > > In many case, we need to check return value of > > > > >

Re: net: dsa: hellcreek: Add support for hardware timestamping

2020-11-09 Thread Colin Ian King
On 09/11/2020 13:59, Kurt Kanzenbach wrote: > Hi Colin, > > On Mon Nov 09 2020, Colin Ian King wrote: >> Hi >> >> Static analysis on linux-next with Coverity has detected a potential >> null pointer dereference issue on the following commit: >> >> commit f0d4ba9eff75a79fccb7793f4d9f12303d458603 >>

答复: [PATCH 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread zhangqilong
> On Mon, Nov 9, 2020 at 2:46 PM zhangqilong > wrote: > > > > Hi, > > > > > > > > On Mon, Nov 9, 2020 at 2:24 PM zhangqilong > > > wrote: > > > > > > > > Hi > > > > > > > > > > On Mon, Nov 9, 2020 at 9:05 AM Zhang Qilong > > > > > > > > > > wrote: > > > > > > > > > > > > In many case, we need to

RE: [EXTERNAL] Re: [PATCH bpf-next v2] Update perf ring buffer to prevent corruption

2020-11-09 Thread Kevin Sheldrake
> -Original Message- > From: Peter Zijlstra > Sent: 09 November 2020 11:29 > To: Alexei Starovoitov > Cc: Kevin Sheldrake ; Ingo Molnar > ; Daniel Borkmann ; Network > Development ; b...@vger.kernel.org; Andrii > Nakryiko ; KP Singh > Subject: [EXTERNAL] Re: [PATCH bpf-next v2] Update

Re: [PATCH] page_frag: Recover from memory pressure

2020-11-09 Thread Matthew Wilcox
On Thu, Nov 05, 2020 at 02:02:24PM +, Matthew Wilcox wrote: > On Thu, Nov 05, 2020 at 02:21:25PM +0100, Eric Dumazet wrote: > > On 11/5/20 5:21 AM, Matthew Wilcox (Oracle) wrote: > > > When the machine is under extreme memory pressure, the page_frag allocator > > > signals this to the networkin

Re: [PATCH] page_frag: Recover from memory pressure

2020-11-09 Thread Eric Dumazet
On 11/9/20 3:32 PM, Matthew Wilcox wrote: > On Thu, Nov 05, 2020 at 02:02:24PM +, Matthew Wilcox wrote: >> On Thu, Nov 05, 2020 at 02:21:25PM +0100, Eric Dumazet wrote: >>> On 11/5/20 5:21 AM, Matthew Wilcox (Oracle) wrote: When the machine is under extreme memory pressure, the page_fra

Re: [PATCH net] net: udp: fix Fast/frag0 UDP GRO

2020-11-09 Thread Willem de Bruijn
On Sat, Nov 7, 2020 at 8:11 PM Alexander Lobakin wrote: > > While testing UDP GSO fraglists forwarding through driver that uses > Fast GRO (via napi_gro_frags()), I was observing lots of out-of-order > iperf packets: > > [ ID] Interval Transfer Bitrate Jitter > [SUM] 0.0-40.

[PATCH] net: dsa: mv88e6xxx: Fix memleak in mv88e6xxx_region_atu_snapshot

2020-11-09 Thread zhangxiaoxu
When mv88e6xxx_fid_map return error, we lost free the table. Fix it. Fixes: bfb255428966 ("net: dsa: mv88e6xxx: Add devlink regions") Reported-by: Hulk Robot Signed-off-by: zhangxiaoxu --- drivers/net/dsa/mv88e6xxx/devlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] net: dsa: mv88e6xxx: Fix memleak in mv88e6xxx_region_atu_snapshot

2020-11-09 Thread Andrew Lunn
On Mon, Nov 09, 2020 at 09:44:16AM -0500, zhangxiaoxu wrote: > When mv88e6xxx_fid_map return error, we lost free the table. > > Fix it. > > Fixes: bfb255428966 ("net: dsa: mv88e6xxx: Add devlink regions") > Reported-by: Hulk Robot > Signed-off-by: zhangxiaoxu Reviewed-by: Andrew Lunn And

Re: [PATCH] net: tcp: ratelimit warnings in tcp_recvmsg

2020-11-09 Thread Menglong Dong
On Mon, Nov 9, 2020 at 9:36 PM Eric Dumazet wrote: > > I do not think this patch is useful. That is simply code churn. > > Can you trigger the WARN() in the latest upstream version ? > If yes this is a serious bug that needs urgent attention. > > Make sure you have backported all needed fixes into

Re: [PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread Marcelo Ricardo Leitner
On Mon, Nov 09, 2020 at 03:24:37PM +0200, Vlad Buslov wrote: > On Sun 08 Nov 2020 at 01:30, we...@ucloud.cn wrote: ... > > @@ -974,9 +974,22 @@ config NET_ACT_TUNNEL_KEY > > To compile this code as a module, choose M here: the > > module will be called act_tunnel_key. > > > > +config

Re: [PATCH v4 5/7] can: update documentation for DLC usage in Classical CAN

2020-11-09 Thread Vincent MAILHOL
On Mon. 9 Nov 2020 at 19:26, Oliver Hartkopp wrote: > > The extension of struct can_frame with the len8_dlc element and the > can_dlc naming issue required an update of the documentation. > > Additionally introduce the term 'Classical CAN' which has been established > by CAN in Automation to separa

Re: [PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread wenxu
在 2020/11/9 21:24, Vlad Buslov 写道: > On Sun 08 Nov 2020 at 01:30, we...@ucloud.cn wrote: >> From: wenxu >> >> Currently kernel tc subsystem can do conntrack in act_ct. But when several >> fragment packets go through the act_ct, function tcf_ct_handle_fragments >> will defrag the packets to a big

[PATCH v2 2/2] net: fec: Fix reference count leak in fec series ops

2020-11-09 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in reference

[PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Zhang Qilong
In many case, we need to check return value of pm_runtime_get_sync, but it brings a trouble to the usage counter processing. Many callers forget to decrease the usage counter when it failed. It has been discussed a lot[0][1]. So we add a function to deal with the usage counter for better coding. [

[PATCH v2 0/2] Fix usage counter leak by adding a general sync ops

2020-11-09 Thread Zhang Qilong
In many case, we need to check return value of pm_runtime_get_sync, but it brings a trouble to the usage counter processing. Many callers forget to decrease the usage counter when it failed. It has been discussed a lot[0][1]. So we add a function to deal with the usage counter for better coding and

Re: [PATCH] IPv6: Set SIT tunnel hard_header_len to zero

2020-11-09 Thread Willem de Bruijn
On Mon, Nov 9, 2020 at 4:05 AM Oliver Herms wrote: > > > On 04.11.20 20:52, Willem de Bruijn wrote: > Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.") > >>> > >>> How did you arrive at this SHA1? > >> I think the legacy usage of hard_header_len in ipv6/sit.c was overseen in > >> c54

[PATCH net-next v4 02/15] net/smc: Use active link of the connection

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Use active link of the connection directly and not via linkgroup array structure when obtaining link data of the connection. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) dif

[PATCH net-next v4 04/15] net/smc: Add link counters for IB device ports

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Add link counters to the structure of the smc ib device, one counter per ib port. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 13 + net/smc/smc_ib.h |

[PATCH net-next v4 07/15] net/smc: Refactor the netlink reply processing routine

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Refactor the netlink reply processing routine so that it provides sub functions for specific parts of the processing. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 218 +++-- 1 file changed, 133 ins

[PATCH net-next v4 01/15] net/smc: use helper smc_conn_abort() in listen processing

2020-11-09 Thread Karsten Graul
The helper smc_connect_abort() can be used by the listen processing functions, too. And rename this helper to smc_conn_abort() to make the purpose clearer. No functional change. Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 17 + 1 file changed, 5 insertions(+), 12 deletion

[PATCH net-next v4 10/15] net/smc: Introduce SMCR get link command

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Introduce get link command which loops through all available links of all available link groups. It uses the SMC-R linkgroup list as entry point, not the socket list, which makes linkgroup diagnosis possible, in case linkgroup does not contain active connections anymore. Signe

[PATCH net-next v4 11/15] net/smc: Add SMC-D Linkgroup diagnostic support

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD Linkgroup information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 7 +++ net/smc/smc_core.c| 7 +++ net/smc/smc_core.h| 2 + net/smc/smc_diag.

[PATCH net-next v4 09/15] net/smc: Introduce SMCR get linkgroup command

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Introduce get linkgroup command which loops through all available SMCR linkgroups. It uses the SMC-R linkgroup list as entry point, not the socket list, which makes linkgroup diagnosis possible, in case linkgroup does not contain active connections anymore. Signed-off-by: Guve

RE: [EXTERNAL] Re: [PATCH net 2/4] net:phy:smsc: expand documentation of clocks property

2020-11-09 Thread Badel, Laurent
 > - Eaton Industries Manufacturing GmbH ~ Registered place of business: Route de la Longeraie 7, 1110, Morges, Switzerland - -Original Message- > From: Florian Fainelli > Sent: Wednesday, November 04, 2020 5:02 PM > To: Badel

[PATCH net-next v4 00/15] net/smc: extend diagnostic netlink interface

2020-11-09 Thread Karsten Graul
Please apply the following patch series for smc to netdev's net-next tree. This patch series refactors the current netlink API in smc_diag module which is used for diagnostic purposes and extends the netlink API in a backward compatible way so that the extended API can provide information about SM

[PATCH net-next v4 14/15] net/smc: Refactor smc ism v2 capability handling

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Encapsulate the smc ism v2 capability boolean value in a function for better information hiding. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 12 ++-- net/smc/smc_ism.c | 8 +++- net/smc/smc_ism.h | 5 ++--- 3 files changed,

[PATCH net-next v4 13/15] net/smc: Add support for obtaining SMCR device list

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCR device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 6 ++ net/smc/smc_core.c| 7 ++ net/smc/smc_core.h| 2 + net/smc/smc_diag.c

[PATCH net-next v4 15/15] net/smc: Add support for obtaining system information

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Add new netlink command to obtain system information of the smc module. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 1 + include/uapi/linux/smc_diag.h | 17 ++ net/smc/smc_clc.c | 5 +++ net/smc/smc_clc.

[PATCH net-next v4 06/15] net/smc: Add diagnostic information to link structure

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce During link creation add network and ib-device name to link structure. This is needed for diagnostic purposes. When diagnostic information is gathered, we need to traverse device, linkgroup and link structures, to be able to do that we need to hold a spinlock for the linkgroup

[PATCH net-next v4 08/15] net/smc: Add ability to work with extended SMC netlink API

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce smc_diag module should be able to work with legacy and extended netlink api. This is done by using the sequence field of the netlink message header. Sequence field is optional and was filled with a constant value MAGIC_SEQ in the current implementation. New constant values MAGI

[PATCH net-next v4 05/15] net/smc: Add diagnostic information to smc ib-device

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce During smc ib-device creation, add network device name to smc ib-device structure. Register for netdevice name changes and update ib-device accordingly. This is needed for diagnostic purposes. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_ib.c |

[PATCH net-next v4 12/15] net/smc: Add support for obtaining SMCD device list

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 2 + include/uapi/linux/smc_diag.h | 20 net/smc/smc_core.h| 8 +++ net/smc/smc_diag.c

[PATCH net-next v4 03/15] net/smc: Add connection counters for links

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Add connection counters to the structure of the link. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 16 ++-- net/smc/smc_core.h | 1 + 2 files changed, 1

Re: [PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Rafael J. Wysocki
On Mon, Nov 9, 2020 at 4:00 PM Zhang Qilong wrote: > > In many case, we need to check return value of pm_runtime_get_sync, but > it brings a trouble to the usage counter processing. Many callers forget > to decrease the usage counter when it failed. It has been discussed a > lot[0][1]. So we add a

Re: [PATCH net-next 05/18] rtnetlink: Add RTNH_F_TRAP flag

2020-11-09 Thread Ido Schimmel
On Fri, Nov 06, 2020 at 11:12:21AM -0800, Jakub Kicinski wrote: > On Wed, 4 Nov 2020 15:30:27 +0200 Ido Schimmel wrote: > > *flags |= (nhc->nhc_flags & RTNH_F_ONLINK); > > if (nhc->nhc_flags & RTNH_F_OFFLOAD) > > *flags |= RTNH_F_OFFLOAD; > > + if (nhc->nhc_flags & RTNH_F_TRA

[PATCH v5 7/8] can-dev: introduce helpers to access Classical CAN DLC values

2020-11-09 Thread Oliver Hartkopp
can_get_len8_dlc: get value to fill len8_dlc at frame reception time can_get_cc_dlc: get DLC value to be written into CAN controller Signed-off-by: Oliver Hartkopp --- include/linux/can/dev.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/linux/can/dev.h b/inclu

[PATCH v5 5/8] can: rename CAN FD related can_len2dlc and can_dlc2len helpers

2020-11-09 Thread Oliver Hartkopp
The helper functions can_len2dlc and can_dlc2len are only relevant for CAN FD data length code (DLC) conversion. To fit the introduced can_cc_dlc2len for Classical CAN we rename: can_dlc2len -> can_fd_dlc2len to get the payload length from the DLC can_len2dlc -> can_fd_len2dlc to get the DLC from

[PATCH v5 3/8] can: remove obsolete get_canfd_dlc() macro

2020-11-09 Thread Oliver Hartkopp
The macro was always used together with can_dlc2len() which sanitizes the given dlc value on its own. Signed-off-by: Oliver Hartkopp --- drivers/net/can/flexcan.c | 2 +- drivers/net/can/peak_canfd/peak_canfd.c | 2 +- drivers/net/can/spi/mcp251xfd/mcp251xfd-cor

[PATCH v5 6/8] can: update documentation for DLC usage in Classical CAN

2020-11-09 Thread Oliver Hartkopp
The extension of struct can_frame with the len8_dlc element and the can_dlc naming issue required an update of the documentation. Additionally introduce the term 'Classical CAN' which has been established by CAN in Automation to separate the original CAN2.0 A/B from CAN FD. Updated some data stru

[PATCH v5 8/8] can-dev: add len8_dlc support for various CAN USB adapters

2020-11-09 Thread Oliver Hartkopp
Support the Classical CAN raw DLC functionality to send and receive DLC values from 9 .. 15 on various Classical CAN capable USB network drivers: - gs_usb - pcan_usb - pcan_usb_fd - usb_8dev Tested-by: Oliver Hartkopp Signed-off-by: Oliver Hartkopp --- drivers/net/can/usb/gs_usb.c

[PATCH v5 2/8] can: rename get_can_dlc() macro with can_cc_dlc2len()

2020-11-09 Thread Oliver Hartkopp
The get_can_dlc() macro is used to ensure the payload length information of the Classical CAN frame to be max 8 bytes (the CAN_MAX_DLEN). Rename the macro and use the correct constant in preparation of the len/dlc cleanup for Classical CAN frames. Signed-off-by: Oliver Hartkopp --- drivers/net/

[PATCH v5 1/8] can: add optional DLC element to Classical CAN frame structure

2020-11-09 Thread Oliver Hartkopp
ISO 11898-1 Chapter 8.4.2.3 defines a 4 bit data length code (DLC) table which maps the DLC to the payload length of the CAN frame in bytes: DLC -> payload length 0 .. 8 -> 0 .. 8 9 .. 15 -> 8 Although the DLC values 8 .. 15 in Classical CAN always result in a payload lengt

[PATCH v5 0/8] Introduce optional DLC element for Classic CAN

2020-11-09 Thread Oliver Hartkopp
Introduce improved DLC handling for Classic CAN with introduces a new element 'len8_dlc' to the struct can_frame and additionally rename the 'can_dlc' element to 'len' as it represents a plain payload length. Before implementing the CAN_CTRLMODE_CC_LEN8_DLC handling on driver level this patch set

[PATCH v5 4/8] can: replace can_dlc as variable/element for payload length

2020-11-09 Thread Oliver Hartkopp
The naming of can_dlc as element of struct can_frame and also as variable name is misleading as it claims to be a 'data length CODE' but in reality it always was a plain data length. With the indroduction of a new 'len' element in struct can_frame we can now remove can_dlc as name and make clear w

Re: [PATCH v4 4/7] can: replace can_dlc as variable/element for payload length

2020-11-09 Thread Oliver Hartkopp
Hi Vincent, On 09.11.20 13:59, Vincent MAILHOL wrote: On Mon. 9 Nov 2020 at 19:26, Oliver Hartkopp wrote: diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index b2e8df8e4cb0..72671184a7a2 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h @@ -183,12 +183,12 @@ stat

Re: [PATCH] net: tcp: ratelimit warnings in tcp_recvmsg

2020-11-09 Thread Eric Dumazet
On 11/9/20 3:48 PM, Menglong Dong wrote: > On Mon, Nov 9, 2020 at 9:36 PM Eric Dumazet wrote: >> >> I do not think this patch is useful. That is simply code churn. >> >> Can you trigger the WARN() in the latest upstream version ? >> If yes this is a serious bug that needs urgent attention. >> >

Re: [PATCH net-next 00/18] nexthop: Add support for nexthop objects offload

2020-11-09 Thread Ido Schimmel
On Fri, Nov 06, 2020 at 11:31:59AM -0800, Jakub Kicinski wrote: > On Wed, 4 Nov 2020 15:30:22 +0200 Ido Schimmel wrote: > > From: Ido Schimmel > > > > This patch set adds support for nexthop objects offload with a dummy > > implementation over netdevsim. mlxsw support will be added later. > > >

Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-11-09 Thread kernel test robot
Hi Nick, I love your patch! Perhaps something to improve: [auto build test WARNING on nf-next/master] [also build test WARNING on nf/master ipvs/master v5.10-rc3 next-20201109] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

[PATCH net-next] net: phy: aquantia: do not return an error on clearing pending IRQs

2020-11-09 Thread Ioana Ciornei
From: Ioana Ciornei The referenced commit added in .config_intr() the part of code which upon configuration of the IRQ state it also clears up any pending IRQ. If there were actually pending IRQs, a read on the IRQ status register will return something non zero. This should not result in the call

Re: [PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread Vlad Buslov
On Mon 09 Nov 2020 at 16:50, Marcelo Ricardo Leitner wrote: > On Mon, Nov 09, 2020 at 03:24:37PM +0200, Vlad Buslov wrote: >> On Sun 08 Nov 2020 at 01:30, we...@ucloud.cn wrote: > ... >> > @@ -974,9 +974,22 @@ config NET_ACT_TUNNEL_KEY >> > To compile this code as a module, choose M here:

答复: [PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread zhangqilong
> operation to deal with usage counter > > On Mon, Nov 9, 2020 at 4:00 PM Zhang Qilong > wrote: > > > > In many case, we need to check return value of pm_runtime_get_sync, > > but it brings a trouble to the usage counter processing. Many callers > > forget to decrease the usage counter when it fa

Re: [PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Ulf Hansson
On Mon, 9 Nov 2020 at 16:20, Rafael J. Wysocki wrote: > > On Mon, Nov 9, 2020 at 4:00 PM Zhang Qilong wrote: > > > > In many case, we need to check return value of pm_runtime_get_sync, but > > it brings a trouble to the usage counter processing. Many callers forget > > to decrease the usage count

Re: [PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread Vlad Buslov
On Mon 09 Nov 2020 at 16:54, wenxu wrote: > 在 2020/11/9 21:24, Vlad Buslov 写道: >> On Sun 08 Nov 2020 at 01:30, we...@ucloud.cn wrote: >>> From: wenxu >>> >>> Currently kernel tc subsystem can do conntrack in act_ct. But when several >>> fragment packets go through the act_ct, function tcf_ct_ha

Re: [PATCH v4 5/7] can: update documentation for DLC usage in Classical CAN

2020-11-09 Thread Oliver Hartkopp
On 09.11.20 15:50, Vincent MAILHOL wrote: On Mon. 9 Nov 2020 at 19:26, Oliver Hartkopp wrote: The extension of struct can_frame with the len8_dlc element and the can_dlc naming issue required an update of the documentation. Additionally introduce the term 'Classical CAN' which has been esta

Re: [PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Rafael J. Wysocki
On Mon, Nov 9, 2020 at 4:50 PM Ulf Hansson wrote: > > On Mon, 9 Nov 2020 at 16:20, Rafael J. Wysocki wrote: > > > > On Mon, Nov 9, 2020 at 4:00 PM Zhang Qilong wrote: > > > > > > In many case, we need to check return value of pm_runtime_get_sync, but > > > it brings a trouble to the usage counte

Re: [PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Rafael J. Wysocki
On Mon, Nov 9, 2020 at 4:50 PM zhangqilong wrote: > > > operation to deal with usage counter > > > > On Mon, Nov 9, 2020 at 4:00 PM Zhang Qilong > > wrote: > > > > > > In many case, we need to check return value of pm_runtime_get_sync, > > > but it brings a trouble to the usage counter processing

[PATCH RFC] SUNRPC: Use zero-copy to perform socket send operations

2020-11-09 Thread Chuck Lever
Daire Byrne reports a ~50% aggregrate throughput regression on his Linux NFS server after commit da1661b93bf4 ("SUNRPC: Teach server to use xprt_sock_sendmsg for socket sends"), which replaced kernel_send_page() calls in NFSD's socket send path with calls to sock_sendmsg() using iov_iter. Investig

Re: [PATCH v2 1/2] PM: runtime: Add a general runtime get sync operation to deal with usage counter

2020-11-09 Thread Ulf Hansson
On Mon, 9 Nov 2020 at 16:54, Rafael J. Wysocki wrote: > > On Mon, Nov 9, 2020 at 4:50 PM Ulf Hansson wrote: > > > > On Mon, 9 Nov 2020 at 16:20, Rafael J. Wysocki wrote: > > > > > > On Mon, Nov 9, 2020 at 4:00 PM Zhang Qilong > > > wrote: > > > > > > > > In many case, we need to check return v

  1   2   3   4   5   >