[PATCH net-next 00/12] sfc: support PTP on 8000 and X2000 series NICs

2018-01-25 Thread Edward Cree
patches to apply cleanly. Bert Kenward (1): sfc: remove tx and MCDI handling from NAPI budget consideration Edward Cree (2): sfc: on 8000 series use TX queues for TX timestamps sfc: support second + quarter ns time format for receive datapath Laurence Evans (3): sfc: simplify RX datapath

[PATCH net-next 01/12] sfc: remove tx and MCDI handling from NAPI budget consideration

2018-01-25 Thread Edward Cree
From: Bert Kenward <bkenw...@solarflare.com> The NAPI budget is only for RX processing work, not other work such as TX or MCDI completion handling. Signed-off-by: Bert Kenward <bkenw...@solarflare.com> Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/etherne

[PATCH net-next 02/12] sfc: handle TX timestamps in the normal data path

2018-01-25 Thread Edward Cree
Habets <mhab...@solarflare.com> Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ef10.c | 87 +++ drivers/net/ethernet/sfc/net_driver.h | 9 drivers/net/ethernet/sfc/nic.h| 1 + drivers/net/ethernet/sfc

[PATCH net-next 03/12] sfc: add function to determine which TX timestamping method to use

2018-01-25 Thread Edward Cree
From: Martin Habets <mhab...@solarflare.com> Use MC capability MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_TIMESTAMPING to detect whether the NIC supports timestamping packets sent out the main datapath. Signed-off-by: Martin Habets <mhab...@solarflare.com> Signed-off-by: Edw

[PATCH net-next 04/12] sfc: use main datapath for HW timestamps if available

2018-01-25 Thread Edward Cree
;ptp_data properly to avoid the 2nd call blowing up. Signed-off-by: Martin Habets <mhab...@solarflare.com> Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ef10.c | 9 +--- drivers/net/ethernet/sfc/ptp.c | 48 +++--

[PATCH net-next 05/12] sfc: only enable TX timestamping if the adapter is licensed for it

2018-01-25 Thread Edward Cree
From: Martin Habets <mhab...@solarflare.com> If we try to enable the feature and do not have the license for it, the MCPU will refuse and fail our TX queue init. Signed-off-by: Martin Habets <mhab...@solarflare.com> Signed-off-by: Edward Cree <ec...@solarflare.com> --- driver

[PATCH net-next 06/12] sfc: MAC TX timestamp handling on the 8000 series

2018-01-25 Thread Edward Cree
From: Martin Habets <mhab...@solarflare.com> TX timestamps on 8000 series are supplied from the MAC. This timestamp is only 48 bits long. The high order bits from the last time sync event are used for the top 16 bits. Signed-off-by: Martin Habets <mhab...@solarflare.com> Signed-of

[PATCH net-next 07/12] sfc: on 8000 series use TX queues for TX timestamps

2018-01-25 Thread Edward Cree
For this we create and use one or more new TX queues on the PTP channel, and enable sync events for it. Based on a patch by Martin Habets <mhab...@solarflare.com>. Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ef10.c | 12 ++-- drivers/

[PATCH net-next 08/12] sfc: only advertise TX timestamping if we have the license for it

2018-01-25 Thread Edward Cree
ed-off-by: Martin Habets <mhab...@solarflare.com> Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ef10.c | 6 +- drivers/net/ethernet/sfc/ptp.c | 11 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/ef

[PATCH net-next 09/12] sfc: simplify RX datapath timestamping

2018-01-25 Thread Edward Cree
From: Laurence Evans <lev...@solarflare.com> Use timestamp conversion function with correction to avoid duplicate correction handling. Signed-off-by: Laurence Evans <lev...@solarflare.com> Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ether

[PATCH net-next 10/12] sfc: support separate PTP and general timestamping

2018-01-25 Thread Edward Cree
ed-off-by: Laurence Evans <lev...@solarflare.com> Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ptp.c | 58 +++--- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/sfc/ptp.c b/driver

[PATCH net-next 11/12] sfc: support second + quarter ns time format for receive datapath

2018-01-25 Thread Edward Cree
com> and Laurence Evans <lev...@solarflare.com>. Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ptp.c | 139 +++-- 1 file changed, 106 insertions(+), 33 deletions(-) diff --git a/drivers/net/ethernet/sfc/ptp.c b/driver

[PATCH net-next 12/12] sfc: support Medford2 frequency adjustment format

2018-01-25 Thread Edward Cree
From: Laurence Evans <lev...@solarflare.com> Support increased precision frequency adjustment format (FP44) used by Medford2 adapters. Signed-off-by: Laurence Evans <lev...@solarflare.com> Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ether

Re: [PATCH] bpf, doc: Correct one wrong value in "Register value tracking"

