Re: [PATCH bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-09-14 Thread kbuild test robot
Hi Joe, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Joe-Stringer/Add-socket-lookup-support/20180914-134632 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config

[PATCH][net-next] net: move definition of pcpu_lstats to header file

2018-09-14 Thread Li RongQing
pcpu_lstats is defined in several files, so unify them as one and move to header file Signed-off-by: Zhang Yu Signed-off-by: Li RongQing --- drivers/net/loopback.c| 6 -- drivers/net/nlmon.c | 6 -- drivers/net/vsockmon.c| 14 -- include/linux/netdevice.h |

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-14 Thread Jason Wang
On 2018年09月14日 12:46, Willem de Bruijn wrote: On Thu, Sep 13, 2018 at 11:53 PM Jason Wang wrote: On 2018年09月14日 11:40, Willem de Bruijn wrote: On Thu, Sep 13, 2018 at 11:27 PM Jason Wang wrote: On 2018年09月13日 22:58, Willem de Bruijn wrote: On Thu, Sep 13, 2018 at 5:02 AM Jason Wang w

Re: mlx5 driver loading failing on v4.19 / net-next / bpf-next

2018-09-14 Thread Saeed Mahameed
On Thu, Sep 13, 2018 at 11:36 PM, Jesper Dangaard Brouer wrote: > On Thu, 13 Sep 2018 15:55:29 -0700 > Alexei Starovoitov wrote: > >> On Thu, Aug 30, 2018 at 1:35 AM, Tariq Toukan wrote: >> > >> > >> > On 29/08/2018 6:05 PM, Jesper Dangaard Brouer wrote: >> >> >> >> Hi Saeed, >> >> >> >> I'm hav

[PATCH 1/1] net: rds: use memset to optimize the recv

2018-09-14 Thread Zhu Yanjun
The function rds_inc_init is in recv process. To use memset can optimize the function rds_inc_init. The test result: Before: 1) + 24.950 us |rds_inc_init [rds](); After: 1) + 10.990 us |rds_inc_init [rds](); Signed-off-by: Zhu Yanjun --- net/rds/recv.c | 5 +-

Re: mlx5 driver loading failing on v4.19 / net-next / bpf-next

2018-09-14 Thread Jesper Dangaard Brouer
On Fri, 14 Sep 2018 01:22:15 -0700 Saeed Mahameed wrote: > On Thu, Sep 13, 2018 at 11:36 PM, Jesper Dangaard Brouer > wrote: > > On Thu, 13 Sep 2018 15:55:29 -0700 > > Alexei Starovoitov wrote: > > > >> On Thu, Aug 30, 2018 at 1:35 AM, Tariq Toukan wrote: > >> > >> > > >> > > >> > On 29/0

Re: [PATCH net-next 5/8] bnxt_en: Use hw_tc_offload and ignore_ari devlink parameters

2018-09-14 Thread kbuild test robot
Hi Vasundhara, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Vasundhara-Volam/bnxt_en-devlink-param-updates/20180914-141937 config: powerpc-allyesconfig (attached as .config) compiler

[PATCH net-next] cxgb4: Fix endianness issue in t4_fwcache()

2018-09-14 Thread Ganesh Goudar
Do not put host-endian 0 or 1 into big endian feild. Reported-by: Al Viro Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cx

Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-14 Thread Or Gerlitz
On Fri, Sep 14, 2018 at 1:31 AM, Jesse Brandeburg wrote: Hi Jesse, > This series contains changes to i40evf so that it becomes a more > generic virtual function driver for current and future silicon. > > While doing the rename of i40evf to a more generic name of iavf, > we also put the driver on

[PATCH net-next] cxgb4: add per rx-queue counter for packet errors

2018-09-14 Thread Ganesh Goudar
print per rx-queue packet errors in sge_qinfo Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 1 + drivers/net/ethernet/chelsio/cxgb4/sge.c | 4 3 files cha

Re: [net-next,RFC PATCH] Introduce TC Range classifier

2018-09-14 Thread Jiri Pirko
Thu, Sep 13, 2018 at 10:52:01PM CEST, amritha.namb...@intel.com wrote: >This patch introduces a TC range classifier to support filtering based >on ranges. Only port-range filters are supported currently. This can >be combined with flower classifier to support filters that are a >combination of port

Re: [net-next, RFC PATCH] net: sched: cls_range: Introduce Range classifier

