[PATCH 1/1] tools/lib/libbpf.c: fix string format to allow build on arm32

2018-05-21 Thread Sirio Balmelli
On arm32, 'cd tools/testing/selftests/bpf && make' fails with: libbpf.c:80:10: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int64_t {aka long long int}’ [-Werror=format=] (func)("libbpf: " fmt, ##__VA_ARGS__); \ ^ libbpf.c:83:30: note: in expansio

[PATCH 1/1] selftests/bpf: Makefile fix "missing" headers on build with -idirafter

2018-05-21 Thread Sirio Balmelli
Selftests fail to build on several distros/architectures because of missing headers files. On a Ubuntu/x86_64 some missing headers are: asm/byteorder.h, asm/socket.h, asm/sockios.h On a Debian/arm32 build already fails at sys/cdefs.h In both cases, these already exist in /usr/inc

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-21 Thread Xin Long
On Mon, May 21, 2018 at 9:54 AM, Marcelo Ricardo Leitner wrote: > On Sun, May 20, 2018 at 08:50:59PM -0400, Neil Horman wrote: >> On Sat, May 19, 2018 at 03:44:40PM +0800, Xin Long wrote: >> > This feature is actually already supported by sk->sk_reuse which can be >> > set by SO_REUSEADDR. But it'

[PATCH] bpf: check NULL for sk_to_full_sk()

2018-05-21 Thread YueHaibing
like commit df39a9f106d5 ("bpf: check NULL for sk_to_full_sk() return value"), we should check sk_to_full_sk return value against NULL. Signed-off-by: YueHaibing --- include/linux/bpf-cgroup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bpf-cgroup.h b/includ

[PATCH V3 7/8] ARM: dts: stm32: add support of ethernet on stm32mp157c-ev1

2018-05-21 Thread Christophe Roullier
MAC is connected to a PHY in RGMII mode. Signed-off-by: Christophe Roullier --- arch/arm/boot/dts/stm32mp157c-ev1.dts | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157c-ev1.dts b/arch/arm/boot/dts/stm32mp157c-ev1.dts index 57e6dbc..a7fee5c 10

[PATCH V3 6/8] net: stmmac: add dwmac-4.20a compatible

2018-05-21 Thread Christophe Roullier
Manage dwmac-4.20a version from synopsys Signed-off-by: Christophe Roullier --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac

[PATCH V3 8/8] dt-bindings: stm32: add compatible for syscon

2018-05-21 Thread Christophe Roullier
This patch describes syscon DT bindings. Signed-off-by: Christophe Roullier --- Documentation/devicetree/bindings/arm/stm32.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/stm32.txt b/Documentation/devicetree/bindings/arm/stm32.txt index 6808ed

[PATCH V3 3/8] ARM: dts: stm32: add ethernet pins to stm32mp157c

2018-05-21 Thread Christophe Roullier
Add ethernet pins on stm32mp157c. Signed-off-by: Christophe Roullier --- arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 46 +++ 1 file changed, 46 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi index 6f0

[PATCH V3 5/8] ARM: dts: stm32: Add ethernet dwmac on stm32mp1

2018-05-21 Thread Christophe Roullier
Add Ethernet support (Synopsys MAC IP 4.20a) on stm32mp1 SOC. Enable feature supported by the stmmac driver, such as TSO. Signed-off-by: Christophe Roullier --- arch/arm/boot/dts/stm32mp157c.dtsi | 30 ++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/boot/dt

[PATCH V3 1/8] net: ethernet: stmmac: add adaptation for stm32mp157c.

2018-05-21 Thread Christophe Roullier
Glue codes to support stm32mp157c device and stay compatible with stm32 mcu family Signed-off-by: Christophe Roullier --- drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 270 -- 1 file changed, 255 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/stmicro/

[PATCH V3 4/8] ARM: dts: stm32: Add syscfg on stm32mp1

2018-05-21 Thread Christophe Roullier
System configuration controller is mainly used to manage the compensation cell and other IOs and system related settings. Signed-off-by: Christophe Roullier --- arch/arm/boot/dts/stm32mp157c.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/

[PATCH V3 0/8] net: ethernet: stmmac: add support for stm32mp1

2018-05-21 Thread Christophe Roullier
Patches to have Ethernet support on stm32mp1 Changelog: Remark from Rob Herring In Documentation/devicetree/bindings/arm/stm32.txt: In arch/arm/boot/dts/stm32mp157c.dtsi: Add "st,stm32mp157-syscfg" compatible Christophe Roullier (8): net: ethernet: stmmac: add adaptation for stm32mp157c. dt-bi

[PATCH V3 2/8] dt-bindings: stm32-dwmac: add support of MPU families

2018-05-21 Thread Christophe Roullier
Add description for Ethernet MPU families fields Signed-off-by: Christophe Roullier Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/net/stm32-dwmac.txt | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/st

[PATCH net 4/4] virito-net: fix leaking page for gso packet during mergeable XDP

2018-05-21 Thread Jason Wang
We need to drop refcnt to xdp_page if we see a gso packet. Otherwise it will be leaked. Fixing this by moving the check of gso packet above the linearizing logic. Cc: John Fastabend Fixes: 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers") Signed-off-by: Jason Wang -

[PATCH net 1/4] virtio-net: correctly redirect linearized packet

2018-05-21 Thread Jason Wang
After a linearized packet was redirected by XDP, we should not go for the err path which will try to pop buffers for the next packet and increase the drop counter. Fixing this by just drop the page refcnt for the original page. Fixes: 186b3c998c50 ("virtio-net: support XDP_REDIRECT") Reported-by:

[PATCH net 2/4] virtio-net: correctly transmit XDP buff after linearizing

2018-05-21 Thread Jason Wang
We should not go for the error path after successfully transmitting a XDP buffer after linearizing. Since the error path may try to pop and drop next packet and increase the drop counters. Fixing this by simply drop the refcnt of original page and go for xmit path. Fixes: 72979a6c3590 ("virtio_net

[PATCH net 0/4] Fix several issues of virtio-net mergeable XDP

2018-05-21 Thread Jason Wang
Hi: Please review the patches that tries to fix sevreal issues of virtio-net mergeable XDP. Thanks Jason Wang (4): virtio-net: correctly redirect linearized packet virtio-net: correctly transmit XDP buff after linearizing virtio-net: reset num_buf to 1 after linearizing packet virito-net

[PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet

2018-05-21 Thread Jason Wang
If we successfully linearize the packets, num_buf were set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path of receive_mergeable(). Zero num_buf will lead the code try to pop the buffers of next packet and drop it. Fixing this by set num_buf to 1 if we su

[RFC PATCH net-next 11/12] vhost_net: passing raw xdp buff to tun

2018-05-21 Thread Jason Wang
This patches implement a TUN specific msg_control: #define TUN_MSG_UBUF 1 #define TUN_MSG_PTR 2 struct tun_msg_ctl { int type; void *ptr; }; The first supported type is ubuf which is already used by vhost_net zerocopy code. The second is XDP buff, which allows vhost_net to pass XDP

[RFC PATCH net-next 10/12] vhost_net: build xdp buff

2018-05-21 Thread Jason Wang
This patch implement build XDP buffers in vhost_net. The idea is do userspace copy in vhost_net and build XDP buff based on the page. Vhost_net can then submit one or an array of XDP buffs to underlayer socket (e.g TUN). TUN can choose to do XDP or call build_skb() to build skb. To support build sk

[RFC PATCH net-next 12/12] vhost_net: batch submitting XDP buffers to underlayer sockets

2018-05-21 Thread Jason Wang
This patch implements XDP batching for vhost_net with tun. This is done by batching XDP buffs in vhost and submit them when: - vhost_net can not build XDP buff (mostly because of the size of packet) - #batched exceeds the limitation (VHOST_NET_RX_BATCH). - tun accept a batch of XDP buff through ms

[RFC PATCH net-next 08/12] tuntap: tweak on the path of non-xdp case in tun_build_skb()

2018-05-21 Thread Jason Wang
If we're sure not to go native XDP, there's no need for several things like touching preemption counter and rcu stuffs. Signed-off-by: Jason Wang --- drivers/net/tun.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index f6e0f96

[RFC PATCH net-next 09/12] tuntap: split out XDP logic

2018-05-21 Thread Jason Wang
This patch split out XDP logic into a single function. This make it to be reused by XDP batching path in the following patch. Signed-off-by: Jason Wang --- drivers/net/tun.c | 85 +-- 1 file changed, 51 insertions(+), 34 deletions(-) diff --gi

[RFC PATCH net-next 07/12] tuntap: simplify error handling in tun_build_skb()

2018-05-21 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/net/tun.c | 36 ++-- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 24ecd82..f6e0f96 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1612,7 +1612,7 @@ stat

[RFC PATCH net-next 06/12] tuntap: enable premmption early

2018-05-21 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/net/tun.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 44d4f3d..24ecd82 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1697,6 +1697,8 @@ static struct sk_buff *tun_build_skb(s

[RFC PATCH net-next 05/12] vhost_net: batch update used ring for datacopy TX

2018-05-21 Thread Jason Wang
Like commit e2b3b35eb989 ("vhost_net: batch used ring update in rx"), this patches implements batch used ring update for datacopy TX (zerocopy has already done some kind of batching). Testpmd transmission from guest to ixgbe via XDP_REDIRECT shows about 15% improvement from 2.8Mpps to 3.2Mpps. Si

[RFC PATCH net-next 02/12] vhost_net: introduce vhost_exceeds_weight()

2018-05-21 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vhost/net.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 15d191a..de544ee 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -479,6 +479,12 @@ static size_t init_i

[RFC PATCH net-next 04/12] vhost_net: split out datacopy logic

2018-05-21 Thread Jason Wang
Instead of mixing zerocopy and datacopy logics, this patch tries to split datacopy logic out. This results for a more compact code and specific optimization could be done on top more easily. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 111 +++--

[RFC PATCH net-next 03/12] vhost_net: introduce vhost_has_more_pkts()

2018-05-21 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vhost/net.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index de544ee..4ebac76 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -485,6 +485,13 @@ static bool vhost_exc

[RFC PATCH net-next 01/12] vhost_net: introduce helper to initialize tx iov iter

2018-05-21 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vhost/net.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index c4b49fc..15d191a 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -459,6 +459,26

[RFC PATCH net-next 00/12] XDP batching for TUN/vhost_net

2018-05-21 Thread Jason Wang
Hi all: We do not support XDP batching for TUN since it can only receive one packet a time from vhost_net. This series tries to remove this limitation by: - introduce a TUN specific msg_control that can hold a pointer to an array of XDP buffs - try copy and build XDP buff in vhost_net - store X

[PATCH net-next] cxgb4/cxgb4vf: link management changes for new SFP

2018-05-21 Thread Ganesh Goudar
newer SFPs like SFP28 and QSFP28 Transceiver Modules present several new possibilities which we haven't faced before. Fix the assumptions in the code reflecting the more limited capabilities of previous Transceiver Module systems Original work by Casey Leedom Signed-off-by: Ganesh Goudar --- d

[PATCH net-next] cxgb4: do L1 config when module is inserted

2018-05-21 Thread Ganesh Goudar
trigger an L1 configure operation when a transceiver module is inserted in order to cause current "sticky" options like Requested Forward Error Correction to be reapplied. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 26 +

[PATCH net-next 0/8] qed*: Add support for management firmware TLV request.

2018-05-21 Thread Sudarsana Reddy Kalluru
From: Sudarsana Reddy Kalluru Management firmware (MFW) requires config and state information from the driver. It queries this via TLV (type-length-value) request wherein mfw specificies the list of required TLVs. Driver fills the TLV data and responds back to MFW. This patch series adds qed/qede

[PATCH net-next 4/8] qede: Add support for populating ethernet TLVs.

2018-05-21 Thread Sudarsana Reddy Kalluru
This patch adds callbacks for providing the ethernet protocol driver TLVs. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qede/qede_main.c | 101 +++ 1 file changed, 101 insertions(+) diff --git a/drivers/net/ethernet/q

[PATCH net-next 1/8] qed: Add MFW interfaces for TLV request support.

2018-05-21 Thread Sudarsana Reddy Kalluru
The patch adds required management firmware (MFW) interfaces such as mailbox commands, TLV types etc. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 231 ++ 1 file changed, 231 insertions(+) diff --g

[PATCH net-next 2/8] qed: Add support for tlv request processing.

2018-05-21 Thread Sudarsana Reddy Kalluru
The patch adds driver support for processing TLV requests/repsonses from the mfw and upper driver layers respectively. The implementation reads the requested TLVs from the shared memory, requests the values from upper layer drivers, populates this info (TLVs) shared memory and notifies MFW about th

[PATCH net-next 3/8] qed: Add driver infrastucture for handling mfw requests.

2018-05-21 Thread Sudarsana Reddy Kalluru
MFW requests the TLVs in interrupt context. Extracting of the required data from upper layers and populating of the TLVs require process context. The patch adds work-queues for processing the tlv requests. It also adds the implementation for requesting the tlv values from appropriate protocol drive

[PATCH net-next 7/8] qedi: Add support for populating ethernet TLVs.

2018-05-21 Thread Sudarsana Reddy Kalluru
From: Manish Rangankar This patch adds callbacks for providing the ethernet protocol driver TLVs. Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi.h | 3 + drivers/scsi/qedi/qedi_iscsi.h | 6 ++ drivers/scsi/qedi/qedi_main.c | 182 +

[PATCH net-next 6/8] qedf: Add get_generic_tlv_data handler.

2018-05-21 Thread Sudarsana Reddy Kalluru
From: Chad Dupuis Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf.h | 1 + drivers/scsi/qedf/qedf_main.c | 17 + 2 files changed, 18 insertions(+) diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h index 0cb0490..cabb6af 100644 --- a/drivers/scsi/qedf/

[PATCH net-next 5/8] qedf: Add support for populating ethernet TLVs.

2018-05-21 Thread Sudarsana Reddy Kalluru
From: Chad Dupuis This patch adds callbacks for providing the ethernet protocol driver TLVs. Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf.h | 6 +++ drivers/scsi/qedf/qedf_debugfs.c | 1 - drivers/scsi/qedf/qedf_io.c | 11 + drivers/scsi/qedf/qedf_main.c| 87 +++

[PATCH net-next 8/8] qedi: Add get_generic_tlv_data handler.

2018-05-21 Thread Sudarsana Reddy Kalluru
From: Manish Rangankar Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_main.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index d2045a5..32ee7f6 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/dr

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-21 Thread Neil Horman
On Sun, May 20, 2018 at 10:54:04PM -0300, Marcelo Ricardo Leitner wrote: > On Sun, May 20, 2018 at 08:50:59PM -0400, Neil Horman wrote: > > On Sat, May 19, 2018 at 03:44:40PM +0800, Xin Long wrote: > > > This feature is actually already supported by sk->sk_reuse which can be > > > set by SO_REUSEAD

Re: [PATCH net] sctp: fix the issue that flags are ignored when using kernel_connect

2018-05-21 Thread Neil Horman
On Sun, May 20, 2018 at 04:39:10PM +0800, Xin Long wrote: > Now sctp uses inet_dgram_connect as its proto_ops .connect, and the flags > param can't be passed into its proto .connect where this flags is really > needed. > > sctp works around it by getting flags from socket file in __sctp_connect. >

Re: [PATCH net-next] net: phy: phylink: Don't release NULL GPIO

2018-05-21 Thread Andrew Lunn
On Sun, May 20, 2018 at 08:49:47PM -0700, Florian Fainelli wrote: > If CONFIG_GPIOLIB is disabled, gpiod_put() becomes a stub that produces a > warning, this helped identify that we could be attempting to release a NULL > pl->link_gpio GPIO descriptor, so guard against that. > > Fixes: daab3349ad1

Re: [PATCH net-next] net: ethernet: Sort Kconfig sourcing alphabetically

2018-05-21 Thread Andrew Lunn
On Sun, May 20, 2018 at 08:58:28PM -0700, Florian Fainelli wrote: > A number of entries were not alphabetically sorted, remedy that. > > Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Hi Florian The Makefile could do with the same treatment. Andrew

[PATCH 06/33] hp100: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Jaroslav Kysela Cc: netdev@vger.kernel.org Signed-off-by: Yisheng Xie --- drivers/net/ethernet/hp/hp100.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff -

[PATCH 05/33] cxgb4: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Ganesh Goudar Cc: netdev@vger.kernel.org Signed-off-by: Yisheng Xie --- drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 14 -- 1 file changed, 4 insertions(+), 10

[PATCH 07/33] iwlwifi: mvm: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Kalle Valo Cc: Intel Linux Wireless Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: linux-wirel...@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Yisheng Xie --- dri

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-21 Thread Michael Tuexen
> On 21. May 2018, at 13:39, Neil Horman wrote: > > On Sun, May 20, 2018 at 10:54:04PM -0300, Marcelo Ricardo Leitner wrote: >> On Sun, May 20, 2018 at 08:50:59PM -0400, Neil Horman wrote: >>> On Sat, May 19, 2018 at 03:44:40PM +0800, Xin Long wrote: This feature is actually already supporte

Re: [RFC V4 PATCH 0/8] Packed ring layout for vhost

2018-05-21 Thread Wei Xu
On Mon, May 21, 2018 at 10:33:30AM +0800, Jason Wang wrote: > > > On 2018年05月21日 00:25, Wei Xu wrote: > >On Wed, May 16, 2018 at 08:32:13PM +0800, Jason Wang wrote: > >>Hi all: > >> > >>This RFC implement packed ring layout. The code were tested with > >>Tiwei's RFC V3 ahttps://lkml.org/lkml/2018

[PATCH 0/3] bpf: add boot parameters for sysctl knobs

2018-05-21 Thread Eugene Syromiatnikov
Hello. This patch set adds ability to set default values for kernel.unprivileged_bpf_disable, net.core.bpf_jit_harden, net.core.bpf_jit_kallsyms sysctl knobs as well as option to override them via a boot-time kernel parameter. Eugene Syromiatnikov (3): bpf: add ability to configure unprivileged

[PATCH 1/3] bpf: add ability to configure unprivileged BPF via boot-time parameter

2018-05-21 Thread Eugene Syromiatnikov
This patch introduces two configuration options, UNPRIVILEGED_BPF_BOOTPARAM and UNPRIVILEGED_BPF_BOOTPARAM_VALUE, that allow configuring the initial value of kernel.unprivileged_bpf_disabled sysctl knob, which is useful for the cases when disabling unprivileged bpf() access during the early boot is

[PATCH 2/3] bpf: add ability to configure BPF JIT hardening via boot-time parameter

2018-05-21 Thread Eugene Syromiatnikov
This patch introduces two configuration options, BPF_JIT_HARDEN_BOOTPARAM and BPF_JIT_HARDEN_BOOTPARAM_VALUE, that allow configuring the initial value of net.core.bpf_jit_harden sysctl knob, which is useful for enforcing JIT hardening during the early boot. Signed-off-by: Eugene Syromiatnikov ---

[PATCH 3/3] bpf: add ability to configure BPF JIT kallsyms export at the boot time

2018-05-21 Thread Eugene Syromiatnikov
This patch introduces two configuration options, BPF_JIT_KALLSYMS_BOOTPARAM and BPF_JIT_KALLSYMS_BOOTPARAM_VALUE, that allow configuring the initial value of net.core.bpf_jit_kallsyms sysctl knob. This enables export of addresses of JIT'ed BPF programs that created during the early boot. Signed-of

[RFC feedback] AF_XDP and non-Intel hardware

2018-05-21 Thread Mykyta Iziumtsev
Hi Björn and Magnus, (This thread is a follow up to private dialogue. The intention is to let community know that AF_XDP can be enhanced further to make it compatible with wider range of NIC vendors). There are two NIC variations which don't fit well with current AF_XDP proposal. The first varia

RE: [PATCH net-next] tipc: eliminate complaint of KMSAN uninit-value in tipc_conn_rcv_sub

2018-05-21 Thread Jon Maloy
> -Original Message- > From: netdev-ow...@vger.kernel.org > On Behalf Of David Miller > Sent: Saturday, May 19, 2018 23:00 > To: ying@windriver.com > Cc: netdev@vger.kernel.org; Jon Maloy ; > syzkaller-b...@googlegroups.com; tipc-discuss...@lists.sourceforge.net > Subject: Re: [PATCH

RE: [PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-21 Thread Jon Rosen (jrosen)
On Sunday, May 20, 2018 7:22 PM, Willem de Bruijn wrote: > On Sun, May 20, 2018 at 6:51 PM, Willem de Bruijn > wrote: >> On Sat, May 19, 2018 at 8:07 AM, Jon Rosen wrote: >>> Fix PACKET_RX_RING bug for versions TPACKET_V1 and TPACKET_V2 which >>> casues the ring to get corrupted by allowing mult

[PATCH net-next 0/7] Add support for QCA8334 switch

2018-05-21 Thread Michal Vokáč
This series basically adds support for a QCA8334 ethernet switch to the qca8k driver. It is a four-port variant of the already supported seven port QCA8337. Register map is the same for the whole familly and all chips have the same device ID. Major part of this series enhances the CPU port setting

[PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting

2018-05-21 Thread Michal Vokáč
Implement adjust_link function that allows to overwrite default CPU port setting using fixed-link device tree subnode. Signed-off-by: Michal Vokáč --- drivers/net/dsa/qca8k.c | 43 +++ drivers/net/dsa/qca8k.h | 1 + 2 files changed, 44 insertions(+) diff

[PATCH net-next 2/7] net: dsa: qca8k: Add support for QCA8334 switch

2018-05-21 Thread Michal Vokáč
Signed-off-by: Michal Vokáč --- drivers/net/dsa/qca8k.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index 3684e56..6a3ffb2 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -1010,6 +1010,7 @@ static SIMPLE_DEV_PM_OPS(qc

[PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses

2018-05-21 Thread Michal Vokáč
Fix warning reported by checkpatch. Signed-off-by: Michal Vokáč --- drivers/net/dsa/qca8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index c834893..c0da402 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8

[PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation

2018-05-21 Thread Michal Vokáč
Signed-off-by: Michal Vokáč --- Documentation/devicetree/bindings/net/dsa/qca8k.txt | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.txt b/Documentation/devicetree/bindings/net/dsa/qca8k.txt index 9c67ee4..3d73cd0 100644 ---

[PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth

2018-05-21 Thread Michal Vokáč
By default autonegotiation is enabled to configure MAC on all ports. For the CPU port autonegotiation can not be used so we need to set some sensible defaults manually. This patch forces the default setting of the CPU port to 1000Mbps/full duplex which is the chip maximum capability. Also correct

[PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX

2018-05-21 Thread Michal Vokáč
Signed-off-by: Michal Vokáč --- drivers/net/dsa/qca8k.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index 7eba987..c834893 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -1,17 +1,9 @@ +// SP

[PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port

2018-05-21 Thread Michal Vokáč
When a port is brought up/down do not enable/disable only the TXMAC but the RXMAC as well. This is essential for the CPU port to work. Signed-off-by: Michal Vokáč --- drivers/net/dsa/qca8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca8k.c b/drivers/net

[PATCH net-next] vmcore: move get_vmcore_size out of __init

2018-05-21 Thread Rahul Lakkireddy
Fix below build warning: WARNING: vmlinux.o(.text+0x422bb8): Section mismatch in reference from the function vmcore_add_device_dump() to the function .init.text:get_vmcore_size.constprop.5() The function vmcore_add_device_dump() references the function __init get_vmcore_size.constprop.5(). This i

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-21 Thread Neil Horman
On Mon, May 21, 2018 at 02:16:56PM +0200, Michael Tuexen wrote: > > On 21. May 2018, at 13:39, Neil Horman wrote: > > > > On Sun, May 20, 2018 at 10:54:04PM -0300, Marcelo Ricardo Leitner wrote: > >> On Sun, May 20, 2018 at 08:50:59PM -0400, Neil Horman wrote: > >>> On Sat, May 19, 2018 at 03:44:

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-21 Thread Alban Crequy
On Mon, May 14, 2018 at 9:38 PM, Y Song wrote: > > On Sun, May 13, 2018 at 10:33 AM, Alban Crequy wrote: > > From: Alban Crequy > > > > bpf_get_current_cgroup_ino() allows BPF trace programs to get the inode > > of the cgroup where the current process resides. > > > > My use case is to get stati

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-21 Thread Michael Tuexen
> On 21. May 2018, at 15:48, Neil Horman wrote: > > On Mon, May 21, 2018 at 02:16:56PM +0200, Michael Tuexen wrote: >>> On 21. May 2018, at 13:39, Neil Horman wrote: >>> >>> On Sun, May 20, 2018 at 10:54:04PM -0300, Marcelo Ricardo Leitner wrote: On Sun, May 20, 2018 at 08:50:59PM -0400, N

Re: [RFC PATCH net-next 06/12] tuntap: enable premmption early

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 05:04:27PM +0800, Jason Wang wrote: > Signed-off-by: Jason Wang typo in subject > --- > drivers/net/tun.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 44d4f3d..24ecd82 100644 > --- a/drivers/

Re: [RFC PATCH net-next 12/12] vhost_net: batch submitting XDP buffers to underlayer sockets

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 05:04:33PM +0800, Jason Wang wrote: > This patch implements XDP batching for vhost_net with tun. This is > done by batching XDP buffs in vhost and submit them when: > > - vhost_net can not build XDP buff (mostly because of the size of packet) > - #batched exceeds the limita

Re: [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation

2018-05-21 Thread Andrew Lunn
On Mon, May 21, 2018 at 03:28:07PM +0200, Michal Vokáč wrote: Hi Michal It is normal to have some commit message, even if it is the subject said differently. Andrew > Signed-off-by: Michal Vokáč > --- > Documentation/devicetree/bindings/net/dsa/qca8k.txt | 5 - > 1 file changed, 4 in

Re: [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port

2018-05-21 Thread Andrew Lunn
On Mon, May 21, 2018 at 03:28:09PM +0200, Michal Vokáč wrote: > When a port is brought up/down do not enable/disable only the TXMAC > but the RXMAC as well. This is essential for the CPU port to work. > > Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth

2018-05-21 Thread Andrew Lunn
On Mon, May 21, 2018 at 03:28:10PM +0200, Michal Vokáč wrote: > By default autonegotiation is enabled to configure MAC on all ports. > For the CPU port autonegotiation can not be used so we need to set > some sensible defaults manually. > > This patch forces the default setting of the CPU port to

Re: KASAN: use-after-free Read in vhost_chr_write_iter

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 10:38:10AM +0800, Jason Wang wrote: > > > On 2018年05月18日 17:24, Jason Wang wrote: > > > > > > On 2018年05月17日 21:45, DaeRyong Jeong wrote: > > > We report the crash: KASAN: use-after-free Read in vhost_chr_write_iter > > > > > > This crash has been found in v4.17-rc1 usi

Re: [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting

2018-05-21 Thread Andrew Lunn
On Mon, May 21, 2018 at 03:28:11PM +0200, Michal Vokáč wrote: > Implement adjust_link function that allows to overwrite default CPU port > setting using fixed-link device tree subnode. > > Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation

2018-05-21 Thread Andrew Lunn
On Mon, May 21, 2018 at 03:28:07PM +0200, Michal Vokáč wrote: > Signed-off-by: Michal Vokáč Hi Michal It would be good to document that fixed-link can be used. Andrew

Re: [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX

2018-05-21 Thread Andrew Lunn
On Mon, May 21, 2018 at 03:28:12PM +0200, Michal Vokáč wrote: > Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses

2018-05-21 Thread Andrew Lunn
On Mon, May 21, 2018 at 03:28:13PM +0200, Michal Vokáč wrote: > Fix warning reported by checkpatch. > > Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Andrew

Re: [net-next PATCH v2 2/4] net: Enable Tx queue selection based on Rx queues

2018-05-21 Thread Tom Herbert
On Sat, May 19, 2018 at 1:27 PM, Willem de Bruijn wrote: > On Sat, May 19, 2018 at 4:13 PM, Willem de Bruijn > wrote: >> On Fri, May 18, 2018 at 12:03 AM, Tom Herbert wrote: >>> On Tue, May 15, 2018 at 6:26 PM, Amritha Nambiar >>> wrote: This patch adds support to pick Tx queue based on th

Re: [PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 04:35:05PM +0800, Jason Wang wrote: > If we successfully linearize the packets, num_buf were set to zero > which was wrong since we now have only 1 buffer to be used for e.g in > the error path of receive_mergeable(). Zero num_buf will lead the code > try to pop the buffers

Re: [PATCH net-next] net:sched: add action inheritdsfield to skbmod

2018-05-21 Thread Jamal Hadi Salim
On 21/05/18 10:42 AM, Fu, Qiaobin wrote: Hi Jamal, I've tested my patch before publishing it here, and Nishanth is going to test it further with version 2 of the GKprio. I'm going to push a patch to the repository iproute2 to add support for "inheritdsfield”. Thanks. I already acked the ker

Re: [PATCH net 4/4] virito-net: fix leaking page for gso packet during mergeable XDP

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 04:35:06PM +0800, Jason Wang wrote: > We need to drop refcnt to xdp_page if we see a gso packet. Otherwise > it will be leaked. Fixing this by moving the check of gso packet above > the linearizing logic. > > Cc: John Fastabend > Fixes: 72979a6c3590 ("virtio_net: xdp, add

Re: [PATCH net 2/4] virtio-net: correctly transmit XDP buff after linearizing

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 04:35:04PM +0800, Jason Wang wrote: > We should not go for the error path after successfully transmitting a > XDP buffer after linearizing. Since the error path may try to pop and > drop next packet and increase the drop counters. Fixing this by simply > drop the refcnt of o

Re: [PATCH net 1/4] virtio-net: correctly redirect linearized packet

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 04:35:03PM +0800, Jason Wang wrote: > After a linearized packet was redirected by XDP, we should not go for > the err path which will try to pop buffers for the next packet and > increase the drop counter. Fixing this by just drop the page refcnt > for the original page. >

Re: [PATCH net 0/4] Fix several issues of virtio-net mergeable XDP

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 04:35:02PM +0800, Jason Wang wrote: > Hi: > > Please review the patches that tries to fix sevreal issues of > virtio-net mergeable XDP. > > Thanks I think we should do 3/4 differently. The rest looks good, and probably needed on stable. Thanks! > Jason Wang (4): > vir

Re: [net-next PATCH v2 2/4] net: Enable Tx queue selection based on Rx queues

2018-05-21 Thread Willem de Bruijn
On Mon, May 21, 2018 at 10:51 AM, Tom Herbert wrote: > On Sat, May 19, 2018 at 1:27 PM, Willem de Bruijn > wrote: >> On Sat, May 19, 2018 at 4:13 PM, Willem de Bruijn >> wrote: >>> On Fri, May 18, 2018 at 12:03 AM, Tom Herbert wrote: On Tue, May 15, 2018 at 6:26 PM, Amritha Nambiar w

Re: [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port

2018-05-21 Thread Florian Fainelli
On 05/21/2018 06:28 AM, Michal Vokáč wrote: > When a port is brought up/down do not enable/disable only the TXMAC > but the RXMAC as well. This is essential for the CPU port to work. > > Signed-off-by: Michal Vokáč Reviewed-by: Florian Fainelli Should this have: Fixes: 6b93fb46480a ("net-ne

Re: [PATCH] bpf: check NULL for sk_to_full_sk()

2018-05-21 Thread Eric Dumazet
On 05/21/2018 12:55 AM, YueHaibing wrote: > like commit df39a9f106d5 ("bpf: check NULL for sk_to_full_sk() return value"), > we should check sk_to_full_sk return value against NULL. > > Signed-off-by: YueHaibing > --- > include/linux/bpf-cgroup.h | 2 +- > 1 file changed, 1 insertion(+), 1 del

Re: [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth

2018-05-21 Thread Florian Fainelli
On 05/21/2018 06:28 AM, Michal Vokáč wrote: > By default autonegotiation is enabled to configure MAC on all ports. > For the CPU port autonegotiation can not be used so we need to set > some sensible defaults manually. > > This patch forces the default setting of the CPU port to 1000Mbps/full >

Re: [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting

2018-05-21 Thread Florian Fainelli
On 05/21/2018 06:28 AM, Michal Vokáč wrote: > Implement adjust_link function that allows to overwrite default CPU port > setting using fixed-link device tree subnode. > > Signed-off-by: Michal Vokáč Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses

2018-05-21 Thread Florian Fainelli
On 05/21/2018 06:28 AM, Michal Vokáč wrote: > Fix warning reported by checkpatch. Nit in the subject: should be redundant, with that: Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX

2018-05-21 Thread Florian Fainelli
On 05/21/2018 06:28 AM, Michal Vokáč wrote: > Signed-off-by: Michal Vokáč Reviewed-by: Florian Fainelli I don't know if we need all people who contributed to that driver to agree on that, this is not a license change, so it should be okay I presume? -- Florian

Re: [PATCH net] tuntap: raise EPOLLOUT on device up

2018-05-21 Thread David Miller
From: Jason Wang Date: Fri, 18 May 2018 21:00:43 +0800 > We return -EIO on device down but can not raise EPOLLOUT after it was > up. This may confuse user like vhost which expects tuntap to raise > EPOLLOUT to re-enable its TX routine after tuntap is down. This could > be easily reproduced by tra

Re: [patch net-next] nfp: flower: set sysfs link to device for representors

2018-05-21 Thread David Miller
From: Jiri Pirko Date: Thu, 17 May 2018 12:05:20 +0200 > From: Jiri Pirko > > Do this so the sysfs has "device" link correctly set. > > Signed-off-by: Jiri Pirko Please sort out the non-PF representor issue with Or and Jakub. Thanks.

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-21 Thread Marcelo Ricardo Leitner
On Mon, May 21, 2018 at 04:09:31PM +0200, Michael Tuexen wrote: > > On 21. May 2018, at 15:48, Neil Horman wrote: > > > > On Mon, May 21, 2018 at 02:16:56PM +0200, Michael Tuexen wrote: > >>> On 21. May 2018, at 13:39, Neil Horman wrote: > >>> > >>> On Sun, May 20, 2018 at 10:54:04PM -0300, Mar

Re: [PATCH net-next 0/2] net: sfp: small improvements

2018-05-21 Thread David Miller
From: Antoine Tenart Date: Thu, 17 May 2018 10:29:05 +0200 > This series was part of the mvpp2 phylink one but as we reworked it to > use fixed-link on the DB boards, the SFP commits weren't needed > anymore for our use case. Two of the three patches still are needed I > believe (I ditched the on

Re: [PATCH v2 net] stmmac: strip vlan tag on reception only for 8021q tagged frames

2018-05-21 Thread David Miller
From: David Miller Date: Thu, 17 May 2018 12:43:56 -0400 (EDT) > Giuseppe and Alexandre, please review this patch. If nobody thinks this patch is important enough to actually review, I'm tossing it. Sorry.

Re: [PATCH net] sctp: fix the issue that flags are ignored when using kernel_connect

2018-05-21 Thread Marcelo Ricardo Leitner
On Sun, May 20, 2018 at 04:39:10PM +0800, Xin Long wrote: > Now sctp uses inet_dgram_connect as its proto_ops .connect, and the flags > param can't be passed into its proto .connect where this flags is really > needed. > > sctp works around it by getting flags from socket file in __sctp_connect. >

  1   2   3   >