Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

2020-05-06 Thread Greg Kroah-Hartman
On Thu, May 07, 2020 at 08:44:12AM +0200, Johan Hovold wrote: > On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote: > > On Tue, 29 Nov 2016 at 00:00, Johan Hovold wrote: > > > > > > Make sure to deregister and free any fixed-link PHY registered using > > > of_phy_register_fixed_link()

Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

2020-05-06 Thread Johan Hovold
On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote: > On Tue, 29 Nov 2016 at 00:00, Johan Hovold wrote: > > > > Make sure to deregister and free any fixed-link PHY registered using > > of_phy_register_fixed_link() on probe errors and on driver unbind. > > > > Fixes: 83895bedeee6 ("net:

Re: [PATCH bpf-next v3 5/5] bpf: allow any port in bpf_bind helper

2020-05-06 Thread Martin KaFai Lau
On Wed, May 06, 2020 at 03:32:10PM -0700, Stanislav Fomichev wrote: > We want to have a tighter control on what ports we bind to in > the BPF_CGROUP_INET{4,6}_CONNECT hooks even if it means > connect() becomes slightly more expensive. The expensive part > comes from the fact that we now need to cal

[PATCH] e1000e: Warn if disabling ULP failed

2020-05-06 Thread Kai-Heng Feng
The hardware may stop working if driver failed to disable ULP mode. Take the return value of e1000_disable_ulp_lpt_lp() into account, and pass up the error if it fails. Signed-off-by: Kai-Heng Feng --- drivers/net/ethernet/intel/e1000e/ich8lan.c | 6 +- 1 file changed, 5 insertions(+), 1 de

Re: [PATCH bpf-next v3 4/5] net: refactor arguments of inet{,6}_bind

2020-05-06 Thread Martin KaFai Lau
On Wed, May 06, 2020 at 03:32:09PM -0700, Stanislav Fomichev wrote: > The intent is to add an additional bind parameter in the next commit. > Instead of adding another argument, let's convert all existing > flag arguments into an extendable bit field. > > No functional changes. > > Cc: Andrey Ign

Re: [PATCH bpf-next v3 3/5] selftests/bpf: move existing common networking parts into network_helpers

2020-05-06 Thread Martin KaFai Lau
On Wed, May 06, 2020 at 03:32:08PM -0700, Stanislav Fomichev wrote: > 1. Move pkt_v4 and pkt_v6 into network_helpers and adjust the users. > 2. Copy-paste spin_lock_thread into two tests that use it. Instead of copying it into two tests, can spin_lock_thread be moved to network-helpers.c?

Re: [PATCH bpf-next v3 1/5] selftests/bpf: generalize helpers to control background listener

2020-05-06 Thread Martin KaFai Lau
On Wed, May 06, 2020 at 03:32:06PM -0700, Stanislav Fomichev wrote: > Move the following routines that let us start a background listener > thread and connect to a server by fd to the test_prog: > * start_server_thread - start background INADDR_ANY thread > * stop_server_thread - stop the thread >

memory leak in inet6_create (2)

2020-05-06 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:f66ed1eb Merge tag 'iomap-5.7-fixes-1' of git://git.kernel.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=12cf3c4c10 kernel config: https://syzkaller.appspot.com/x/.config?x=36dc1e5ad3e26c41 das

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Leon Romanovsky
On Wed, May 06, 2020 at 12:23:29PM -0700, Jakub Kicinski wrote: > On Wed, 6 May 2020 22:16:11 +0300 Leon Romanovsky wrote: > > > +#define MTK_MAC_DRVNAME"mtk_eth_mac" > > > +#define MTK_MAC_VERSION"1.0" > > > > Please don't add driver

[PATCH bpf-next v3 03/21] bpf: support bpf tracing/iter programs for BPF_LINK_CREATE

2020-05-06 Thread Yonghong Song
Given a bpf program, the step to create an anonymous bpf iterator is: - create a bpf_iter_link, which combines bpf program and the target. In the future, there could be more information recorded in the link. A link_fd will be returned to the user space. - create an anonymous bpf iterato

[PATCH bpf-next v3 10/21] net: bpf: add netlink and ipv6_route bpf_iter targets

2020-05-06 Thread Yonghong Song
This patch added netlink and ipv6_route targets, using the same seq_ops (except show() and minor changes for stop()) for /proc/net/{netlink,ipv6_route}. The net namespace for these targets are the current net namespace at file open stage, similar to /proc/net/{netlink,ipv6_route} reference countin

[PATCH bpf-next v3 20/21] tools/bpf: selftests: add iter progs for bpf_map/task/task_file

2020-05-06 Thread Yonghong Song
The implementation is arbitrary, just to show how the bpf programs can be written for bpf_map/task/task_file. They can be costomized for specific needs. For example, for bpf_map, the iterator prints out: $ cat /sys/fs/bpf/my_bpf_map id refcnt usercnt locked_vm 32

[PATCH bpf-next v3 06/21] bpf: create anonymous bpf iterator

2020-05-06 Thread Yonghong Song
A new bpf command BPF_ITER_CREATE is added. The anonymous bpf iterator is seq_file based. The seq_file private data are referenced by targets. The bpf_iter infrastructure allocated additional space at seq_file->private before the space used by targets to store some meta data, e.g., prog: p

[PATCH bpf-next v3 17/21] tools/libpf: add offsetof/container_of macro in bpf_helpers.h

2020-05-06 Thread Yonghong Song
These two helpers will be used later in bpf_iter bpf program bpf_iter_netlink.c. Put them in bpf_helpers.h since they could be useful in other cases. Signed-off-by: Yonghong Song --- tools/lib/bpf/bpf_helpers.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/lib/bpf/bpf

[PATCH bpf-next v3 07/21] bpf: create file bpf iterator

2020-05-06 Thread Yonghong Song
To produce a file bpf iterator, the fd must be corresponding to a link_fd assocciated with a trace/iter program. When the pinned file is opened, a seq_file will be generated. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song --- include/linux/bpf.h | 2 ++ kernel/bpf/bpf_iter.c | 17 +++

[PATCH bpf-next v3 09/21] bpf: add bpf_map iterator

2020-05-06 Thread Yonghong Song
Implement seq_file operations to traverse all maps. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song --- include/linux/bpf.h | 1 + kernel/bpf/Makefile | 2 +- kernel/bpf/map_iter.c | 97 +++ kernel/bpf/syscall.c | 19 + 4 files chang

[PATCH bpf-next v3 12/21] bpf: add PTR_TO_BTF_ID_OR_NULL support

2020-05-06 Thread Yonghong Song
Add bpf_reg_type PTR_TO_BTF_ID_OR_NULL support. For tracing/iter program, the bpf program context definition, e.g., for previous bpf_map target, looks like struct bpf_iter__bpf_map { struct bpf_iter_meta *meta; struct bpf_map *map; }; The kernel guarantees that meta is not NULL, but ma

[PATCH bpf-next v3 21/21] tools/bpf: selftests: add bpf_iter selftests

2020-05-06 Thread Yonghong Song
The added test includes the following subtests: - test verifier change for btf_id_or_null - test load/create_iter/read for ipv6_route/netlink/bpf_map/task/task_file - test anon bpf iterator - test anon bpf iterator reading one char at a time - test file bpf iterator - test overflow

[PATCH bpf-next v3 16/21] tools/libbpf: add bpf_iter support

2020-05-06 Thread Yonghong Song
Two new libbpf APIs are added to support bpf_iter: - bpf_program__attach_iter Given a bpf program and additional parameters, which is none now, returns a bpf_link. - bpf_iter_create syscall level API to create a bpf iterator. The macro BPF_SEQ_PRINTF are also introduced. The format

[PATCH bpf-next v3 15/21] bpf: support variable length array in tracing programs

2020-05-06 Thread Yonghong Song
In /proc/net/ipv6_route, we have struct fib6_info { struct fib6_table *fib6_table; ... struct fib6_nh fib6_nh[0]; } struct fib6_nh { struct fib_nh_common nh_common; struct rt6_info **rt6i_pcpu; struct rt6_exception_bucket *rt6i_exception_bucket; }; struct fib_nh_co

[PATCH bpf-next v3 13/21] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-06 Thread Yonghong Song
Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq_printf supports common format string flag/width/type fields so at least I can get identical results for netlink and ipv6_route targets. For bpf_seq_printf and bpf_seq_write, return value -EOVE

[PATCH bpf-next v3 04/21] bpf: support bpf tracing/iter programs for BPF_LINK_UPDATE

2020-05-06 Thread Yonghong Song
Added BPF_LINK_UPDATE support for tracing/iter programs. This way, a file based bpf iterator, which holds a reference to the link, can have its bpf program updated without creating new files. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song --- kernel/bpf/bpf_iter.c | 31 +

[PATCH bpf-next v3 19/21] tools/bpf: selftests: add iterator programs for ipv6_route and netlink

2020-05-06 Thread Yonghong Song
Two bpf programs are added in this patch for netlink and ipv6_route target. On my VM, I am able to achieve identical results compared to /proc/net/netlink and /proc/net/ipv6_route. $ cat /proc/net/netlink sk Eth PidGroups Rmem Wmem Dump Locks DropsInode

[PATCH bpf-next v3 11/21] bpf: add task and task/file iterator targets

2020-05-06 Thread Yonghong Song
Only the tasks belonging to "current" pid namespace are enumerated. For task/file target, the bpf program will have access to struct task_struct *task u32 fd struct file *file where fd/file is an open file for the task. Signed-off-by: Yonghong Song --- kernel/bpf/Makefile| 2 +- ker

[PATCH bpf-next v3 14/21] bpf: handle spilled PTR_TO_BTF_ID properly when checking stack_boundary

2020-05-06 Thread Yonghong Song
This specifically to handle the case like below: // ptr below is a socket ptr identified by PTR_TO_BTF_ID u64 param[2] = { ptr, val }; bpf_seq_printf(seq, fmt, sizeof(fmt), param, sizeof(param)); In this case, the 16 bytes stack for "param" contains: 8 bytes for ptr with spilled PTR_TO

[PATCH bpf-next v3 08/21] bpf: implement common macros/helpers for target iterators

2020-05-06 Thread Yonghong Song
Macro DEFINE_BPF_ITER_FUNC is implemented so target can define an init function to capture the BTF type which represents the target. The bpf_iter_meta is a structure holding meta data, common to all targets in the bpf program. Additional marker functions are called before or after bpf_seq_read()

[PATCH bpf-next v3 01/21] bpf: implement an interface to register bpf_iter targets

2020-05-06 Thread Yonghong Song
The target can call bpf_iter_reg_target() to register itself. The needed information: target: target name seq_ops: the seq_file operations for the target init_seq_private target callback to initialize seq_priv during file open fini_seq_private target callback to clean u

[PATCH bpf-next v3 02/21] bpf: allow loading of a bpf_iter program

2020-05-06 Thread Yonghong Song
A bpf_iter program is a tracing program with attach type BPF_TRACE_ITER. The load attribute attach_btf_id is used by the verifier against a particular kernel function, which represents a target, e.g., __bpf_iter__bpf_map for target bpf_map which is implemented later. The program return value mus

[PATCH bpf-next v3 00/21] bpf: implement bpf iterator for kernel data

2020-05-06 Thread Yonghong Song
Motivation: The current way to dump kernel data structures mostly: 1. /proc system 2. various specific tools like "ss" which requires kernel support. 3. drgn The dropback for the first two is that whenever you want to dump more, you need change the kernel. For example, Martin want

[PATCH bpf-next v3 18/21] tools/bpftool: add bpf_iter support for bptool

2020-05-06 Thread Yonghong Song
Currently, only one command is supported bpftool iter pin It will pin the trace/iter bpf program in the object file to the where should be on a bpffs mount. For example, $ bpftool iter pin ./bpf_iter_ipv6_route.o \ /sys/fs/bpf/my_route User can then do a `cat` to print out the result

[PATCH bpf-next v3 05/21] bpf: implement bpf_seq_read() for bpf iterator

2020-05-06 Thread Yonghong Song
bpf iterator uses seq_file to provide a lossless way to transfer data to user space. But we want to call bpf program after all objects have been traversed, and bpf program may write additional data to the seq_file buffer. The current seq_read() does not work for this use case. Besides allowing sto

Re: [PATCH 15/15] x86: use non-set_fs based maccess routines

2020-05-06 Thread Christoph Hellwig
On Wed, May 06, 2020 at 12:01:32PM -0700, Linus Torvalds wrote: > Oh, absolutely. I did *NOT* mean that you'd use "unsafe_get_user()" as > the actual interface. I just meant that as an implementation detail on > x86, using "unsafe_get_user()" instead of "__get_user_size()" > internally both simplif

Re: [PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()'

2020-05-06 Thread Bjorn Andersson
On Wed 06 May 21:36 PDT 2020, Christophe JAILLET wrote: > In case of error, 'qcom_wcnss_open_channel()' must be undone by a call to > 'rpmsg_destroy_ept()', as already done in the remove function. > > Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to > rpmsg") It seems

Re: [PATCH next] ARM: dts: am437x: fix networking on boards with ksz9031 phy

2020-05-06 Thread Oleksij Rempel
Hi Grygorii, thank you for you patches! On Wed, May 06, 2020 at 10:08:35PM +0300, Grygorii Strashko wrote: > Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the > KSZ9031 PHY") the networking is broken on boards: > am437x-gp-evm > am437x-sk-evm > am437x-idk-evm > > All

[PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()'

2020-05-06 Thread Christophe JAILLET
In case of error, 'qcom_wcnss_open_channel()' must be undone by a call to 'rpmsg_destroy_ept()', as already done in the remove function. Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg") Signed-off-by: Christophe JAILLET --- Not 100% sure of the commit for Fixes

Re: [PATCH] ath10k: Replace zero-length array with flexible-array

2020-05-06 Thread Gustavo A. R. Silva
Kalle, On 5/5/20 02:51, Kalle Valo wrote: > > Fails to apply, please rebase on top of ath.git master branch. > > error: patch failed: drivers/net/wireless/ath/ath10k/pci.h:182 > error: drivers/net/wireless/ath/ath10k/pci.h: patch does not apply > stg import: Diff does not apply cleanly > > Pat

Re: [PATCH -next] iwlwifi: pcie: Use bitwise instead of arithmetic operator for flags

2020-05-06 Thread Samuel Zou
Both of you are right. I neglected, and this patch is wrong. Thanks. On 2020/5/6 23:15, Joe Perches wrote: On Wed, 2020-05-06 at 16:51 +0300, Luciano Coelho wrote: On Tue, 2020-05-05 at 20:19 -0700, Joe Perches wrote: On Wed, 2020-05-06 at 11:07 +0800, Samuel Zou wrote: This silences the fol

[PATCH v2] ath10k: Replace zero-length array with flexible-array

2020-05-06 Thread Gustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By ma

Re: [GIT] Networking

2020-05-06 Thread pr-tracker-bot
The pull request you sent on Wed, 06 May 2020 20:40:39 -0700 (PDT): > git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git refs/heads/master has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/a811c1fa0a02c062555b54651065899437bacdbe Thank you! -- Deet-doot-dot,

[PATCH] tcp: tcp_mark_head_lost is only valid for sack-tcp

2020-05-06 Thread zhang kai
so tcp_is_sack/reno checks are removed from tcp_mark_head_lost. Signed-off-by: zhang kai --- net/ipv4/tcp_input.c | 32 +++- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index b996dc106..c306becf6 100644 --

[GIT] Networking

2020-05-06 Thread David Miller
1) Fix reference count leaks in various parts of batman-adv, from Xiyu Yang. 2) Update NAT checksum even when it is zero, from Guillaume Nault. 3) sk_psock reference count leak in tls code, also from Xiyu Yang. 4) Sanity check TCA_FQ_CODEL_DROP_BATCH_SIZE netlink attribute in fq_codel, f