2018-01-24 Thread Edward Cree
egister state can also be updated by conditional > branches. For instance, if a SCALAR_VALUE is compared > 8, in the 'true' > branch Acked-by: Edward Cree <ec...@solarflare.com>

Re: [PATCH bpf] bpf: do not modify min/max bounds on scalars with constant values

2018-01-12 Thread Edward Cree
On 12/01/18 19:23, Daniel Borkmann wrote: > syzkaller generated a BPF proglet and triggered a warning with > the following: > > 0: (b7) r0 = 0 > 1: (d5) if r0 s<= 0x0 goto pc+0 >R0=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 > 2: (1f) r0 -= r1 >R0=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 >

[RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-08 Thread Edward Cree
do with - see comment on patch #2. Edward Cree (2): bpf/verifier: validate func_calls by marking at do_check() time bpf/verifier: update selftests include/linux/bpf_verifier.h| 24 +- kernel/bpf/verifier.c | 425 +++- tools/test

[RFC PATCH bpf-next 1/2] bpf/verifier: validate func_calls by marking at do_check() time

2018-02-08 Thread Edward Cree
Removes a couple of passes from the verifier, one to check subprogs don't overlap etc., and one to compute max stack depth (which now is done by topologically sorting the call graph). Signed-off-by: Edward Cree <ec...@solarflare.com> --- include/linux/bpf_verifier.h | 24 ++- kern

[RFC PATCH bpf-next 2/2] bpf/verifier: update selftests

2018-02-08 Thread Edward Cree
still not 100% sure that's right though. Signed-off-by: Edward Cree <ec...@solarflare.com> --- tools/testing/selftests/bpf/test_verifier.c | 46 ++--- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/tools/testing/selftests/bpf/test_verifier.c b/t

Re: [RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-12 Thread Edward Cree
On 10/02/18 03:18, Alexei Starovoitov wrote: > On Thu, Feb 08, 2018 at 07:31:55PM +0000, Edward Cree wrote: >> By storing subprog boundaries as a subprogno mark on each insn, rather than >> a start (and implicit end) for each subprog, we collect a number of gains: >

Re: [RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-13 Thread Edward Cree
On 13/02/18 05:09, John Fastabend wrote: > I have some code that is getting close to working on bounded loops. Here > is how I think it should work, (with some annotations on what I have). Thanks for this!  For comparison, since my code is also 'getting close to  working' here's how my approach

[RFC PATCH bpf-next 07/12] bpf/verifier: allow bounded loops with JLT/true back-edge

2018-02-23 Thread Edward Cree
ne whether the recursion was bounded. Signed-off-by: Edward Cree <ec...@solarflare.com> --- include/linux/bpf_verifier.h | 5 + kernel/bpf/verifier.c| 295 +++ 2 files changed, 244 insertions(+), 56 deletions(-) diff --git a/include/linux/bpf_veri

[RFC PATCH bpf-next 08/12] bpf/verifier: selftests for bounded loops

2018-02-23 Thread Edward Cree
Mainly consists of tests that broke (or I expected to break) earlier versions of the bounded-loop handling. Also updated some existing tests to deal with changed error messages, programs now being accepted etc. Signed-off-by: Edward Cree <ec...@solarflare.com> --- tools/testing/selftes

[RFC PATCH bpf-next 05/12] bpf/verifier: detect loops dynamically rather than statically

2018-02-23 Thread Edward Cree
walked before reaching the back-edge are valid. Signed-off-by: Edward Cree <ec...@solarflare.com> --- include/linux/bpf_verifier.h| 2 + kernel/bpf/verifier.c | 280 +--- tools/testing/selftests/bpf/test_verifier.c | 12 +- 3

[RFC PATCH bpf-next 06/12] bpf/verifier: do not walk impossible branches

2018-02-23 Thread Edward Cree
ion is known to have been met. Signed-off-by: Edward Cree <ec...@solarflare.com> --- kernel/bpf/verifier.c | 53 ++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index e7d898f4fd29..7a8

[RFC/PoC PATCH bpf-next 00/12] bounded loops for eBPF

2018-02-23 Thread Edward Cree
The main object of this patch series is to support verification of eBPF programs with bounded loops. Only bounds derived from JLT (unsigned <) with the taken branch in the loop are supported, but it should be clear how others could be added. Testing of these changes has consisted only of

[RFC PATCH bpf-next 03/12] bpf/verifier: per-register parent pointers

2018-02-23 Thread Edward Cree
-r5 into the callee as args, and r0 out as the return value) they also copy the parent pointer. Signed-off-by: Edward Cree <ec...@solarflare.com> --- include/linux/bpf_verifier.h | 8 +- kernel/bpf/verifier.c| 180 ++- 2 files changed, 45 inse

[RFC PATCH bpf-next 04/12] bpf/verifier: store insn_idx instead of callsite in bpf_func_state

2018-02-23 Thread Edward Cree
This means each entry in the parentage chain can have its insn identified, which will help to support bounded-loop handling later. Signed-off-by: Edward Cree <ec...@solarflare.com> --- include/linux/bpf_verifier.h | 6 -- kernel/bpf/verifier.c| 22 +++--- 2

[RFC PATCH bpf-next 02/12] bpf/verifier: update selftests

2018-02-23 Thread Edward Cree
still not 100% sure that's right though. Signed-off-by: Edward Cree <ec...@solarflare.com> --- tools/testing/selftests/bpf/test_verifier.c | 46 ++--- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/tools/testing/selftests/bpf/test_verifier.c b/t

[RFC PATCH bpf-next 11/12] bpf/verifier: better detection of statically unreachable code

2018-02-23 Thread Edward Cree
essentially the same "where does the jump go" calculations as placing state list marks, do both in the same pass. Signed-off-by: Edward Cree <ec...@solarflare.com> --- kernel/bpf/verifier.c | 149 +- 1 file changed, 88 insertions(

[RFC PATCH bpf-next 12/12] bpf/verifier: update selftests

2018-02-23 Thread Edward Cree
Slight change to message when execution can run off the end of the program. Signed-off-by: Edward Cree <ec...@solarflare.com> --- tools/testing/selftests/bpf/test_verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_verifier.c b

[RFC PATCH bpf-next 01/12] bpf/verifier: validate func_calls by marking at do_check() time

2018-02-23 Thread Edward Cree
Removes a couple of passes from the verifier, one to check subprogs don't overlap etc., and one to compute max stack depth (which now is done by topologically sorting the call graph). Signed-off-by: Edward Cree <ec...@solarflare.com> --- As noted in the cover letter, I haven't yet inte

[RFC PATCH bpf-next 09/12] bpf/verifier: count still-live children of explored_states

2018-02-23 Thread Edward Cree
reached an exit. Includes a check at free_states() time to ensure that all the reference counts have fallen to zero. Signed-off-by: Edward Cree <ec...@solarflare.com> --- include/linux/bpf_verifier.h | 3 +- kernel/bpf/verifier.c| 109 --- 2

[RFC PATCH bpf-next 10/12] bpf/verifier: parent state pointer is not per-frame

2018-02-23 Thread Edward Cree
Computing min_frame in find_loop and using it to detect recursion means we don't need to play games with per-frame parent pointers, and can instead have a single parent pointer in the verifier_state. Signed-off-by: Edward Cree <ec...@solarflare.com> --- include/linux/bpf_verifier.

Re: [PATCH] bpf: verifier: BPF_MOV don't mark dst reg if src == dst

2018-07-30 Thread Edward Cree
On 30/07/18 13:03, Daniel Borkmann wrote: > On 07/30/2018 12:58 PM, Arthur Fabre wrote: >> The check_alu_op() call handles 32bit and 64bit cases, but then in the >> 32bit case >> mark_reg_unknown() is called, discarding all the dst register state. >> I think this is equivalent to keeping a copy of

Re: [PATCH v2] bpf: verifier: MOV64 don't mark dst reg unbounded

2018-07-31 Thread Edward Cree
ase for MOV64 dst == src, and dst != src. > > Signed-off-by: Arthur Fabre > --- > v2: Add mov64 tests, always use DST_OP_NO_MARK > > kernel/bpf/verifier.c | 6 +++-- > tools/testing/selftests/bpf/test_verifier.c | 26 +++++ > 2 files changed, 30 insertions(+), 2 deletions(-) Acked-by: Edward Cree

Re: [bpf-next RFC 1/3] flow_dissector: implements flow dissector BPF hook

2018-08-16 Thread Edward Cree
On 16/08/18 17:44, Petar Penkov wrote: > 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 kept as a global variable so it is > accessible to all flow

[RFC PATCH v2 bpf-next 0/2] verifier liveness simplification

2018-08-22 Thread Edward Cree
. The second patch adds information about misc/zero data on the stack to the state dumps emitted to the log at various points; this information was found essential in debugging the first patch, and may be useful elsewhere. Edward Cree (2): bpf/verifier: per-register parent pointers bpf/verifier

[RFC PATCH v2 bpf-next 2/2] bpf/verifier: display non-spill stack slot types in print_verifier_state

2018-08-22 Thread Edward Cree
where its first byte was STACK_ZERO. Instead, print eight characters with either 0 (STACK_ZERO), m (STACK_MISC) or ? (STACK_INVALID) for any stack slot which is neither STACK_SPILL nor entirely STACK_INVALID. Signed-off-by: Edward Cree --- kernel/bpf/verifier.c | 32

[RFC PATCH v2 bpf-next 1/2] bpf/verifier: per-register parent pointers

2018-08-22 Thread Edward Cree
-r5 into the callee as args, and r0 out as the return value) they also copy the parent pointer. Signed-off-by: Edward Cree --- include/linux/bpf_verifier.h | 8 +- kernel/bpf/verifier.c| 184 +++ 2 files changed, 47 insertions(+), 145 deletions

Re: [PATCH RFC bpf-next] bpf: per-register parent pointers

2018-07-19 Thread Edward Cree
On 18/07/18 04:54, Alexei Starovoitov wrote: > I'd like to apply it, but I see the difference in insn_processed. > Several cilium tests show favorable difference towards new liveness approach. > selftests/bpf/test_xdp_noinline.o also shows the difference. > I'm struggling to see why this patch

Re: [PATCH net-next 1/2] docs: Add rest label the_canonical_path_format

2018-07-25 Thread Edward Cree
On 25/07/18 03:50, Tobin C. Harding wrote: > In preparation to convert Documentation/network/netdev-FAQ.rst to > restructured text format we would like to be able to reference 'the > canonical patch format' section. > > Add rest label: 'the_canonical_path_format'. Here and in the Subject, 'patch'

[RFC PATCH net-next 0/4] net: batched receive in GRO path

2018-08-30 Thread Edward Cree
int): net-next: 4.756 Gbit/s (sigma 0.240) after #4: 5.355 Gbit/s (sigma 0.232) = datum + 12.6% Edward Cree (4): net: introduce list entry point for GRO sfc: use batched receive for GRO net: make listified RX functions return number of good packets net/core: handle GRO_NORMAL skbs as a l

[RFC PATCH net-next 1/4] net: introduce list entry point for GRO

2018-08-30 Thread Edward Cree
Also export napi_frags_skb() so that drivers using the napi_gro_frags() interface can prepare their SKBs properly for submitting on such a list. Signed-off-by: Edward Cree --- include/linux/netdevice.h | 2 ++ net/core/dev.c| 28 +++- 2 files changed, 29

[RFC PATCH net-next 4/4] net/core: handle GRO_NORMAL skbs as a list in napi_gro_receive_list

2018-08-30 Thread Edward Cree
Allows GRO-using drivers to get the benefits of batching for non-GROable traffic. Signed-off-by: Edward Cree --- net/core/dev.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index ac9741273c62..f9391f76feb7 100644

[RFC PATCH net-next 3/4] net: make listified RX functions return number of good packets

2018-08-30 Thread Edward Cree
Signed-off-by: Edward Cree --- include/linux/netdevice.h | 4 +-- include/net/ip.h | 4 +-- include/net/ipv6.h| 4 +-- net/core/dev.c| 63 +-- net/ipv4/ip_input.c | 39 ++--- net/ipv6

[RFC PATCH net-next 2/4] sfc: use batched receive for GRO

2018-08-30 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx.c| 11 +-- drivers/net/ethernet/sfc/net_driver.h | 1 + drivers/net/ethernet/sfc/rx.c | 16 +--- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx.c b

Re: [PATCH bpf-next] bpf/verifier: properly clear union members after a ctx read

2018-09-05 Thread Edward Cree
: f1174f77b50c ("bpf/verifier: rework value tracking") > Debugged-by: Edward Cree > Signed-off-by: Alexei Starovoitov Acked-by: Edward Cree

[PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-05 Thread Edward Cree
-separated list of FEC modes in the 'encoding' argument on the command line. Also adds --set-fec tests to test-cmdline.c, and corrects the man page (the encoding argument is not optional) while updating it. Signed-off-by: Edward Cree --- I've CCed the maintainers of the other drivers (cxgb4, nfp

[PATCH bpf-next] bpf/verifier: properly clear union members after a ctx read

2018-09-04 Thread Edward Cree
in place. This then caused the memcmp() in regsafe() to fail, preventing some branches from being pruned (and occasionally causing the same program to take a varying number of processed insns on repeated verifier runs). Signed-off-by: Edward Cree --- Possibly something might need adding

[PATCH v2 net-next 0/4] net: batched receive in GRO path

2018-09-06 Thread Edward Cree
int): net-next: 4.756 Gbit/s (sigma 0.240) after #4: 5.355 Gbit/s (sigma 0.232) = datum + 12.6% v2: Rebased on latest net-next. Removed RFC tags. Otherwise unchanged owing to lack of comments on v1. Edward Cree (4): net: introduce list entry point for GRO sfc: use batched receive for GRO

[PATCH v2 net-next 3/4] net: make listified RX functions return number of good packets

2018-09-06 Thread Edward Cree
Signed-off-by: Edward Cree --- include/linux/netdevice.h | 4 +-- include/net/ip.h | 4 +-- include/net/ipv6.h| 4 +-- net/core/dev.c| 63 +-- net/ipv4/ip_input.c | 39 ++--- net/ipv6

[PATCH v2 net-next 4/4] net/core: handle GRO_NORMAL skbs as a list in napi_gro_receive_list

2018-09-06 Thread Edward Cree
Allows GRO-using drivers to get the benefits of batching for non-GROable traffic. Signed-off-by: Edward Cree --- net/core/dev.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 69e2819994e4..9a937d2ac83b 100644

[PATCH v2 net-next 2/4] sfc: use batched receive for GRO

2018-09-06 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx.c| 11 +-- drivers/net/ethernet/sfc/net_driver.h | 1 + drivers/net/ethernet/sfc/rx.c | 16 +--- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx.c b

[PATCH v2 net-next 1/4] net: introduce list entry point for GRO

2018-09-06 Thread Edward Cree
Also export napi_frags_skb() so that drivers using the napi_gro_frags() interface can prepare their SKBs properly for submitting on such a list. Signed-off-by: Edward Cree --- include/linux/netdevice.h | 2 ++ net/core/dev.c| 28 +++- 2 files changed, 29

Re: [PATCH v2 net-next 3/4] net: make listified RX functions return number of good packets

2018-09-07 Thread Edward Cree
On 07/09/18 03:27, Eric Dumazet wrote: > On 09/06/2018 07:26 AM, Edward Cree wrote: >> Signed-off-by: Edward Cree > Lack of changelog here ? > > I do not know what is a good packet. The comment on netif_receive_skb_list() defines this as "skbs for which  netif_receive_sk

Re: [PATCH v2 net-next 0/4] net: batched receive in GRO path

2018-09-07 Thread Edward Cree
On 07/09/18 03:32, Eric Dumazet wrote: > Your performance numbers are not convincing, since TCP stream test should > get nominal GRO gains. I'm not quite sure what you mean here, could you explain a bit more? > Adding this complexity and icache pressure needs more experimental results. > > What

[PATCH net-next 1/2] net: ipv4: fix list processing on L3 slave devices

2018-07-05 Thread Edward Cree
be different in the single packet path (return NET_RX_SUCCESS) and the list path (forget this packet and continue). Fixes: 5fa12739a53d net: ipv4: listify ip_rcv_finish Signed-off-by: Edward Cree --- net/ipv4/ip_input.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions

[PATCH net-next 2/2] net: ipv6: listify ipv6_rcv() and ip6_rcv_finish()

2018-07-05 Thread Edward Cree
Essentially the same as the ipv4 equivalents. Signed-off-by: Edward Cree --- include/net/ipv6.h | 2 + net/ipv6/af_inet6.c | 1 + net/ipv6/ip6_input.c | 131 --- 3 files changed, 118 insertions(+), 16 deletions(-) diff --git a/include/net

[PATCH net-next 0/2] IP listification follow-ups

2018-07-05 Thread Edward Cree
While working on IPv6 list processing, I found another bug in the IPv4 version. So this patch series has that fix, and the IPv6 version with both fixes incorporated. Edward Cree (2): net: ipv4: fix list processing on L3 slave devices net: ipv6: listify ipv6_rcv() and ip6_rcv_finish

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

2018-07-11 Thread Edward Cree
o ip_forward. > > Fixes: 5fa12739a53d ("net: ipv4: listify ip_rcv_finish") > Signed-off-by: Jesper Dangaard Brouer Acked-by: Edward Cree But it feels weird and asymmetric to only NULL skb->next (not ->prev), and  to have to do this by hand rather than e.g. being able to use  list

[PATCH net-next 2/3] netfilter: fix use-after-free in NF_HOOK_LIST

2018-07-06 Thread Edward Cree
nf_hook() can free the skb, so we need to remove it from the list before calling, and add passed skbs to a sublist afterwards. Fixes: 17266ee93984 ("net: ipv4: listified version of ip_rcv") Reported-by: Dan Carpenter Signed-off-by: Edward Cree --- include/linux/netfilter.h | 10 +++

[PATCH net-next 3/3] net: refactor dequeue-model list processing

2018-07-06 Thread Edward Cree
New macro list_for_each_entry_dequeue loops over a list by popping entries from the head, allowing a more concise expression of the dequeue-enqueue model of list processing and avoiding the need for a 'next' pointer (as used in list_for_each_entry_safe). Signed-off-by: Edward Cree

[PATCH net-next 1/3] net: core: fix uses-after-free in list processing

2018-07-06 Thread Edward Cree
afterwards. In the case of enqueue_to_backlog() we have already decided not to pass when we call the function, so we do not need a sublist. Fixes: 7da517a3bc52 ("net: core: Another step of skb receive list processing") Reported-by: Dan Carpenter Signed-off-by: Edward Cree --- net/core/

[PATCH net-next 0/3] fix use-after-free bugs in skb list processing

2018-07-06 Thread Edward Cree
), and then adds a list.h helper macro to refactor code using the dequeue-enqueue model. Edward Cree (3): net: core: fix uses-after-free in list processing netfilter: fix use-after-free in NF_HOOK_LIST net: refactor dequeue-model list processing include/linux/list.h | 15 +++ include

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

