[PATCH net] vmxnet3: fix cksum offload issues for non-udp tunnels

2020-09-24 Thread Ronak Doshi
Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") added support for encapsulation offload. However, the inner offload capability is to be restrictued to UDP tunnels. This patch fixes the issue for non-udp tunnels by adding features check capability and filtering appropri

Re: [PATCH bpf-next 7/9] libbpf: add BTF writing APIs

2020-09-24 Thread Andrii Nakryiko
On Thu, Sep 24, 2020 at 8:55 PM Alexei Starovoitov wrote: > > On Wed, Sep 23, 2020 at 08:54:34AM -0700, Andrii Nakryiko wrote: > > Add APIs for appending new BTF types at the end of BTF object. > > > > Each BTF kind has either one API of the form btf__append_(). For types > > that have variable am

Re: [PATCH bpf-next 4/6] bpf, libbpf: add bpf_tail_call_static helper for bpf programs

2020-09-24 Thread Yonghong Song
On 9/24/20 11:21 AM, Daniel Borkmann wrote: Port of tail_call_static() helper function from Cilium's BPF code base [0] to libbpf, so others can easily consume it as well. We've been using this in production code for some time now. The main idea is that we guarantee that the kernel's BPF infras

Re: [Intel-wired-lan] [PATCH v3] e1000e: Increase iteration on polling MDIC ready bit

2020-09-24 Thread Paul Menzel
Dear Kai-Heng, Thank you for patch version 3. Am 24.09.20 um 18:45 schrieb Kai-Heng Feng: We are seeing the following error after S3 resume: [ 704.746874] e1000e :00:1f.6 eno1: Setting page 0x6020 [ 704.844232] e1000e :00:1f.6 eno1: MDI Write did not complete [ 704.902817] e1000e 00

[PATCH 9/9] security/keys: remove compat_keyctl_instantiate_key_iov

2020-09-24 Thread Christoph Hellwig
Now that import_iovec handles compat iovecs, the native version of keyctl_instantiate_key_iov can be used for the compat case as well. Signed-off-by: Christoph Hellwig --- security/keys/compat.c | 36 ++-- security/keys/internal.h | 5 - security/keys/keyct

[PATCH 7/9] fs: remove compat_sys_vmsplice

2020-09-24 Thread Christoph Hellwig
Now that import_iovec handles compat iovecs, the native vmsplice syscall can be used for the compat case as well. Signed-off-by: Christoph Hellwig --- arch/arm64/include/asm/unistd32.h | 2 +- arch/mips/kernel/syscalls/syscall_n32.tbl | 2 +- arch/mips/kernel/syscalls/syscall_o

[PATCH 5/9] fs: remove various compat readv/writev helpers

2020-09-24 Thread Christoph Hellwig
Now that import_iovec handles compat iovecs as well, all the duplicated code in the compat readv/writev helpers is not needed. Remove them and switch the compat syscall handlers to use the native helpers. Signed-off-by: Christoph Hellwig --- fs/read_write.c| 179 +++-

[PATCH 6/9] fs: remove the compat readv/writev syscalls

2020-09-24 Thread Christoph Hellwig
Now that import_iovec handles compat iovecs, the native readv and writev syscalls can be used for the compat case as well. Signed-off-by: Christoph Hellwig --- arch/arm64/include/asm/unistd32.h | 4 ++-- arch/mips/kernel/syscalls/syscall_n32.tbl | 4 ++-- arch/mips/ke

let import_iovec deal with compat_iovecs as well v4

2020-09-24 Thread Christoph Hellwig
Hi Al, this series changes import_iovec to transparently deal with compat iovec structures, and then cleanups up a lot of code dupliation. Changes since v3: - fix up changed prototypes in compat.h as well Changes since v2: - revert the switch of the access process vm sysclls to iov_iter - ref

[PATCH 1/9] compat.h: fix a spelling error in

2020-09-24 Thread Christoph Hellwig
There is no compat_sys_readv64v2 syscall, only a compat_sys_preadv64v2 one. Signed-off-by: Christoph Hellwig --- include/linux/compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compat.h b/include/linux/compat.h index b354ce58966e2d..654c1ec36671a4 100644

[PATCH 4/9] iov_iter: transparently handle compat iovecs in import_iovec

2020-09-24 Thread Christoph Hellwig
Use in compat_syscall to import either native or the compat iovecs, and remove the now superflous compat_import_iovec. This removes the need for special compat logic in most callers, and the remaining ones can still be simplified by using __import_iovec with a bool compat parameter. Signed-off-by

[PATCH 2/9] iov_iter: move rw_copy_check_uvector() into lib/iov_iter.c

2020-09-24 Thread Christoph Hellwig
From: David Laight This lets the compiler inline it into import_iovec() generating much better code. Signed-off-by: David Laight Signed-off-by: Christoph Hellwig --- fs/read_write.c | 179 lib/iov_iter.c | 176 +

[PATCH 8/9] mm: remove compat_process_vm_{readv,writev}

2020-09-24 Thread Christoph Hellwig
Now that import_iovec handles compat iovecs, the native syscalls can be used for the compat case as well. Signed-off-by: Christoph Hellwig --- arch/arm64/include/asm/unistd32.h | 4 +- arch/mips/kernel/syscalls/syscall_n32.tbl | 4 +- arch/mips/kernel/syscalls/syscall_o32.tbl

[PATCH 3/9] iov_iter: refactor rw_copy_check_uvector and import_iovec