Re: [PATCH net,v4] net: flow_offload: skip hw stats check for FLOW_ACTION_HW_STATS_DONT_CARE

2020-05-06 Thread David Miller
From: Pablo Neira Ayuso Date: Wed, 6 May 2020 20:34:50 +0200 > This patch adds FLOW_ACTION_HW_STATS_DONT_CARE which tells the driver > that the frontend does not need counters, this hw stats type request > never fails. The FLOW_ACTION_HW_STATS_DISABLED type explicitly requests > the driver to di

Re: [PATCH net 0/5] wireguard fixes for 5.7-rc5

2020-05-06 Thread David Miller
From: "Jason A. Donenfeld" Date: Wed, 6 May 2020 15:33:01 -0600 > With Ubuntu and Debian having backported this into their kernels, we're > finally seeing testing from places we hadn't seen prior, which is nice. > With that comes more fixes: ... Series applied. > Patches (2) and (3) have Fixe

RE: Re: [v4,iproute2-next 1/2] iproute2-next:tc:action: add a gate control action

2020-05-06 Thread Po Liu
Hi Stephen, > -Original Message- > From: Stephen Hemminger > Sent: 2020年5月6日 23:22 > To: Po Liu > Cc: dsah...@gmail.com; linux-ker...@vger.kernel.org; > netdev@vger.kernel.org; vinicius.go...@intel.com; > da...@davemloft.net; v...@buslov.dev; Claudiu Manoil > ; Vladimir Oltean ; > Alexa

