Re: [External] Re: [PATCH 0/7] Introduce vdpa management tool

2020-12-01 Thread Jason Wang
On 2020/12/2 下午2:24, Parav Pandit wrote: From: Jason Wang Sent: Wednesday, December 2, 2020 11:21 AM On 2020/12/2 下午12:53, Parav Pandit wrote: From: Yongji Xie Sent: Wednesday, December 2, 2020 9:00 AM On Tue, Dec 1, 2020 at 11:59 PM Parav Pandit wrote: From: Yongji Xie Sent: Tuesda

Re: [PATCH bpf-next] bpf, xdp: add bpf_redirect{,_map}() leaf node detection and optimization

2020-12-01 Thread Björn Töpel
On 2020-12-01 22:42, Toke Høiland-Jørgensen wrote: Björn Töpel writes: [...] Performance up ~5% Mpps for the xdp_redirect_map and xdpsock samples, and ~3% for bpf_redirect() programs. Neat! Got actual numbers? :) +~1 Mpps for AF_XDP, and +~3 Mpps for a naive (non-swapping) redirect. [

[PATCH] igc: Report speed and duplex as unknown when device is runtime suspended

2020-12-01 Thread Kai-Heng Feng
Similar to commit 165ae7a8feb5 ("igb: Report speed and duplex as unknown when device is runtime suspended"), if we try to read speed and duplex sysfs while the device is runtime suspeneded, igc will complain and stops working: [ 123.449883] igc :03:00.0 enp3s0: PCIe link lost, device now deta

RE: [PATCH net v2] net/x25: prevent a couple of overflows(Internet mail)

2020-12-01 Thread 尹亮
Hi Dan, I think the strnlen is better. the kernel doesn't need to adjust user land mistake by putting a NULL terminator. just return an error to let the user land program fix the wrong address. Regards, kiyin > -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.co

Re: [PATCH net-next] octeontx2-af: debugfs: delete dead code

2020-12-01 Thread Sunil Kovvuri
On Wed, Dec 2, 2020 at 12:28 PM Dan Carpenter wrote: > > These debugfs never return NULL so all this code will never be run. > > In the normal case, (and in this case particularly), the debugfs > functions are not supposed to be checked for errors so all this error > checking code can be safely de

Re: [PATCH iproute2-net 3/3] devlink: Add reload stats to dev show

2020-12-01 Thread Moshe Shemesh
On 11/29/2020 11:22 PM, David Ahern wrote: On 11/26/20 4:14 AM, Moshe Shemesh wrote: @@ -2975,17 +2996,93 @@ static int cmd_dev_param(struct dl *dl) return -ENOENT; } -static void pr_out_dev(struct dl *dl, struct nlattr **tb) +static void pr_out_action_stats(struct dl *dl, struct

Re: [PATCH iproute2-net 2/3] devlink: Add pr_out_dev() helper function

2020-12-01 Thread Moshe Shemesh
On 11/29/2020 11:15 PM, David Ahern wrote: On 11/26/20 4:14 AM, Moshe Shemesh wrote: diff --git a/devlink/devlink.c b/devlink/devlink.c index a9ba0072..bd588869 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -2974,17 +2974,11 @@ static int cmd_dev_param(struct dl *dl) pr_err

[PATCH net-next] octeontx2-af: debugfs: delete dead code

2020-12-01 Thread Dan Carpenter
These debugfs never return NULL so all this code will never be run. In the normal case, (and in this case particularly), the debugfs functions are not supposed to be checked for errors so all this error checking code can be safely deleted. Signed-off-by: Dan Carpenter --- .../marvell/octeontx2/

Re: [PATCH iproute2-net 1/3] devlink: Add devlink reload action and limit options

2020-12-01 Thread Moshe Shemesh
On 11/29/2020 11:12 PM, David Ahern wrote: On 11/26/20 4:14 AM, Moshe Shemesh wrote: @@ -1997,7 +2066,7 @@ static void cmd_dev_help(void) pr_err(" devlink dev eswitch show DEV\n"); pr_err(" devlink dev param set DEV name PARAMETER value VALUE cmode { permanent | dr

[PATCH bpf-next 3/3] tools/bpftool: auto-detect split BTFs in common cases

2020-12-01 Thread Andrii Nakryiko
In case of working with module's split BTF from /sys/kernel/btf/*, auto-substitute /sys/kernel/btf/vmlinux as the base BTF. This makes using bpftool with module BTFs faster and simpler. Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/btf.c | 25 + 1 file changed, 21

[PATCH bpf-next 0/3] bpftool: improve split BTF support

2020-12-01 Thread Andrii Nakryiko
Few follow up improvements to bpftool for split BTF support: - emit "name " for non-named BTFs in `bpftool btf show` command; - when dumping /sys/kernel/btf/ use /sys/kernel/btf/vmlinux as the base BTF, unless base BTF is explicitly specified with -B flag. This patch set also adds btf__bas

[PATCH bpf-next 1/3] tools/bpftool: emit name for anonymous BTFs

2020-12-01 Thread Andrii Nakryiko
For consistency of output, emit "name " for BTFs without the name. This keeps output more consistent and obvious. Suggested-by: Song Liu Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/btf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/b

[PATCH bpf-next 2/3] libbpf: add base BTF accessor

2020-12-01 Thread Andrii Nakryiko
Add ability to get base BTF. It can be also used to check if BTF is split BTF. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/btf.c | 5 + tools/lib/bpf/btf.h | 1 + tools/lib/bpf/libbpf.map | 1 + 3 files changed, 7 insertions(+) diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf

RE: [External] Re: [PATCH 0/7] Introduce vdpa management tool

2020-12-01 Thread Parav Pandit
> From: Jason Wang > Sent: Wednesday, December 2, 2020 11:21 AM > > On 2020/12/2 下午12:53, Parav Pandit wrote: > > > >> From: Yongji Xie > >> Sent: Wednesday, December 2, 2020 9:00 AM > >> > >> On Tue, Dec 1, 2020 at 11:59 PM Parav Pandit wrote: > >>> > >>> > From: Yongji Xie > Sent

Re: UBSAN: array-index-out-of-bounds in arch_uprobe_analyze_insn

2020-12-01 Thread Masami Hiramatsu
Hi Kees, On Tue, 1 Dec 2020 16:48:55 -0800 Kees Cook wrote: > Hi, > > There appears to be a problem with prefix counting for the instruction > decoder. It looks like insn_get_prefixes() isn't keeping "nb" and "nbytes" > in sync correctly: > > while (inat_is_legacy_prefix(attr)) { >

Re: [PATCH bpf-next] kbuild: Restore ability to build out-of-tree modules

2020-12-01 Thread Leon Romanovsky
On Tue, Dec 01, 2020 at 01:44:46PM -0800, Andrii Nakryiko wrote: > On Tue, Dec 1, 2020 at 11:32 AM Leon Romanovsky wrote: > > > > On Tue, Dec 01, 2020 at 10:01:23AM -0800, Andrii Nakryiko wrote: > > > On Tue, Dec 1, 2020 at 6:37 AM Leon Romanovsky wrote: > > > > > > > > From: Leon Romanovsky > >

Re: [External] Re: [PATCH 0/7] Introduce vdpa management tool

2020-12-01 Thread Jason Wang
On 2020/12/2 下午12:53, Parav Pandit wrote: From: Yongji Xie Sent: Wednesday, December 2, 2020 9:00 AM On Tue, Dec 1, 2020 at 11:59 PM Parav Pandit wrote: From: Yongji Xie Sent: Tuesday, December 1, 2020 7:49 PM On Tue, Dec 1, 2020 at 7:32 PM Parav Pandit wrote: From: Yongji Xie

Re: [External] Re: [PATCH 0/7] Introduce vdpa management tool

2020-12-01 Thread Jason Wang
On 2020/12/1 下午5:55, Yongji Xie wrote: On Tue, Dec 1, 2020 at 2:25 PM Jason Wang wrote: On 2020/11/30 下午3:07, Yongji Xie wrote: Thanks for adding me, Jason! Now I'm working on a v2 patchset for VDUSE (vDPA Device in Userspace) [1]. This tool is very useful for the vduse device. So I'm cons

Re: [PATCH v13 0/4] userspace MHI client interface driver

2020-12-01 Thread Jeffrey Hugo
On 12/1/2020 7:55 PM, Jakub Kicinski wrote: On Tue, 1 Dec 2020 13:48:36 -0700 Jeffrey Hugo wrote: On 12/1/2020 1:03 PM, Jakub Kicinski wrote: On Tue, 1 Dec 2020 12:40:50 -0700 Jeffrey Hugo wrote: On 12/1/2020 12:29 PM, Jakub Kicinski wrote: On Fri, 27 Nov 2020 19:26:02 -0800 Hemant Kumar wrot

[PATCH net-next v1 3/9] igc: Set the RX packet buffer size for TSN mode

2020-12-01 Thread Vinicius Costa Gomes
In preparation for supporting frame preemption, when entering TSN mode set the receive packet buffer to 16KB for the Express MAC, 16KB for the Preemptible MAC and 2KB for the BMC, according to the datasheet section 7.1.3.2. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/i

[PATCH net-next v1 6/9] igc: Add support for tuning frame preemption via ethtool

2020-12-01 Thread Vinicius Costa Gomes
The tc subsystem sets which queues are marked as preemptible, it's the role of ethtool to control more hardware specific parameters. These parameters include: - enabling the frame preemption hardware: As enabling frame preemption may have other requirements before it can be enabled, it's expose

[PATCH net-next v1 9/9] igc: Separate TSN configurations that can be updated

2020-12-01 Thread Vinicius Costa Gomes
Some TSN features can be enabled during runtime, but most of the features need an adapter reset to be disabled. To better keep track of this, separate the process into an "_apply" and a "reset" functions, "_apply" will run with the adapter in potencially "dirty" state, and if necessary will reques

[PATCH net-next v1 2/9] taprio: Add support for frame preemption offload

2020-12-01 Thread Vinicius Costa Gomes
This adds a way to configure which queues are marked as preemptible and which are marked as express. Even if this is not a "real" offload, because it can't be executed purely in software, having this information near where the mapping of queues is specified, makes it, hopefully, easier to understa

[PATCH net-next v1 5/9] igc: Avoid TX Hangs because long cycles

2020-12-01 Thread Vinicius Costa Gomes
Avoid possible TX Hangs caused by using long Qbv cycles. In some cases, using long cycles (more than 1 second) can cause transmissions to be blocked for that time. As the TX Hang timeout is close to 1 second, we may need to reduce the cycle time to something more reasonable: the value chosen is 1ms

[PATCH net-next v1 8/9] igc: Add support for exposing frame preemption stats registers

2020-12-01 Thread Vinicius Costa Gomes
Expose the Frame Preemption counters, so the number of express/preemptible packets can be monitored by userspace. These registers are cleared when read, so the value shown is the number of events that happened since the last read. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/int

[PATCH net-next v1 4/9] igc: Only dump registers if configured to dump HW information

2020-12-01 Thread Vinicius Costa Gomes
To avoid polluting the users logs with register dumps, only dump the adapter's registers if configured to do so. If users want to enable HW status messages they can do: $ ethtool -s IFACE msglvl hw on Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_dump.c | 3 +++ 1

[PATCH net-next v1 7/9] igc: Add support for Frame Preemption offload

2020-12-01 Thread Vinicius Costa Gomes
After the set of queues that are marked as preemptible are exposed to the driver we can configure the hardware to enable the frame preemption functionality. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 32 +++ 1 file changed, 32 insertio

[PATCH net-next v1 1/9] ethtool: Add support for configuring frame preemption

2020-12-01 Thread Vinicius Costa Gomes
Frame preemption (described in IEEE 802.3br-2016) defines the concept of preemptible and express queues. It allows traffic from express queues to "interrupt" traffic from preemptible queues, which are "resumed" after the express traffic has finished transmitting. Frame preemption can only be used

RE: [External] Re: [PATCH 0/7] Introduce vdpa management tool

2020-12-01 Thread Parav Pandit
> From: Yongji Xie > Sent: Wednesday, December 2, 2020 9:00 AM > > On Tue, Dec 1, 2020 at 11:59 PM Parav Pandit wrote: > > > > > > > > > From: Yongji Xie > > > Sent: Tuesday, December 1, 2020 7:49 PM > > > > > > On Tue, Dec 1, 2020 at 7:32 PM Parav Pandit wrote: > > > > > > > > > > > > > > >

[PATCH net-next v1 0/9] ethtool: Add support for frame preemption

2020-12-01 Thread Vinicius Costa Gomes
Hi, Changes from RFC v2: - Reorganised the offload enabling/disabling on the driver size; - Added a few igc fixes; Changes from RFC v1: - The per-queue preemptible/express setting is moved to applicable qdiscs (Jakub Kicinski and others); - "min-frag-size" now follows the 802.3br specific

Re: [PATCH bpf-next] bpf, xdp: add bpf_redirect{,_map}() leaf node detection and optimization

2020-12-01 Thread Alexei Starovoitov
On Tue, Dec 01, 2020 at 06:23:45PM +0100, Björn Töpel wrote: > +static void check_redirect_opt(struct bpf_verifier_env *env, int func_id, > int insn_idx) > +{ > + struct bpf_insn *insns = env->prog->insnsi; > + int insn_cnt = env->prog->len; > + struct bpf_insn *insn; > + bool is_l

Re: [net:master 1/3] ERROR: modpost: "__uio_register_device" undefined!

2020-12-01 Thread Randy Dunlap
fig: microblaze-randconfig-r011-20201201 (attached as .config) > compiler: microblaze-linux-gcc (GCC) 9.3.0 > reproduce (this is a W=1 build): > wget > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O > ~/bin/make.cross > chmod +x ~/bi

Re: [PATCH bpf 1/2] libbpf: fix ring_buffer__poll() to return number of consumed samples

2020-12-01 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf.git (refs/heads/master): On Mon, 30 Nov 2020 14:33:35 -0800 you wrote: > Fix ring_buffer__poll() to return the number of non-discarded records > consumed, just like its documentation states. It's also consistent with > ring_buffer__consume() return. Fix u

Re: [PATCH v13 0/4] userspace MHI client interface driver

2020-12-01 Thread Bjorn Andersson
On Tue 01 Dec 13:29 CST 2020, Jakub Kicinski wrote: > On Fri, 27 Nov 2020 19:26:02 -0800 Hemant Kumar wrote: > > This patch series adds support for UCI driver. UCI driver enables userspace > > clients to communicate to external MHI devices like modem and WLAN. UCI > > driver > > probe creates sta

RE: [PATCH net-next v2] devlink: Add devlink port documentation

2020-12-01 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Wednesday, December 2, 2020 7:05 AM > > On Mon, 30 Nov 2020 22:00:25 +0200 Parav Pandit wrote: > > Added documentation for devlink port and port function related commands. > > > > Signed-off-by: Parav Pandit > > Reviewed-by: Jiri Pirko > > > + > >

Re: [PATCH v13 0/4] userspace MHI client interface driver

2020-12-01 Thread Manivannan Sadhasivam
On Tue, Dec 01, 2020 at 12:03:02PM -0800, Jakub Kicinski wrote: > On Tue, 1 Dec 2020 12:40:50 -0700 Jeffrey Hugo wrote: > > On 12/1/2020 12:29 PM, Jakub Kicinski wrote: > > > On Fri, 27 Nov 2020 19:26:02 -0800 Hemant Kumar wrote: > > >> This patch series adds support for UCI driver. UCI driver

Re: [PATCH iproute2-next 3/6] lib: Move sprint_size() from tc here, add print_size()

2020-12-01 Thread David Ahern
On 12/1/20 3:41 PM, Petr Machata wrote: > >> Also, instead of magic SPRINT_BSIZE, why not take a len param (and >> name it snprint_size)? > > Because keeping the interface like this makes it possible to reuse the > macroized bits in q_cake. I feel like the three current users are > auditable enou

[net:master 1/3] ERROR: modpost: "__uio_register_device" undefined!

2020-12-01 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master head: 2867e1eac61016f59b3d730e3f7aa488e186e917 commit: 14483cbf040fcb38113497161088a1ce8ce5d713 [1/3] net: broadcom CNIC: requires MMU config: microblaze-randconfig-r011-20201201 (attached as .config) compiler

Re: [External] Re: [PATCH 0/7] Introduce vdpa management tool

2020-12-01 Thread Yongji Xie
On Tue, Dec 1, 2020 at 11:59 PM Parav Pandit wrote: > > > > > From: Yongji Xie > > Sent: Tuesday, December 1, 2020 7:49 PM > > > > On Tue, Dec 1, 2020 at 7:32 PM Parav Pandit wrote: > > > > > > > > > > > > > From: Yongji Xie > > > > Sent: Tuesday, December 1, 2020 3:26 PM > > > > > > > > On Tue

Re: [PATCH] ptp: Add clock driver for the OpenCompute TimeCard.

2020-12-01 Thread kernel test robot
Hi Jonathan, I love your patch! Yet something to improve: [auto build test ERROR on net/master] [also build test ERROR on ipvs/master net-next/master linus/master v5.10-rc6 next-20201201] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we

[PATCH v14 3/4] docs: Add documentation for userspace client interface

2020-12-01 Thread Hemant Kumar
MHI userspace client driver is creating device file node for user application to perform file operations. File operations are handled by MHI core driver. Currently QMI MHI channel is supported by this driver. Signed-off-by: Hemant Kumar --- Documentation/mhi/index.rst | 1 + Documentation/mhi/u

[PATCH v14 1/4] bus: mhi: core: Add helper API to return number of free TREs

2020-12-01 Thread Hemant Kumar
Introduce mhi_get_free_desc_count() API to return number of TREs available to queue buffer. MHI clients can use this API to know before hand if ring is full without calling queue API. Signed-off-by: Hemant Kumar Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam --- drivers/bus/mhi/c

[PATCH v14 4/4] bus: mhi: Add userspace client interface driver

2020-12-01 Thread Hemant Kumar
This MHI client driver allows userspace clients to transfer raw data between MHI device and host using standard file operations. Driver instantiates UCI device object which is associated to device file node. UCI device object instantiates UCI channel object when device file node is opened. UCI chan

[PATCH v14 0/4] userspace MHI client interface driver

2020-12-01 Thread Hemant Kumar
This patch series adds support for UCI driver. UCI driver enables userspace clients to communicate to external MHI devices like modem and WLAN. UCI driver probe creates standard character device file nodes for userspace clients to perform open, read, write, poll and release file operations. These f

[PATCH v14 2/4] bus: mhi: core: Move MHI_MAX_MTU to external header file

2020-12-01 Thread Hemant Kumar
Currently this macro is defined in internal MHI header as a TRE length mask. Moving it to external header allows MHI client drivers to set this upper bound for the transmit buffer size. Signed-off-by: Hemant Kumar Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam --- drivers/bus/mhi

Re: [PATCH v13 0/4] userspace MHI client interface driver

2020-12-01 Thread Jakub Kicinski
On Tue, 1 Dec 2020 13:48:36 -0700 Jeffrey Hugo wrote: > On 12/1/2020 1:03 PM, Jakub Kicinski wrote: > > On Tue, 1 Dec 2020 12:40:50 -0700 Jeffrey Hugo wrote: > >> On 12/1/2020 12:29 PM, Jakub Kicinski wrote: > >>> On Fri, 27 Nov 2020 19:26:02 -0800 Hemant Kumar wrote: > This patch series

Re: [PATCH net-next] net-loopback: allow lo dev initial state to be controlled

2020-12-01 Thread Jakub Kicinski
On Tue, 1 Dec 2020 12:24:38 -0800 Mahesh Bandewar (महेश बंडेवार) wrote: > On Thu, Nov 19, 2020 at 8:56 PM Jakub Kicinski wrote: > > Do you have more details on what the use cases are that expect no > > networking? > > > > TBH I don't get the utility of this knob. If you want to write vaguely > > p

Re: [PATCH net-next] r8169: set tc_offset only if tally counter reset isn't supported

2020-12-01 Thread Jakub Kicinski
On Tue, 1 Dec 2020 09:57:29 +0100 Heiner Kallweit wrote: > On chip versions supporting tally counter reset we currently update > the counters after a reset although we know all counters are zero. > Skip this unnecessary step. > > Signed-off-by: Heiner Kallweit Applied, thanks!

Re: [PATCH net-next 0/4] net: ipa: IPA v4.5 aggregation and Qtime

2020-12-01 Thread Jakub Kicinski
On Mon, 30 Nov 2020 17:37:08 -0600 Alex Elder wrote: > This series updates some IPA register definitions that change in > substantive ways for IPA v4.5. > > One register defines parameters used by an endpoint to aggregate > multiple packets into a buffer. The size and position of most > fields in

Re: [PATCH bpf-next 1/2] bpf: Adds support for setting window clamp

2020-12-01 Thread Alexei Starovoitov
On Tue, Dec 01, 2020 at 08:43:56AM -0800, Prankur gupta wrote: > Adds a new bpf_setsockopt for TCP sockets, TCP_BPF_WINDOW_CLAMP, > which sets the maximum receiver window size. It will be useful for > limiting receiver window based on RTT. > > Signed-off-by: Prankur gupta > --- > net/core/filter

Re: [PATCH net-next 2/2] net: ipa: add support for inline checksum offload

2020-12-01 Thread Jakub Kicinski
On Mon, 30 Nov 2020 18:41:43 -0600 Alex Elder wrote: > Starting with IPA v4.5, IP payload checksum offload is implemented > differently. > > Prior to v4.5, the IPA hardware appends an rmnet_map_dl_csum_trailer > structure to each packet if checksum offload is enabled in the > download direction (m

Re: [PATCH v1 bpf-next 06/11] bpf: Introduce two attach types for BPF_PROG_TYPE_SK_REUSEPORT.

2020-12-01 Thread Andrii Nakryiko
On Tue, Dec 1, 2020 at 6:49 AM Kuniyuki Iwashima wrote: > > This commit adds new bpf_attach_type for BPF_PROG_TYPE_SK_REUSEPORT to > check if the attached eBPF program is capable of migrating sockets. > > When the eBPF program is attached, the kernel runs it for socket migration > only if the expe

Re: [PATCH net-next v7 00/14] net/smc: Add support for generic netlink API

2020-12-01 Thread Jakub Kicinski
On Tue, 1 Dec 2020 20:20:35 +0100 Karsten Graul wrote: > Please apply the following patch series for smc to netdev's net-next tree. > > Up to version 4 this patch series was using the sock_diag netlink > infrastructure. This version is using the generic netlink API. Generic > netlink API offers a

Re: [net] net/tls: tls offload is broken

2020-12-01 Thread Jakub Kicinski
On Tue, 1 Dec 2020 14:37:52 +0530 Rohit Maheshwari wrote: > Recent changes made to remove AES constants started using protocol > aware salt_size. ctx->prot_info's salt_size is filled in tls sw case, > but not in tls offload mode, and was working so far because of the > hard coded value was used. >

Re: [PATCH net] geneve: pull IP header before ECN decapsulation

2020-12-01 Thread Jakub Kicinski
On Tue, 1 Dec 2020 01:05:07 -0800 Eric Dumazet wrote: > From: Eric Dumazet > > IP_ECN_decapsulate() and IP6_ECN_decapsulate() assume > IP header is already pulled. > > geneve does not ensure this yet. > > Fixing this generically in IP_ECN_decapsulate() and > IP6_ECN_decapsulate() is not possib

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

2020-12-01 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: net/core/xdp.c: In function 'xdp_return_frame_bulk': net/core/xdp.c:417:3: error: too few arguments to function '__xdp_return' 417 | __xdp_return(xdpf->data, &xdpf->mem, false);

Re: [PATCH net-next v2] devlink: Add devlink port documentation

2020-12-01 Thread Jakub Kicinski
On Mon, 30 Nov 2020 22:00:25 +0200 Parav Pandit wrote: > Added documentation for devlink port and port function related commands. > > Signed-off-by: Parav Pandit > Reviewed-by: Jiri Pirko > + > +Devlink Port > + > + > +``devlink-port`` provides capability for a driver to

Re: [PATCH bpf-next 0/2] Add support to set window_clamp from bpf setsockops

2020-12-01 Thread Andrii Nakryiko
On Tue, Dec 1, 2020 at 12:24 PM Prankur gupta wrote: > > From: Prankur Gupta > > No reason in particular. > Updated the code (patch v2) to have logic as tcp setsockopt for > tCP_WINDOW_CLAMP. > > PS: First time trying git send-em,ail, pleas elet me know if this is not the > right way to reply.

Re: [PATCH net] inet_ecn: Fix endianness of checksum update when setting ECT(1)

2020-12-01 Thread Jakub Kicinski
On Mon, 30 Nov 2020 19:37:05 +0100 Toke Høiland-Jørgensen wrote: > When adding support for propagating ECT(1) marking in IP headers it seems I > suffered from endianness-confusion in the checksum update calculation: In > fact the ECN field is in the *lower* bits of the first 16-bit word of the > IP

Re: [PATCH 1/2] selftests/bpf: Avoid errno clobbering

2020-12-01 Thread Andrii Nakryiko
On Sat, Nov 28, 2020 at 11:28 AM Florian Lehner wrote: > > Commit 8184d44c9a57 ("selftests/bpf: skip verifier tests for unsupported > program types") added a check to skip unsupported program types. As > bpf_probe_prog_type can change errno, do_single_test should save it before > printing a reason

Re: [PATCH 2/2] selftests/bpf: Print reason when a tester could not run a program

2020-12-01 Thread Andrii Nakryiko
On Sat, Nov 28, 2020 at 11:29 AM Florian Lehner wrote: > > Print a message when the returned error is about a program type being > not supported or because of permission problems. > These messages are expected if the program to test was actually > executed. > > Cc: Krzesimir Nowak > Signed-off-by

linux-next: manual merge of the net-next tree with the net tree

2020-12-01 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/ethernet/ibm/ibmvnic.c between commit: b71ec9522346 ("ibmvnic: Ensure that SCRQ entry reads are correctly ordered") from the net tree and commit: ec20f36bb41a ("ibmvnic: Correctly re-enable interrupts i

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-12-01 Thread Edwin Peer
On Tue, Dec 1, 2020 at 9:23 AM Danielle Ratson wrote: > The suggestions I have are: > 1. Add a bit that for unknown media for each link (something like > ETHTOOL_LINK_MODE_10unknown_Full_BIT). I am not sure it is even possible > or makes sense. > 2. Pass the link mode as bitmap. > > Do you

Re: [PATCH net-next 0/2] ionic updates

2020-12-01 Thread Jakub Kicinski
On Mon, 30 Nov 2020 16:25:44 -0800 Shannon Nelson wrote: > These are a pair of small code cleanups. Applied, thanks!

Re: [PATCH v5 bpf-next 0/2] libbpf: add support for privileged/unprivileged control separation

2020-12-01 Thread Andrii Nakryiko
On Fri, Nov 27, 2020 at 12:26 AM wrote: > > From: Mariusz Dudek > > This patch series adds support for separation of eBPF program > load and xsk socket creation. In for example a Kubernetes > environment you can have an AF_XDP CNI or daemonset that is > responsible for launching pods that execute

Re: [PATCH] net: phy: marvell: replace phy_modify()

2020-12-01 Thread Jakub Kicinski
On Mon, 30 Nov 2020 18:41:35 +0800 Yejune Deng wrote: > a set of phy_set_bits() looks more neater > > Signed-off-by: Yejune Deng Looks like that's what those helpers are for so applied to net-next, thanks.

Re: VRF NS for lladdr sent on the wrong interface

2020-12-01 Thread David Ahern
On 12/1/20 12:00 PM, Stephen Suryaputra wrote: > On Mon, Nov 30, 2020 at 06:15:06PM -0700, David Ahern wrote: >> On 11/23/20 5:23 PM, Stephen Suryaputra wrote: >>> Hi, >>> >>> I'm running into a problem with lladdr pinging all-host mcast all nodes >>> addr. The ping intially works but after cycling

Re: [PATCH net-next 0/6] s390/ctcm: updates 2020-11-30

2020-12-01 Thread Jakub Kicinski
On Mon, 30 Nov 2020 11:09:44 +0100 Julian Wiedmann wrote: > Some rare ctcm updates by Sebastian, who cleans up all places where > in_interrupt() was used to determine the correct GFP_* mask for > allocations. > In the first three patches we can get rid of those allocations entirely, > as they just

Re: [PATCH net-next 1/6] s390/ctcm: Avoid temporary allocation of struct th_header and th_sweep.

2020-12-01 Thread Jakub Kicinski
On Mon, 30 Nov 2020 11:09:45 +0100 Julian Wiedmann wrote: > From: Sebastian Andrzej Siewior > > The size of struct th_header is 8 byte and the size of struct th_sweep > is 16 byte. The memory for is allocated, initialized, used and > deallocated a few lines later. > > It is more efficient to avo

Re: [net-next PATCH] net: freescale: ucc_geth: remove unused SKB_ALLOC_TIMEOUT

2020-12-01 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 30 Nov 2020 13:10:10 +1300 you wrote: > This was added in commit ce973b141dfa ("[PATCH] Freescale QE UCC gigabit > ethernet driver") but doesn't appear to have been used. Remove it now. > > Signed-off-by: Chris Pac

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

2020-12-01 Thread Jakub Kicinski
On Wed, 2 Dec 2020 02:28:51 +0200 Vladimir Oltean wrote: > On Fri, Nov 27, 2020 at 10:36:42PM +0100, Andrew Lunn wrote: > > > Either way, can we conclude that ndo_get_stats64 is not a replacement > > > for ethtool -S, since the latter is blocking and, if implemented > > > correctly, > > > can retu

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-12-01 Thread Edwin Peer
On Wed, Nov 25, 2020 at 10:35:35AM +, Danielle Ratson wrote: > > > In ethtool, for speed 100G and 4 lanes for example, there are few link > > > modes that fits: > > > ETHTOOL_LINK_MODE_10baseKR4_Full_BIT > > > ETHTOOL_LINK_MODE_10baseSR4_Full_BIT > > > ETHTOOL_LINK_MODE_10baseCR4_

Re: UBSAN: array-index-out-of-bounds in arch_uprobe_analyze_insn

2020-12-01 Thread Kees Cook
Hi, There appears to be a problem with prefix counting for the instruction decoder. It looks like insn_get_prefixes() isn't keeping "nb" and "nbytes" in sync correctly: while (inat_is_legacy_prefix(attr)) { /* Skip if same prefix */ for (i = 0; i < nb; i++)

Re: [PATCH bpf] libbpf: sanitise map names before pinning

2020-12-01 Thread Andrii Nakryiko
On Mon, Nov 30, 2020 at 8:17 AM Toke Høiland-Jørgensen wrote: > > When we added sanitising of map names before loading programs to libbpf, we > still allowed periods in the name. While the kernel will accept these for > the map names themselves, they are not allowed in file names when pinning Tha

Re: [PATCH v2 net-next 4/4] net: dsa: tag_dsa: Support reception of packets from LAG devices

2020-12-01 Thread Vladimir Oltean
On Tue, Dec 01, 2020 at 11:31:02PM +0100, Tobias Waldekranz wrote: > >> + if (unlikely(!dsa_slave_dev_check(skb->dev))) { > >> + /* Packet is to be injected directly on an upper > >> + * device, e.g. a team/bond, so skip all DSA-port > >> + * specific actions. > >> +

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-12-01 Thread Edwin Peer
On Tue, Dec 1, 2020 at 3:22 AM Jiri Pirko wrote: > >Consider a physical QSFP connector comprising 4 lanes. Today, if the > >speed is forced, we would achieve 100G speeds using all 4 lanes with > >NRZ encoding. If we configure the port for PAM4 encoding at the same > >speed, then we only require 2

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

2020-12-01 Thread Vladimir Oltean
Hi Jakub, On Fri, Nov 27, 2020 at 10:36:42PM +0100, Andrew Lunn wrote: > > Either way, can we conclude that ndo_get_stats64 is not a replacement > > for ethtool -S, since the latter is blocking and, if implemented correctly, > > can return the counters at the time of the call (therefore making sur

Re: [PATCH bpf-next 1/3] selftests/bpf: rewrite test_sock_addr bind bpf into C

2020-12-01 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 4:20 PM Stanislav Fomichev wrote: > > I'm planning to extend it in the next patches. It's much easier to > work with C than BPF assembly. > > Signed-off-by: Stanislav Fomichev > --- With nits below: Acked-by: Andrii Nakryiko > .../testing/selftests/bpf/progs/bind4_pr

[PATCH v4 bpf-next 12/14] libbpf: support attachment of BPF tracing programs to kernel modules

2020-12-01 Thread Andrii Nakryiko
Teach libbpf to search for BTF types in kernel modules for tracing BPF programs. This allows attachment of raw_tp/fentry/fexit/fmod_ret/etc BPF program types to tracepoints and functions in kernel modules. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/bpf.c | 1 + tools/lib/bpf

[PATCH v4 bpf-next 13/14] selftests/bpf: add tp_btf CO-RE reloc test for modules

2020-12-01 Thread Andrii Nakryiko
Add another CO-RE relocation test for kernel module relocations. This time for tp_btf with direct memory reads. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/core_reloc.c | 3 +- .../bpf/progs/test_core_reloc_module.c| 32 ++- 2 files changed, 33 in

[PATCH v4 bpf-next 14/14] selftests/bpf: add fentry/fexit/fmod_ret selftest for kernel module

2020-12-01 Thread Andrii Nakryiko
Add new selftest checking attachment of fentry/fexit/fmod_ret (and raw tracepoint ones for completeness) BPF programs to kernel module function. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/module_attach.c | 53 +++ .../selftests/bpf/progs/test_module_attach.c |

[PATCH v4 bpf-next 09/14] bpf: remove hard-coded btf_vmlinux assumption from BPF verifier

2020-12-01 Thread Andrii Nakryiko
Remove a permeating assumption thoughout BPF verifier of vmlinux BTF. Instead, wherever BTF type IDs are involved, also track the instance of struct btf that goes along with the type ID. This allows to gradually add support for kernel module BTFs and using/tracking module types across BPF helper ca

[PATCH v4 bpf-next 10/14] bpf: allow to specify kernel module BTFs when attaching BPF programs

2020-12-01 Thread Andrii Nakryiko
Add ability for user-space programs to specify non-vmlinux BTF when attaching BTF-powered BPF programs: raw_tp, fentry/fexit/fmod_ret, LSM, etc. For this, add attach_btf_obj_id field which contains BTF object ID for either vmlinux or module. For backwards compatibility (and simplicity) reasons, 0 d

[PATCH v4 bpf-next 08/14] selftests/bpf: add CO-RE relocs selftest relying on kernel module BTF

2020-12-01 Thread Andrii Nakryiko
Add a self-tests validating libbpf is able to perform CO-RE relocations against the type defined in kernel module BTF. if bpf_testmod.o is not supported by the kernel (e.g., due to version mismatch), skip tests, instead of failing. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/

[PATCH v4 bpf-next 11/14] libbpf: factor out low-level BPF program loading helper

2020-12-01 Thread Andrii Nakryiko
Refactor low-level API for BPF program loading to not rely on public API types. This allows painless extension without constant efforts to cleverly not break backwards compatibility. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/bpf.c | 100 ++-- tools/

[PATCH v4 bpf-next 03/14] libbpf: add internal helper to load BTF data by FD

2020-12-01 Thread Andrii Nakryiko
Add a btf_get_from_fd() helper, which constructs struct btf from in-kernel BTF data by FD. This is used for loading module BTFs. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/btf.c | 61 +++-- tools/lib/bpf/libbpf_internal.h | 1 + 2 files changed, 36

[PATCH v4 bpf-next 06/14] selftests/bpf: add bpf_testmod kernel module for testing

2020-12-01 Thread Andrii Nakryiko
Add bpf_testmod module, which is conceptually out-of-tree module and provides ways for selftests/bpf to test various kernel module-related functionality: raw tracepoint, fentry/fexit/fmod_ret, etc. This module will be auto-loaded by test_progs test runner and expected by some of selftests to be pre

[PATCH v4 bpf-next 07/14] selftests/bpf: add support for marking sub-tests as skipped

2020-12-01 Thread Andrii Nakryiko
Previously skipped sub-tests would be counted as passing with ":OK" appened in the log. Change that to be accounted as ":SKIP". Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/test_progs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/self

[PATCH v4 bpf-next 05/14] libbpf: add kernel module BTF support for CO-RE relocations

2020-12-01 Thread Andrii Nakryiko
Teach libbpf to search for candidate types for CO-RE relocations across kernel modules BTFs, in addition to vmlinux BTF. If at least one candidate type is found in vmlinux BTF, kernel module BTFs are not iterated. If vmlinux BTF has no matching candidates, then find all kernel module BTFs and searc

[PATCH v4 bpf-next 04/14] libbpf: refactor CO-RE relocs to not assume a single BTF object

2020-12-01 Thread Andrii Nakryiko
Refactor CO-RE relocation candidate search to not expect a single BTF, rather return all candidate types with their corresponding BTF objects. This will allow to extend CO-RE relocations to accommodate kernel module BTFs. Acked-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko --- tools/lib/b

[PATCH v4 bpf-next 00/14] Support BTF-powered BPF tracing programs for kernel modules

2020-12-01 Thread Andrii Nakryiko
This patch sets extends kernel and libbpf with support for attaching BTF-powered raw tracepoint (tp_btf) and tracing (fentry/fexit/fmod_ret/lsm) BPF programs to BPF hooks defined in kernel modules. As part of that, libbpf now supports performing CO-RE relocations against types in kernel module BTFs

[PATCH v4 bpf-next 02/14] bpf: keep module's btf_data_size intact after load

2020-12-01 Thread Andrii Nakryiko
Having real btf_data_size stored in struct module is benefitial to quickly determine which kernel modules have associated BTF object and which don't. There is no harm in keeping this info, as opposed to keeping invalid pointer. Fixes: 607c543f939d ("bpf: Sanitize BTF data pointer after module is l

[PATCH v4 bpf-next 01/14] bpf: fix bpf_put_raw_tracepoint()'s use of __module_address()

2020-12-01 Thread Andrii Nakryiko
__module_address() needs to be called with preemption disabled or with module_mutex taken. preempt_disable() is enough for read-only uses, which is what this fix does. Also, module_put() does internal check for NULL, so drop it as well. Fixes: a38d1107f937 ("bpf: support raw tracepoints in modules

Re: [PATCH bpf-next 3/3] selftests/bpf: extend bind{4,6} programs with a call to bpf_setsockopt

2020-12-01 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 4:20 PM Stanislav Fomichev wrote: > > To make sure it doesn't trigger sock_owned_by_me splat. > > Signed-off-by: Stanislav Fomichev > --- Acked-by: Andrii Nakryiko > .../testing/selftests/bpf/progs/bind4_prog.c | 31 +++ > .../testing/selftests/bpf/pro

Re: [Patch net] lwt: disable BH too in run_lwt_bpf()

2020-12-01 Thread Jakub Kicinski
On Tue, 1 Dec 2020 16:16:33 -0800 Jakub Kicinski wrote: > On Tue, 1 Dec 2020 11:44:38 -0800 Cong Wang wrote: > > From: Dongdong Wang > > > > The per-cpu bpf_redirect_info is shared among all skb_do_redirect() > > and BPF redirect helpers. Callers on RX path are all in BH context, > > disabling p

Re: [Patch net] lwt: disable BH too in run_lwt_bpf()

2020-12-01 Thread Jakub Kicinski
On Tue, 1 Dec 2020 11:44:38 -0800 Cong Wang wrote: > From: Dongdong Wang > > The per-cpu bpf_redirect_info is shared among all skb_do_redirect() > and BPF redirect helpers. Callers on RX path are all in BH context, > disabling preemption is not sufficient to prevent BH interruption. > > In prod

Re: [PATCH 00/10 net-next v2] net/tipc: fix all kernel-doc and add TIPC networking chapter

2020-12-01 Thread Jakub Kicinski
On Sun, 29 Nov 2020 10:32:41 -0800 Randy Dunlap wrote: > Fix lots of net/tipc/ kernel-doc warnings. Add many struct field and > function parameter descriptions. > > Then add a TIPC chapter to the networking documentation book. > > All patches have been rebased to current net-next. > > > Note: s

Re: [GIT PULL] vhost,vdpa: bugfixes

2020-12-01 Thread pr-tracker-bot
The pull request you sent on Mon, 30 Nov 2020 03:50:10 -0500: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f43691b59fae581ca83349539c686ecf4a01e42d Thank you! -- Deet-doot-dot, I am a b

Re: [PATCH net-next] net: delete __dev_getfirstbyhwtype

2020-12-01 Thread Jakub Kicinski
On Mon, 30 Nov 2020 09:38:42 + David Howells wrote: > Vladimir Oltean wrote: > > > The last user of the RTNL brother of dev_getfirstbyhwtype (the latter > > being synchronized under RCU) has been deleted in commit b4db2b35fc44 > > ("afs: Use core kernel UUID generation"). > > > > Cc: Arnd Be

Re: [PATCH net-next 0/9] mlxsw: Add support for 802.1ad bridging

2020-12-01 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Sun, 29 Nov 2020 14:53:58 +0200 you wrote: > From: Ido Schimmel > > 802.1ad, also known as QinQ, is an extension to the 802.1q standard, > which is concerned with passing possibly 802.1q-tagged packets through > anoth

  1   2   3   4   >