2020-09-24 Thread Christoph Hellwig
Split rw_copy_check_uvector into two new helpers with more sensible calling conventions: - iovec_from_user copies a iovec from userspace either into the provided stack buffer if it fits, or allocates a new buffer for it. Returns the actually used iovec. It also verifies that iov_len does

[PATCH] xfrm: Use correct address family in xfrm_state_find

2020-09-24 Thread Herbert Xu
Resend with proper subject. ---8<--- The struct flowi must never be interpreted by itself as its size depends on the address family. Therefore it must always be grouped with its original family value. In this particular instance, the original family value is lost in the function xfrm_state_find

Re: a saner API for allocating DMA addressable pages v3

2020-09-24 Thread Christoph Hellwig
This is in dma-mapping for-next now.

Re: [PATCH v3] e1000e: Increase iteration on polling MDIC ready bit

2020-09-24 Thread Kai-Heng Feng
> On Sep 25, 2020, at 03:57, Andrew Lunn wrote: > > On Fri, Sep 25, 2020 at 12:45:42AM +0800, Kai-Heng Feng wrote: >> We are seeing the following error after S3 resume: >> [ 704.746874] e1000e :00:1f.6 eno1: Setting page 0x6020 >> [ 704.844232] e1000e :00:1f.6 eno1: MDI Write did not

Re: [PATCH bpf-next 7/9] libbpf: add BTF writing APIs

2020-09-24 Thread Alexei Starovoitov
On Wed, Sep 23, 2020 at 08:54:34AM -0700, Andrii Nakryiko wrote: > Add APIs for appending new BTF types at the end of BTF object. > > Each BTF kind has either one API of the form btf__append_(). For types > that have variable amount of additional items (struct/union, enum, func_proto, > datasec),

Re: [PATCH net-next 0/6] net: hns3: updates for -next

2020-09-24 Thread David Miller
From: Huazhong Tan Date: Fri, 25 Sep 2020 08:26:12 +0800 > There are some updates for the HNS3 ethernet driver. > #1 & #2 are two cleanups. > #3 adds new hardware error for the client. > #4 adds debugfs support the pf's interrupt resource. > #5 adds new pci device id for 200G device. > #6 renames

Re: [PATCH net-next] net: tcp: drop unused function argument from mptcp_incoming_options

2020-09-24 Thread David Miller
From: Florian Westphal Date: Fri, 25 Sep 2020 01:23:02 +0200 > Since commit cfde141ea3faa30e ("mptcp: move option parsing into > mptcp_incoming_options()"), the 3rd function argument is no longer used. > > Signed-off-by: Florian Westphal Applied, thanks Florian.

Re: [PATCH net] tcp: skip DSACKs with dubious sequence ranges

2020-09-24 Thread David Miller
From: Priyaranjan Jha Date: Thu, 24 Sep 2020 15:23:14 -0700 > From: Priyaranjan Jha > > Currently, we use length of DSACKed range to compute number of > delivered packets. And if sequence range in DSACK is corrupted, > we can get bogus dsacked/acked count, and bogus cwnd. > > This patch put bo

Re: [PATCH] net/fsl: quieten expected MDIO access failures

2020-09-24 Thread David Miller
From: Jamie Iles Date: Thu, 24 Sep 2020 15:56:45 +0100 > MDIO reads can happen during PHY probing, and printing an error with > dev_err can result in a large number of error messages during device > probe. On a platform with a serial console this can result in > excessively long boot times in a

Re: [PATCH] net: dsa: microchip: really look for phy-mode in port nodes

