Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-13 Thread Marcelo Ricardo Leitner
On Fri, Jul 13, 2018 at 11:17:18AM -0700, Cong Wang wrote: ... > > > > > Isn't the whole point of sch_prio offloading the queueing to > > > > > each class? If you need a limit, there is one for each child > > > > > qdisc if you use for example pfifo or bfifo (depending on you > > > > > want to

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-13 Thread Marcelo Ricardo Leitner
On Fri, Jul 13, 2018 at 11:26:28AM -0700, Cong Wang wrote: > On Fri, Jul 13, 2018 at 6:04 AM Marcelo Ricardo Leitner > wrote: > > > > On Thu, Jul 12, 2018 at 11:05:45PM -0700, Cong Wang wrote: > > > On Wed, Jul 11, 2018 at 12:33 PM Marcelo Ricardo Leitner > > > wrote: > > > > > > > > On Tue, Jul

Re: [PATCH bpf-next] tools: include reallocarray feature test in FEATURE_TESTS_BASIC

2018-07-13 Thread Guenter Roeck
On 07/13/2018 07:08 PM, Jakub Kicinski wrote: perf propagates its feature check results to libbpf. This means features for which perf probes must be a superset of libbpf's required features. perf depends on FEATURE_TESTS_BASIC for its list of features. commit 531b014e7a2f ("tools: bpf: make

[PATCH bpf-next] tools: include reallocarray feature test in FEATURE_TESTS_BASIC

2018-07-13 Thread Jakub Kicinski
perf propagates its feature check results to libbpf. This means features for which perf probes must be a superset of libbpf's required features. perf depends on FEATURE_TESTS_BASIC for its list of features. commit 531b014e7a2f ("tools: bpf: make use of reallocarray") added reallocarray use to

Re: [PATCH net] qlogic: check kstrtoul() for errors

2018-07-13 Thread David Miller
From: Dan Carpenter Date: Thu, 12 Jul 2018 15:23:45 +0300 > We accidentally left out the error handling for kstrtoul(). > > Fixes: a520030e326a ("qlcnic: Implement flash sysfs callback for 83xx > adapter") > Signed-off-by: Dan Carpenter Applied.

Re: [PATCH] of: mdio: Support fixed links in of_phy_get_and_connect()

2018-07-13 Thread David Miller
From: Linus Walleij Date: Wed, 11 Jul 2018 19:45:11 +0200 > By a simple extension of of_phy_get_and_connect() drivers > that have a fixed link on e.g. RGMII can support also > fixed links, so in addition to: > > ethernet-port { > phy-mode = "rgmii"; > phy-handle = <>; > }; > > This

Re: [PATCH net-next] net: sched: refactor flower walk to iterate over idr

2018-07-13 Thread David Miller
From: Vlad Buslov Date: Mon, 9 Jul 2018 13:29:11 +0300 > Extend struct tcf_walker with additional 'cookie' field. It is intended to > be used by classifier walk implementations to continue iteration directly > from particular filter, instead of iterating 'skip' number of times. > > Change

Re: [bpf-next,v3,11/13] tools: bpf: make use of reallocarray

2018-07-13 Thread Jakub Kicinski
e Foundation, Inc. > This program is free software; you may redistribute it under the terms of > the GNU General Public License version 3 or (at your option) a later version. > This program has absolutely no warranty. > $ git describe > next-20180713 > $ git clean -d -x -f -q > $

Re: [bpf-next,v3,11/13] tools: bpf: make use of reallocarray

2018-07-13 Thread Guenter Roeck
nse version 3 or (at your option) a later version. This program has absolutely no warranty. $ git describe next-20180713 $ git clean -d -x -f -q $ make allmodconfig $ make tools/perf ... libbpf.c: In function ‘bpf_object__add_program’: libbpf.c:326:10: error: implicit declaration of function ‘reallocar

Re: [PATCH net-next v6 01/11] net: sched: use rcu for action cookie update

2018-07-13 Thread Cong Wang
On Fri, Jul 13, 2018 at 3:11 PM David Miller wrote: > > From: Cong Wang > Date: Fri, 13 Jul 2018 14:51:15 -0700 > > > Can we at least agree you have no justification for this change in > > this changelog? > > He stated that he wishes to make this subsystem more lockless, and he > cannot do that

Re: [bpf-next,v3,11/13] tools: bpf: make use of reallocarray

2018-07-13 Thread Jakub Kicinski
On Fri, 13 Jul 2018 16:53:05 -0700, Guenter Roeck wrote: > Hi, > > On Tue, Jul 10, 2018 at 02:43:05PM -0700, Jakub Kicinski wrote: > > reallocarray() is a safer variant of realloc which checks for > > multiplication overflow in case of array allocation. Since it's > > not available in Glibc <

[RFC iproute2-next v1 0/5] net/sched: Introduce the taprio scheduler

2018-07-13 Thread Vinicius Costa Gomes
Hi, This is iproute2 side of the taprio RFC series. Please see the kernel side cover letter for more information about how to test this. Cheers, -- Vinicius Jesus Sanchez-Palencia (1): libnetlink: Add helper for getting a __s32 from netlink msgs Vinicius Costa Gomes (4): utils:

[RFC net-next v1 1/1] net/sched: Introduce the taprio scheduler

