[PATCH net-next v2 5/7] mptcp: add a new sysctl add_addr_timeout

2020-11-03 Thread Mat Martineau
From: Geliang Tang This patch added a new sysctl, named add_addr_timeout, to control the timeout value (in seconds) of the ADD_ADDR retransmission. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-o

[PATCH net-next v2 4/7] mptcp: split mptcp_clean_una function

2020-11-03 Thread Mat Martineau
From: Florian Westphal mptcp_clean_una() will wake writers in case memory could be reclaimed. When called from mptcp_sendmsg the wakeup code isn't needed. Move the wakeup to a new helper and then use that from the mptcp worker. Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau ---

[PATCH net-next v2 7/7] selftests: mptcp: add ADD_ADDR timeout test case

2020-11-03 Thread Mat Martineau
From: Geliang Tang This patch added the test case for retransmitting ADD_ADDR when timeout occurs. It set NS1's add_addr_timeout to 1 second, and drop NS2's ADD_ADDR echo packets. Here we need to slow down the transfer process of all data to let the ADD_ADDR suboptions can be retransmitted three

[PATCH net-next v2 1/7] mptcp: adjust mptcp receive buffer limit if subflow has larger one

2020-11-03 Thread Mat Martineau
From: Florian Westphal In addition to tcp autotuning during read, it may also increase the receive buffer in tcp_clamp_window(). In this case, mptcp should adjust its receive buffer size as well so it can move all pending skbs from the subflow socket to the mptcp socket. At this time, TCP can h

[PATCH net-next v2 2/7] mptcp: use _fast lock version in __mptcp_move_skbs

2020-11-03 Thread Mat Martineau
From: Florian Westphal The function is short and won't sleep, so this can use the _fast version. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau --- net/mptcp/protocol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/mptcp/prot

[PATCH net-next v2 0/7] mptcp: Miscellaneous MPTCP fixes

2020-11-03 Thread Mat Martineau
This is a collection of small fixup and minor enhancement patches that have accumulated in the MPTCP tree while net-next was closed. These are prerequisites for larger changes we have queued up. Patch 1 refines receive buffer autotuning. Patches 2 and 4 are some minor locking and refactoring chan

Re: [bpf-next PATCH v2 1/5] selftests/bpf: Move test_tcppbf_user into test_progs

2020-11-03 Thread Alexander Duyck
On Tue, Nov 3, 2020 at 10:34 AM Andrii Nakryiko wrote: > > On Sat, Oct 31, 2020 at 11:52 AM Alexander Duyck > wrote: > > > > From: Alexander Duyck > > > > Recently a bug was missed due to the fact that test_tcpbpf_user is not a > > part of test_progs. In order to prevent similar issues in the fu

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

2020-11-03 Thread Jakub Kicinski
On Tue, 3 Nov 2020 11:25:38 +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 > by Joak

Re: [PATCH iproute2-next] tc: implement support for action terse dump

2020-11-03 Thread Vlad Buslov
On Tue 03 Nov 2020 at 03:48, David Ahern wrote: > On 10/31/20 2:25 PM, Vlad Buslov wrote: >> diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h >> index 5ad84e663d01..b486f52900f0 100644 >> --- a/include/uapi/linux/rtnetlink.h >> +++ b/include/uapi/linux/rtnetlink.h >>

[net 1/9] net/mlx5e: Fix modify header actions memory leak

2020-11-03 Thread Saeed Mahameed
From: Maor Dickman Modify header actions are allocated during parse tc actions and only freed during the flow creation, however, on error flow the allocated memory is wrongly unfreed. Fix this by calling dealloc_mod_hdr_actions in __mlx5e_add_fdb_flow and mlx5e_add_nic_flow error flow. Fixes: d

[net 2/9] net/mlx5e: Protect encap route dev from concurrent release

2020-11-03 Thread Saeed Mahameed
From: Vlad Buslov In functions mlx5e_route_lookup_ipv{4|6}() route_dev can be arbitrary net device and not necessary mlx5 eswitch port representor. As such, in order to ensure that route_dev is not destroyed concurrent the code needs either explicitly take reference to the device before releasing

[net 5/9] net/mlx5: Fix deletion of duplicate rules

2020-11-03 Thread Saeed Mahameed
From: Maor Gottlieb When a rule is duplicated, the refcount of the rule is increased so only the second deletion of the rule should cause destruction of the FTE. Currently, the FTE will be destroyed in the first deletion of rule since the modify_mask will be 0. Fix it and call to destroy FTE only

Re: [PATCH RFC] ipvs: add genetlink cmd to dump all services and destinations