2020-09-24 Thread David Miller
From: Helmut Grohne Date: Thu, 24 Sep 2020 10:37:47 +0200 > The previous implementation failed to account for the "ports" node. The > actual port nodes are not child nodes of the switch node, but a "ports" > node sits in between. > > Fixes: edecfa98f602 ("net: dsa: microchip: look for phy-mode i

Re: KASAN: stack-out-of-bounds Read in xfrm_selector_match (2)

2020-09-24 Thread Herbert Xu
On Mon, Sep 21, 2020 at 07:56:20AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:eb5f95f1 Merge tag 's390-5.9-6' of git://git.kernel.org/pu.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=13996ad590 > kernel

Re: [PATCH] net/tls: race causes kernel panic

2020-09-24 Thread David Miller
From: Rohit Maheshwari Date: Thu, 24 Sep 2020 12:28:45 +0530 > BUG: kernel NULL pointer dereference, address: 00b8 ... > RIP: 0010:tx_work_handler+0x1b/0x70 [tls] ... > Call Trace: > process_one_work+0x1a7/0x370 > worker_thread+0x30/0x370 > ? process_one_work+0x370/0x370 >

Re: [PATCH] net/ethernet/broadcom: fix spelling typo

2020-09-24 Thread David Miller
From: Wang Qing Date: Thu, 24 Sep 2020 14:50:24 +0800 > Modify the comment typo: "compliment" -> "complement". > > Signed-off-by: Wang Qing Applied, thank you.

Re: [PATCH net] hinic: fix wrong return value of mac-set cmd

2020-09-24 Thread David Miller
From: Luo bin Date: Thu, 24 Sep 2020 09:31:51 +0800 > It should also be regarded as an error when hw return status=4 for PF's > setting mac cmd. Only if PF return status=4 to VF should this cmd be > taken special treatment. > > Fixes: 7dd29ee12865 ("hinic: add sriov feature support") > Signed-of

Re: [net] net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3

2020-09-24 Thread David Miller
From: Xiaoliang Yang Date: Thu, 24 Sep 2020 10:11:13 +0800 > INIT_IPS and GATE_ENABLE fields have a wrong offset in SG_CONFIG_REG_3. > This register is used by stream gate control of PSFP, and it has not > been used before, because PSFP is not implemented in ocelot driver. > > Signed-off-by: Xia

Re: [PATCH v5 bpf-next 3/3] selftests/bpf: add raw_tp_test_run

2020-09-24 Thread Song Liu
> On Sep 24, 2020, at 6:01 PM, John Fastabend wrote: > > Song Liu wrote: >> This test runs test_run for raw_tracepoint program. The test covers ctx >> input, retval output, and running on correct cpu. >> >> Signed-off-by: Song Liu >> --- > > [...] > >> +void test_raw_tp_test_run(void) >> +

Re: [net] net: dsa: felix: convert TAS link speed based on phylink speed

2020-09-24 Thread David Miller
From: Xiaoliang Yang Date: Thu, 24 Sep 2020 09:57:46 +0800 > state->speed holds a value of 10, 100, 1000 or 2500, but > QSYS_TAG_CONFIG_LINK_SPEED expects a value of 0, 1, 2, 3. So convert the > speed to a proper value. > > Fixes: de143c0e274b ("net: dsa: felix: Configure Time-Aware Scheduler vi

[PATCH] Revert "net: ethernet: ixgbe: check the return value of ixgbe_mii_bus_init()"

2020-09-24 Thread Yongxin Liu
This reverts commit 09ef193fef7efb0175a04634853862d717adbb95. For C3000 family of SoCs, they have four ixgbe devices sharing a single MDIO bus. ixgbe_mii_bus_init() returns -ENODEV for other three devices. The propagation of the error code makes other three ixgbe devices unregistered. Signed-off

Re: [MPTCP][PATCH net-next 00/16] mptcp: RM_ADDR/ADD_ADDR enhancements

2020-09-24 Thread David Miller
From: Geliang Tang Date: Thu, 24 Sep 2020 08:29:46 +0800 > This series include two enhancements for the MPTCP path management, > namely RM_ADDR support and ADD_ADDR echo support, as specified by RFC > sections 3.4.1 and 3.4.2. > > 1 RM_ADDR support include 9 patches (1-3 and 8-13): > > Patch 1

Re: [pull request][net-next V2 00/15] mlx5 Connection Tracking in NIC mode

2020-09-24 Thread David Miller
From: sa...@kernel.org Date: Wed, 23 Sep 2020 15:48:09 -0700 > This series adds the support for connection tracking in NIC mode, > and attached to this series some trivial cleanup patches. > v1->v2: > - Remove "fixup!" comment from commit message (Jakub) > - More information and use case descrip

Re: [PATCH v3] net/ipv4: always honour route mtu during forwarding

2020-09-24 Thread David Miller
From: Maciej Żenczykowski Date: Wed, 23 Sep 2020 13:18:15 -0700 > From: Maciej Żenczykowski > > Documentation/networking/ip-sysctl.txt:46 says: > ip_forward_use_pmtu - BOOLEAN > By default we don't trust protocol path MTUs while forwarding > because they could be easily forged and can

Re: [PATCH net v2] drivers/net/wan/x25_asy: Correct the ndo_open and ndo_stop functions

2020-09-24 Thread David Miller
From: Xie He Date: Wed, 23 Sep 2020 11:18:18 -0700 > 1. > Move the lapb_register/lapb_unregister calls into the ndo_open/ndo_stop > functions. > This makes the LAPB protocol start/stop when the network interface > starts/stops. When the network interface is down, the LAPB protocol > shouldn't be

Re: [PATCH net-next v2 0/3] dpaa2-mac: add PCS support through the Lynx module

2020-09-24 Thread David Miller
From: Ioana Ciornei Date: Wed, 23 Sep 2020 18:41:20 +0300 > This patch set aims to add PCS support in the dpaa2-eth driver by > leveraging the Lynx PCS module. > > The first two patches are some missing pieces: the first one adding > support for 10GBASER in Lynx PCS while the second one adds a n

Re: [PATCH net-next] net: mscc: ocelot: always pass skb clone to ocelot_port_add_txtstamp_skb

2020-09-24 Thread David Miller
From: Vladimir Oltean Date: Wed, 23 Sep 2020 14:24:20 +0300 > Currently, ocelot switchdev passes the skb directly to the function that > enqueues it to the list of skb's awaiting a TX timestamp. Whereas the > felix DSA driver first clones the skb, then passes the clone to this > queue. > > This

Re: [Patch net 0/2] net_sched: fix a UAF in tcf_action_init()

2020-09-24 Thread David Miller
From: Cong Wang Date: Tue, 22 Sep 2020 20:56:22 -0700 > This patchset fixes a use-after-free triggered by syzbot. Please > find more details in each patch description. Series applied and queued up for -stable, thanks Cong.

Re: [PATCH v6 bpf-next 6/6] selftests/bpf: add test for bpf_seq_printf_btf helper

2020-09-24 Thread Alexei Starovoitov
On Wed, Sep 23, 2020 at 06:46:28PM +0100, Alan Maguire wrote: > Add a test verifying iterating over tasks and displaying BTF > representation of data succeeds. Note here that we do not display > the task_struct itself, as it will overflow the PAGE_SIZE limit on seq > data; instead we write task->f

Re: [PATCH v3 bpf-next 02/11] bpf: Enable bpf_skc_to_* sock casting helper to networking prog type

2020-09-24 Thread Martin KaFai Lau
On Thu, Sep 24, 2020 at 09:38:09AM +0100, Lorenz Bauer wrote: > On Wed, 23 Sep 2020 at 18:06, Martin KaFai Lau wrote: > > > > On Wed, Sep 23, 2020 at 10:27:27AM +0100, Lorenz Bauer wrote: > > > On Tue, 22 Sep 2020 at 19:26, Martin KaFai Lau wrote: > > > > > > > > On Tue, Sep 22, 2020 at 10:46:41A

RE: [PATCH v5 bpf-next 3/3] selftests/bpf: add raw_tp_test_run

2020-09-24 Thread John Fastabend
Song Liu wrote: > This test runs test_run for raw_tracepoint program. The test covers ctx > input, retval output, and running on correct cpu. > > Signed-off-by: Song Liu > --- [...] > +void test_raw_tp_test_run(void) > +{ > + struct bpf_prog_test_run_attr test_attr = {}; > + int comm_fd

Re: [PATCH v6 bpf-next 4/6] selftests/bpf: add bpf_snprintf_btf helper tests

2020-09-24 Thread Alexei Starovoitov
On Wed, Sep 23, 2020 at 06:46:26PM +0100, Alan Maguire wrote: > +static int __strncmp(const void *m1, const void *m2, size_t len) > +{ > + const unsigned char *s1 = m1; > + const unsigned char *s2 = m2; > + int i, delta = 0; > + > +#pragma clang loop unroll(full) Shouldn't be needed? T

Re: [PATCH v6 bpf-next 3/6] bpf: add bpf_snprintf_btf helper

2020-09-24 Thread Alexei Starovoitov
On Wed, Sep 23, 2020 at 06:46:25PM +0100, Alan Maguire wrote: > + > +static int bpf_btf_printf_prepare(struct btf_ptr *ptr, u32 btf_ptr_size, > + u64 flags, const struct btf **btf, > + s32 *btf_id) > +{ > + u8 btf_kind = BTF_KIND_TYPED

Re: [PATCH v6 bpf-next 2/6] bpf: move to generic BTF show support, apply it to seq files/strings

2020-09-24 Thread Alexei Starovoitov
On Wed, Sep 23, 2020 at 06:46:24PM +0100, Alan Maguire wrote: > > +/* Chunk size we use in safe copy of data to be shown. */ > +#define BTF_SHOW_OBJ_SAFE_SIZE 256 sizeof(struct btf_show) == 472 It's allocated on stack and called from bpf prog. It's a leaf function, but it still wor

Re: [MPTCP][PATCH net-next 09/16] mptcp: implement mptcp_pm_remove_subflow

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch implemented the local subflow removing function, mptcp_pm_remove_subflow, it simply called mptcp_pm_nl_rm_subflow_received under the PM spin lock. We use mptcp_pm_remove_subflow to remove a local subflow, so change it's argument from remote_id

[PATCH net-next 4/6] net: hns3: add debugfs of dumping pf interrupt resources

2020-09-24 Thread Huazhong Tan
From: Yufeng Mo The pf's interrupt resources will be changed with the number of enabled pf. Dumping this resource information will be helpful for debugging. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 1 + drivers/net/

[PATCH net-next 0/6] net: hns3: updates for -next

2020-09-24 Thread Huazhong Tan
There are some updates for the HNS3 ethernet driver. #1 & #2 are two cleanups. #3 adds new hardware error for the client. #4 adds debugfs support the pf's interrupt resource. #5 adds new pci device id for 200G device. #6 renames the unsuitable macro of vf's pci device id. Guangbin Huang (2): net

[PATCH net-next 1/6] net: hns3: refactor the function for dumping tc information in debugfs

2020-09-24 Thread Huazhong Tan
From: Yufeng Mo Remove some unnecessary parameters of hclge_title_idx_print(), and rename this function for readability. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c| 15 +-- 1 file changed, 5 insertions(+), 10

[PATCH net-next 5/6] net: hns3: add support for 200G device

2020-09-24 Thread Huazhong Tan
From: Guangbin Huang The 200G device has a new device id 0xA228, so adds this device id to pci table, then the driver can probe it. As speed_ability queried from firmware has only 8 bits and already be used up, so firmware adds extra speed_ability_ext to indicate more speed abilities to support

[PATCH net-next 3/6] net: hns3: add a hardware error detect type

2020-09-24 Thread Huazhong Tan
From: Yufeng Mo In hns3_process_hw_error(), the hardware error detection of the ROCEE AXI RESP error type is added. When this error occurs, the client needs to be notified of this error and take corresponding operation. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- drivers/net/ethe

[PATCH net-next 2/6] net: hns3: remove unnecessary variable initialization

2020-09-24 Thread Huazhong Tan
From: Yufeng Mo If a variable is assigned a value before it is used, it's no need to assign an initial value to the variable. So remove these redundant operations. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c| 2 +- driver

[PATCH net-next 6/6] net: hns3: rename macro of pci device id of vf

2020-09-24 Thread Huazhong Tan
From: Guangbin Huang VF devices do not have speed division, its speed is depended on its PF. So macro name of PCI device id of VF is incorrent to have 100G info, it should be renamed by removing 100G info. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisi

[PATCH net-next v2] net: vlan: Avoid using BUG() in vlan_proto_idx()

2020-09-24 Thread Florian Fainelli
While we should always make sure that we specify a valid VLAN protocol to vlan_proto_idx(), killing the machine when an invalid value is specified is too harsh and not helpful for debugging. All callers are capable of dealing with an error returned by vlan_proto_idx() so check the index value and p

Re: [MPTCP][PATCH net-next 16/16] mptcp: retransmit ADD_ADDR when timeout

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch implemented the retransmition of ADD_ADDR when no ADD_ADDR echo is received. It added a timer with the announced address. When timeout occurs, ADD_ADDR will be retransmitted. Suggested-by: Mat Martineau Suggested-by: Paolo Abeni Acked-by: Pa

Re: [MPTCP][PATCH net-next 15/16] mptcp: add sk_stop_timer_sync helper

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch added a new helper sk_stop_timer_sync, it deactivates a timer like sk_stop_timer, but waits for the handler to finish. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- include/net/sock.h | 2 ++ net/core/sock.c| 7 +++ 2 files cha

Re: [MPTCP][PATCH net-next 14/16] mptcp: add struct mptcp_pm_add_entry

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: Add a new struct mptcp_pm_add_entry to describe add_addr's entry. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/pm_netlink.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) Reviewed-by: Mat Martineau -- M

Re: [MPTCP][PATCH net-next 13/16] selftests: mptcp: add remove addr and subflow test cases

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch added the remove addr and subflow test cases and two new functions. The first function run_remove_tests calls do_transfer with two new arguments, rm_nr_ns1 and rm_nr_ns2, for the numbers of addresses should be removed during the transfer proce

Re: [MPTCP][PATCH net-next 12/16] selftests: mptcp: add remove cfg in mptcp_connect

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch added a new cfg, named cfg_remove in mptcp_connect. This new cfg_remove is copied from cfg_join. The only difference between them is in the do_rnd_write function. Here we slow down the transfer process of all data to let the RM_ADDR suboption c

Re: [MPTCP][PATCH net-next 11/16] mptcp: add mptcp_destroy_common helper

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch added a new helper named mptcp_destroy_common containing the shared code between mptcp_destroy() and mptcp_sock_destruct(). Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/protocol.c | 11 --- net/mptcp/protocol.h

RE: [PATCH bpf-next v3 2/2] selftests/bpf: Verifying real time helper function

2020-09-24 Thread Pujari, Bimmy
I agree with you. I will write a separate new test. In the meanwhile I think it should be okay to prepare and send just one patch. Thanks Bimmy -Original Message- From: Andrii Nakryiko Sent: Thursday, September 24, 2020 1:22 PM To: Pujari, Bimmy Cc: bpf ; Networking ; mche...@kernel.

Re: [MPTCP][PATCH net-next 10/16] mptcp: add RM_ADDR related mibs

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch added two new mibs for RM_ADDR, named MPTCP_MIB_RMADDR and MPTCP_MIB_RMSUBFLOW, when the RM_ADDR suboption is received, increase the first mib counter, when the local subflow is removed, increase the second mib counter. Suggested-by: Matthieu

Re: [MPTCP][PATCH net-next 08/16] mptcp: remove addr and subflow in PM netlink

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch implements the remove announced addr and subflow logic in PM netlink. When the PM netlink removes an address, we traverse all the existing msk sockets to find the relevant sockets. We add a new list named anno_list in mptcp_pm_data, to record

Re: [MPTCP][PATCH net-next 03/16] mptcp: add the incoming RM_ADDR support

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch added the RM_ADDR option parsing logic: We parsed the incoming options to find if the rm_addr option is received, and called mptcp_pm_rm_addr_received to schedule PM work to a new status, named MPTCP_PM_RM_ADDR_RECEIVED. PM work got this stat

Re: [MPTCP][PATCH net-next 02/16] mptcp: add the outgoing RM_ADDR support

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch added a new signal named rm_addr_signal in PM. On outgoing path, we called mptcp_pm_should_rm_signal to check if rm_addr_signal has been set. If it has been, we sent out the RM_ADDR option. Suggested-by: Matthieu Baerts Suggested-by: Paolo Ab

Re: [MPTCP][PATCH net-next 01/16] mptcp: rename addr_signal and the related functions

2020-09-24 Thread Mat Martineau
On Thu, 24 Sep 2020, Geliang Tang wrote: This patch renamed addr_signal and the related functions with the explicit word "add". Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/options.c | 14 +++--- net/mptcp/pm.c | 12 ++---

[PATCH v4 bpf-next 08/13] bpf: selftest: Move sock_fields test into test_progs

2020-09-24 Thread Martin KaFai Lau
This is a mechanical change to 1. move test_sock_fields.c to prog_tests/sock_fields.c 2. rename progs/test_sock_fields_kern.c to progs/test_sock_fields.c Minimal change is made to the code itself. Next patch will make changes to use new ways of writing test, e.g. use skel and global variables. S

[PATCH v4 bpf-next 13/13] bpf: selftest: Add test_btf_skc_cls_ingress

2020-09-24 Thread Martin KaFai Lau
This patch attaches a classifier prog to the ingress filter. It exercises the following helpers with different socket pointer types in different logical branches: 1. bpf_sk_release() 2. bpf_sk_assign() 3. bpf_skc_to_tcp_request_sock(), bpf_skc_to_tcp_sock() 4. bpf_tcp_gen_syncookie, bpf_tcp_check_s

[PATCH v4 bpf-next 06/13] bpf: Change bpf_sk_assign to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON

2020-09-24 Thread Martin KaFai Lau
This patch changes the bpf_sk_assign() to take ARG_PTR_TO_BTF_ID_SOCK_COMMON such that they will work with the pointer returned by the bpf_skc_to_*() helpers also. The bpf_sk_lookup_assign() is taking ARG_PTR_TO_SOCKET_"OR_NULL". Meaning it specifically takes a literal NULL. ARG_PTR_TO_BTF_ID_SO

[PATCH v4 bpf-next 11/13] bpf: selftest: Use bpf_skc_to_tcp_sock() in the sock_fields test

2020-09-24 Thread Martin KaFai Lau
This test uses bpf_skc_to_tcp_sock() to get a kernel tcp_sock ptr "ktp". Access the ktp->lsndtime and also pass ktp to bpf_sk_storage_get(). It also exercises the bpf_sk_cgroup_id() and bpf_sk_ancestor_cgroup_id() with the "ktp". To do that, a parent cgroup and a child cgroup are created. The bp

[PATCH v4 bpf-next 05/13] bpf: Change bpf_tcp_*_syncookie to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON

2020-09-24 Thread Martin KaFai Lau
This patch changes the bpf_tcp_*_syncookie() to take ARG_PTR_TO_BTF_ID_SOCK_COMMON such that they will work with the pointer returned by the bpf_skc_to_*() helpers also. Acked-by: Lorenz Bauer Signed-off-by: Martin KaFai Lau --- include/uapi/linux/bpf.h | 4 ++-- net/core/filter.c

[PATCH v4 bpf-next 10/13] bpf: selftest: Use network_helpers in the sock_fields test

2020-09-24 Thread Martin KaFai Lau
This patch uses start_server() and connect_to_fd() from network_helpers.h to remove the network testing boiler plate codes. epoll is no longer needed also since the timeout has already been taken care of also. Signed-off-by: Martin KaFai Lau --- .../selftests/bpf/prog_tests/sock_fields.c| 8

[PATCH v4 bpf-next 12/13] bpf: selftest: Remove enum tcp_ca_state from bpf_tcp_helpers.h

2020-09-24 Thread Martin KaFai Lau
The enum tcp_ca_state is available in . Remove it from the bpf_tcp_helpers.h to avoid conflict when the bpf prog needs to include both both and bpf_tcp_helpers.h. Modify the bpf_cubic.c and bpf_dctcp.c to use instead. The is needed by . Signed-off-by: Martin KaFai Lau --- tools/testing/selft

[PATCH v4 bpf-next 09/13] bpf: selftest: Adapt sock_fields test to use skel and global variables

2020-09-24 Thread Martin KaFai Lau
skel is used. Global variables are used to store the result from bpf prog. addr_map, sock_result_map, and tcp_sock_result_map are gone. Instead, global variables listen_tp, srv_sa6, cli_tp,, srv_tp, listen_sk, srv_sk, and cli_sk are added. Because of that, bpf_addr_array_idx and bpf_result_array_i

[PATCH v4 bpf-next 04/13] bpf: Change bpf_sk_storage_*() to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON

2020-09-24 Thread Martin KaFai Lau
This patch changes the bpf_sk_storage_*() to take ARG_PTR_TO_BTF_ID_SOCK_COMMON such that they will work with the pointer returned by the bpf_skc_to_*() helpers also. A micro benchmark has been done on a "cgroup_skb/egress" bpf program which does a bpf_sk_storage_get(). It was driven by netperf d

[PATCH v4 bpf-next 07/13] bpf: selftest: Add ref_tracking verifier test for bpf_skc casting

2020-09-24 Thread Martin KaFai Lau
The patch tests for: 1. bpf_sk_release() can be called on a tcp_sock btf_id ptr. 2. Ensure the tcp_sock btf_id pointer cannot be used after bpf_sk_release(). Signed-off-by: Martin KaFai Lau --- .../selftests/bpf/verifier/ref_tracking.c | 47 +++ 1 file changed, 47 inserti

[PATCH v4 bpf-next 02/13] bpf: Enable bpf_skc_to_* sock casting helper to networking prog type

2020-09-24 Thread Martin KaFai Lau
There is a constant need to add more fields into the bpf_tcp_sock for the bpf programs running at tc, sock_ops...etc. A current workaround could be to use bpf_probe_read_kernel(). However, other than making another helper call for reading each field and missing CO-RE, it is also not as intuitive

[PATCH v4 bpf-next 03/13] bpf: Change bpf_sk_release and bpf_sk_*cgroup_id to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON

2020-09-24 Thread Martin KaFai Lau
The previous patch allows the networking bpf prog to use the bpf_skc_to_*() helpers to get a PTR_TO_BTF_ID socket pointer, e.g. "struct tcp_sock *". It allows the bpf prog to read all the fields of the tcp_sock. This patch changes the bpf_sk_release() and bpf_sk_*cgroup_id() to take ARG_PTR_TO_BT

[PATCH v4 bpf-next 00/13] bpf: Enable bpf_skc_to_* sock casting helper to networking prog type

2020-09-24 Thread Martin KaFai Lau
This set allows networking prog type to directly read fields from the in-kernel socket type, e.g. "struct tcp_sock". Patch 2 has the details on the use case. v3: - Pass arg_btf_id instead of fn into check_reg_type() in Patch 1 (Lorenz) - Move arg_btf_id from func_proto to struct bpf_reg_types in

[PATCH v4 bpf-next 01/13] bpf: Move the PTR_TO_BTF_ID check to check_reg_type()

2020-09-24 Thread Martin KaFai Lau
check_reg_type() checks whether a reg can be used as an arg of a func_proto. For PTR_TO_BTF_ID, the check is actually not completely done until the reg->btf_id is pointing to a kernel struct that is acceptable by the func_proto. Thus, this patch moves the btf_id check into check_reg_type(). "arg_

Re: [PATCH net-next] net: vlan: Avoid using BUG() in vlan_proto_idx()

2020-09-24 Thread Florian Fainelli
On 9/24/2020 4:46 PM, Jakub Kicinski wrote: On Wed, 23 Sep 2020 21:16:27 -0700 Florian Fainelli wrote: While we should always make sure that we specify a valid VLAN protocol to vlan_proto_idx(), killing the machine when an invalid value is specified is too harsh and not helpful for debugging.

Re: [PATCH] net: usb: ax88179_178a: add Toshiba usb 3.0 adapter

2020-09-24 Thread Jakub Kicinski
On Thu, 24 Sep 2020 08:27:22 +0200 Wilken Gottwalt wrote: > Reposted and added netdev as suggested by Jakub Kicinski. Thanks! > --- If you want to add a comment like the above you need to place it under the '---' which git generates. Git removes everything after those lines. With the patch as po

Re: [PATCH net-next] net: vlan: Avoid using BUG() in vlan_proto_idx()

2020-09-24 Thread Jakub Kicinski
On Wed, 23 Sep 2020 21:16:27 -0700 Florian Fainelli wrote: > While we should always make sure that we specify a valid VLAN protocol > to vlan_proto_idx(), killing the machine when an invalid value is > specified is too harsh and not helpful for debugging. All callers are > capable of dealing with a

Re: [PATCH v2 4/4] PCI: Limit pci_alloc_irq_vectors as per housekeeping CPUs

2020-09-24 Thread Nitesh Narayan Lal
On 9/24/20 6:59 PM, Bjorn Helgaas wrote: > On Thu, Sep 24, 2020 at 05:39:07PM -0400, Nitesh Narayan Lal wrote: >> On 9/24/20 4:45 PM, Bjorn Helgaas wrote: >>> Possible subject: >>> >>> PCI: Limit pci_alloc_irq_vectors() to housekeeping CPUs >> Will switch to this. >> >>> On Wed, Sep 23, 2020 at

Re: [PATCH net-next v3 1/2] net: mscc: ocelot: Add support for tcam

2020-09-24 Thread Vladimir Oltean
Hi Horatiu, On Thu, Apr 23, 2020 at 10:29:48AM +0200, Horatiu Vultur wrote: > > > +static const struct vcap_props vcap_is2 = { > > > + .name = "IS2", > > > + .tg_width = 2, > > > + .sw_count = 4, > > > + .entry_count = VCAP_IS2_CNT, > > > + .entry_words = BITS_TO_32BI

[PATCH net-next] net: tcp: drop unused function argument from mptcp_incoming_options

2020-09-24 Thread Florian Westphal
Since commit cfde141ea3faa30e ("mptcp: move option parsing into mptcp_incoming_options()"), the 3rd function argument is no longer used. Signed-off-by: Florian Westphal --- include/net/mptcp.h | 6 ++ net/ipv4/tcp_input.c | 4 ++-- net/mptcp/options.c | 3 +-- 3 files changed, 5 insertions

Re: [PATCH bpf-next v8 11/11] selftests: Remove fmod_ret from benchmarks and test_overhead

2020-09-24 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > On Wed, Sep 23, 2020 at 6:08 PM Alexei Starovoitov > wrote: >> >> On Tue, Sep 22, 2020 at 08:38:45PM +0200, Toke Høiland-Jørgensen wrote: >> > -const struct bench bench_trig_fmodret = { >> > - .name = "trig-fmodret", >> > - .validate = trigger_validate, >> > -

Re: [PATCH bpf-next v8 04/11] bpf: move prog->aux->linked_prog and trampoline into bpf_link on attach

2020-09-24 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: >> [root@(none) bpf]# ./test_progs -t map_in_map >> test_lookup_update:PASS:skel_open 0 nsec >> test_lookup_update:PASS:skel_attach 0 nsec >> test_lookup_update:PASS:inner1 0 nsec >> test_lookup_update:PASS:inner2 0 nsec >> test_lookup_update:PASS:inner1 0 nsec >> test_loo

Re: [PATCH net-next v3 1/4] gve: Add support for raw addressing device option

2020-09-24 Thread Jakub Kicinski
On Wed, 23 Sep 2020 18:01:01 -0700 David Awogbemila wrote: > @@ -518,6 +521,49 @@ int gve_adminq_describe_device(struct gve_priv *priv) > priv->rx_desc_cnt = priv->rx_pages_per_qpl; > } > priv->default_num_queues = be16_to_cpu(descriptor->default_num_queues); > + dev_o

[PATCH v5 bpf-next 3/3] selftests/bpf: add raw_tp_test_run

2020-09-24 Thread Song Liu
This test runs test_run for raw_tracepoint program. The test covers ctx input, retval output, and running on correct cpu. Signed-off-by: Song Liu --- .../bpf/prog_tests/raw_tp_test_run.c | 98 +++ .../bpf/progs/test_raw_tp_test_run.c | 24 + 2 files changed,

[PATCH v5 bpf-next 1/3] bpf: enable BPF_PROG_TEST_RUN for raw_tracepoint

2020-09-24 Thread Song Liu
Add .test_run for raw_tracepoint. Also, introduce a new feature that runs the target program on a specific CPU. This is achieved by a new flag in bpf_attr.test, BPF_F_TEST_RUN_ON_CPU. When this flag is set, the program is triggered on cpu with id bpf_attr.test.cpu. This feature is needed for BPF pr

[PATCH v5 bpf-next 2/3] libbpf: support test run of raw tracepoint programs

2020-09-24 Thread Song Liu
Add bpf_prog_test_run_opts() with support of new fields in bpf_attr.test, namely, flags and cpu. Also extend _opts operations to support outputs via opts. Signed-off-by: Song Liu --- tools/lib/bpf/bpf.c | 31 +++ tools/lib/bpf/bpf.h | 26 ++

[PATCH v5 bpf-next 0/3] enable BPF_PROG_TEST_RUN for raw_tp

2020-09-24 Thread Song Liu
This set enables BPF_PROG_TEST_RUN for raw_tracepoint type programs. This set also enables running the raw_tp program on a specific CPU. This feature can be used by user space to trigger programs that access percpu resources, e.g. perf_event, percpu variables. Changes v4 => v5: 1.Fail test_run wit

Re: [PATCH net-next v3 3/4] gve: Rx Buffer Recycling

2020-09-24 Thread Jakub Kicinski
On Wed, 23 Sep 2020 18:01:03 -0700 David Awogbemila wrote: > This patch lets the driver reuse buffers that have been freed by the > networking stack. > > In the raw addressing case, this allows the driver avoid allocating new > buffers. > In the qpl case, the driver can avoid copies. > > Signed-o

Re: [PATCH v2 4/4] PCI: Limit pci_alloc_irq_vectors as per housekeeping CPUs

2020-09-24 Thread Bjorn Helgaas
On Thu, Sep 24, 2020 at 05:39:07PM -0400, Nitesh Narayan Lal wrote: > > On 9/24/20 4:45 PM, Bjorn Helgaas wrote: > > Possible subject: > > > > PCI: Limit pci_alloc_irq_vectors() to housekeeping CPUs > > Will switch to this. > > > On Wed, Sep 23, 2020 at 02:11:26PM -0400, Nitesh Narayan Lal wro

Re: [PATCH net-next v3 4/4] gve: Add support for raw addressing in the tx path

2020-09-24 Thread Jakub Kicinski
On Wed, 23 Sep 2020 18:01:04 -0700 David Awogbemila wrote: > + info->skb = skb; double space > + addr = dma_map_single(tx->dev, skb->data, len, DMA_TO_DEVICE); > + if (unlikely(dma_mapping_error(tx->dev, addr))) { > + priv->dma_mapping_error++; > + goto drop;

Re: [PATCH net-next 4/5] bonding: make Kconfig toggle to disable legacy interfaces

2020-09-24 Thread Jay Vosburgh
Jarod Wilson wrote: >On Tue, Sep 22, 2020 at 8:01 PM Stephen Hemminger > wrote: >> >> On Tue, 22 Sep 2020 16:47:07 -0700 >> Jay Vosburgh wrote: >> >> > Stephen Hemminger wrote: >> > >> > >On Tue, 22 Sep 2020 09:37:30 -0400 >> > >Jarod Wilson wrote: >> > > >> > >> By default, enable retaining a

Re: [PATCH bpf-next v8 04/11] bpf: move prog->aux->linked_prog and trampoline into bpf_link on attach

2020-09-24 Thread Andrii Nakryiko
On Thu, Sep 24, 2020 at 3:20 PM Toke Høiland-Jørgensen wrote: > > Andrii Nakryiko writes: > > > On Thu, Sep 24, 2020 at 2:24 PM Toke Høiland-Jørgensen > > wrote: > >> > >> Andrii Nakryiko writes: > >> > >> > On Thu, Sep 24, 2020 at 7:36 AM Toke Høiland-Jørgensen > >> > wrote: > >> >> > >> >>

Re: [Intel-wired-lan] [PATCH net-next v1 4/7] selftests: net: add a test for shared UDP tunnel info tables

2020-09-24 Thread Jakub Kicinski
On Thu, 24 Sep 2020 22:25:46 + Nguyen, Anthony L wrote: > On Mon, 2020-09-21 at 14:44 -0700, Jakub Kicinski wrote: > > Ah, good catch, thanks! Please adjust in your tree or I can send a > > follow up with other patches I still have queued. > > Hi Jakub, > > It'd be great if you could adjust

Re: [PATCH bpf-next v5] bpf: Add bpf_ktime_get_real_ns

2020-09-24 Thread Daniel Borkmann
On 9/25/20 12:15 AM, David Ahern wrote: On 9/24/20 4:07 PM, bimmy.puj...@intel.com wrote: diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index a22812561064..198e69a6508d 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -3586,6 +3586,13 @@ union bpf_attr {

Re: [Intel-wired-lan] [PATCH net-next v1 4/7] selftests: net: add a test for shared UDP tunnel info tables

2020-09-24 Thread Nguyen, Anthony L
On Mon, 2020-09-21 at 14:44 -0700, Jakub Kicinski wrote: > On Sat, 19 Sep 2020 07:23:58 + Brown, Aaron F wrote: > > > From: Intel-wired-lan On > > > Behalf Of Jakub > > > Kicinski > > > Sent: Tuesday, July 21, 2020 6:27 PM > > > To: da...@davemloft.net > > > Cc: netdev@vger.kernel.org; intel-w

  1   2   3   >