Re: [PATCHv2] erspan: Add type I version 0 support.

2020-05-06 Thread Eric Dumazet
On 5/5/20 9:05 AM, William Tu wrote: > The Type I ERSPAN frame format is based on the barebones > IP + GRE(4-byte) encapsulation on top of the raw mirrored frame. > Both type I and II use 0x88BE as protocol type. Unlike type II > and III, no sequence number or key is required. > To creat a type

Re: [PATCH iproute2] ip link: Do not call ll_name_to_index when creating a new link

2020-05-06 Thread David Ahern
On 5/17/18 4:36 PM, Stephen Hemminger wrote: > On Thu, 17 May 2018 16:22:37 -0600 > dsah...@kernel.org wrote: > >> From: David Ahern >> >> Using iproute2 to create a bridge and add 4094 vlans to it can take from >> 2 to 3 *minutes*. The reason is the extraneous call to ll_name_to_index. >> ll_nam

[PATCH v3] net: bpf: permit redirect from ingress L3 to egress L2 devices at near max mtu

2020-05-06 Thread Maciej Żenczykowski
From: Maciej Żenczykowski __bpf_skb_max_len(skb) is used from: bpf_skb_adjust_room __bpf_skb_change_tail __bpf_skb_change_head but in the case of forwarding we're likely calling these functions during receive processing on ingress and bpf_redirect()'ing at a later point in time to egress o