2018-09-14 Thread Jiri Pirko
Thu, Sep 13, 2018 at 10:52:06PM CEST, amritha.namb...@intel.com wrote: [...] >+static struct cls_range_filter *range_lookup(struct cls_range_head *head, >+ struct range_flow_key *key, >+ struct range_flow_key *mke

[PATCH net] net/sched: act_sample: fix NULL dereference in the data path

2018-09-14 Thread Davide Caratti
Matteo reported the following splat, testing the datapath of TC 'sample': BUG: KASAN: null-ptr-deref in tcf_sample_act+0xc4/0x310 Read of size 8 at addr by task nc/433 CPU: 0 PID: 433 Comm: nc Not tainted 4.19.0-rc3-kvm #17 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009),

Re: [PATCH net-next 0/8] bnxt_en: devlink param updates

2018-09-14 Thread Jiri Pirko
Fri, Sep 14, 2018 at 06:17:07AM CEST, vasundhara-v.vo...@broadcom.com wrote: >On Wed, Sep 12, 2018 at 3:20 PM Jakub Kicinski > wrote: >> >> On Wed, 12 Sep 2018 12:09:37 +0530, Vasundhara Volam wrote: >> > On Tue, Sep 11, 2018 at 5:04 PM Jakub Kicinski wrote: >> > > On Tue, 11 Sep 2018 14:14:57 +053

Re: [PATCH net] net/sched: act_sample: fix NULL dereference in the data path

2018-09-14 Thread Jiri Pirko
Fri, Sep 14, 2018 at 12:03:18PM CEST, dcara...@redhat.com wrote: >Matteo reported the following splat, testing the datapath of TC 'sample': > > BUG: KASAN: null-ptr-deref in tcf_sample_act+0xc4/0x310 > Read of size 8 at addr by task nc/433 > > CPU: 0 PID: 433 Comm: nc Not tainted 4

Re: [PATCH net-next 08/13] net: sched: rename tcf_block_get{_ext}() and tcf_block_put{_ext}()

2018-09-14 Thread Vlad Buslov
On Thu 13 Sep 2018 at 17:21, Cong Wang wrote: > On Wed, Sep 12, 2018 at 1:24 AM Vlad Buslov wrote: >> >> >> On Fri 07 Sep 2018 at 20:09, Cong Wang wrote: >> > On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote: >> >> >> >> Functions tcf_block_get{_ext}() and tcf_block_put{_ext}() actually >> >

Re: [PATCH net-next v2] net: sched: change tcf_del_walker() to take idrinfo->lock

2018-09-14 Thread Vlad Buslov
On Thu 13 Sep 2018 at 17:13, Cong Wang wrote: > On Wed, Sep 12, 2018 at 1:51 AM Vlad Buslov wrote: >> >> >> On Fri 07 Sep 2018 at 19:12, Cong Wang wrote: >> > On Fri, Sep 7, 2018 at 6:52 AM Vlad Buslov wrote: >> >> >> >> Action API was changed to work with actions and action_idr in concurrenc

[PATCH net-next] cxgb4: update supported DCB version

2018-09-14 Thread Ganesh Goudar
- In CXGB4_DCB_STATE_FW_INCOMPLETE state check if the dcb version is changed and update the dcb supported version. - Also, fill the priority code point value for priority based flow control. Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 27 +++

Re: [PATCH net-next 4/4] bnxt_en: Always forward VF MAC address to the PF.

2018-09-14 Thread Siwei Liu
This commit is toxic, if possible I hope it can be reverted and reworked with a new patch. First, the patch introduced backward incompatible changes to bnxt_en VF driver that is causing issue when interoperating with the old PF driver without this commit. In that event, VF probing fails from withi

Re: [PATCH iproute2] q_cake: Add printing of no-split-gso option

2018-09-14 Thread Toke Høiland-Jørgensen
Stephen Hemminger writes: > On Wed, 12 Sep 2018 00:32:16 +0200 > Toke Høiland-Jørgensen wrote: > >> When the GSO splitting was turned into dual split-gso/no-split-gso options, >> the printing of the latter was left out. Add that, so output is consistent >> with the options passed. >> >> Signed-

Re: [PATCH net] veth: Orphan skb before GRO

2018-09-14 Thread Paolo Abeni
On Fri, 2018-09-14 at 13:33 +0900, Toshiaki Makita wrote: > GRO expects skbs not to be owned by sockets, but when XDP is enabled veth > passed skbs owned by sockets. It caused corrupted sk_wmem_alloc. > > Paolo Abeni reported the following splat: > > [ 362.098904] refcount_t overflow at skb_set_

[PATCH net] pppoe: fix reception of frames with no mac header

2018-09-14 Thread Guillaume Nault
pppoe_rcv() needs to look back at the Ethernet header in order to lookup the PPPoE session. Therefore we need to ensure that the mac header is big enough to contain an Ethernet header. Otherwise eth_hdr(skb)->h_source might access invalid data. =

Re: [PATCH net] pppoe: fix reception of frames with no mac header

2018-09-14 Thread Guillaume Nault
On Fri, Sep 14, 2018 at 04:28:05PM +0200, Guillaume Nault wrote: > pppoe_rcv() needs to look back at the Ethernet header in order to > lookup the PPPoE session. Therefore we need to ensure that the mac > header is big enough to contain an Ethernet header. Otherwise > eth_hdr(skb)->h_source might ac

[bpf-next, v4 1/5] flow_dissector: implements flow dissector BPF hook

2018-09-14 Thread Petar Penkov
From: Petar Penkov Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR and attach type BPF_FLOW_DISSECTOR that is executed in the flow dissector path. The BPF program is per-network namespace. Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn --- include/linux/bpf.h

[bpf-next, v4 0/5] Introduce eBPF flow dissector

2018-09-14 Thread Petar Penkov
From: Petar Penkov This patch series hardens the RX stack by allowing flow dissection in BPF, as previously discussed [1]. Because of the rigorous checks of the BPF verifier, this provides significant security guarantees. In particular, the BPF flow dissector cannot get inside of an infinite loop

[bpf-next, v4 2/5] bpf: sync bpf.h uapi with tools/

2018-09-14 Thread Petar Penkov
From: Petar Penkov This patch syncs tools/include/uapi/linux/bpf.h with the flow dissector definitions from include/uapi/linux/bpf.h Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn --- tools/include/uapi/linux/bpf.h | 26 ++ 1 file changed, 26 insertions(+)

[bpf-next, v4 3/5] bpf: support flow dissector in libbpf and bpftool

2018-09-14 Thread Petar Penkov
From: Petar Penkov This patch extends libbpf and bpftool to work with programs of type BPF_PROG_TYPE_FLOW_DISSECTOR. Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn --- tools/bpf/bpftool/prog.c | 1 + tools/lib/bpf/libbpf.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/

[bpf-next, v4 4/5] flow_dissector: implements eBPF parser

2018-09-14 Thread Petar Penkov
From: Petar Penkov This eBPF program extracts basic/control/ip address/ports keys from incoming packets. It supports recursive parsing for IP encapsulation, and VLAN, along with IPv4/IPv6 and extension headers. This program is meant to show how flow dissection and key extraction can be done in e

[bpf-next, v4 5/5] selftests/bpf: test bpf flow dissection

2018-09-14 Thread Petar Penkov
From: Petar Penkov Adds a test that sends different types of packets over multiple tunnels and verifies that valid packets are dissected correctly. To do so, a tc-flower rule is added to drop packets on UDP src port 9, and packets are sent from ports 8, 9, and 10. Only the packets on port 9 shou

Re: [PATCH net-next v3 0/2] net: stmmac: Coalesce and tail addr fixes

2018-09-14 Thread Jerome Brunet
On Thu, 2018-09-13 at 09:02 +0100, Jose Abreu wrote: > The fix for coalesce timer and a fix in tail address setting that impacts > XGMAC2 operation. > > Cc: Florian Fainelli > Cc: Neil Armstrong > Cc: Jerome Brunet > Cc: Martin Blumenstingl > Cc: David S. Miller > Cc: Joao Pinto > Cc: Giusep

Re: [PATCH net-next 08/13] net: sched: rename tcf_block_get{_ext}() and tcf_block_put{_ext}()

2018-09-14 Thread Jiri Pirko
Fri, Sep 14, 2018 at 12:38:08PM CEST, vla...@mellanox.com wrote: > >On Thu 13 Sep 2018 at 17:21, Cong Wang wrote: >> On Wed, Sep 12, 2018 at 1:24 AM Vlad Buslov wrote: >>> >>> >>> On Fri 07 Sep 2018 at 20:09, Cong Wang wrote: >>> > On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote: >>> >> >>> >

Re: [PATCH net] net: diag: Fix swapped src/dst in udp_dump_one.

2018-09-14 Thread David Miller
From: Lorenzo Colitti Date: Fri, 14 Sep 2018 15:25:53 +0900 > Since its inception, udp_dump_one had has a bug where userspace > needs to swap src and dst addresses and ports in order to find > the socket it wants. > > This is because udp_dump_one misuses __udp[46]_lib_lookup by > passing the sou

Re: [PATCH][net-next] net: move definition of pcpu_lstats to header file

2018-09-14 Thread David Miller
From: Li RongQing Date: Fri, 14 Sep 2018 16:00:51 +0800 > pcpu_lstats is defined in several files, so unify them as one > and move to header file > > Signed-off-by: Zhang Yu > Signed-off-by: Li RongQing This looks fine, applied, thanks.

Re: [PATCH net-next] cxgb4: add per rx-queue counter for packet errors

2018-09-14 Thread David Miller
From: Ganesh Goudar Date: Fri, 14 Sep 2018 14:46:04 +0530 > print per rx-queue packet errors in sge_qinfo > > Signed-off-by: Casey Leedom > Signed-off-by: Ganesh Goudar Applied.

Re: [PATCH net-next] cxgb4: Fix endianness issue in t4_fwcache()

2018-09-14 Thread David Miller
From: Ganesh Goudar Date: Fri, 14 Sep 2018 14:36:27 +0530 > Do not put host-endian 0 or 1 into big endian feild. > > Reported-by: Al Viro > Signed-off-by: Ganesh Goudar Applied.

[RFC PATCH 0/4] UDP: implement GRO support for UDP_SEGMENT socket

2018-09-14 Thread Paolo Abeni
This series implements GRO support for UDP sockets, as the RX counterpart of ommit bec1f6f69736 ("udp: generate gso with UDP_SEGMENT"). The first two patches allow UDP GRO registration on demand, avoiding additional overhead when no UDP_SEGMENT sockets are created, actually decreasing the GRO engi

[RFC PATCH 4/4] selftests: add GRO support, fix port option processing

2018-09-14 Thread Paolo Abeni
Not a full test-case yet, but allows triggering the UDP GSO code path. Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/udpgso_bench_rx.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/udpgso_bench_rx.c b/tools/testi

[RFC PATCH 1/4] net: add new helper to update an already registered offload

2018-09-14 Thread Paolo Abeni
This will allow us to enable/disable UDP GRO at runtime in a later patch. Signed-off-by: Paolo Abeni --- include/net/protocol.h | 4 net/ipv4/protocol.c| 13 + net/ipv6/protocol.c| 13 + 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/include

[RFC PATCH 2/4] net: enable UDP gro on demand.

2018-09-14 Thread Paolo Abeni
Currently, the UDP GRO callback is always invoked, regardless of the existence of any actual user (e.g. a UDP tunnel). With retpoline enabled, this causes measurable overhead. This changeset introduces explicit accounting of the sockets requiring UDP GRO and updates the UDP offloads at runtime acc

[RFC PATCH 3/4] udp: implement GRO plain UDP sockets.

2018-09-14 Thread Paolo Abeni
This is the RX counter part of commit bec1f6f69736 ("udp: generate gso with UDP_SEGMENT"). When UDP_SEGMENT is enabled, such socket is also eligible for GRO in the rx path: UDP segments directed to such socket are assembled into a larger GSO_UDP_L4 packet. The core UDP GRO support is enabled/updat

Re: [PATCH net] net/sched: act_sample: fix NULL dereference in the data path

2018-09-14 Thread David Miller
From: Davide Caratti Date: Fri, 14 Sep 2018 12:03:18 +0200 > Matteo reported the following splat, testing the datapath of TC 'sample': ... > tcf_sample_act() tried to update its per-cpu stats, but tcf_sample_init() > forgot to allocate them, because tcf_idr_create() was called with a wrong > val

Re: [PATCH net-next] cxgb4: update supported DCB version

2018-09-14 Thread David Miller
From: Ganesh Goudar Date: Fri, 14 Sep 2018 17:35:55 +0530 > - In CXGB4_DCB_STATE_FW_INCOMPLETE state check if the dcb > version is changed and update the dcb supported version. > > - Also, fill the priority code point value for priority > based flow control. > > Signed-off-by: Ganesh Goudar

Re: Project Financing

2018-09-14 Thread Gabriel Walker
Thank you for your time, We are looking for clients in your country with good business or project that requires financing to execute. Do get back to me if you are interested in this or you know anybody who has good business ideas but lack the necessary capital to fund his projects so we can es

Re: [PATCH net] pppoe: fix reception of frames with no mac header

2018-09-14 Thread Alexander Potapenko
On Fri, Sep 14, 2018 at 4:35 PM Guillaume Nault wrote: > > On Fri, Sep 14, 2018 at 04:28:05PM +0200, Guillaume Nault wrote: > > pppoe_rcv() needs to look back at the Ethernet header in order to > > lookup the PPPoE session. Therefore we need to ensure that the mac > > header is big enough to conta

Re: [RFC PATCH 3/4] udp: implement GRO plain UDP sockets.

2018-09-14 Thread Eric Dumazet
On 09/14/2018 08:43 AM, Paolo Abeni wrote: > This is the RX counter part of commit bec1f6f69736 ("udp: generate gso > with UDP_SEGMENT"). When UDP_SEGMENT is enabled, such socket is also > eligible for GRO in the rx path: UDP segments directed to such socket > are assembled into a larger GSO_UDP

Re: [PATCH 1/1] net: rds: use memset to optimize the recv

2018-09-14 Thread Santosh Shilimkar
On 9/14/2018 1:45 AM, Zhu Yanjun wrote: The function rds_inc_init is in recv process. To use memset can optimize the function rds_inc_init. The test result: Before: 1) + 24.950 us |rds_inc_init [rds](); After: 1) + 10.990 us |rds_inc_init [rds](); Signed-