[PATCH v2 net-next 2/2] netfilter: fix use-after-free in NF_HOOK_LIST

2018-07-09 Thread Edward Cree
nf_hook() can free the skb, so we need to remove it from the list before calling, and add passed skbs to a sublist afterwards. Fixes: 17266ee93984 ("net: ipv4: listified version of ip_rcv") Reported-by: Dan Carpenter Signed-off-by: Edward Cree --- include/linux/netfilter.h | 10 +++

[PATCH v2 net-next 1/2] net: core: fix uses-after-free in list processing

2018-07-09 Thread Edward Cree
afterwards. In the case of enqueue_to_backlog() we have already decided not to pass when we call the function, so we do not need a sublist. Fixes: 7da517a3bc52 ("net: core: Another step of skb receive list processing") Reported-by: Dan Carpenter Signed-off-by: Edward Cree --- net/core/

[PATCH v2 net-next 0/2] fix use-after-free bugs in skb list processing

2018-07-09 Thread Edward Cree
patch #3 (new list.h helper), per DaveM's request. Edward Cree (2): net: core: fix uses-after-free in list processing netfilter: fix use-after-free in NF_HOOK_LIST include/linux/netfilter.h | 10 +++--- net/core/dev.c| 21 + 2 files changed, 20 insertions

[PATCH v3 net-next 1/3] net: core: fix uses-after-free in list processing