Re: [PATCH v2] net: bpf: permit redirect from L3 to L2 devices at near max mtu

2020-05-06 Thread Maciej Żenczykowski
> > I thought we have established that checking device MTU (m*T*u) > > at ingress makes a very limited amount of sense, no? > > > > Shooting from the hip here, but won't something like: > > > > if (!skb->dev || skb->tc_at_ingress) > > return SKB_MAX_ALLOC; > > return skb->dev->mtu +

RE: [EXT] Re: [v4,iproute2-next 1/2] iproute2-next:tc:action: add a gate control action

2020-05-06 Thread Po Liu
Hi Davide, > -Original Message- > From: Davide Caratti > Sent: 2020年5月6日 20:54 > To: Po Liu ; dsah...@gmail.com; linux- > ker...@vger.kernel.org; netdev@vger.kernel.org > Cc: vinicius.go...@intel.com; step...@networkplumber.org; > da...@davemloft.net; v...@buslov.dev; Claudiu Manoil > ;

Re: [PATCH bpf-next v2 18/20] tools/bpf: selftests: add iterator programs for ipv6_route and netlink

2020-05-06 Thread Yonghong Song
On 5/5/20 11:01 PM, Andrii Nakryiko wrote: On Sun, May 3, 2020 at 11:30 PM Yonghong Song wrote: Two bpf programs are added in this patch for netlink and ipv6_route target. On my VM, I am able to achieve identical results compared to /proc/net/netlink and /proc/net/ipv6_route. $ cat /pro

[RFC PATCH bpf-next 1/3] arm64: insn: Fix two bugs in encoding 32-bit logical immediates

2020-05-06 Thread Luke Nelson
This patch fixes two issues present in the current function for encoding arm64 logical immediates when using the 32-bit variants of instructions. First, the code does not correctly reject an all-ones 32-bit immediate and returns an undefined instruction encoding, which can crash the kernel. The fi

[RFC PATCH bpf-next 0/3] arm64 BPF JIT Optimizations

2020-05-06 Thread Luke Nelson
This patch series introduces several optimizations to the arm64 BPF JIT. The optimizations make use of arm64 immediate instructions to avoid loading BPF immediates to temporary registers, when possible. In the process, we discovered two bugs in the logical immediate encoding function in arch/arm64