Re: [RFC PATCH 2/4] net: enable UDP gro on demand.

2018-09-14 Thread Willem de Bruijn
On Fri, Sep 14, 2018 at 11:47 AM Paolo Abeni wrote: > > Currently, the UDP GRO callback is always invoked, regardless of > the existence of any actual user (e.g. a UDP tunnel). With retpoline > enabled, this causes measurable overhead. > > This changeset introduces explicit accounting of the socke

[PATCH] net: caif: remove redundant null check on frontpkt

2018-09-14 Thread Colin King
From: Colin Ian King It is impossible for frontpkt to be null at the point of the null check because it has been assigned from rearpkt and there is no way realpkt can be null at the point of the assignment because of the sanity checking and exit paths taken previously. Remove the redundant null c

Re: [PATCH iproute2] libnetlink: fix leak and using unused memory on error

2018-09-14 Thread महेश बंडेवार
On Thu, Sep 13, 2018 at 12:33 PM, Stephen Hemminger wrote: > If an error happens in multi-segment message (tc only) > then report the error and stop processing further responses. > This also fixes refering to the buffer after free. > > The sequence check is not necessary here because the > respons

Re: [PATCH] net: caif: remove redundant null check on frontpkt

2018-09-14 Thread Sergei Shtylyov
Hello! On 09/14/2018 08:19 PM, Colin King wrote: > From: Colin Ian King > > It is impossible for frontpkt to be null at the point of the null > check because it has been assigned from rearpkt and there is no > way realpkt can be null at the point of the assignment because rearpkt? > of the