2018-07-13 Thread Vinicius Costa Gomes
This scheduler allows the network administrator to configure schedules for classes of traffic, the configuration interface is similar to what IEEE 802.1Qbv-2015 defines. Example configuration: $ tc qdisc add dev enp2s0 parent root handle 100 taprio \ num_tc 3 \ map 2 2 1

[RFC iproute2-next v1 1/5] utils: Implement get_s64()

2018-07-13 Thread Vinicius Costa Gomes
Add this helper to read signed 64-bit integers from a string. --- include/utils.h | 1 + lib/utils.c | 21 + 2 files changed, 22 insertions(+) diff --git a/include/utils.h b/include/utils.h index 8cb4349e..58574a05 100644 --- a/include/utils.h +++ b/include/utils.h @@

[RFC iproute2-next v1 3/5] libnetlink: Add helper for getting a __s32 from netlink msgs

2018-07-13 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia This function retrieves a signed 32-bit integer from a netlink message and returns it. Signed-off-by: Jesus Sanchez-Palencia --- include/libnetlink.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/libnetlink.h b/include/libnetlink.h index

[RFC iproute2-next v1 5/5] tc: Add support for configuring the taprio scheduler

2018-07-13 Thread Vinicius Costa Gomes
This traffic scheduler allows traffic classes states (transmission allowed/not allowed, in the simplest case) to be scheduled, according to a pre-generated time sequence. This is the basis of the IEEE 802.1Qbv specification. If the controller supports it, traffic can be also marked as

[RFC iproute2-next v1 4/5] include: add definitions for taprio [DO NOT COMMIT]

2018-07-13 Thread Vinicius Costa Gomes
DO NOT COMMIT This patch exists only to ease the testing, until this header is updated with the definitions from the kernel. Signed-off-by: Vinicius Costa Gomes --- include/uapi/linux/pkt_sched.h | 48 ++ 1 file changed, 48 insertions(+) diff --git

[RFC iproute2-next v1 2/5] include: Add helper to retrieve a __s64 from a netlink msg

2018-07-13 Thread Vinicius Costa Gomes
This allows signed 64-bit integers to be retrieved from a netlink message. --- include/libnetlink.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/libnetlink.h b/include/libnetlink.h index 9d9249e6..88164975 100644 --- a/include/libnetlink.h +++ b/include/libnetlink.h @@

[RFC net-next v1 0/1] net/sched: Introduce the taprio scheduler

2018-07-13 Thread Vinicius Costa Gomes
Hi, This series provides a set of interfaces that can be used by applications that require (time-based) Scheduled Transmission of packets. It is comprised by 3 new components to the kernel: - etf: the per-queue TxTime-Based scheduling qdisc; - taprio: the per-port Time-Aware scheduler

Re: [bpf-next,v3,11/13] tools: bpf: make use of reallocarray

2018-07-13 Thread Guenter Roeck
Hi, On Tue, Jul 10, 2018 at 02:43:05PM -0700, Jakub Kicinski wrote: > reallocarray() is a safer variant of realloc which checks for > multiplication overflow in case of array allocation. Since it's > not available in Glibc < 2.26 import kernel's overflow.h and > add a static inline