2018-07-09 Thread Edward Cree
afterwards. In the case of enqueue_to_backlog() we have already decided not to pass when we call the function, so we do not need a sublist. Fixes: 7da517a3bc52 ("net: core: Another step of skb receive list processing") Reported-by: Dan Carpenter Signed-off-by: Edward Cree --- net/core/

[PATCH v3 net-next 2/3] netfilter: fix use-after-free in NF_HOOK_LIST

2018-07-09 Thread Edward Cree
nf_hook() can free the skb, so we need to remove it from the list before calling, and add passed skbs to a sublist afterwards. Fixes: 17266ee93984 ("net: ipv4: listified version of ip_rcv") Reported-by: Dan Carpenter Signed-off-by: Edward Cree --- include/linux/netfilter.h | 10 +++

[PATCH v3 net-next 0/3] fix use-after-free bugs in skb list processing

2018-07-09 Thread Edward Cree
another similar bug in __netif_receive_skb_list_core(). v2: dropped patch #3 (new list.h helper), per DaveM's request. Edward Cree (3): net: core: fix uses-after-free in list processing netfilter: fix use-after-free in NF_HOOK_LIST net: core: fix use-after-free in __netif_receive_skb_list_core

[PATCH v3 net-next 3/3] net: core: fix use-after-free in __netif_receive_skb_list_core