[PATCH net-next RFC 6/8] net: make gro configurable

2018-09-14 Thread Willem de Bruijn
From: Willem de Bruijn Add net_offload flag NET_OFF_FLAG_GRO_OFF. If set, a net_offload will not be used for gro receive processing. Also add sysctl helper proc_do_net_offload that toggles this flag and register sysctls net.{core,ipv4,ipv6}.gro Signed-off-by: Willem de Bruijn --- drivers/net/

[PATCH net-next RFC 7/8] udp: gro behind static key

2018-09-14 Thread Willem de Bruijn
From: Willem de Bruijn Avoid the socket lookup cost in udp_gro_receive if no socket has a gro callback configured. Signed-off-by: Willem de Bruijn --- include/net/udp.h | 2 ++ net/ipv4/udp.c | 2 +- net/ipv4/udp_offload.c | 2 +- net/ipv6/udp.c | 2 +- net/ipv6/udp_offloa

[PATCH net-next RFC 4/8] ipv6: remove offload exception for hopopts

2018-09-14 Thread Willem de Bruijn
From: Willem de Bruijn Extension headers in ipv6 are pulled without calling a callback function. An inet6_offload signals this feature with flag INET6_PROTO_GSO_EXTHDR. Add net_has_flag helper to hide implementation details and in prepartion for configurable gro. Convert NEXTHDR_HOP from a spec