2020-11-03 Thread Julian Anastasov
Hello, On Tue, 3 Nov 2020, Cezar Sá Espinola wrote: > > And now what happens if all dests can not fit in a packet? > > We should start next packet with the same svc? And then > > user space should merge the dests when multiple packets > > start with same service? > > My (maybe n

[net 7/9] net/mlx5: E-switch, Avoid extack error log for disabled vport

2020-11-03 Thread Saeed Mahameed
From: Parav Pandit When E-switch vport is disabled, querying its hardware address is unsupported. Avoid setting extack error log message in such case. Fixes: f099fde16db3 ("net/mlx5: E-switch, Support querying port function mac address") Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Sign

[net 3/9] net/mlx5e: Use spin_lock_bh for async_icosq_lock

2020-11-03 Thread Saeed Mahameed
From: Maxim Mikityanskiy async_icosq_lock may be taken from softirq and non-softirq contexts. It requires protection with spin_lock_bh, otherwise a softirq may be triggered in the middle of the critical section, and it may deadlock if it tries to take the same lock. This patch fixes such a scenar

[pull request][net 0/9] mlx5 fixes 2020-11-03

2020-11-03 Thread Saeed Mahameed
Hi Jakub, This series introduces some fixes to mlx5 driver. For more information please see tag log below. Please pull and let me know if there is any problem. For -stable v5.1 ('net/mlx5: Fix deletion of duplicate rules') For -stable v5.4 ('net/mlx5e: Fix modify header actions memory leak')

Re: [RFC] Add BPF_PROG_TYPE_CGROUP_IOCTL

2020-11-03 Thread Kenny Ho
On Tue, Nov 3, 2020 at 12:43 AM Alexei Starovoitov wrote: > On Mon, Nov 2, 2020 at 9:39 PM Kenny Ho wrote: > pls don't top post. My apology. > > Cgroup awareness is desired because the intent > > is to use this for resource management as well (potentially along with > > other cgroup controlled r

[net 4/9] net/mlx5e: Fix refcount leak on kTLS RX resync

2020-11-03 Thread Saeed Mahameed
From: Maxim Mikityanskiy On resync, the driver calls inet_lookup_established (__inet6_lookup_established) that increases sk_refcnt of the socket. To decrease it, the driver set skb->destructor to sock_edemux. However, it didn't work well, because the TCP stack also sets this destructor for early

[net 9/9] net/mlx5e: Fix incorrect access of RCU-protected xdp_prog

2020-11-03 Thread Saeed Mahameed
From: Maxim Mikityanskiy rq->xdp_prog is RCU-protected and should be accessed only with rcu_access_pointer for the NULL check in mlx5e_poll_rx_cq. rq->xdp_prog may change on the fly only from one non-NULL value to another non-NULL value, so the checks in mlx5e_xdp_handle and mlx5e_poll_rx_cq wil

[net 6/9] net/mlx5e: E-Switch, Offload all chain 0 priorities when modify header and forward action is not supported

2020-11-03 Thread Saeed Mahameed
From: Jianbo Liu Miss path handling of tc multi chain filters (i.e. filters that are defined on chain > 0) requires the hardware to communicate to the driver the last chain that was processed. This is possible only when the hardware is capable of performing the combination of modify header and fo

[net 8/9] net/mlx5e: Fix VXLAN synchronization after function reload

2020-11-03 Thread Saeed Mahameed
From: Aya Levin During driver reload, perform firmware tear-down which results in firmware losing the configured VXLAN ports. These ports are still available in the driver's database. Fix this by cleaning up driver's VXLAN database in the nic unload flow, before firmware tear-down. With that, min

[PATCH net-next 1/5] r8152: use generic USB macros to define product table

2020-11-03 Thread Marek Behún
We can now use macros USB_DEVICE_INTERFACE_CLASS and USB_DEVICE_AND_INTERFACE_INFO to define r8152 product table. Signed-off-by: Marek Behún --- drivers/net/usb/r8152.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb

[PATCH net-next 0/5] r8152 changes

2020-11-03 Thread Marek Behún
Hi, these are some changes for r8152. At first I just wanted to add support for rtl8156 (which supports 2500baseT), by porting from Realtek's out-of-tree driver. It instead turned out into cosmetic changes first, though. Please review this. I would much like to try to port rtl8156 after these p

[PATCH net-next 3/5] r8152: add MCU typed read/write functions

2020-11-03 Thread Marek Behún
Add pla_ and usb_ prefixed versions of ocp_read_* and ocp_write_* functions. This saves us from always writing MCU_TYPE_PLA/MCU_TYPE_USB as parameter. Signed-off-by: Marek Behún --- drivers/net/usb/r8152.c | 673 1 file changed, 338 insertions(+), 335 del

[PATCH net-next 2/5] r8152: cosmetic improvement of product table macro

2020-11-03 Thread Marek Behún
Improve macro REALTEK_USB_DEVICE cosmetically so that it defines complete members. Signed-off-by: Marek Behún --- drivers/net/usb/r8152.c | 44 - 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r815

[PATCH net-next 4/5] r8152: rename r8153_phy_status to r8153_phy_status_wait

2020-11-03 Thread Marek Behún
The idea behind r8153_phy_status function is to wait till status is of desired value or (if desired value is zero) to wait till status if of non-zero value. Rename this function to r8153_phy_status_wait. Signed-off-by: Marek Behún --- drivers/net/usb/r8152.c | 14 +++--- 1 file changed,

[PATCH net-next 5/5] r8152: use *_modify helpers instead of read/write combos

2020-11-03 Thread Marek Behún
Add *_modify helpers to clear and set bits. Use these helpers such as x_modify(addr, clr, set); instead of: reg = x_read(addr); reg &= ~clr; reg |= set; x_write(addr, reg); This seems to be the way other parts of Linux are taking. Signed-off-by: Marek Behún --- drivers/net/usb/r8152.c

Re: [PATCH V2] net: ethernet: mscc: fix missing brace warning for old compilers

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 11:05:09AM -0800, Jakub Kicinski wrote: > I believe Vladimir asked to use a memset instead; > > struct ocelot_vcap_u16 etype; > > memset(&etype, 0, sizeof(etype)); Thanks, Jakub.

Re: [PATCH net-next 04/15] net: mlx5: Replace in_irq() usage.

2020-11-03 Thread Saeed Mahameed
On Sat, 2020-10-31 at 09:59 -0700, Jakub Kicinski wrote: > On Tue, 27 Oct 2020 23:54:43 +0100 Sebastian Andrzej Siewior wrote: > > mlx5_eq_async_int() uses in_irq() to decide whether eq::lock needs > > to be > > acquired and released with spin_[un]lock() or the irq > > saving/restoring > > variants

[PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Dongli Zhang
The ethernet driver may allocates skb (and skb->data) via napi_alloc_skb(). This ends up to page_frag_alloc() to allocate skb->data from page_frag_cache->va. During the memory pressure, page_frag_cache->va may be allocated as pfmemalloc page. As a result, the skb->pfmemalloc is always true as skb-

Re: [PATCH] vhost/vsock: add IOTLB API support

2020-11-03 Thread Peter Xu
On Tue, Nov 03, 2020 at 05:04:23PM +0800, Jason Wang wrote: > > On 2020/11/3 上午1:11, Stefano Garzarella wrote: > > On Fri, Oct 30, 2020 at 07:44:43PM +0800, Jason Wang wrote: > > > > > > On 2020/10/30 下午6:54, Stefano Garzarella wrote: > > > > On Fri, Oct 30, 2020 at 06:02:18PM +0800, Jason Wang w

[pull request][net-next 00/12] mlx5 updates-2020-11-03

2020-11-03 Thread Saeed Mahameed
Hi Jakub, This series makes some updates to mlx5 software steering. and some other misc trivial changes. For more information please see tag log below. For the DR memory buddy allocator series, Yevgeny has updated the implementation according to Dave's request [1] and got rid of the bit array op

[net-next 04/12] net/mlx5: DR, Add buddy allocator utilities

2020-11-03 Thread Saeed Mahameed
From: Yevgeny Kliteynik Add implementation of SW Steering variation of buddy allocator. The buddy system for ICM memory uses 2 main data structures: - Bitmap per order, that keeps the current state of allocated blocks for this order - Indicator for the number of available blocks per each order

[net-next 03/12] net/mlx5: DR, Rename matcher functions to be more HW agnostic

2020-11-03 Thread Saeed Mahameed
From: Yevgeny Kliteynik Remove flex parser from the matcher function names since the matcher should not be aware of such HW specific details. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/steering/dr_cmd.c | 4 +- .

[net-next 07/12] net/mlx5: DR, ICM memory pools sync optimization

2020-11-03 Thread Saeed Mahameed
From: Yevgeny Kliteynik Track the pool's hot ICM memory when freeing/allocating chunk, so that when checking if the sync is required, just check if the pool hot memory has reached the sync threshold. Signed-off-by: Hamdan Igbaria Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Revie

[net-next 02/12] net/mlx5: DR, Rename builders HW specific names

2020-11-03 Thread Saeed Mahameed
From: Yevgeny Kliteynik We will support multiple STE versions. The existing naming is not suitable for newer versions. Removed the HW specific details and renamed with a more general names. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed --- .../mell

[net-next 01/12] net/mlx5: DR, Remove unused member of action struct

2020-11-03 Thread Saeed Mahameed
From: Yevgeny Kliteynik Struct mlx5dr_action doesn't use this member Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h | 1 - 1 file changed, 1 deletion(-) diff

[net-next 05/12] net/mlx5: DR, Handle ICM memory via buddy allocation instead of buckets

2020-11-03 Thread Saeed Mahameed
From: Yevgeny Kliteynik Till now in order to manage the ICM memory we used bucket mechanism, which kept a bucket per specified size (sizes were between 1 block to 2^21 blocks). Now changing that with buddy-system mechanism, which gives us much more flexible way to manage the ICM memory. Its bigg

[net-next 10/12] net/mlx4: Cleanup kernel-doc warnings

2020-11-03 Thread Saeed Mahameed
$ git ls-files *.[ch] | egrep drivers/net/ethernet/mellanox/ | \ xargs scripts/kernel-doc -none drivers/net/ethernet/mellanox/mlx4/fw_qos.h:144: warning: Function parameter or member 'in_param' not described ... drivers/net/ethernet/mellanox/mlx4/fw_qos.h:144: warning: Excess function para

[net-next 11/12] net/mlx5: Cleanup kernel-doc warnings

2020-11-03 Thread Saeed Mahameed
$ git ls-files *.[ch] | egrep drivers/net/ethernet/mellanox/ | \ xargs scripts/kernel-doc -none drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h:57: warning: Enum value 'MLX5_FPGA_ACCESS_TYPE_I2C' not described ... drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h:57: warning: Enum valu

[net-next 12/12] net: mlx5: Replace in_irq() usage

2020-11-03 Thread Saeed Mahameed
From: Sebastian Andrzej Siewior mlx5_eq_async_int() uses in_irq() to decide whether eq::lock needs to be acquired and released with spin_[un]lock() or the irq saving/restoring variants. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour dep

[net-next 08/12] net/mlx5: DR, Free unused buddy ICM memory

2020-11-03 Thread Saeed Mahameed
From: Yevgeny Kliteynik Track buddy's used ICM memory, and free it if all of the buddy's memory bacame unused. Do this only for STEs. MODIFY_ACTION buddies are much smaller, so in case there is a large amount of modify_header actions, which result in large amount of MODIFY_ACTION buddies, doing t

[net-next 06/12] net/mlx5: DR, Sync chunks only during free

2020-11-03 Thread Saeed Mahameed
From: Yevgeny Kliteynik When freeing chunks, we want to sync the steering so that all the "hot" memory will be written to ICM and all the chunks that are in the hot_list will be actually destroyed. When allocating from the pool, we don't have a need to sync the steering, as we're not freeing anyt

[net-next 09/12] net/mlx5e: Validate stop_room size upon user input

2020-11-03 Thread Saeed Mahameed
From: Vladyslav Tarasiuk Stop room is a space that may be taken by WQEs in the SQ during a packet transmit. It is used to check if next packet has enough room in the SQ. Stop room guarantees this packet can be served and if not, the queue is stopped, so no more packets are passed to the driver un

Re: [net-next,v1,4/5] seg6: add support for the SRv6 End.DT4 behavior

2020-11-03 Thread kernel test robot
Hi Andrea, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on ipvs/master] [also build test WARNING on linus/master v5.10-rc2 next-20201103] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

Re: [MPTCP] [PATCH net-next v2 6/7] docs: networking: mptcp: Add MPTCP sysctl entries

2020-11-03 Thread Matthieu Baerts
Hi Mat, On 03/11/2020 20:05, Mat Martineau wrote: Describe the two MPTCP sysctls, what the values mean, and the default settings. Acked-by: Geliang Tang Signed-off-by: Mat Martineau Thank you for this new patch! Reviewed-by: Matthieu Baerts Cheers, Matt -- Tessares | Belgium | Hybrid Acc

Re: [PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Matthew Wilcox
On Tue, Nov 03, 2020 at 11:32:39AM -0800, Dongli Zhang wrote: > The ethernet driver may allocates skb (and skb->data) via napi_alloc_skb(). > This ends up to page_frag_alloc() to allocate skb->data from > page_frag_cache->va. > > During the memory pressure, page_frag_cache->va may be allocated as

Re: [net v4 05/10] cxgb4/ch_ktls: creating skbs causes panic

2020-11-03 Thread Jakub Kicinski
On Fri, 30 Oct 2020 23:32:20 +0530 Rohit Maheshwari wrote: > Creating SKB per tls record and freeing the original one causes > panic. There will be race if connection reset is requested. By > freeing original skb, refcnt will be decremented and that means, > there is no pending record to send, and

Re: [PATCH v2] net: bonding: alb disable balance for IPv6 multicast related mac

2020-11-03 Thread Jakub Kicinski
On Mon, 2 Nov 2020 15:56:43 +0800 LIU Yulong wrote: > According to the RFC 2464 [1] the prefix "33:33:xx:xx:xx:xx" is defined to > construct the multicast destination MAC address for IPv6 multicast traffic. > The NDP (Neighbor Discovery Protocol for IPv6)[2] will comply with such > rule. The work

Re: [PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Matthew Wilcox
On Tue, Nov 03, 2020 at 12:57:33PM -0800, Dongli Zhang wrote: > On 11/3/20 12:35 PM, Matthew Wilcox wrote: > > On Tue, Nov 03, 2020 at 11:32:39AM -0800, Dongli Zhang wrote: > >> However, once kernel is not under memory pressure any longer (suppose large > >> amount of memory pages are just reclaime

Re: [PATCH net] mptcp: token: fix unititialized variable

2020-11-03 Thread Jakub Kicinski
On Mon, 02 Nov 2020 11:48:25 +0100 Paolo Abeni wrote: > On Mon, 2020-11-02 at 10:09 +0100, Davide Caratti wrote: > > gcc complains about use of uninitialized 'num'. Fix it by doing the first > > assignment of 'num' when the variable is declared. > > > > Fixes: 96d890daad05 ("mptcp: add msk interat

[BUG] ax88179_178a - broken hw checksumming after resume

2020-11-03 Thread Lukasz Stelmach
Hi, I've got a generic AX88179 based USB ethernet interface and I am experiencing a following problem. + After resuming from suspend + hw tx-checksuming doesn't work + for UDP packets. I've got an RPi4 on the other end of the cable. To test the connection I use the following commands tcptracero

Re: [RFC] Add BPF_PROG_TYPE_CGROUP_IOCTL

2020-11-03 Thread Alexei Starovoitov
On Tue, Nov 03, 2020 at 02:19:22PM -0500, Kenny Ho wrote: > On Tue, Nov 3, 2020 at 12:43 AM Alexei Starovoitov > wrote: > > On Mon, Nov 2, 2020 at 9:39 PM Kenny Ho wrote: > > pls don't top post. > My apology. > > > > Cgroup awareness is desired because the intent > > > is to use this for resourc

Re: [PATCH 1/1] net: usb: qmi_wwan: add Telit LE910Cx 0x1230 composition

2020-11-03 Thread Jakub Kicinski
On Mon, 02 Nov 2020 21:22:31 +0100 Bjørn Mork wrote: > Daniele Palmas writes: > > > dd support for Telit LE910Cx 0x1230 composition: > > > > 0x1230: tty, adb, rmnet, audio, tty, tty, tty, tty > > > > Signed-off-by: Daniele Palmas > > Acked-by: Bjørn Mork Applied, thanks!

Re: [PATCH v4 0/5] Bluetooth: Add new MGMT interface for advertising add

2020-11-03 Thread Luiz Augusto von Dentz
Hi Daniel, On Tue, Nov 3, 2020 at 9:42 AM Daniel Winkler wrote: > > Hello Luiz, > > Thank you for the information. It is good to know that this tool is > actively used and that there is a way to skip existing flaky tests. > Just for clarification, is this a requirement to land the kernel > change

Re: [PATCH iproute2-next v2 03/11] lib: utils: Add print_on_off_bool()

2020-11-03 Thread Petr Machata
Leon Romanovsky writes: > On Tue, Nov 03, 2020 at 12:05:20AM +0100, Petr Machata wrote: >> >> Leon Romanovsky writes: >> >> > On Sun, Nov 01, 2020 at 04:55:42PM -0700, David Ahern wrote: >> > >> >> yes, the rdma utils are using generic function names. The rdma version >> >> should be renamed;

Re: [PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Dongli Zhang
Hi Matthew, On 11/3/20 12:35 PM, Matthew Wilcox wrote: > On Tue, Nov 03, 2020 at 11:32:39AM -0800, Dongli Zhang wrote: >> The ethernet driver may allocates skb (and skb->data) via napi_alloc_skb(). >> This ends up to page_frag_alloc() to allocate skb->data from >> page_frag_cache->va. >> >> During

Re: [PATCH] net: ipv6: remove redundant blank in ip6_frags_ns_sysctl_register

2020-11-03 Thread Jakub Kicinski
On Mon, 2 Nov 2020 22:24:03 +0800 Menglong Dong wrote: > From: Menglong Dong > > This blank seems redundant. > > Signed-off-by: Menglong Dong It is redundant but cleanup like this is not worth the potential conflicts when backporting fixes.

Re: [PATCH net-next] mpls: drop skb's dst in mpls_forward()

2020-11-03 Thread Jakub Kicinski
On Sat, 31 Oct 2020 01:07:25 +0100 Guillaume Nault wrote: > Commit 394de110a733 ("net: Added pointer check for > dst->ops->neigh_lookup in dst_neigh_lookup_skb") added a test in > dst_neigh_lookup_skb() to avoid a NULL pointer dereference. The root > cause was the MPLS forwarding code, which doesn'

[bpf-next PATCH v3 1/5] selftests/bpf: Move test_tcppbf_user into test_progs

2020-11-03 Thread Alexander Duyck
From: Alexander Duyck Recently a bug was missed due to the fact that test_tcpbpf_user is not a part of test_progs. In order to prevent similar issues in the future move the test functionality into test_progs. By doing this we can make certain that it is a part of standard testing and will not be

[bpf-next PATCH v3 3/5] selftests/bpf: Replace EXPECT_EQ with ASSERT_EQ and refactor verify_results

2020-11-03 Thread Alexander Duyck
From: Alexander Duyck There is already logic in test_progs.h for asserting that a value is expected to be another value. So instead of reinventing it we should just make use of ASSERT_EQ in tcpbpf_user.c. This will allow for better debugging and integrates much more closely with the test_progs fr

[bpf-next PATCH v3 2/5] selftests/bpf: Drop python client/server in favor of threads

2020-11-03 Thread Alexander Duyck
From: Alexander Duyck Drop the tcp_client/server.py files in favor of using a client and server thread within the test case. Specifically we spawn a new thread to play the role of the server, and the main testing thread plays the role of client. Add logic to the end of the run_test function to g

[bpf-next PATCH v3 0/5] selftests/bpf: Migrate test_tcpbpf_user to be a part of test_progs framework

2020-11-03 Thread Alexander Duyck
Move the test functionality from test_tcpbpf_user into the test_progs framework so that it will be run any time the test_progs framework is run. This will help to prevent future test escapes as the individual tests, such as test_tcpbpf_user, are less likely to be run by developers and CI tests. A

[bpf-next PATCH v3 5/5] selftest/bpf: Use global variables instead of maps for test_tcpbpf_kern

2020-11-03 Thread Alexander Duyck
From: Alexander Duyck Use global variables instead of global_map and sockopt_results_map to track test data. Doing this greatly simplifies the code as there is not need to take the extra steps of updating the maps or looking up elements. Acked-by: Martin KaFai Lau Signed-off-by: Alexander Duyck

[bpf-next PATCH v3 4/5] selftests/bpf: Migrate tcpbpf_user.c to use BPF skeleton

2020-11-03 Thread Alexander Duyck
From: Alexander Duyck Update tcpbpf_user.c to make use of the BPF skeleton. Doing this we can simplify test_tcpbpf_user and reduce the overhead involved in setting up the test. In addition we can clean up the remaining bits such as the one remaining CHECK_FAIL at the end of test_tcpbpf_user so t

Re: [PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Dongli Zhang
On 11/3/20 1:15 PM, Matthew Wilcox wrote: > On Tue, Nov 03, 2020 at 12:57:33PM -0800, Dongli Zhang wrote: >> On 11/3/20 12:35 PM, Matthew Wilcox wrote: >>> On Tue, Nov 03, 2020 at 11:32:39AM -0800, Dongli Zhang wrote: However, once kernel is not under memory pressure any longer (suppose lar

[PATCH 2/2] can: af_can: prevent potential access of uninitialized member in canfd_rcv()

2020-11-03 Thread Anant Thazhemadam
In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CANFD_MAX_DLEN) separately after the skb->len's condition is checked,

[PATCH 1/2] can: af_can: prevent potential access of uninitialized member in can_rcv()

2020-11-03 Thread Anant Thazhemadam
In can_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CAN_MAX_DLEN) separately after the skb->len's condition is checked, and

[PATCH 0/2] prevent potential access of uninitialized members in can_rcv() and canfd_rcv()

2020-11-03 Thread Anant Thazhemadam
In both can_rcv(), and canfd_rcv(), when skb->len = 0, cfd->len (which is uninitialized) is accessed by pr_warn_once(). Performing the validation check for cfd->len separately, after the validation check for skb->len is done, resolves this issue in both instances, without compromising the degre

Re: [PATCH v2 net 1/1] ptp: idt82p33: add adjphase support

2020-11-03 Thread Jakub Kicinski
On Mon, 2 Nov 2020 10:27:28 -0500 min.li...@renesas.com wrote: > From: Min Li > > Add idt82p33_adjwritephase() to support PHC write phase mode. > > Changes since v1: > - Fix broken build on 32 bit machine due to 64 bit division. > > Signed-off-by: Min Li > --- > drivers/ptp/ptp_idt82p33.c | 3

Re: [PATCH v2 net 1/1] ptp: idt82p33: add adjphase support

2020-11-03 Thread Jakub Kicinski
On Mon, 2 Nov 2020 10:27:28 -0500 min.li...@renesas.com wrote: > From: Min Li > > Add idt82p33_adjwritephase() to support PHC write phase mode. > > Changes since v1: > - Fix broken build on 32 bit machine due to 64 bit division. Oh, and also please mark this as [PATCH net-next] in the subject,

Re: [net v4 07/10] ch_ktls: packet handling prior to start marker

2020-11-03 Thread Jakub Kicinski
On Fri, 30 Oct 2020 23:32:22 +0530 Rohit Maheshwari wrote: > There could be a case where ACK for tls exchanges prior to start > marker is missed out, and by the time tls is offloaded. This pkt > should not be discarded and handled carefully. It could be > plaintext alone or plaintext + finish as we

Re: [PATCH net-next 3/5] r8152: add MCU typed read/write functions

2020-11-03 Thread Vladimir Oltean
On Tue, Nov 03, 2020 at 08:22:24PM +0100, Marek Behún wrote: > Add pla_ and usb_ prefixed versions of ocp_read_* and ocp_write_* > functions. This saves us from always writing MCU_TYPE_PLA/MCU_TYPE_USB > as parameter. > > Signed-off-by: Marek Behún > --- You just made it harder for everyone to f

Re: [PATCH net] chelsio/chtls: fix memory leak

2020-11-03 Thread Jakub Kicinski
On Mon, 2 Nov 2020 23:09:10 +0530 Vinay Kumar Yadav wrote: > Correct skb refcount in alloc_ctrl_skb(), causing skb memleak > when chtls_send_abort() called with NULL skb. > it was always leaking the skb, correct it by incrementing skb > refs by one. > > Fixes: cc35c88ae4db ("crypto : chtls - CPL

Re: [PATCH iproute2-next] tc: implement support for action terse dump

2020-11-03 Thread Jamal Hadi Salim
On 2020-11-03 10:07 a.m., Vlad Buslov wrote: On Tue 03 Nov 2020 at 03:48, David Ahern wrote: On 10/31/20 2:25 PM, Vlad Buslov wrote: diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 5ad84e663d01..b486f52900f0 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/

Re: [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2020-11-02

2020-11-03 Thread Jakub Kicinski
On Mon, 02 Nov 2020 14:58:08 -0800 Saeed Mahameed wrote: > On Mon, 2020-11-02 at 14:23 -0800, Tony Nguyen wrote: > > This series contains updates to ice driver only. > > ... > > > Tony renames Flow Director functions to be more generic as their use > > is expanded. > > > > Real expands ntuple

[net 05/27] can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context

2020-11-03 Thread Marc Kleine-Budde
From: Vincent Mailhol If a driver calls can_get_echo_skb() during a hardware IRQ (which is often, but not always, the case), the 'WARN_ON(in_irq)' in net/core/skbuff.c#skb_release_head_state() might be triggered, under network congestion circumstances, together with the potential risk of a NULL p

[net 04/27] can: rx-offload: don't call kfree_skb() from IRQ context

2020-11-03 Thread Marc Kleine-Budde
A CAN driver, using the rx-offload infrastructure, is reading CAN frames (usually in IRQ context) from the hardware and placing it into the rx-offload queue to be delivered to the networking stack via NAPI. In case the rx-offload queue is full, trying to add more skbs results in the skbs being dro

[net 15/27] can: isotp: padlen(): make const array static, makes object smaller

2020-11-03 Thread Marc Kleine-Budde
From: Colin Ian King Don't populate the const array plen on the stack but instead it static. Makes the object code smaller by 926 bytes. Before: textdata bss dec hex filename 265311943 64 285386f7a net/can/isotp.o After: textdata bss dec he

[net 27/27] can: flexcan: flexcan_remove(): disable wakeup completely

2020-11-03 Thread Marc Kleine-Budde
From: Joakim Zhang With below sequence, we can see wakeup default is enabled after re-load module, if it was enabled before, so we need disable wakeup in flexcan_remove(). | # cat /sys/bus/platform/drivers/flexcan/5a8e.can/power/wakeup | disabled | # echo enabled > /sys/bus/platform/drivers/

[net 25/27] can: flexcan: add ECC initialization for LX2160A

2020-11-03 Thread Marc Kleine-Budde
From: Joakim Zhang After double check with Layerscape CAN owner (Pankaj Bansal), confirm that LX2160A indeed supports ECC feature, so correct the feature table. For SoCs with ECC supported, even use FLEXCAN_QUIRK_DISABLE_MECR quirk to disable non-correctable errors interrupt and freeze mode, had

[net 07/27] can: can_create_echo_skb(): fix echo skb generation: always use skb_clone()

2020-11-03 Thread Marc Kleine-Budde
From: Oleksij Rempel All user space generated SKBs are owned by a socket (unless injected into the key via AF_PACKET). If a socket is closed, all associated skbs will be cleaned up. This leads to a problem when a CAN driver calls can_put_echo_skb() on a unshared SKB. If the socket is closed prio

[net 16/27] can: ti_hecc: ti_hecc_probe(): add missed clk_disable_unprepare() in error path

2020-11-03 Thread Marc Kleine-Budde
From: Zhang Changzhong The driver forgets to call clk_disable_unprepare() in error path after a success calling for clk_prepare_enable(). Fix it by adding a clk_disable_unprepare() in error path. Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1594973079-27743-1-git-send-email

[net 09/27] can: j1939: fix syntax and spelling

2020-11-03 Thread Marc Kleine-Budde
From: Yegor Yefremov This patches fixes the syntax an spelling of the j1939 documentation. Signed-off-by: Yegor Yefremov Link: https://lore.kernel.org/r/20201020101043.6369-1-yegorsli...@googlemail.com Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Marc Kleine-Bud

[net 21/27] can: mcp251xfd: mcp251xfd_regmap_crc_read(): increase severity of CRC read error messages

2020-11-03 Thread Marc Kleine-Budde
During debugging it turned out that some people have setups where the SPI communication is more prone to CRC errors. Increase the severity of both the transfer retry and transfer failure message to give users feedback without the need to recompile the driver with debug enabled. Cc: Manivannan Sad

[net 06/27] can: dev: __can_get_echo_skb(): fix real payload length return value for RTR frames

2020-11-03 Thread Marc Kleine-Budde
From: Oliver Hartkopp The can_get_echo_skb() function returns the number of received bytes to be used for netdev statistics. In the case of RTR frames we get a valid (potential non-zero) data length value which has to be passed for further operations. But on the wire RTR frames have no payload le

[net 24/27] can: flexcan: remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A

2020-11-03 Thread Marc Kleine-Budde
From: Joakim Zhang After double check with Layerscape CAN owner (Pankaj Bansal), confirm that LS1021A doesn't support ECC feature, so remove FLEXCAN_QUIRK_DISABLE_MECR quirk. Fixes: 99b7668c04b27 ("can: flexcan: adding platform specific details for LS1021A") Cc: Pankaj Bansal Signed-off-by: Jo

[net 26/27] can: flexcan: add ECC initialization for VF610

2020-11-03 Thread Marc Kleine-Budde
From: Joakim Zhang For SoCs with ECC supported, even use FLEXCAN_QUIRK_DISABLE_MECR quirk to disable non-correctable errors interrupt and freeze mode, had better use FLEXCAN_QUIRK_SUPPORT_ECC quirk to initialize all memory. Fixes: cdce844865bea ("can: flexcan: add vf610 support for FlexCAN") Sig

[net 14/27] can: isotp: isotp_rcv_cf(): enable RX timeout handling in listen-only mode

2020-11-03 Thread Marc Kleine-Budde
From: Oliver Hartkopp As reported by Thomas Wagner: https://github.com/hartkopp/can-isotp/issues/34 the timeout handling for data frames is not enabled when the isotp socket is used in listen-only mode (sockopt CAN_ISOTP_LISTEN_MODE). This mode is enabled by the isotpsniffer application whi

[net 17/27] can: xilinx_can: handle failure cases of pm_runtime_get_sync

2020-11-03 Thread Marc Kleine-Budde
From: Navid Emamdoost Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count. Call pm_runtime_put if pm_runtime_get_sync fails. Signed-off-by: Navid Emamdoost Link: https://lore.kernel.org/r/20200605033239.60664-1-navid.emamdo...@gmail.com Fixes:

[net 18/27] can: peak_usb: add range checking in decode operations

2020-11-03 Thread Marc Kleine-Budde
From: Dan Carpenter These values come from skb->data so Smatch considers them untrusted. I believe Smatch is correct but I don't have a way to test this. The usb_if->dev[] array has 2 elements but the index is in the 0-15 range without checks. The cfd->len can be up to 255 but the maximum vali

[net 22/27] can: mcp251xfd: mcp251xfd_regmap_nocrc_read(): fix semicolon.cocci warnings

2020-11-03 Thread Marc Kleine-Budde
From: kernel test robot drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c:176:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 875347fe5756 ("can: mcp25xxfd: add regmap infrastructure") Signed-off-by: kernel test robot Link: https

[net 20/27] can: peak_canfd: pucan_handle_can_rx(): fix echo management when loopback is on

2020-11-03 Thread Marc Kleine-Budde
From: Stephane Grosjean Echo management is driven by PUCAN_MSG_LOOPED_BACK bit, while loopback frames are identified with PUCAN_MSG_SELF_RECEIVE bit. Those bits are set for each outgoing frame written to the IP core so that a copy of each one will be placed into the rx path. Thus, - when PUCAN_M

[net 12/27] can: j1939: j1939_sk_bind(): return failure if netdev is down

2020-11-03 Thread Marc Kleine-Budde
From: Zhang Changzhong When a netdev down event occurs after a successful call to j1939_sk_bind(), j1939_netdev_notify() can handle it correctly. But if the netdev already in down state before calling j1939_sk_bind(), j1939_sk_release() will stay in wait_event_interruptible() blocked forever. Be

[net 13/27] can: isotp: Explain PDU in CAN_ISOTP help text

2020-11-03 Thread Marc Kleine-Budde
From: Geert Uytterhoeven The help text for the CAN_ISOTP config symbol uses the acronym "PDU". However, this acronym is not explained here, nor in Documentation/networking/can.rst. Expand the acronym to make it easier for users to decide if they need to enable the CAN_ISOTP option or not. Sign

[net 23/27] can: mcp251xfd: remove unneeded break

2020-11-03 Thread Marc Kleine-Budde
From: Tom Rix A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019172412.31143-1-t...@redhat.com Signed-off-by: Marc Kleine-Budde --- .../net/can/spi/mcp251xfd/mcp251xfd-core.c| 22 +-- 1 file changed, 11 inse

[net 19/27] can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping

2020-11-03 Thread Marc Kleine-Budde
From: Stephane Grosjean Fabian Inostroza has discovered a potential problem in the hardware timestamp reporting from the PCAN-USB USB CAN interface (only), related to the fact that a timestamp of an event may precede the timestamp used for synchronization when both records are part of the same U

[net 10/27] can: j1939: swap addr and pgn in the send example

2020-11-03 Thread Marc Kleine-Budde
From: Yegor Yefremov The address was wrongly assigned to the PGN field and vice versa. Signed-off-by: Yegor Yefremov Link: https://lore.kernel.org/r/20201022083708.8755-1-yegorsli...@googlemail.com Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Marc Kleine-Budde

[net 02/27] dt-bindings: can: flexcan: convert fsl,*flexcan bindings to yaml

2020-11-03 Thread Marc Kleine-Budde
From: Oleksij Rempel In order to automate the verification of DT nodes convert fsl-flexcan.txt to fsl,flexcan.yaml Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201022075218.11880-3-o.rem...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- .../bi

[net 11/27] can: j1939: use backquotes for code samples

2020-11-03 Thread Marc Kleine-Budde
From: Yegor Yefremov This patch adds backquotes for code samples. Signed-off-by: Yegor Yefremov Link: https://lore.kernel.org/r/20201026094442.16587-1-yegorsli...@googlemail.com Signed-off-by: Marc Kleine-Budde --- Documentation/networking/j1939.rst | 88 +++--- 1 fil

<    1   2   3   4   >