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;

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

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: [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 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

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: [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

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-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: > >>> >

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

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.

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

2018-05-21 Thread David Miller
From: Florian Fainelli Date: Sun, 20 May 2018 20:58:28 -0700 > A number of entries were not alphabetically sorted, remedy that. > > Signed-off-by: Florian Fainelli Applied.

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

2018-05-21 Thread David Miller
From: Florian Fainelli Date: Sun, 20 May 2018 20:49:47 -0700 > 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. >

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

2018-05-21 Thread Alexei Starovoitov
On Sun, May 13, 2018 at 07:33:18PM +0200, Alban Crequy wrote: > > +BPF_CALL_2(bpf_get_current_cgroup_ino, u32, hierarchy, u64, flags) > +{ > + // TODO: pick the correct hierarchy instead of the mem controller > + struct cgroup *cgrp = task_cgroup(current, memory_cgrp_id); > + > + if

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

2018-05-21 Thread David Miller
From: Rahul Lakkireddy Date: Mon, 21 May 2018 19:07:50 +0530 > 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() >

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

2018-05-21 Thread Jesse Brandeburg
On Mon, 21 May 2018 17:04:24 +0800 Jason wrote: > 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 > ---

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: [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

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 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

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

[PATCH net-next v13 1/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
sch_cake targets the home router use case and is intended to squeeze the most bandwidth and latency out of even the slowest ISP links and routers, while presenting an API simple enough that even an ISP can configure it. Example of use on a cable ISP uplink: tc qdisc add dev eth0 cake bandwidth

[PATCH net-next v13 7/7] sch_cake: Conditionally split GSO segments

2018-05-21 Thread Toke Høiland-Jørgensen
At lower bandwidths, the transmission time of a single GSO segment can add an unacceptable amount of latency due to HOL blocking. Furthermore, with a software shaper, any tuning mechanism employed by the kernel to control the maximum size of GSO segments is thrown off by the artificial limit on

[PATCH net-next v13 6/7] sch_cake: Add overhead compensation support to the rate shaper

2018-05-21 Thread Toke Høiland-Jørgensen
This commit adds configurable overhead compensation support to the rate shaper. With this feature, userspace can configure the actual bottleneck link overhead and encapsulation mode used, which will be used by the shaper to calculate the precise duration of each packet on the wire. This feature

[PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Toke Høiland-Jørgensen
The ACK filter is an optional feature of CAKE which is designed to improve performance on links with very asymmetrical rate limits. On such links (which are unfortunately quite prevalent, especially for DSL and cable subscribers), the downstream throughput can be limited by the number of ACKs

[PATCH net-next v13 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-21 Thread Toke Høiland-Jørgensen
When CAKE is deployed on a gateway that also performs NAT (which is a common deployment mode), the host fairness mechanism cannot distinguish internal hosts from each other, and so fails to work correctly. To fix this, we add an optional NAT awareness mode, which will query the kernel conntrack

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

2018-05-21 Thread Jesse Brandeburg
Hi Jason, a few nits. On Mon, 21 May 2018 17:04:22 +0800 Jason wrote: > Signed-off-by: Jason Wang > --- > drivers/vhost/net.c | 34 +++--- > 1 file changed, 23 insertions(+), 11 deletions(-) > > diff --git a/drivers/vhost/net.c

Re: [PATCH bpf-next 0/5] fix test_sockmap

2018-05-21 Thread John Fastabend
On 05/20/2018 10:13 PM, Prashant Bhole wrote: > > > On 5/19/2018 1:42 AM, John Fastabend wrote: >> On 05/18/2018 12:17 AM, Prashant Bhole wrote: >>> This series fixes bugs in test_sockmap code. They weren't caught >>> previously because failure in RX/TX thread was not notified to the >>> main

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

2018-05-21 Thread Willem de Bruijn
On Mon, May 21, 2018 at 8:57 AM, Jon Rosen (jrosen) wrote: > 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

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: [PACTH net-next] cxgb4: copy the length of cpl_tx_pkt_core to fw_wr

2018-05-21 Thread David Miller
From: Ganesh Goudar Date: Mon, 21 May 2018 12:26:36 +0530 > immdlen field of FW_ETH_TX_PKT_WR is filled in a wrong way, > we must copy the length of all the cpls encapsulated in fw > work request. In the xmit path we missed adding the length > of CPL_TX_PKT_CORE but we

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

2018-05-21 Thread David Miller
From: Ganesh Goudar Date: Mon, 21 May 2018 14:45:43 +0530 > 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

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

2018-05-21 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Mon, 21 May 2018 03:40:12 -0700 > +struct qed_tlv_parsed_buf { > + /* To be filled with the address to set in Value field */ > + u8 *p_val; Assignments to this pointer are cast hundreds of times, like: > +

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

2018-05-21 Thread Jesse Brandeburg
On Mon, 21 May 2018 17:04:23 +0800 Jason wrote: > 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 > ---

[PATCH net-next] r8169: perform reset synchronously in __rtl8169_resume

2018-05-21 Thread Heiner Kallweit
The driver uses pm_runtime_get_sync() in few places and relies on the device being fully runtime-resumed after this call. So far however the runtime resume callback triggers an asynchronous reset. Avoid this and perform the reset synchronously. Signed-off-by: Heiner Kallweit

Re: [PATCH bpf-next 2/5] selftests/bpf: test_sockmap, join cgroup in selftest mode

2018-05-21 Thread John Fastabend
On 05/20/2018 10:15 PM, Prashant Bhole wrote: > > > On 5/19/2018 1:45 AM, John Fastabend wrote: >> On 05/18/2018 12:17 AM, Prashant Bhole wrote: >>> In case of selftest mode, temporary cgroup environment is created but >>> cgroup is not joined. It causes test failures. Fixed by joining the >>>

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

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

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): >

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

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

[PATCH net-next v13 5/7] sch_cake: Add DiffServ handling

2018-05-21 Thread Toke Høiland-Jørgensen
This adds support for DiffServ-based priority queueing to CAKE. If the shaper is in use, each priority tier gets its own virtual clock, which limits that tier's rate to a fraction of the overall shaped rate, to discourage trying to game the priority mechanism. CAKE defaults to a simple,

[PATCH net-next v13 0/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
This patch series adds the CAKE qdisc, and has been split up to ease review. I have attempted to split out each configurable feature into its own patch. The first commit adds the base shaper and packet scheduler, while subsequent commits add the optional features. The full userspace API and most

[PATCH net-next v13 2/7] sch_cake: Add ingress mode

2018-05-21 Thread Toke Høiland-Jørgensen
The ingress mode is meant to be enabled when CAKE runs downlink of the actual bottleneck (such as on an IFB device). The mode changes the shaper to also account dropped packets to the shaped rate, as these have already traversed the bottleneck. Enabling ingress mode will also tune the AQM to

[PATCH bpf-next 6/7] bpf: btf: Sync bpf.h and btf.h to tools/include/uapi/linux/

2018-05-21 Thread Martin KaFai Lau
This patch sync the uapi's bpf.h and btf.h to tools/. Signed-off-by: Martin KaFai Lau --- tools/include/uapi/linux/bpf.h | 8 tools/include/uapi/linux/btf.h | 28 +++- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git

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:

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 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

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

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

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

[PATCH v2 bpf-next 2/3] net/ipv6: Add helper to return path MTU based on fib result

2018-05-21 Thread dsahern
From: David Ahern Determine path MTU from a FIB lookup result. Logic is based on ip6_dst_mtu_forward plus lookup of nexthop exception. Add ip6_dst_mtu_forward to ipv6_stubs to handle access by core bpf code. Signed-off-by: David Ahern ---

[PATCH v2 bpf-next 0/3] bpf: Add MTU check to fib lookup helper

2018-05-21 Thread dsahern
From: David Ahern Packets that exceed the egress MTU can not be forwarded in the fast path. Add IPv4 and IPv6 MTU helpers that take a FIB lookup result (versus the typical dst path) and add the calls to bpf_ipv{4,6}_fib_lookup. v2 - add ip6_mtu_from_fib6 to ipv6_stub - only

[PATCH v2 bpf-next 3/3] bpf: Add mtu checking to FIB forwarding helper

2018-05-21 Thread dsahern
From: David Ahern Add check that egress MTU can handle packet to be forwarded. If the MTU is less than the packet length, return 0 meaning the packet is expected to continue up the stack for help - eg., fragmenting the packet or sending an ICMP. The XDP path needs to leverage

[PATCH v2 bpf-next 1/3] net/ipv4: Add helper to return path MTU based on fib result

2018-05-21 Thread dsahern
From: David Ahern Determine path MTU from a FIB lookup result. Logic is a distillation of ip_dst_mtu_maybe_forward. Signed-off-by: David Ahern --- include/net/ip_fib.h | 2 ++ net/ipv4/route.c | 31 +++ 2 files changed, 33

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

2018-05-21 Thread David Miller
From: David Miller Date: Mon, 21 May 2018 12:21:04 -0400 (EDT) > From: Ganesh Goudar > Date: Mon, 21 May 2018 14:45:43 +0530 > >> trigger an L1 configure operation when a transceiver module >> is inserted in order to cause current "sticky" options

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

2018-05-21 Thread David Miller
From: Ganesh Goudar Date: Mon, 21 May 2018 14:46:35 +0530 > 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

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

2018-05-21 Thread Jesse Brandeburg
On Mon, 21 May 2018 17:04:25 +0800 Jason wrote: > 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

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 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

[PATCH net] dccp: don't free ccid2_hc_tx_sock struct in dccp_disconnect()

2018-05-21 Thread Alexey Kodanev
Syzbot reported the use-after-free in timer_is_static_object() [1]. This can happen because the structure for the rto timer (ccid2_hc_tx_sock) is removed in dccp_disconnect(), and ccid2_hc_tx_rto_expire() can be called after that. The report [1] is similar to the one in commit 120e9dabaf55

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

2018-05-21 Thread Florian Fainelli
On 05/21/2018 08:48 AM, David Miller wrote: > 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: [RFC PATCH net-next 10/12] vhost_net: build xdp buff

2018-05-21 Thread Jesse Brandeburg
On Mon, 21 May 2018 17:04:31 +0800 Jason wrote: > 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

Re: [PATCH bpf-next 3/5] selftests/bpf: test_sockmap, fix test timeout

2018-05-21 Thread John Fastabend
On 05/20/2018 10:15 PM, Prashant Bhole wrote: > > > On 5/19/2018 1:47 AM, John Fastabend wrote: >> On 05/18/2018 12:17 AM, Prashant Bhole wrote: >>> In order to reduce runtime of tests, recently timout for select() call >>> was reduced from 1sec to 10usec. This was causing many tests failures.

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

[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

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

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:

[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

[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 @@

[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 +++

[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

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.

[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

[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

[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,

[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

[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

[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

[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

[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

[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 ++

[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

[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.

[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

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

[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

[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

[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.

[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

[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 @@

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:

[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.

[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 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

[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

[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 @@

[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

  1   2   3   >