[PATCH net-next RFC 0/8] udp and configurable gro

2018-09-14 Thread Willem de Bruijn
From: Willem de Bruijn This is a *very rough* draft. Mainly for discussion while we also look at another partially overlapping approach [1]. Reduce UDP receive cost for bulk traffic by enabling datagram coalescing with GRO. Before adding more GRO callbacks, make GRO configurable by the administ

[PATCH net-next RFC 2/8] gro: deduplicate gro_complete

2018-09-14 Thread Willem de Bruijn
From: Willem de Bruijn The gro completion datapath is open coded for all protocols. Deduplicate with new helper function net_gro_complete. Signed-off-by: Willem de Bruijn --- drivers/net/geneve.c | 9 + include/linux/netdevice.h | 19 ++- net/8021q/vlan.c

[PATCH net-next RFC 1/8] gro: convert device offloads to net_offload

2018-09-14 Thread Willem de Bruijn
From: Willem de Bruijn In preparation of making GRO receive configurable, have all offloads share the same infrastructure. Signed-off-by: Willem de Bruijn --- include/linux/netdevice.h | 17 +- include/net/protocol.h| 7 --- net/core/dev.c| 105 +-

[PATCH net-next RFC 3/8] gro: add net_gro_receive

2018-09-14 Thread Willem de Bruijn
From: Willem de Bruijn For configurable gro_receive all callsites need to be updated. Similar to gro_complete, introduce a single shared helper, net_gro_receive. Signed-off-by: Willem de Bruijn --- drivers/net/geneve.c | 2 +- include/linux/netdevice.h | 14 +- net/8021q/vlan

[PATCH net-next RFC 5/8] net: deconstify net_offload

2018-09-14 Thread Willem de Bruijn
From: Willem de Bruijn With configurable gro, the flags field in net_offloads may be changed. Remove the const keyword. This is a noop otherwise. Signed-off-by: Willem de Bruijn --- include/linux/netdevice.h | 14 +++--- include/net/protocol.h| 12 ++-- net/core/dev.c

[PATCH net-next RFC 8/8] udp: add gro

2018-09-14 Thread Willem de Bruijn
From: Willem de Bruijn Very rough initial version of udp gro, for discussion purpose only at this point. Among others it - lacks the cmsg UDP_SEGMENT to return gso_size - probably breaks udp tunnels - hard breaks at 40 segments - does not allow a last segment of unequal size Signed-off-by: Will

Re: [PATCH] net: caif: remove redundant null check on frontpkt

2018-09-14 Thread Colin Ian King
On 14/09/18 18:54, Sergei Shtylyov wrote: > Hello! > > On 09/14/2018 08:19 PM, Colin King wrote: > >> From: Colin Ian King >> >> It is impossible for frontpkt to be null at the point of the null >> check because it has been assigned from rearpkt and there is no >> way realpkt can be null at the

Re: mlx5 driver loading failing on v4.19 / net-next / bpf-next

2018-09-14 Thread Saeed Mahameed
On Fri, Sep 14, 2018 at 1:52 AM, Jesper Dangaard Brouer wrote: > On Fri, 14 Sep 2018 01:22:15 -0700 > Saeed Mahameed wrote: > >> On Thu, Sep 13, 2018 at 11:36 PM, Jesper Dangaard Brouer >> wrote: >> > On Thu, 13 Sep 2018 15:55:29 -0700 >> > Alexei Starovoitov wrote: >> > >> >> On Thu, Aug 30, 2

Re: [PATCH net-next RFC 6/8] net: make gro configurable