2018-07-09 Thread Edward Cree
__netif_receive_skb_core can free the skb, so we have to use the dequeue- enqueue model when calling it from __netif_receive_skb_list_core. Fixes: 88eb1944e18c ("net: core: propagate SKB lists through packet_type lookup") Signed-off-by: Edward Cree --- net/core/dev.c | 9 +++

Re: [PATCH v4 net-next 7/9] net: ipv4: listified version of ip_rcv

2018-07-04 Thread Edward Cree
On 02/07/18 16:14, Edward Cree wrote: > +/* Receive a list of IP packets */ > +void ip_list_rcv(struct list_head *head, struct packet_type *pt, > + struct net_device *orig_dev) > +{ > + struct net_device *curr_dev = NULL; > + struct net *curr_net = NULL; >

[PATCH net-next] net: ipv4: fix drop handling in ip_list_rcv() and ip_list_rcv_finish()

2018-07-04 Thread Edward Cree
ore processing, and add it to the sublist afterwards if it wasn't freed or stolen. Fixes: 5fa12739a53d net: ipv4: listify ip_rcv_finish Fixes: 17266ee93984 net: ipv4: listified version of ip_rcv Signed-off-by: Edward Cree --- net/ipv4/ip_input.c | 16 +++- 1 file changed, 11 insertions(+)

Re: [RFC,POC] iptables/nftables to epbf/xdp via common intermediate layer

2018-03-06 Thread Edward Cree
On 06/03/18 18:03, Florian Westphal wrote: > I don't know. I suspect we should go for naive algorithm only, > but I would defer such decision to Alexei/Daniel. > > f.e. i don't know if using llvm is a good idea or not, Yeah, I wondered about that too.  I think it's probably not a good idea,  

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-12 Thread Edward Cree
On 09/03/18 18:58, Alexei Starovoitov wrote: > It's not waiting for the whole thing, because once bpfilter starts it > stays running/sleeping because it's stateful. So, this has been bugging me a bit. If bpfilter takes a signal and crashes, all that state goes away. Does that mean your

[PATCH net] net: ethtool: don't ignore return from driver get_fecparam method

2018-02-28 Thread Edward Cree
If ethtool_ops->get_fecparam returns an error, pass that error on to the user, rather than ignoring it. Fixes: 1a5f3da20bd9 ("net: ethtool: add support for forward error correction modes") Signed-off-by: Edward Cree <ec...@solarflare.com> --- net/core/ethtool.c | 5 -

Re: [PATCH RESEND net-next 0/2] ntuple filters with RSS

2018-02-27 Thread Edward Cree
On 27/02/18 17:38, David Miller wrote: > The problem is there are syntax errors in your email headers. > > Any time a person's name contains a special character like ".", > that entire string must be enclosed in double quotes. > > This is the case for "John W. Linville" so please add proper >

[PATCH RESEND net-next 0/2] ntuple filters with RSS

2018-02-27 Thread Edward Cree
with an equal-weight [0,1] indirection table could be used to target all three containers by setting ring_cookie to 1, 3 and 6 on the respective filters. Edward Cree (2): net: ethtool: extend RXNFC API to support RSS spreading of filter matches sfc: support RSS spreading of ethtool ntuple

[PATCH net-next 2/2] sfc: support RSS spreading of ethtool ntuple filters

2018-02-27 Thread Edward Cree
Use a linked list to associate user-facing context IDs with FW-facing context IDs (since the latter can change after an MC reset). Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ef10.c | 273 ++ drivers/net/ethernet/sfc

[PATCH net-next 1/2] net: ethtool: extend RXNFC API to support RSS spreading of filter matches

2018-02-27 Thread Edward Cree
-off-by: Edward Cree <ec...@solarflare.com> --- include/linux/ethtool.h | 5 include/uapi/linux/ethtool.h | 32 +- net/core/ethtool.c | 64 +--- 3 files changed, 80 insertions(+), 21 deletions(-) diff --git a/i

[PATCH ethtool 0/3] RSS ntuple filters

2018-03-09 Thread Edward Cree
This series adds support for the management of extra RSS contexts and RSS spreading of ntuple/NFC filters introduced in kernel commit 84a1d9c48200 ("net: ethtool: extend RXNFC API to support RSS spreading of filter matches"). Edward Cree (3): ethtool-copy.h: sync with net-next et

[PATCH ethtool 3/3] ethtool.8: Document RSS context control and RSS filters

2018-03-09 Thread Edward Cree
Signed-off-by: Edward Cree <ec...@solarflare.com> --- ethtool.8.in | 28 1 file changed, 28 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index 690e55e..99ac62f 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -274,6 +274,7 @@ ethtool \- query or c

[PATCH ethtool 2/3] ethtool: add support for extra RSS contexts and RSS steering filters

2018-03-09 Thread Edward Cree
RSS contexts can be created on a device with -X ... context new, modified with -X ... context N, and deleted with -X ... context N delete. N-tuple filters can be directed at those contexts with -N ... context N. Signed-off-by: Edward Cree <ec...@solarflare.com> --- ethtool.c

[PATCH ethtool 1/3] ethtool-copy.h: sync with net-next

2018-03-09 Thread Edward Cree
This covers kernel changes up to commit 84a1d9c48200, net: ethtool: extend RXNFC API to support RSS spreading of filter matches Signed-off-by: Edward Cree <ec...@solarflare.com> --- ethtool-copy.h | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-)