[RFC PATCH bpf-next 3/3] bpf, arm64: Optimize ADD,SUB,JMP BPF_K using arm64 add/sub immediates

2020-05-06 Thread Luke Nelson
The current code for BPF_{ADD,SUB} BPF_K loads the BPF immediate to a temporary register before performing the addition/subtraction. Similarly, BPF_JMP BPF_K cases load the immediate to a temporary register before comparison. This patch introduces optimizations that use arm64 immediate add, sub, c

[RFC PATCH bpf-next 2/3] bpf, arm64: Optimize AND,OR,XOR,JSET BPF_K using arm64 logical immediates

2020-05-06 Thread Luke Nelson
The current code for BPF_{AND,OR,XOR,JSET} BPF_K loads the immediate to a temporary register before use. This patch changes the code to avoid using a temporary register when the BPF immediate is encodable using an arm64 logical immediate instruction. If the encoding fails (due to the immediate not

[PATCH net-next] net: remove newlines in NL_SET_ERR_MSG_MOD

2020-05-06 Thread Jacob Keller
The NL_SET_ERR_MSG_MOD macro is used to report a string describing an error message to userspace via the netlink extended ACK structure. It should not have a trailing newline. Add a cocci script which catches cases where the newline marker is present. Using this script, fix the handful of cases wh

Re: [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix irqs type

2020-05-06 Thread David Miller
From: Grygorii Strashko Date: Tue, 5 May 2020 19:31:26 +0300 > The K3 INTA driver, which is source TX/RX IRQs for CPSW NUSS, defines IRQs > triggering type as EDGE by default, but triggering type for CPSW NUSS TX/RX > IRQs has to be LEVEL as the EDGE triggering type may cause unnecessary IRQs > t

RE: [PATCH net-next] i40e: Make i40e_shutdown_adminq() return void

2020-05-06 Thread Kirsher, Jeffrey T
> -Original Message- > From: David Miller > Sent: Wednesday, May 6, 2020 14:03 > To: yanai...@huawei.com > Cc: Kirsher, Jeffrey T ; Azarewicz, Piotr > ; intel-wired-...@lists.osuosl.org; > netdev@vger.kernel.org; linux-ker...@vger.kernel.org > Subject: Re: [PATCH net-next] i40e: Make i40e_

Re: [PATCH v2] net: bpf: permit redirect from L3 to L2 devices at near max mtu

2020-05-06 Thread Maciej Żenczykowski
> I thought we have established that checking device MTU (m*T*u) > at ingress makes a very limited amount of sense, no? > > Shooting from the hip here, but won't something like: > > if (!skb->dev || skb->tc_at_ingress) > return SKB_MAX_ALLOC; > return skb->dev->mtu + skb->dev->hard_

Re: [PATCH v2] ionic: Use debugfs_create_bool() to export bool

2020-05-06 Thread David Miller
From: Geert Uytterhoeven Date: Tue, 5 May 2020 15:28:09 +0200 > Currently bool ionic_cq.done_color is exported using > debugfs_create_u8(), which requires a cast, preventing further compiler > checks. > > Fix this by switching to debugfs_create_bool(), and dropping the cast. > > Signed-off-by:

Re: [PATCH net-next v6 0/2] provide support for PHY master/slave configuration

2020-05-06 Thread David Miller
From: Oleksij Rempel Date: Tue, 5 May 2020 08:35:04 +0200 > changes v6: > - use NL_SET_ERR_MSG_ATTR in ethnl_update_linkmodes > - add sanity checks in the ioctl interface > - use bool for ethnl_validate_master_slave_cfg() ... Series applied, thank you.

Re: [PATCH] [net-next, v2] dsa: sja1105: dynamically allocate stats structure

2020-05-06 Thread David Miller
From: Arnd Bergmann Date: Tue, 5 May 2020 17:38:19 +0200 > The addition of sja1105_port_status_ether structure into the > statistics causes the frame size to go over the warning limit: > > drivers/net/dsa/sja1105/sja1105_ethtool.c:421:6: error: stack frame size of > 1104 bytes in function 'sja

Re: [PATCH net-next 0/5] Crypto/chcr: Fix issues regarding algorithm implementation in driver

2020-05-06 Thread David Miller
From: Devulapally Shiva Krishna Date: Tue, 5 May 2020 08:42:52 +0530 > The following series of patches fixes the issues which came during > self-tests with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled. > > Patch 1: Fixes gcm(aes) hang issue and rfc4106-gcm encryption issue. > Patch 2: Fixes ctr, c

Re: [PATCH net-next 0/5] net: ipa: kill endpoint stop workaround

2020-05-06 Thread David Miller
From: Alex Elder Date: Mon, 4 May 2020 18:53:40 -0500 > It turns out that a workaround that performs a small DMA operation > between retried attempts to stop a GSI channel is not needed for any > supported hardware. The hardware quirk that required the extra DMA > operation was fixed after IPA

Re: [PATCH net-next 0/3] net: ipa: kill endpoint delay mode workaround

2020-05-06 Thread David Miller
From: Alex Elder Date: Mon, 4 May 2020 18:37:10 -0500 > A "delay mode" feature was put in place to work around a problem > where packets could passed to the modem before it was ready to > handle them. That problem no longer exists, and we don't need the > workaround any more so get rid of it.

Re: [PATCH net-next 0/2] net: ipa: limit special reset handling

2020-05-06 Thread David Miller
From: Alex Elder Date: Mon, 4 May 2020 18:30:01 -0500 > Some special handling done during channel reset should only be done > for IPA hardare version 3.5.1. This series generalizes the meaning > of a flag passed to indicate special behavior, then has the special > handling be used only when app

Re: [PATCH net] net: dsa: Do not leave DSA master with NULL netdev_ops

2020-05-06 Thread David Miller
From: Florian Fainelli Date: Mon, 4 May 2020 13:18:06 -0700 > When ndo_get_phys_port_name() for the CPU port was added we introduced > an early check for when the DSA master network device in > dsa_master_ndo_setup() already implements ndo_get_phys_port_name(). When > we perform the teardown ope

Re: [PATCH v2 net] net: dsa: remove duplicate assignment in dsa_slave_add_cls_matchall_mirred

2020-05-06 Thread David Miller
From: Vladimir Oltean Date: Mon, 4 May 2020 22:58:56 +0300 > From: Vladimir Oltean > > This was caused by a poor merge conflict resolution on my side. The > "act = &cls->rule->action.entries[0];" assignment was already present in > the code prior to the patch mentioned below. > > Fixes: e13c2

Re: [PATCH net-next 0/2] tcp: minor adjustments for low pacing rates

2020-05-06 Thread David Miller
From: Eric Dumazet Date: Mon, 4 May 2020 11:27:48 -0700 > After pacing horizon addition, we have to adjust how we arm rto > timer, otherwise we might freeze very low pacing rate flows. Series applied, thanks Eric.

Re: [PATCH net-next v2 1/1] arm64: dts: sdm845: add IPA iommus property

2020-05-06 Thread David Miller
From: Alex Elder Date: Mon, 4 May 2020 13:13:50 -0500 > Add an "iommus" property to the IPA node in "sdm845.dtsi". It is > required because there are two regions of memory the IPA accesses > through an SMMU. The next few patches define and map those regions. > > Signed-off-by: Alex Elder Ap

Re: pulling cap_perfmon

2020-05-06 Thread Alexei Starovoitov
On Wed, May 6, 2020 at 2:51 PM Thomas Gleixner wrote: > > Alexei, > > Thomas Gleixner writes: > > Alexei Starovoitov writes: > >> > >> I'd like to pull > >> commit 980737282232 ("capabilities: Introduce CAP_PERFMON to kernel > >> and user space") > >> into bpf-next to base my CAP_BPF work on top

Re: [PATCH net] net: stricter validation of untrusted gso packets

2020-05-06 Thread David Miller
From: Willem de Bruijn Date: Mon, 4 May 2020 12:48:54 -0400 > From: Willem de Bruijn > > Syzkaller again found a path to a kernel crash through bad gso input: > a packet with transport header extending beyond skb_headlen(skb). > > Tighten validation at kernel entry: > > - Verify that the tra

Re: [net] seg6: fix SRH processing to comply with RFC8754

2020-05-06 Thread David Miller
From: Ahmed Abdelsalam Date: Mon, 4 May 2020 14:42:11 + > The Segment Routing Header (SRH) which defines the SRv6 dataplane is defined > in RFC8754. > > RFC8754 (section 4.1) defines the SR source node behavior which encapsulates > packets into an outer IPv6 header and SRH. The SR source no

Re: [PATCH net 0/2] FDB fixes for Felix and Ocelot switches

2020-05-06 Thread David Miller
From: Vladimir Oltean Date: Mon, 4 May 2020 01:20:25 +0300 > From: Vladimir Oltean > > This series fixes the following problems: > - Dynamically learnt addresses never expiring (neither for Ocelot nor > for Felix) > - Half of the FDB not visible in 'bridge fdb show' (for Felix only) Series

Re: [PATCH] bpf: Tweak BPF jump table optimizations for objtool compatibility

2020-05-06 Thread Alexei Starovoitov
On Wed, May 06, 2020 at 04:19:45PM -0500, Josh Poimboeuf wrote: > On Wed, May 06, 2020 at 09:45:01AM -0700, Alexei Starovoitov wrote: > > On Wed, May 6, 2020 at 8:53 AM Josh Poimboeuf wrote: > > > > > > On Tue, May 05, 2020 at 04:59:39PM -0700, Alexei Starovoitov wrote: > > > > As far as workaroun

Re: [PATCH net-next 0/2] timer: add fsleep for flexible sleeping

2020-05-06 Thread David Miller
From: Heiner Kallweit Date: Fri, 1 May 2020 23:26:21 +0200 > Sleeping for a certain amount of time requires use of different > functions, depending on the time period. > Documentation/timers/timers-howto.rst explains when to use which > function, and also checkpatch checks for some potentially >

Re: [PATCH v3 net-next] ipv6: Implement draft-ietf-6man-rfc4941bis

2020-05-06 Thread David Miller
From: Fernando Gont Date: Fri, 1 May 2020 00:51:47 -0300 > Implement the upcoming rev of RFC4941 (IPv6 temporary addresses): > https://tools.ietf.org/html/draft-ietf-6man-rfc4941bis-09 > > * Reduces the default Valid Lifetime to 2 days > The number of extra addresses employed when Valid Lifeti

Re: Kernel crash in DSA/Marvell 6176 switch in 5.4.36

2020-05-06 Thread Andrew Lunn
On Wed, May 06, 2020 at 07:35:50PM -0400, Sriram Chadalavada wrote: > For this device tree with new binding, there was no crash with 4.19.16 > kernel on an NXP imx6 device but there is with 5.4.36. > eth0: igb0 { > compatible = "intel,igb"; >

Re: [PATCH v2] net: bpf: permit redirect from L3 to L2 devices at near max mtu

2020-05-06 Thread Jakub Kicinski
On Wed, 6 May 2020 16:32:59 -0700 Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > __bpf_skb_max_len(skb) is used from: > bpf_skb_adjust_room > __bpf_skb_change_tail > __bpf_skb_change_head > > but in the case of forwarding we're likely calling these functions > during receive p

Re: Kernel crash in DSA/Marvell 6176 switch in 5.4.36

2020-05-06 Thread Andrew Lunn
> MDIO bus. Followed example in > Documentation/devicetree/bindings/dsa/marvell.txt */ > compatible = "marvell,mv88e6xxx-mdio-external"; 6176 does not have an external MDIO bus. Only the 6390 family does. The 6176 has just one bus, which is both internal and external.

Kernel crash in DSA/Marvell 6176 switch in 5.4.36

2020-05-06 Thread Sriram Chadalavada
For this device tree with new binding, there was no crash with 4.19.16 kernel on an NXP imx6 device but there is with 5.4.36. eth0: igb0 { compatible = "intel,igb"; /* SC: New binding for the Marvell 6176 switch attached to the Intel Gigabit

[PATCH v2] net: bpf: permit redirect from L3 to L2 devices at near max mtu

2020-05-06 Thread Maciej Żenczykowski
From: Maciej Żenczykowski __bpf_skb_max_len(skb) is used from: bpf_skb_adjust_room __bpf_skb_change_tail __bpf_skb_change_head but in the case of forwarding we're likely calling these functions during receive processing on ingress and bpf_redirect()'ing at a later point in time to egress o

Re: [RFC net] net: dsa: Add missing reference counting

2020-05-06 Thread Vladimir Oltean
On Thu, 7 May 2020 at 01:45, Florian Fainelli wrote: > > > > On 5/6/2020 2:40 PM, Vladimir Oltean wrote: > > Hi Florian, > > > > On Thu, 7 May 2020 at 00:24, Florian Fainelli wrote: > >> > >> > >> > >> On 5/5/2020 2:23 PM, Vivien Didelot wrote: > >>> On Tue, 5 May 2020 14:02:53 -0700, Florian Fa

Re: [PATCH bpf-next v2 18/20] tools/bpf: selftests: add iterator programs for ipv6_route and netlink

2020-05-06 Thread Yonghong Song
On 5/5/20 11:04 PM, Andrii Nakryiko wrote: On Sun, May 3, 2020 at 11:30 PM Yonghong Song wrote: Two bpf programs are added in this patch for netlink and ipv6_route target. On my VM, I am able to achieve identical results compared to /proc/net/netlink and /proc/net/ipv6_route. $ cat /pro

Re: [RFC net] net: dsa: Add missing reference counting

2020-05-06 Thread Florian Fainelli
On 5/6/2020 2:40 PM, Vladimir Oltean wrote: > Hi Florian, > > On Thu, 7 May 2020 at 00:24, Florian Fainelli wrote: >> >> >> >> On 5/5/2020 2:23 PM, Vivien Didelot wrote: >>> On Tue, 5 May 2020 14:02:53 -0700, Florian Fainelli >>> wrote: If we are probed through platform_data we would b

Re: [PATCH v2] bpf, i386: remove unneeded conversion to bool

2020-05-06 Thread Martin KaFai Lau
On Wed, May 06, 2020 at 10:03:52PM +0800, Jason Yan wrote: > The '==' expression itself is bool, no need to convert it to bool again. > This fixes the following coccicheck warning: Make sense. It may belong to bpf-next instead. Acked-by: Martin KaFai Lau

Re: [PATCH net] net: dsa: sja1105: the PTP_CLK extts input reacts on both edges

2020-05-06 Thread David Miller
From: Vladimir Oltean Date: Wed, 6 May 2020 20:48:13 +0300 > From: Vladimir Oltean > > It looks like the sja1105 external timestamping input is not as generic > as we thought. When fed a signal with 50% duty cycle, it will timestamp > both the rising and the falling edge. When fed a short puls

Re: [PATCH net] selftests: net: tcp_mmap: fix SO_RCVLOWAT setting

2020-05-06 Thread David Miller
From: Eric Dumazet Date: Wed, 6 May 2020 09:21:15 -0700 > Since chunk_size is no longer an integer, we can not > use it directly as an argument of setsockopt(). > > This patch should fix tcp_mmap for Big Endian kernels. > > Fixes: 597b01edafac ("selftests: net: avoid ptl lock contention in tcp

Re: [PATCH net] selftests: net: tcp_mmap: fix SO_RCVLOWAT setting

2020-05-06 Thread David Miller
From: Eric Dumazet Date: Wed, 6 May 2020 09:21:15 -0700 > Since chunk_size is no longer an integer, we can not > use it directly as an argument of setsockopt(). > > This patch should fix tcp_mmap for Big Endian kernels. > > Fixes: 597b01edafac ("selftests: net: avoid ptl lock contention in tcp

Re: [net-next PATCH] net: hsr: fix incorrect type usage for protocol variable

2020-05-06 Thread David Miller
From: Murali Karicheri Date: Wed, 6 May 2020 11:41:07 -0400 > Fix following sparse checker warning:- > > net/hsr/hsr_slave.c:38:18: warning: incorrect type in assignment (different > base types) > net/hsr/hsr_slave.c:38:18:expected unsigned short [unsigned] [usertype] > protocol > net/hsr/

Re: [PATCH 1/2] lib/bpf hashmap: increase portability

2020-05-06 Thread Andrii Nakryiko
On Wed, May 6, 2020 at 2:47 PM Ian Rogers wrote: > > On Wed, May 6, 2020 at 2:33 PM Andrii Nakryiko > wrote: > > > > On Wed, May 6, 2020 at 1:54 PM Ian Rogers wrote: > > > > > > Don't include libbpf_internal.h as it is unused and has conflicting > > > definitions, for example, with tools/perf/ut

Re: [PATCH] netfilter: fix make target xt_TCPMSS.o error.

2020-05-06 Thread Cong Wang
On Tue, May 5, 2020 at 11:52 PM Huang Qijun wrote: > > When compiling netfilter, there will be an error > "No rule to make target 'net/netfilter/xt_TCPMSS.o'", > because the xt_TCPMSS.c in the makefile is uppercase, > and the file name of the source file (xt_tcpmss.c) is lowercase. > Therefore, ch

Re: [PATCH net-next v3 0/3] add phy shared storage

2020-05-06 Thread David Miller
From: Michael Walle Date: Wed, 6 May 2020 16:53:12 +0200 > Introduce the concept of a shared PHY storage which can be used by some > QSGMII PHYs to ease initialization and access to global per-package > registers. > > Changes since v2: > - restore page to standard after reading the base addres

Re: [PATCH net-next] Revert "crypto: chelsio - Inline single pdu only"

2020-05-06 Thread David Miller
From: Ayush Sawal Date: Wed, 6 May 2020 20:17:19 +0530 > This reverts commit 27c6feb0fb33a665a746346e76714826a5be5d10. > > For ipsec offload the chelsio's ethernet driver expects a single mtu > sized packet. > > But when ipsec traffic is running using iperf, most of the packets in > that traff

Re: pulling cap_perfmon

2020-05-06 Thread Thomas Gleixner
Alexei, Thomas Gleixner writes: > Alexei Starovoitov writes: >> >> I'd like to pull >> commit 980737282232 ("capabilities: Introduce CAP_PERFMON to kernel >> and user space") >> into bpf-next to base my CAP_BPF work on top of it. >> could you please prepare a stable tag for me to pull ? >> Last

Re: [PATCH net] net: macsec: fix rtnl locking issue

2020-05-06 Thread David Miller
From: Antoine Tenart Date: Wed, 6 May 2020 15:58:30 +0200 > netdev_update_features() must be called with the rtnl lock taken. Not > doing so triggers a warning, as ASSERT_RTNL() is used in > __netdev_update_features(), the first function called by > netdev_update_features(). Fix this. > > Fixes

Re: [PATCH bpf-next v2 14/20] bpf: handle spilled PTR_TO_BTF_ID properly when checking stack_boundary

2020-05-06 Thread Yonghong Song
On 5/6/20 10:38 AM, Andrii Nakryiko wrote: On Sun, May 3, 2020 at 11:28 PM Yonghong Song wrote: This specifically to handle the case like below: // ptr below is a socket ptr identified by PTR_TO_BTF_ID u64 param[2] = { ptr, val }; bpf_seq_printf(seq, fmt, sizeof(fmt), param, siz

Re: [PATCH bpf-next v2 13/20] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-06 Thread Yonghong Song
On 5/6/20 10:37 AM, Andrii Nakryiko wrote: On Sun, May 3, 2020 at 11:26 PM Yonghong Song wrote: Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq_printf supports common format string flag/width/type fields so at least I can get identic

Re: [RFC net] net: dsa: Add missing reference counting

2020-05-06 Thread Vladimir Oltean
Hi Florian, On Thu, 7 May 2020 at 00:24, Florian Fainelli wrote: > > > > On 5/5/2020 2:23 PM, Vivien Didelot wrote: > > On Tue, 5 May 2020 14:02:53 -0700, Florian Fainelli > > wrote: > >> If we are probed through platform_data we would be intentionally > >> dropping the reference count on mast

Re: [PATCH 2/2] lib/bpf hashmap: fixes to hashmap__clear

2020-05-06 Thread Andrii Nakryiko
On Wed, May 6, 2020 at 1:55 PM Ian Rogers wrote: > > hashmap_find_entry assumes that if buckets is NULL then there are no > entries. NULL the buckets in clear to ensure this. > Free hashmap entries and not just the bucket array. > > Signed-off-by: Ian Rogers > --- This is already fixed in bpf-ne

[PATCH net 3/5] wireguard: send/receive: cond_resched() when processing worker ringbuffers

2020-05-06 Thread Jason A. Donenfeld
Users with pathological hardware reported CPU stalls on CONFIG_ PREEMPT_VOLUNTARY=y, because the ringbuffers would stay full, meaning these workers would never terminate. That turned out not to be okay on systems without forced preemption, which Sultan observed. This commit adds a cond_resched() to

  1   2   3   4   5   >