2018-09-14 Thread Stephen Hemminger
On Fri, 14 Sep 2018 13:59:39 -0400 Willem de Bruijn wrote: > diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c > index e5d236595206..8cb8e02c8ab6 100644 > --- a/drivers/net/vxlan.c > +++ b/drivers/net/vxlan.c > @@ -572,6 +572,7 @@ static struct sk_buff *vxlan_gro_receive(struct sock *sk, >

Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-14 Thread Jesse Brandeburg
On Fri, 14 Sep 2018 13:39:17 +0900 Benjamin wrote: > > Jesse Brandeburg (14): > > intel-ethernet: rename i40evf to iavf > > Seems like patch 1 didn't make it to netdev > https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20180910/014025.html Hi Ben, Thanks for the note, I don't kn

[PATCH net] ipv6: fix possible use-after-free in ip6_xmit()

2018-09-14 Thread Eric Dumazet
In the unlikely case ip6_xmit() has to call skb_realloc_headroom(), we need to call skb_set_owner_w() before consuming original skb, otherwise we risk a use-after-free. Bring IPv6 in line with what we do in IPv4 to fix this. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet R

Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-14 Thread Jesse Brandeburg
On Fri, 14 Sep 2018 12:10:45 +0300 Or wrote: > On Fri, Sep 14, 2018 at 1:31 AM, Jesse Brandeburg > wrote: > on what HW ring format do you standardize? do i40e/Fortville and > ice/what's-the-intel-code-name? HWs can/use the same posting/completion > descriptor? The initial ring format is the same

Re: [bpf-next, v4 0/5] Introduce eBPF flow dissector

2018-09-14 Thread Alexei Starovoitov
On Fri, Sep 14, 2018 at 07:46:17AM -0700, Petar Penkov wrote: > From: Petar Penkov > > This patch series hardens the RX stack by allowing flow dissection in BPF, > as previously discussed [1]. Because of the rigorous checks of the BPF > verifier, this provides significant security guarantees. In

Re: [PATCH net-next v2] net/tls: Add support for async decryption of tls records

2018-09-14 Thread John Fastabend
On 08/29/2018 02:56 AM, Vakul Garg wrote: > When tls records are decrypted using asynchronous acclerators such as > NXP CAAM engine, the crypto apis return -EINPROGRESS. Presently, on > getting -EINPROGRESS, the tls record processing stops till the time the > crypto accelerator finishes off and ret

[PATCH net] bnxt_en: Fix VF mac address regression.

2018-09-14 Thread Michael Chan
The recent commit to always forward the VF MAC address to the PF for approval may not work if the PF driver or the firmware is older. This will cause the VF driver to fail during probe: bnxt_en :00:03.0 (unnamed net_device) (uninitialized): hwrm req_type 0xf seq id 0x5 error 0x bnxt_

[PATCH v2 0/2] hv_netvsc: associate VF and PV device by serial number

2018-09-14 Thread Stephen Hemminger
The Hyper-V implementation of PCI controller has concept of 32 bit serial number (not to be confused with PCI-E serial number). This value is sent in the protocol from the host to indicate SR-IOV VF device is attached to a synthetic NIC. Using the serial number (instead of MAC address) to associ

[PATCH v2 1/2] PCI: hv: support reporting serial number as slot information

2018-09-14 Thread Stephen Hemminger
The Hyper-V host API for PCI provides a unique "serial number" which can be used as basis for sysfs PCI slot table. This can be useful for cases where userspace wants to find the PCI device based on serial number. When an SR-IOV NIC is added, the host sends an attach message with serial number. Th

[PATCH v2 2/2] hv_netvsc: pair VF based on serial number

2018-09-14 Thread Stephen Hemminger
Matching network device based on MAC address is problematic since a non VF network device can be creted with a duplicate MAC address causing confusion and problems. The VMBus API does provide a serial number that is a better matching method. Signed-off-by: Stephen Hemminger --- drivers/net/hype

[net-next PATCH] tls: async support causes out-of-bounds access in crypto APIs

2018-09-14 Thread John Fastabend
When async support was added it needed to access the sk from the async callback to report errors up the stack. The patch tried to use space after the aead request struct by directly setting the reqsize field in aead_request. This is an internal field that should not be used outside the crypto APIs.

Re: [PATCH net] bnxt_en: Fix VF mac address regression.

2018-09-14 Thread Siwei Liu
Ack. Looks fine to me. -Siwei On Fri, Sep 14, 2018 at 12:41 PM, Michael Chan wrote: > The recent commit to always forward the VF MAC address to the PF for > approval may not work if the PF driver or the firmware is older. This > will cause the VF driver to fail during probe: > > bnxt_en :

[Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-14 Thread Cong Wang
ra_mutex is a IPv4 specific mutex, it is inside struct netns_ipv4, but its initialization is in the generic netns code, setup_net(). Move it to IPv4 specific net init code, inet_init_net(). Fixes: d9ff3049739e ("net: Replace ip_ra_lock with per-net mutex") Cc: Kirill Tkhai Signed-off-by: Cong Wa

Re: [PATCH net-next v2] net: sched: change tcf_del_walker() to take idrinfo->lock

2018-09-14 Thread Cong Wang
On Fri, Sep 14, 2018 at 3:46 AM Vlad Buslov wrote: > > > On Thu 13 Sep 2018 at 17:13, Cong Wang wrote: > > On Wed, Sep 12, 2018 at 1:51 AM Vlad Buslov wrote: > >> > >> > >> On Fri 07 Sep 2018 at 19:12, Cong Wang wrote: > >> > On Fri, Sep 7, 2018 at 6:52 AM Vlad Buslov wrote: > >> >> > >> >> Ac

[PATCH net] tls: fix currently broken MSG_PEEK behavior

2018-09-14 Thread Daniel Borkmann
In kTLS MSG_PEEK behavior is currently failing, strace example: [pid 2430] socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3 [pid 2430] socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 4 [pid 2430] bind(4, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 [pid 2430]

Re: [net-next, RFC PATCH] net: sched: cls_range: Introduce Range classifier

2018-09-14 Thread Cong Wang
On Thu, Sep 13, 2018 at 6:53 PM Amritha Nambiar wrote: > > This patch introduces a range classifier to support filtering based > on ranges. Only port-range filters are supported currently. This can > be combined with flower classifier to support filters that are a > combination of port-ranges and

Re: [net-next,RFC PATCH] Introduce TC Range classifier

2018-09-14 Thread Cong Wang
On Fri, Sep 14, 2018 at 2:53 AM Jiri Pirko wrote: > > Thu, Sep 13, 2018 at 10:52:01PM CEST, amritha.namb...@intel.com wrote: > >This patch introduces a TC range classifier to support filtering based > >on ranges. Only port-range filters are supported currently. This can > >be combined with flower

mlx5_core: null pointer dereference in mlx5_accel_tls_device_caps() (net-next kernel)

2018-09-14 Thread Michal Kubecek
I just encountered a null pointer dereference on mlx5_core module initialization while booting net-next kernel (based on commit ee4fccbee7d3) on an aarch64 machine: [ 12.021971] iommu: Adding device :01:00.0 to group 3 [ 12.022925] mlx5_core :01:00.0: firmware version: 12.17.2020 [ 1

Re: [PATCH net-next v3 0/2] net: stmmac: Coalesce and tail addr fixes

2018-09-14 Thread David Miller
From: Jose Abreu Date: Thu, 13 Sep 2018 09:02:21 +0100 > The fix for coalesce timer and a fix in tail address setting that impacts > XGMAC2 operation. This series is fixing bugs going all the way back to 4.7 There is no logical way that targetting net-next is valid. net-next is always for new

[PATH RFC net-next 5/8] net: phy: Add limkmode equivalents to some of the MII ethtool helpers

2018-09-14 Thread Andrew Lunn
Add helpers which take a linkmode rather than a u32 ethtool for advertising settings. Signed-off-by: Andrew Lunn --- include/linux/mii.h | 50 + 1 file changed, 50 insertions(+) diff --git a/include/linux/mii.h b/include/linux/mii.h index 9ed49c8261d0

[PATH RFC net-next 2/8] net: phy: Add phydev_warn()

2018-09-14 Thread Andrew Lunn
Not all new style LINK_MODE bits can be converted into old style SUPPORTED bits. We need to warn when such a conversion is attempted. Add a helper for this. Signed-off-by: Andrew Lunn --- include/linux/phy.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/phy.h b/include/lin

[PATH RFC net-next 4/8] net: phy: Add helper for advertise to lcl value

2018-09-14 Thread Andrew Lunn
Add a helper to convert the local advertising to an LCL capabilities, which is then used to resolve pause flow control settings. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mt7530.c | 6 +- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 5 + drivers/net/etherne

[PATH RFC net-next 1/8] net: phy: Move linkmode helpers to somewhere public

2018-09-14 Thread Andrew Lunn
phylink has some useful helpers to working with linkmode bitmaps. Move them to there own header so other code can use them. Signed-off-by: Andrew Lunn --- drivers/net/phy/phylink.c | 27 include/linux/linkmode.h | 67 +++ include/linux/mii.h

[PATH RFC net-next 6/8] net: ethernet xgbe expand PHY_GBIT_FEAUTRES

2018-09-14 Thread Andrew Lunn
The macro PHY_GBIT_FEAUTRES needs to change into a bitmap in order to support link_modes. Remove its use from xgde by replacing it with its definition. Probably, the current behavior is wrong. It probably should be ANDing not assigning. Signed-off-by: Andrew Lunn --- drivers/net/ethernet/amd/xg

[PATH RFC net-next 3/8] net: phy: Add helper to convert MII ADV register to a linkmode

2018-09-14 Thread Andrew Lunn
The phy_mii_ioctl can be used to write a value into the MII_ADVERTISE register in the PHY. Since this changes the state of the PHY, we need to make the same change to phydev->advertising. Add a helper which can convert the register value to a linkmode. Signed-off-by: Andrew Lunn --- include/linu

[PATH RFC net-next 7/8] net: phy: Replace phy driver features u32 with link_mode bitmap

2018-09-14 Thread Andrew Lunn
This is one step in allowing phylib to make use of link_mode bitmaps, instead of u32 for supported and advertised features. Convert the phy drivers to use bitmaps to indicates the features they support. This requires some macro magic in order to construct constant bitmaps used to initialise the dri

[PATH RFC net-next 8/8] net: phy: Add build warning if assumptions get broken

2018-09-14 Thread Andrew Lunn
The macro magic to build constant bitmaps of supported PHY features breaks when we have more than 63 ETHTOOL_LINK_MODE bits. Make the breakage loud, not a subtle bug, when we get to that condition. Signed-off-by: Andrew Lunn --- drivers/net/phy/phy_device.c | 7 +++ 1 file changed, 7 inserti

[PATH RFC net-next 0/8] Continue towards using linkmode in phylib

2018-09-14 Thread Andrew Lunn
These patches contain some further cleanup and helpers, and the first real patch towards using linkmode bitmaps in phylink. It is RFC because i don't like patch #7 and maybe somebody has a better idea how to do this. Ideally, we want to initialise a linux generic bitmap at compile time. Thanks

[PATCH net] net: dsa: mv88e6xxx: Fix ATU Miss Violation

2018-09-14 Thread Andrew Lunn
Fix a cut/paste error and a typo which results in ATU miss violations not being reported. Fixes: 0977644c5005 ("net: dsa: mv88e6xxx: Decode ATU problem interrupt") Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/global1.h | 2 +- drivers/net/dsa/mv88e6xxx/global1_atu.c | 2 +- 2 fil

Re: [bpf-next, v4 0/5] Introduce eBPF flow dissector

2018-09-14 Thread Y Song
On Fri, Sep 14, 2018 at 12:24 PM Alexei Starovoitov wrote: > > On Fri, Sep 14, 2018 at 07:46:17AM -0700, Petar Penkov wrote: > > From: Petar Penkov > > > > This patch series hardens the RX stack by allowing flow dissection in BPF, > > as previously discussed [1]. Because of the rigorous checks of

Re: [bpf-next, v4 0/5] Introduce eBPF flow dissector

2018-09-14 Thread Petar Penkov
On Fri, Sep 14, 2018 at 2:47 PM, Y Song wrote: > On Fri, Sep 14, 2018 at 12:24 PM Alexei Starovoitov > wrote: >> >> On Fri, Sep 14, 2018 at 07:46:17AM -0700, Petar Penkov wrote: >> > From: Petar Penkov >> > >> > This patch series hardens the RX stack by allowing flow dissection in BPF, >> > as p

[PATCH bpf-next] tools/bpf: bpftool: improve output format for bpftool net

2018-09-14 Thread Yonghong Song
This is a followup patch for Commit f6f3bac08ff9 ("tools/bpf: bpftool: add net support"). Some improvements are made for the bpftool net output. Specially, plain output is more concise such that per attachment should nicely fit in one line. Compared to previous output, the prog tag is removed since

Re: [PATH RFC net-next 1/8] net: phy: Move linkmode helpers to somewhere public

2018-09-14 Thread Florian Fainelli
On 09/14/2018 02:38 PM, Andrew Lunn wrote: > phylink has some useful helpers to working with linkmode bitmaps. > Move them to there own header so other code can use them. Good idea, I wonder if we should create a more specific directory within include/linux/ that can host a variety of PHYLIB, PHYL

Re: [PATH RFC net-next 2/8] net: phy: Add phydev_warn()

2018-09-14 Thread Florian Fainelli
On 09/14/2018 02:38 PM, Andrew Lunn wrote: > Not all new style LINK_MODE bits can be converted into old style > SUPPORTED bits. We need to warn when such a conversion is attempted. > Add a helper for this. > > Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli Do you mind converting drivers

Re: [PATH RFC net-next 3/8] net: phy: Add helper to convert MII ADV register to a linkmode

2018-09-14 Thread Florian Fainelli
On 09/14/2018 02:38 PM, Andrew Lunn wrote: > The phy_mii_ioctl can be used to write a value into the MII_ADVERTISE > register in the PHY. Since this changes the state of the PHY, we need > to make the same change to phydev->advertising. Add a helper which can > convert the register value to a linkm

Re: [PATCH net-next RFC 6/8] net: make gro configurable

2018-09-14 Thread Willem de Bruijn
On Fri, Sep 14, 2018 at 2:39 PM Stephen Hemminger wrote: > > On Fri, 14 Sep 2018 13:59:39 -0400 > Willem de Bruijn wrote: > > > diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c > > index e5d236595206..8cb8e02c8ab6 100644 > > --- a/drivers/net/vxlan.c > > +++ b/drivers/net/vxlan.c > > @@ -57

Re: [PATCH net-next RFC 6/8] net: make gro configurable

2018-09-14 Thread Willem de Bruijn
On Fri, Sep 14, 2018 at 6:50 PM Willem de Bruijn wrote: > > On Fri, Sep 14, 2018 at 2:39 PM Stephen Hemminger > wrote: > > > > On Fri, 14 Sep 2018 13:59:39 -0400 > > Willem de Bruijn wrote: > > > > > diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c > > > index e5d236595206..8cb8e02c8ab6 10

Re: [PATCH net-next RFC 6/8] net: make gro configurable

2018-09-14 Thread Willem de Bruijn
On Fri, Sep 14, 2018 at 1:59 PM Willem de Bruijn wrote: > > From: Willem de Bruijn > > Add net_offload flag NET_OFF_FLAG_GRO_OFF. If set, a net_offload will > not be used for gro receive processing. > > Also add sysctl helper proc_do_net_offload that toggles this flag and > register sysctls net.{

Re: [PATH RFC net-next 3/8] net: phy: Add helper to convert MII ADV register to a linkmode

2018-09-14 Thread Andrew Lunn
On Fri, Sep 14, 2018 at 03:23:14PM -0700, Florian Fainelli wrote: > On 09/14/2018 02:38 PM, Andrew Lunn wrote: > > The phy_mii_ioctl can be used to write a value into the MII_ADVERTISE > > register in the PHY. Since this changes the state of the PHY, we need > > to make the same change to phydev->a

  1   2   >