[PATCH v2 net-next 0/2] ntuple filters with RSS

2018-03-08 Thread Edward Cree
with an equal-weight [0,1] indirection table could be used to target all three containers by setting ring_cookie to 1, 3 and 6 on the respective filters. v2: Initialised ctx in efx_ef10_filter_insert() to avoid (false positive) gcc warning. Edward Cree (2): net: ethtool: extend RXNFC API

[PATCH v2 net-next 2/2] sfc: support RSS spreading of ethtool ntuple filters

2018-03-08 Thread Edward Cree
Use a linked list to associate user-facing context IDs with FW-facing context IDs (since the latter can change after an MC reset). Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ef10.c | 273 ++ drivers/net/ethernet/sfc

[PATCH v2 net-next 1/2] net: ethtool: extend RXNFC API to support RSS spreading of filter matches

2018-03-08 Thread Edward Cree
-off-by: Edward Cree <ec...@solarflare.com> --- include/linux/ethtool.h | 5 include/uapi/linux/ethtool.h | 32 +- net/core/ethtool.c | 64 +--- 3 files changed, 80 insertions(+), 21 deletions(-) diff --git a/i

Re: [RFC,POC] iptables/nftables to epbf/xdp via common intermediate layer

2018-03-06 Thread Edward Cree
On 06/03/18 16:42, Florian Westphal wrote: > I would also add 'highlevel' objects that are themselves translated into > basic operations. Most obvious example > are 'fetch 4 bytes x bytes into transport header'. > > Frontend should not need to bother with ipv4 details, such as ip > options.