Re: [PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support

2018-07-13 Thread Santosh Shilimkar
On 7/13/2018 4:27 PM, David Miller wrote: From: Santosh Shilimkar Date: Fri, 13 Jul 2018 15:00:59 -0700 Ofcourse any application built using upstream header and using SO_RDS_TRANSPORT will break but since this particular option was added for special case(application wants to upfront select

Re: [PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support

2018-07-13 Thread David Miller
From: Santosh Shilimkar Date: Fri, 13 Jul 2018 15:00:59 -0700 > Ofcourse any application built using upstream header and > using SO_RDS_TRANSPORT will break but since this particular > option was added for special case(application wants to > upfront select transport instead letting bind figure

Re: [bpf-next PATCH] samples/bpf: xdp_redirect_cpu handle parsing of double VLAN tagged packets

2018-07-13 Thread Daniel Borkmann
On 07/13/2018 04:35 PM, Jesper Dangaard Brouer wrote: > People noticed that the code match on IEEE 802.1ad (ETH_P_8021AD) ethertype, > and this implies Q-in-Q or double tagged VLANs. Thus, we better parse > the next VLAN header too. It is even marked as a TODO. > > This is relevant for real

Re: [PATCH iproute2-next] iplink: add support for reporting multiple XDP programs

2018-07-13 Thread Jakub Kicinski
On Fri, 13 Jul 2018 15:23:30 -0700, Stephen Hemminger wrote: > > > I prefer to not use "printf(fp," and use print_string(PRINT_FP, NULL, > > > "%s", ...) > > > because otherwise you end up mixing strings and json format output in the > > > same result. > > > > > > You should be able to do > > >

[PATCH iproute2-next v2] iplink: add support for reporting multiple XDP programs

2018-07-13 Thread Jakub Kicinski
Kernel now supports attaching XDP programs in the driver and hardware at the same time. Print that information correctly. In case there are multiple programs attached kernel will not provide IFLA_XDP_PROG_ID, so don't expect it to be there (this also improves the printing for very old kernels

Re: [PATCH net-next] net: ip6_gre: get ipv6hdr after skb_cow_head()

2018-07-13 Thread William Tu
On Thu, Jul 12, 2018 at 10:40 PM, Prashant Bhole wrote: > A KASAN:use-after-free bug was found related to ip6-erspan > while running selftests/net/ip6_gre_headroom.sh > > It happens because of following sequence: > - ipv6hdr pointer is obtained from skb > - skb_cow_head() is called, skb->head

Re: [PATCH iproute2-next] iplink: add support for reporting multiple XDP programs

2018-07-13 Thread Stephen Hemminger
On Fri, 13 Jul 2018 14:20:37 -0700 Jakub Kicinski wrote: > On Fri, 13 Jul 2018 13:59:41 -0700, Stephen Hemminger wrote: > > On Fri, 13 Jul 2018 13:43:59 -0700 > > Jakub Kicinski wrote: > > > > > > > > +static void xdp_dump_prog_one(FILE *fp, struct rtattr *tb[IFLA_XDP_MAX + > > > 1], > >

Re: [PATCH iproute2-next 0/9] TC more JSON support

2018-07-13 Thread Stephen Hemminger
On Fri, 13 Jul 2018 14:29:42 -0700 Jakub Kicinski wrote: > On Fri, 13 Jul 2018 16:48:28 -0400, David Ahern wrote: > > On 7/9/18 3:48 PM, Stephen Hemminger wrote: > > > From: Stephen Hemminger > > > > > > Update core of TC command and library to do more JSON. > > > Most of this patch set is

Re: [PATCH net-next v6 01/11] net: sched: use rcu for action cookie update

2018-07-13 Thread David Miller
From: Cong Wang Date: Fri, 13 Jul 2018 14:51:15 -0700 > Can we at least agree you have no justification for this change in > this changelog? He stated that he wishes to make this subsystem more lockless, and he cannot do that without making the action cookie handling use RCU. I agree with the

Re: [PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support

2018-07-13 Thread Santosh Shilimkar
Hi Dave, On 7/13/2018 2:25 PM, David Miller wrote: From: Ka-Cheong Poon Date: Fri, 13 Jul 2018 04:02:59 -0700 @@ -52,7 +52,7 @@ #define RDS_RECVERR 5 #define RDS_CONG_MONITOR 6 #define RDS_GET_MR_FOR_DEST 7 -#define SO_RDS_TRANSPORT

Re: [PATCH net-next v6 01/11] net: sched: use rcu for action cookie update

2018-07-13 Thread Cong Wang
On Fri, Jul 13, 2018 at 6:30 AM Vlad Buslov wrote: > > > On Fri 13 Jul 2018 at 03:52, Cong Wang wrote: > > On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov wrote: > >> > >> Implement functions to atomically update and free action cookie > >> using rcu mechanism. > > > > Without stating any

Re: [PATCH v4 net-next 19/19] net/mlx5e: Kconfig, mutually exclude compilation of TLS and IPsec accel

2018-07-13 Thread David Miller
From: Boris Pismenny Date: Fri, 13 Jul 2018 16:03:01 -0400 > We currently have no devices that support both TLS and IPsec using the > accel framework I read this the first time, and this is not what I am objecting to. The compile time limitation is the problem, not the run time limitation. >

Re: [PATCH] tcp: allow user to create repair socket without window probes

2018-07-13 Thread Eric Dumazet
On 07/13/2018 02:36 PM, Stefan Baranoff wrote: > > Before I put my foot in my mouth one more time and end up on everyone's > naughty list - can someone help guide me on a couple of questions? > > What is the correct way to resubmit this, just as a simple v2 or does it need > cherry picked

Re: pull-request: bpf 2018-07-13

2018-07-13 Thread David Miller
From: Daniel Borkmann Date: Fri, 13 Jul 2018 17:40:58 +0200 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Fix AF_XDP TX error reporting before final kernel release such that it >becomes consistent between copy mode and zero-copy,

Re: [PATCH iproute2-next 0/9] TC more JSON support

2018-07-13 Thread Jakub Kicinski
On Fri, 13 Jul 2018 16:48:28 -0400, David Ahern wrote: > On 7/9/18 3:48 PM, Stephen Hemminger wrote: > > From: Stephen Hemminger > > > > Update core of TC command and library to do more JSON. > > Most of this patch set is about getting tc utility functions > > to be more friendly to the

Re: [PATCH net] skbuff: Unconditionally copy pfmemalloc in __skb_clone()

2018-07-13 Thread David Miller
From: Stefano Brivio Date: Fri, 13 Jul 2018 13:21:07 +0200 > Commit 8b7008620b84 ("net: Don't copy pfmemalloc flag in > __copy_skb_header()") introduced a different handling for the > pfmemalloc flag in copy and clone paths. > > In __skb_clone(), now, the flag is set only if it was set in the >

Re: [PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support

2018-07-13 Thread David Miller
From: Ka-Cheong Poon Date: Fri, 13 Jul 2018 04:02:59 -0700 > @@ -52,7 +52,7 @@ > #define RDS_RECVERR 5 > #define RDS_CONG_MONITOR 6 > #define RDS_GET_MR_FOR_DEST 7 > -#define SO_RDS_TRANSPORT 8 > +#define SO_RDS_TRANSPORT 9 There

Re: [PATCH net-next] net: ipmr: add support for passing full packet on wrong vif

2018-07-13 Thread David Miller
From: Nikolay Aleksandrov Date: Fri, 13 Jul 2018 12:16:43 +0300 > This patch adds support for IGMPMSG_WRVIFWHOLE which is used to pass > full packet and real vif id when the incoming interface is wrong. > While the RP and FHR are setting up state we need to be sending the > registers

Re: [PATCH iproute2-next] iplink: add support for reporting multiple XDP programs

2018-07-13 Thread Jakub Kicinski
On Fri, 13 Jul 2018 13:59:41 -0700, Stephen Hemminger wrote: > On Fri, 13 Jul 2018 13:43:59 -0700 > Jakub Kicinski wrote: > > > > > +static void xdp_dump_prog_one(FILE *fp, struct rtattr *tb[IFLA_XDP_MAX + > > 1], > > + __u32 attr, bool link, bool details, char *pfx) >

Re: [PATCH iproute2-next] iplink: add support for reporting multiple XDP programs

2018-07-13 Thread Stephen Hemminger
On Fri, 13 Jul 2018 13:43:59 -0700 Jakub Kicinski wrote: > > +static void xdp_dump_prog_one(FILE *fp, struct rtattr *tb[IFLA_XDP_MAX + 1], > + __u32 attr, bool link, bool details, char *pfx) > +{ > + __u32 prog_id; > + > + if (!tb[attr]) > +

Re: [PATCH iproute2-next 0/9] TC more JSON support

2018-07-13 Thread David Ahern
On 7/9/18 3:48 PM, Stephen Hemminger wrote: > From: Stephen Hemminger > > Update core of TC command and library to do more JSON. > Most of this patch set is about getting tc utility functions > to be more friendly to the json_print infrastructure. > > Stephen Hemminger (9): > tc: use JSON in

Re: [PATCH net-next] net: ip6_gre: get ipv6hdr after skb_cow_head()

2018-07-13 Thread Gregory Rose
On 7/12/2018 10:40 PM, Prashant Bhole wrote: A KASAN:use-after-free bug was found related to ip6-erspan while running selftests/net/ip6_gre_headroom.sh It happens because of following sequence: - ipv6hdr pointer is obtained from skb - skb_cow_head() is called, skb->head memory is reallocated -

[PATCH iproute2-next] iplink: add support for reporting multiple XDP programs

2018-07-13 Thread Jakub Kicinski
Kernel now supports attaching XDP programs in the driver and hardware at the same time. Print that information correctly. In case there are multiple programs attached kernel will not provide IFLA_XDP_PROG_ID, so don't expect it to be there (this also improves the printing for very old kernels

Re: [PATCH bpf-next 0/7] xdp: simultaneous driver and HW XDP

2018-07-13 Thread Jakub Kicinski
On Fri, 13 Jul 2018 21:59:22 +0200, Daniel Borkmann wrote: > On 07/12/2018 05:36 AM, Jakub Kicinski wrote: > > Hi! > > > > This set is adding support for loading driver and offload XDP > > at the same time. This enables advanced use cases where some > > of the work is offloaded to the NIC and

Re: [PATCH v4 net-next 19/19] net/mlx5e: Kconfig, mutually exclude compilation of TLS and IPsec accel

2018-07-13 Thread Boris Pismenny
On 7/12/2018 8:44 PM, David Miller wrote: From: Boris Pismenny Date: Thu, 12 Jul 2018 22:25:57 +0300 We currently have no devices that support both TLS and IPsec using the accel framework, and the current code does not support both IPsec and TLS. This patch prevents such combinations.

Re: [PATCH bpf-next 0/7] xdp: simultaneous driver and HW XDP

2018-07-13 Thread Daniel Borkmann
On 07/12/2018 05:36 AM, Jakub Kicinski wrote: > Hi! > > This set is adding support for loading driver and offload XDP > at the same time. This enables advanced use cases where some > of the work is offloaded to the NIC and some is done by the host. > Separate netlink attributes are added for

[PATCH net-next] liquidio: fix hang when re-binding VF host drv after running DPDK VF driver

2018-07-13 Thread Felix Manlunas
From: Rick Farrington When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR mode was disabled by reset, which was not true. Since DPDK driver had set IPTR mode previously, the VF driver (which uses buf-ptr-only mode) was not properly handling DROQ packets (i.e. it saw

Re: MACsec hardware offloading

2018-07-13 Thread Antoine Tenart
Hi Andrew, On Fri, Jul 13, 2018 at 06:20:02PM +0200, Andrew Lunn wrote: > On Fri, Jul 13, 2018 at 04:46:08PM +0200, Antoine Tenart wrote: > > > One important point about adding MACsec offloading in Linux is this can > > be done in either the MAC or the PHY. While I'll be working on making > >

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-13 Thread Cong Wang
On Fri, Jul 13, 2018 at 6:04 AM Marcelo Ricardo Leitner wrote: > > On Thu, Jul 12, 2018 at 11:05:45PM -0700, Cong Wang wrote: > > On Wed, Jul 11, 2018 at 12:33 PM Marcelo Ricardo Leitner > > wrote: > > > > > > On Tue, Jul 10, 2018 at 07:25:53PM -0700, Cong Wang wrote: > > > > On Mon, Jul 9, 2018

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-13 Thread Cong Wang
On Fri, Jul 13, 2018 at 6:00 AM Marcelo Ricardo Leitner wrote: > > On Thu, Jul 12, 2018 at 10:07:30PM -0700, Cong Wang wrote: > > On Wed, Jul 11, 2018 at 11:37 AM Marcelo Ricardo Leitner > > wrote: > > > > > > On Tue, Jul 10, 2018 at 07:32:43PM -0700, Cong Wang wrote: > > > > On Mon, Jul 9, 2018

Re: [net-next PATCH] net: ipv4: fix listify ip_rcv_finish in case of forwarding

2018-07-13 Thread Eric Dumazet
On 07/13/2018 07:19 AM, Edward Cree wrote: > On 12/07/18 21:10, Or Gerlitz wrote: >> On Wed, Jul 11, 2018 at 11:06 PM, Jesper Dangaard Brouer >> wrote: >>> One reason I didn't "just" send a patch, is that Edward so-fare only >>> implemented netif_receive_skb_list() and not

Re: [PATCH bpf-next 0/7] xdp: simultaneous driver and HW XDP

2018-07-13 Thread Alexei Starovoitov
On Wed, Jul 11, 2018 at 08:36:37PM -0700, Jakub Kicinski wrote: > Hi! > > This set is adding support for loading driver and offload XDP > at the same time. This enables advanced use cases where some > of the work is offloaded to the NIC and some is done by the host. > Separate netlink attributes

[PATCH net] hv/netvsc: fix handling of fallback to single queue mode

2018-07-13 Thread Stephen Hemminger
The netvsc device may need to fallback to running in single queue mode if host side only wants to support single queue. Recent change for handling mtu broke this in setup logic. Reported-by: Dan Carpenter Fixes: 3ffe64f1a641 ("hv_netvsc: split sub-channel setup into async and sync")

Re: [PATCH v2 net-next 01/14] net: Clear skb->tstamp only on the forwarding path

2018-07-13 Thread Eric Dumazet
On 07/03/2018 03:42 PM, Jesus Sanchez-Palencia wrote: > This is done in preparation for the upcoming time based transmission > patchset. Now that skb->tstamp will be used to hold packet's txtime, > we must ensure that it is being cleared when traversing namespaces. > Also, doing that from

[PATCH net] ibmvnic: Revise RX/TX queue error messages

2018-07-13 Thread Thomas Falcon
During a device failover, there may be latency between the loss of the current backing device and a notification from firmware that a failover has occurred. This latency can result in a large amount of error printouts as firmware returns outgoing traffic with a generic error code. These are not

[PATCH net-next 3/3] net/tls: Remove redundant variable assignments and wakeup

2018-07-13 Thread Vakul Garg
In function tls_do_decryption(), the assignment to tls receive context' variable 'decrypted' is redundant as the same is being done in function tls_recvmsg() after calling decrypt_skb(). Also calling callback function to wakeup processes sleeping on socket data availability is useless as

[PATCH net-next 1/3] net/tls: Do not enable zero-copy prematurely

2018-07-13 Thread Vakul Garg
Zero-copy mode was left enabled even when zerocopy_from_iter() failed. Set the zero-copy mode only when zerocopy_from_iter() succeeds. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index

[PATCH net-next 2/3] net/tls: Use socket data_ready callback on record availability

2018-07-13 Thread Vakul Garg
On receipt of a complete tls record, use socket's saved data_ready callback instead of state_change callback. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index d31dc2487488..a184c70ee0ac

Re: [PATCH net-next] TCP: make seq # error messages more readable

2018-07-13 Thread Randy Dunlap
On 07/13/2018 06:38 AM, Eric Dumazet wrote: > > > On 07/12/2018 05:48 PM, Randy Dunlap wrote: >> From: Randy Dunlap >> >> Attempt to make cryptic TCP seq number error messages clearer by >> (1) adding the function name, (2) identifying the errors as "seq # bug", >> and (3) grouping the field

RE: [PATCH v2 net-next 7/9] lan743x: Add EEE support

2018-07-13 Thread Bryan.Whitehead
> > +static int lan743x_ethtool_set_eee(struct net_device *netdev, > > + struct ethtool_eee *eee) > > +{ > > Hi Bryan > > You should call phy_ethtool_set_eee() in both cases, so that it gets disabled > in the PHY as well. It needs to stop advertising it. > >

Re: [PATCH net-next 3/4] net/sched: refactor TC_ACT_REDIRECT handling

2018-07-13 Thread Daniel Borkmann
On 07/13/2018 04:37 PM, Paolo Abeni wrote: > On Fri, 2018-07-13 at 16:13 +0200, Daniel Borkmann wrote: >> On 07/13/2018 11:55 AM, Paolo Abeni wrote: >>> This patch changes the TC_ACT_REDIRECT code path to allow >>> providing the redirect parameters via the tcf_result argument. >>> >>> Such union

Re: [PATCH] tcp: allow user to create repair socket without window probes

2018-07-13 Thread Eric Dumazet
On 07/12/2018 02:34 PM, David Miller wrote: > From: Stefan Baranoff > Date: Tue, 10 Jul 2018 17:31:10 -0400 > >> Under rare conditions where repair code may be used it is possible that >> window probes are either unnecessary or undesired. If the user knows that >> window probes are not wanted

Re: MACsec hardware offloading

2018-07-13 Thread Andrew Lunn
On Fri, Jul 13, 2018 at 04:46:08PM +0200, Antoine Tenart wrote: > Hello, > > Linux has a software implementation of the MACsec standard but so far, > to my knowledge, no hardware offloading support was developed and sent > upstream. Mellonex is usually the leader in this sort of thing. Adding

Re: [net-next PATCH] net: ipv4: fix listify ip_rcv_finish in case of forwarding

2018-07-13 Thread Jesper Dangaard Brouer
On Fri, 13 Jul 2018 15:19:40 +0100 Edward Cree wrote: > On 12/07/18 21:10, Or Gerlitz wrote: > > On Wed, Jul 11, 2018 at 11:06 PM, Jesper Dangaard Brouer > > wrote: > >> One reason I didn't "just" send a patch, is that Edward so-fare only > >> implemented netif_receive_skb_list() and not

pull-request: bpf 2018-07-13

2018-07-13 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix AF_XDP TX error reporting before final kernel release such that it becomes consistent between copy mode and zero-copy, from Magnus. 2) Fix three different syzkaller reported issues:

[PATCH] octeon_mgmt: Fix MIX registers configuration on MTU setup

2018-07-13 Thread Alexander Sverdlin
From: Alexander Sverdlin octeon_mgmt driver doesn't drop RX frames that are 1-4 bytes bigger than MTU set for the corresponding interface. The problem is in the AGL_GMX_RX0/1_FRM_MAX register setting, which should not account for VLAN tagging. According to Octeon HW manual: "For tagged frames,

[PATCH net] ipv6: make DAD fail with enhanced DAD when nonce length differs

2018-07-13 Thread Sabrina Dubroca
Commit adc176c54722 ("ipv6 addrconf: Implemented enhanced DAD (RFC7527)") added enhanced DAD with a nonce length of 6 bytes. However, RFC7527 doesn't specify the length of the nonce, other than being 6 + 8*k bytes, with integer k >= 0 (RFC3971 5.3.2). The current implementation simply assumes that

Re: [PATCH 2/2] samples/bpf: test_cgrp2_sock2: fix an off by one

2018-07-13 Thread David Ahern
On 7/13/18 11:05 AM, Dan Carpenter wrote: > "prog_cnt" is the number of elements which are filled out in prog_fd[] > so the test should be >= instead of >. > > Signed-off-by: Dan Carpenter > Fixes: 554ae6e792ef3 ("samples/bpf: add userspace example for prohibiting sockets") Reviewed-by: David

Re: [PATCH 1/2] samples: bpf: ensure that we don't load over MAX_PROGS programs

2018-07-13 Thread Dan Carpenter
On Fri, Jul 13, 2018 at 04:13:30PM +0100, Colin Ian King wrote: > On 13/07/18 16:11, Dan Carpenter wrote: > > I can't see that we check prog_cnt to ensure it doesn't go over > > MAX_PROGS. > > > > Signed-off-by: Dan Carpenter > > > > diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c

Re: [PATCH 1/2] samples: bpf: ensure that we don't load over MAX_PROGS programs

2018-07-13 Thread Colin Ian King
On 13/07/18 16:11, Dan Carpenter wrote: > I can't see that we check prog_cnt to ensure it doesn't go over > MAX_PROGS. > > Signed-off-by: Dan Carpenter > > diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c > index 89161c9ed466..904e775d1a44 100644 > --- a/samples/bpf/bpf_load.c > +++

[PATCH 1/2] samples: bpf: ensure that we don't load over MAX_PROGS programs

2018-07-13 Thread Dan Carpenter
I can't see that we check prog_cnt to ensure it doesn't go over MAX_PROGS. Signed-off-by: Dan Carpenter diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c index 89161c9ed466..904e775d1a44 100644 --- a/samples/bpf/bpf_load.c +++ b/samples/bpf/bpf_load.c @@ -107,6 +107,9 @@ static int

[PATCH 2/2] samples/bpf: test_cgrp2_sock2: fix an off by one

2018-07-13 Thread Dan Carpenter
"prog_cnt" is the number of elements which are filled out in prog_fd[] so the test should be >= instead of >. Signed-off-by: Dan Carpenter diff --git a/samples/bpf/test_cgrp2_sock2.c b/samples/bpf/test_cgrp2_sock2.c index 3b5be2364975..a9277b118c33 100644 --- a/samples/bpf/test_cgrp2_sock2.c

[PATCH] net: cavium: Drop dependency of NET_VENDOR_CAVIUM on PCI

2018-07-13 Thread Alexander Sverdlin
Octeon Ethernet drivers work perfectly without PCI. Signed-off-by: Alexander Sverdlin --- drivers/net/ethernet/cavium/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/cavium/Kconfig b/drivers/net/ethernet/cavium/Kconfig index 043e3c11c42b..4c3a5c354497 100644 ---

Re: [PATCH net-next 2/4] tc/act: remove unneeded RCU lock in action callback

2018-07-13 Thread Paolo Abeni
On Fri, 2018-07-13 at 16:41 +0200, Daniel Borkmann wrote: > On 07/13/2018 04:26 PM, Paolo Abeni wrote: > > On Fri, 2018-07-13 at 16:08 +0200, Daniel Borkmann wrote: > > > On 07/13/2018 11:55 AM, Paolo Abeni wrote: > > > > Each lockless action currently does its own RCU locking in ->act(). > > > >

MACsec hardware offloading

2018-07-13 Thread Antoine Tenart
Hello, Linux has a software implementation of the MACsec standard but so far, to my knowledge, no hardware offloading support was developed and sent upstream. I am working on a PHY that has an embedded MACsec engine and would like to add support for MACsec hardware offloading in Linux in order to

Re: [PATCH net] net/ipv6: Do not allow device only routes via the multipath API

2018-07-13 Thread David Ahern
On 7/13/18 7:28 AM, Stefano Brivio wrote: > On Thu, 12 Jul 2018 14:48:23 -0700 > dsah...@kernel.org wrote: > >> @@ -4388,6 +4388,13 @@ static int ip6_route_multipath_add(struct fib6_config >> *cfg, >> rt = NULL; >> goto cleanup; >> } >> +

Re: [PATCH net-next 2/4] tc/act: remove unneeded RCU lock in action callback

2018-07-13 Thread Daniel Borkmann
On 07/13/2018 04:26 PM, Paolo Abeni wrote: > On Fri, 2018-07-13 at 16:08 +0200, Daniel Borkmann wrote: >> On 07/13/2018 11:55 AM, Paolo Abeni wrote: >>> Each lockless action currently does its own RCU locking in ->act(). >>> This is allows using plain RCU accessor, even if the context >>> is

Re: [PATCH net-next 3/4] net/sched: refactor TC_ACT_REDIRECT handling

2018-07-13 Thread Paolo Abeni
On Fri, 2018-07-13 at 16:13 +0200, Daniel Borkmann wrote: > On 07/13/2018 11:55 AM, Paolo Abeni wrote: > > This patch changes the TC_ACT_REDIRECT code path to allow > > providing the redirect parameters via the tcf_result argument. > > > > Such union is expanded to host the redirect device, the

[bpf-next PATCH] samples/bpf: xdp_redirect_cpu handle parsing of double VLAN tagged packets

2018-07-13 Thread Jesper Dangaard Brouer
People noticed that the code match on IEEE 802.1ad (ETH_P_8021AD) ethertype, and this implies Q-in-Q or double tagged VLANs. Thus, we better parse the next VLAN header too. It is even marked as a TODO. This is relevant for real world use-cases, as XDP cpumap redirect can be used when the NIC

Re: [PATCH net-next 2/4] tc/act: remove unneeded RCU lock in action callback

2018-07-13 Thread Paolo Abeni
On Fri, 2018-07-13 at 16:08 +0200, Daniel Borkmann wrote: > Hi Paolo, > > On 07/13/2018 11:55 AM, Paolo Abeni wrote: > > Each lockless action currently does its own RCU locking in ->act(). > > This is allows using plain RCU accessor, even if the context > > is really RCU BH. > > > > This change

Re: [net-next PATCH] net: ipv4: fix listify ip_rcv_finish in case of forwarding

2018-07-13 Thread Edward Cree
On 12/07/18 21:10, Or Gerlitz wrote: > On Wed, Jul 11, 2018 at 11:06 PM, Jesper Dangaard Brouer > wrote: >> One reason I didn't "just" send a patch, is that Edward so-fare only >> implemented netif_receive_skb_list() and not napi_gro_receive_list(). > sfc does't support gro?! doesn't make sense..

Re: [PATCH net-next 3/4] net/sched: refactor TC_ACT_REDIRECT handling

2018-07-13 Thread Daniel Borkmann
On 07/13/2018 11:55 AM, Paolo Abeni wrote: > This patch changes the TC_ACT_REDIRECT code path to allow > providing the redirect parameters via the tcf_result argument. > > Such union is expanded to host the redirect device, the redirect > direction (ingress/egress) and the stats to be updated on

Re: [PATCH net-next 2/4] tc/act: remove unneeded RCU lock in action callback

2018-07-13 Thread Daniel Borkmann
Hi Paolo, On 07/13/2018 11:55 AM, Paolo Abeni wrote: > Each lockless action currently does its own RCU locking in ->act(). > This is allows using plain RCU accessor, even if the context > is really RCU BH. > > This change drops the per action RCU lock, replace the accessors > with _bh variant,

Re: [PATCH net-next v6 00/11] Modify action API for implementing lockless actions

2018-07-13 Thread Vlad Buslov
On Fri 13 Jul 2018 at 03:54, Cong Wang wrote: > On Sat, Jul 7, 2018 at 8:43 PM David Miller wrote: >> >> From: Vlad Buslov >> Date: Thu, 5 Jul 2018 17:24:22 +0300 >> >> > Currently, all netlink protocol handlers for updating rules, actions and >> > qdiscs are protected with single global

Re: [PATCH net-next] TCP: make seq # error messages more readable

2018-07-13 Thread Eric Dumazet
On 07/12/2018 05:48 PM, Randy Dunlap wrote: > From: Randy Dunlap > > Attempt to make cryptic TCP seq number error messages clearer by > (1) adding the function name, (2) identifying the errors as "seq # bug", > and (3) grouping the field identifiers and values by separating them > with

Re: [PATCH bpf 0/4] Consistent sendmsg error reporting in AF_XDP

2018-07-13 Thread Daniel Borkmann
On 07/11/2018 10:12 AM, Magnus Karlsson wrote: > This patch set adjusts the AF_XDP TX error reporting so that it becomes > consistent between copy mode and zero-copy. First some background: > > Copy-mode for TX uses the SKB path in which the action of sending the > packet is performed from

Re: [PATCH net-next 0/4] Further ARM BPF jit compiler improvements

2018-07-13 Thread Daniel Borkmann
On 07/12/2018 10:50 PM, Russell King - ARM Linux wrote: > Four further jit compiler improves for 32-bit ARM. > > arch/arm/net/bpf_jit_32.c | 120 > -- > 1 file changed, 73 insertions(+), 47 deletions(-) Applied to bpf-next, thanks Russell! (Fyi,

Re: [PATCH net-next v6 01/11] net: sched: use rcu for action cookie update

2018-07-13 Thread Vlad Buslov
On Fri 13 Jul 2018 at 03:52, Cong Wang wrote: > On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov wrote: >> >> Implement functions to atomically update and free action cookie >> using rcu mechanism. > > Without stating any reason. Is this even a changelog? Yes, it is. > >> >> Reviewed-by:

Re: [PATCH 00/14] ARM BPF jit compiler improvements

2018-07-13 Thread Daniel Borkmann
On 07/12/2018 11:35 PM, Russell King - ARM Linux wrote: > On Thu, Jul 12, 2018 at 11:12:45PM +0200, Daniel Borkmann wrote: >> On 07/12/2018 11:02 PM, Russell King - ARM Linux wrote: >>> On Thu, Jul 12, 2018 at 09:02:41PM +0200, Daniel Borkmann wrote: Applied to bpf-next, thanks a lot Russell!

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-13 Thread Marcelo Ricardo Leitner
On Thu, Jul 12, 2018 at 11:05:45PM -0700, Cong Wang wrote: > On Wed, Jul 11, 2018 at 12:33 PM Marcelo Ricardo Leitner > wrote: > > > > On Tue, Jul 10, 2018 at 07:25:53PM -0700, Cong Wang wrote: > > > On Mon, Jul 9, 2018 at 2:40 PM Marcelo Ricardo Leitner > > > wrote: > > > > > > > > On Mon, Jul

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-13 Thread Marcelo Ricardo Leitner
On Thu, Jul 12, 2018 at 10:07:30PM -0700, Cong Wang wrote: > On Wed, Jul 11, 2018 at 11:37 AM Marcelo Ricardo Leitner > wrote: > > > > On Tue, Jul 10, 2018 at 07:32:43PM -0700, Cong Wang wrote: > > > On Mon, Jul 9, 2018 at 12:53 PM Marcelo Ricardo Leitner > > > wrote: > > > > > > > > On Mon, Jul

Re: [PATCH net] skbuff: Unconditionally copy pfmemalloc in __skb_clone()

2018-07-13 Thread Sabrina Dubroca
2018-07-13, 13:21:07 +0200, Stefano Brivio wrote: > Commit 8b7008620b84 ("net: Don't copy pfmemalloc flag in > __copy_skb_header()") introduced a different handling for the > pfmemalloc flag in copy and clone paths. > > In __skb_clone(), now, the flag is set only if it was set in the > original

[PATCH net-next] cxgb4: do not return DUPLEX_UNKNOWN when link is down

2018-07-13 Thread Ganesh Goudar
We were returning DUPLEX_UNKNOWN in get_link_ksettings() when the link was down. Unfortunately, this causes a problem when "ethtool -s autoneg on" is issued for a link which is down because the ethtool code first reads the settings and then reapplies them with only the changes provided on the

[PATCH v5 net-next 01/18] net: Add decrypted field to skb

2018-07-13 Thread Boris Pismenny
The decrypted bit is propogated to cloned/copied skbs. This will be used later by the inline crypto receive side offload of tls. Signed-off-by: Boris Pismenny Signed-off-by: Ilya Lesokhin --- include/linux/skbuff.h | 7 ++- net/core/skbuff.c | 6 ++ 2 files changed, 12

[PATCH v5 net-next 16/18] net/mlx5e: TLS, build TLS netdev from capabilities

2018-07-13 Thread Boris Pismenny
This patch enables TLS Rx based on available HW capabilities. Signed-off-by: Boris Pismenny --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c

[PATCH v5 net-next 06/18] tls: Split decrypt_skb to two functions

2018-07-13 Thread Boris Pismenny
Previously, decrypt_skb also updated the TLS context. Now, decrypt_skb only decrypts the payload using the current context, while decrypt_skb_update also updates the state. Later, in the tls_device Rx flow, we will use decrypt_skb directly. Signed-off-by: Boris Pismenny --- include/net/tls.h |

[PATCH v5 net-next 17/18] net/mlx5: Accel, add common metadata functions

2018-07-13 Thread Boris Pismenny
This patch adds common functions to handle mellanox metadata headers. These functions are used by IPsec and TLS to process FPGA metadata. Signed-off-by: Boris Pismenny --- .../net/ethernet/mellanox/mlx5/core/accel/accel.h | 37 ++

[PATCH v5 net-next 18/18] net/mlx5e: IPsec, fix byte count in CQE

2018-07-13 Thread Boris Pismenny
This patch fixes the byte count indication in CQE for processed IPsec packets that contain a metadata header. Signed-off-by: Boris Pismenny --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h | 2 +-

[PATCH v5 net-next 13/18] net/mlx5e: TLS, add innova rx support

2018-07-13 Thread Boris Pismenny
Add the mlx5 implementation of the TLS Rx routines to add/del TLS contexts, also add the tls_dev_resync_rx routine to work with the TLS inline Rx crypto offload infrastructure. Signed-off-by: Boris Pismenny Signed-off-by: Ilya Lesokhin --- .../net/ethernet/mellanox/mlx5/core/en_accel/tls.c |

[PATCH v5 net-next 15/18] net/mlx5e: TLS, add software statistics

2018-07-13 Thread Boris Pismenny
This patch adds software statistics for TLS to count important events. Signed-off-by: Boris Pismenny --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h | 4

  1   2   >