Re: [PATCH RESEND net-next 0/2] ntuple filters with RSS

2018-03-07 Thread Edward Cree
On 07/03/18 15:24, David Miller wrote: > Ok. > > Since nobody is really working on the ethtool --> devlink/netlink conversion, > it really isn't reasonable for me to block useful changes like your's. > > So please resubmit this series and I will apply it. > > Thanks. Ok, thanks.  Should I stick

[PATCH net-next 0/2] sfc: support FEC configuration

2018-03-14 Thread Edward Cree
Implements the ethtool get & set fecparam operations. Edward Cree (2): sfc: update MCDI protocol headers sfc: support FEC configuration through ethtool drivers/net/ethernet/sfc/ethtool.c| 32 + drivers/net/ethernet/sfc/mcdi_pcol.h | 2822 + drivers

[PATCH net-next 2/2] sfc: support FEC configuration through ethtool

2018-03-14 Thread Edward Cree
rs|baser (with or without auto bit) means prefer FEC even where auto wouldn't use it, but let FW choose which encoding to use. Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ethtool.c| 32 drivers/net/ethernet/sfc/mcdi_port

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-04 Thread Edward Cree
On 04/04/18 00:37, Alexei Starovoitov wrote: > hmm. that doesn't fail for me and any other bots didn't complain. > Are you sure you're running the latest kernel and tests? Ah, test_progs isn't actually rebuilding because __NR_bpf is undeclared;  something must be going wrong with header files.

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-05 Thread Edward Cree
On 05/04/18 06:28, Alexei Starovoitov wrote: > On Thu, Apr 05, 2018 at 12:58:46AM +0100, Edward Cree wrote: >> On 04/04/18 00:37, Alexei Starovoitov wrote: >>> hmm. that doesn't fail for me and any other bots didn't complain. >>> Are you sure you're running the lat

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-05 Thread Edward Cree
On 05/04/18 16:50, Jiong Wang wrote: > On 03/04/2018 02:08, Alexei Starovoitov wrote: >> Combining subprog pass with do_check is going into opposite direction >> of this long term work. Divide and conquer. Combining more things into >> do_check is the opposite of this programming principle. > >

[PATCH net 0/2] sfc: couple of ARFS fixes

2018-04-12 Thread Edward Cree
in the bad configuration by default, but that too is a problem for another time.) Edward Cree (2): sfc: insert ARFS filters with replace_equal=true sfc: limit ARFS workitems in flight per channel drivers/net/ethernet/sfc/net_driver.h | 25 +++ drivers/net/ethernet/sfc/rx.c

[PATCH net 2/2] sfc: limit ARFS workitems in flight per channel

2018-04-12 Thread Edward Cree
-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/net_driver.h | 25 +++ drivers/net/ethernet/sfc/rx.c | 58 ++- 2 files changed, 55 insertions(+), 28 deletions(-) diff --git a/drivers/net/ethernet/sfc/net_driver.h b/d

[PATCH net 1/2] sfc: insert ARFS filters with replace_equal=true

2018-04-12 Thread Edward Cree
Necessary to allow redirecting a flow when the application moves. Fixes: 3af0f34290f6 ("sfc: replace asynchronous filter operations") Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 net 3/3] sfc: limit ARFS workitems in flight per channel

2018-04-13 Thread Edward Cree
should not negatively impact performance, because it is only likely to be hit in cases where ARFS will be ineffective anyway. Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/net_driver.h | 25 +++ drivers/net/ethernet/sfc/rx.c

[PATCH v2 net 2/3] sfc: pass the correctly bogus filter_id to rps_may_expire_flow()

2018-04-13 Thread Edward Cree
("sfc: replace asynchronous filter operations") Signed-off-by: Edward Cree <ec...@solarflare.com> --- drivers/net/ethernet/sfc/ef10.c | 3 +-- drivers/net/ethernet/sfc/farch.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sfc/ef10

<    1   2   3   4   5   6   7   >