[RFC net-next 1/1] net: sched: protect against loops in TC filter hooks

2019-05-24 Thread John Hurley
dropped if a recursive limit is passed and the counter reset for the next packet. Signed-off-by: John Hurley Reviewed-by: Simon Horman --- net/core/dev.c | 62 +++--- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/net/core/dev.c b

Re: [RFC net-next 1/1] net: sched: protect against loops in TC filter hooks

2019-05-28 Thread John Hurley
On Fri, May 24, 2019 at 7:32 PM Daniel Borkmann wrote: > > On 05/24/2019 06:05 PM, John Hurley wrote: > > TC hooks allow the application of filters and actions to packets at both > > ingress and egress of the network stack. It is possible, with poor > > configuration, tha

[RFC net-next v2 1/1] net: sched: protect against loops in TC filter hooks

2019-06-06 Thread John Hurley
red file given that it is the source of the loops. This means that the code additions are not in the main datapath. v1->v2 - change from per cpu counter to per skb tracking (Jamal) - move check/update from fast path to act_mirred (Daniel) Signed-off-by: John Hurley --- include/linux/skbuff

Re: [RFC net-next v2 1/1] net: sched: protect against loops in TC filter hooks

2019-06-06 Thread John Hurley
On Thu, Jun 6, 2019 at 1:58 PM Florian Westphal wrote: > > John Hurley wrote: > > TC hooks allow the application of filters and actions to packets at both > > ingress and egress of the network stack. It is possible, with poor > > configuration, that this can produce loops

[PATCH net-next 0/4] nfp: Offload MPLS actions

2019-07-23 Thread John Hurley
actions in the NFP driver. John Hurley (4): net: sched: include mpls actions in hardware intermediate representation nfp: flower: offload MPLS push action nfp: flower: offload MPLS pop action nfp: flower: offload MPLS set action drivers/net/ethernet/netronome/nfp/flower/action.c

[PATCH net-next 4/4] nfp: flower: offload MPLS set action

2019-07-23 Thread John Hurley
MPLS header. The offload includes a mask to specify which fields should be set. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/action.c | 45 ++ drivers/net/ethernet/netronome/nfp/flower/cmsg.h

[PATCH net-next 1/4] net: sched: include mpls actions in hardware intermediate representation

2019-07-23 Thread John Hurley
. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- include/net/flow_offload.h | 19 +++ include/net/tc_act/tc_mpls.h | 75 net/sched/cls_api.c | 25 +++ 3 files changed, 119 insertions(+) diff --git a/include/net

[PATCH net-next 3/4] nfp: flower: offload MPLS pop action

2019-07-23 Thread John Hurley
that the next protocol is supplied along with the pop action. Passing this to firmware allows it to properly rebuild the underlying packet after the pop. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/action.c | 25

[PATCH net-next 2/4] nfp: flower: offload MPLS push action

2019-07-23 Thread John Hurley
Recent additions to the kernel include a TC action module to manipulate MPLS headers on packets. Such actions are available to offload via the flow_offload intermediate representation API. Modify the NFP driver to allow the offload of MPLS push actions to firmware. Signed-off-by: John Hurley

[PATCH net-next 04/10] net: sched: add ingress mirred action to hardware IR

2019-08-04 Thread John Hurley
or not to offload them. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski --- include/net/flow_offload.h | 2 ++ net/sched/cls_api.c| 6 ++ 2 files changed, 8 insertions(+) diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h index

[PATCH net-next 02/10] net: sched: add skbedit of ptype action to hardware IR

2019-08-04 Thread John Hurley
the ptype to HOST when redirecting a packet to ingress. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski --- include/net/flow_offload.h | 2 ++ net/sched/cls_api.c| 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/net/flow_offload.h b/include

[PATCH net-next 01/10] net: tc_act: add skbedit_ptype helper functions

2019-08-04 Thread John Hurley
The tc_act header file contains an inline function that checks if an action is changing the skb mark of a packet and a further function to extract the mark. Add similar functions to check for and get skbedit actions that modify the packet type of the skb. Signed-off-by: John Hurley Reviewed-by

[PATCH net-next 00/10] Support tunnels over VLAN in NFP

2019-08-04 Thread John Hurley
able prior to decapsulation in HW allows the correct parsing and handling of outer VLANs on tunnelled packets and the correct updating of stats for said 'pre-tunnel' rules. John Hurley (10): net: tc_act: add skbedit_ptype helper functions net: sched: add skbedit of ptype action

[PATCH net-next 10/10] nfp: flower: encode mac indexes with pre-tunnel rule check

2019-08-04 Thread John Hurley
ntinuing with decap. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- .../ethernet/netronome/nfp/flower/tunnel_conf.c| 71 +- 1 file changed, 55 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/flower/tun

[PATCH net-next 08/10] nfp: flower: offload pre-tunnel rules

2019-08-04 Thread John Hurley
the tunnel decap process based on (firmware) mac index and VLAN. This means that decap can be carried out correctly with VLANs and that stats can be updated for all kernel rules correctly. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- drivers/net/ethernet

[PATCH net-next 07/10] nfp: flower: verify pre-tunnel rules

2019-08-04 Thread John Hurley
rule deletion. The actual offloading of these commands is left to a following patch. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/main.h | 5 + .../net/ethernet/netronome/nfp/flower/offload.c| 103

[PATCH net-next 05/10] nfp: flower: push vlan after tunnel in merge

2019-08-04 Thread John Hurley
(with action order being maintained). Support tunnel in VLAN pushes by encoding VLAN information in the tunnel push action of any merge flow requiring this. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 3

[PATCH net-next 09/10] nfp: flower: remove offloaded MACs when reprs are applied to OvS bridges

2019-08-04 Thread John Hurley
firmware by removing offloaded MAC addresses when a MAC representer is added to an OvS bridge. This can prevent any false positive tunnel decaps. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/main.h | 7

[PATCH net-next 03/10] net: tc_act: add helpers to detect ingress mirred actions

2019-08-04 Thread John Hurley
TC mirred actions can send to egress or ingress on a given netdev. Helpers exist to detect actions that are mirred to egress. Extend the header file to include helpers to detect ingress mirred actions. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski

[PATCH net-next 06/10] nfp: flower: detect potential pre-tunnel rules

2019-08-04 Thread John Hurley
is left to subsequent patches. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/action.c | 40 ++ drivers/net/ethernet/netronome/nfp/flower/main.h | 4 +++ .../net/ethernet/netronome/nfp/flower/offload

Re: [RFC net-next v2 1/1] net: sched: protect against loops in TC filter hooks

2019-06-11 Thread John Hurley
On Thu, Jun 6, 2019 at 8:52 PM Florian Westphal wrote: > > David Miller wrote: > > From: Florian Westphal > > Date: Thu, 6 Jun 2019 14:58:18 +0200 > > > > >> @@ -827,6 +828,7 @@ struct sk_buff { > > >>__u8tc_at_ingress:1; > > >>__u8tc_redirected:1;

[PATCH net-next 0/3] Add MPLS actions to TC

2019-06-12 Thread John Hurley
This patchset introduces a new TC action module that allows the manipulation of the MPLS headers of packets. The code impliments functionality including push, pop, and modify. Also included is a update to the IR action preparation code to allow the new MPLS actions to be offloaded to HW. John

[PATCH net-next 1/3] net: sched: add mpls manipulation actions to TC

2019-06-12 Thread John Hurley
. This includes the ability to push and pop headers as well as modify the contents of new or existing headers. A further action to decrement the TTL field of an MPLS header is also provided. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- include/net/tc_act/tc_mpls.h| 27

[PATCH net-next 2/3] net: sched: include mpls actions in hardware intermediate representation

2019-06-12 Thread John Hurley
A recent addition to TC actions is the ability to manipulate the MPLS headers on packets. In preparation to offload such actions to hardware, update the IR code to accept and prepare the new actions. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- include/net/flow_offload.h | 10

[PATCH net-next 3/3] selftests: tc-tests: actions: add MPLS tests

2019-06-12 Thread John Hurley
Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- .../tc-testing/tc-tests/actions/mpls.json | 744 + 1 file changed, 744 insertions(+) create mode 100644 tools/testing/selftests

Re: [PATCH net-next 1/3] net: sched: add mpls manipulation actions to TC

2019-06-13 Thread John Hurley
On Thu, Jun 13, 2019 at 2:20 PM Davide Caratti wrote: > > hello John! > > On Wed, 2019-06-12 at 13:51 +0100, John Hurley wrote: > > Currently, TC offers the ability to match on the MPLS fields of a packet > > through the use of the flow_dissector_key_mpls struct. However

Re: [PATCH net-next 1/3] net: sched: add mpls manipulation actions to TC

2019-06-13 Thread John Hurley
On Wed, Jun 12, 2019 at 7:03 PM Marcelo Ricardo Leitner wrote: > > On Wed, Jun 12, 2019 at 01:51:44PM +0100, John Hurley wrote: > > Currently, TC offers the ability to match on the MPLS fields of a packet > > through the use of the flow_dissector_key_mpls struct. However, as y

[PATCH net-next v2 2/3] net: sched: include mpls actions in hardware intermediate representation

2019-06-13 Thread John Hurley
A recent addition to TC actions is the ability to manipulate the MPLS headers on packets. In preparation to offload such actions to hardware, update the IR code to accept and prepare the new actions. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- include/net/flow_offload.h | 10

[PATCH net-next v2 0/3] Add MPLS actions to TC

2019-06-13 Thread John Hurley
;v2: - ensure TCA_ID_MPLS does not conflict with TCA_ID_CTINFO (Davide Caratti) John Hurley (3): net: sched: add mpls manipulation actions to TC net: sched: include mpls actions in hardware intermediate representation selftests: tc-tests: actions: add MPLS tests include/net/flow_offloa

[PATCH net-next v2 1/3] net: sched: add mpls manipulation actions to TC

2019-06-13 Thread John Hurley
. This includes the ability to push and pop headers as well as modify the contents of new or existing headers. A further action to decrement the TTL field of an MPLS header is also provided. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- include/net/tc_act/tc_mpls.h| 27

[PATCH net-next v2 3/3] selftests: tc-tests: actions: add MPLS tests

2019-06-13 Thread John Hurley
Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- .../tc-testing/tc-tests/actions/mpls.json | 744 + 1 file changed, 744 insertions(+) create mode 100644 tools/testing/selftests

Re: [PATCH net-next v2 1/3] net: sched: add mpls manipulation actions to TC

2019-06-14 Thread John Hurley
. A further action to decrement the > >TTL field of an MPLS header is also provided. > > > >Signed-off-by: John Hurley > >Reviewed-by: Jakub Kicinski > > [...] > > > >+ if (tb[TCA_MPLS_LABEL] || tb[T

[RFC net-next 0/2] Track recursive calls in TC act_mirred

2019-06-14 Thread John Hurley
looping are separate issues and should be treated as such. David Miller futher points out that pcpu counters cannot track the precise skb context required to detect loops. Hence these patches are not aimed at detecting packet loops, rather, preventing stack flows arising from such loops. John Hurley

[RFC net-next 1/2] net: sched: refactor reinsert action

2019-06-14 Thread John Hurley
t has been stolen by another process and that no consume call is required. Moving all redirect calls to the act_mirred code is in preparation for tracking recursion created by act_mirred. Signed-off-by: John Hurley Reviewed-by: Simon Horman --- include/net/pkt_cls.h | 2 +- include/net/sch_gen

[RFC net-next 2/2] net: sched: protect against stack overflow in TC act_mirred

2019-06-14 Thread John Hurley
-off-by: John Hurley Reviewed-by: Simon Horman --- net/sched/act_mirred.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 8c1d736..766fae0 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -27,6 +27,9

[PATCH net-next v3 0/2] Add MPLS actions to TC

2019-06-14 Thread John Hurley
-v3: - remove a few unnecessary line breaks (Jiri Pirko) - retract hw offload patch from set (resubmit with driver changes) (Jiri) v1->v2: - ensure TCA_ID_MPLS does not conflict with TCA_ID_CTINFO (Davide Caratti) John Hurley (2): net: sched: add mpls manipulation actions to TC selftests:

[PATCH net-next v3 2/2] selftests: tc-tests: actions: add MPLS tests

2019-06-14 Thread John Hurley
Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- .../tc-testing/tc-tests/actions/mpls.json | 744 + 1 file changed, 744 insertions(+) create mode 100644 tools/testing/selftests

[PATCH net-next v3 1/2] net: sched: add mpls manipulation actions to TC

2019-06-14 Thread John Hurley
. This includes the ability to push and pop headers as well as modify the contents of new or existing headers. A further action to decrement the TTL field of an MPLS header is also provided. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Acked-by: Jiri Pirko --- include/net/tc_act/tc_mpls.h

Re: [PATCH net-next v2 1/3] net: sched: add mpls manipulation actions to TC

2019-06-14 Thread John Hurley
On Fri, Jun 14, 2019 at 5:59 PM Cong Wang wrote: > > On Thu, Jun 13, 2019 at 10:44 AM John Hurley > wrote: > > +static inline void tcf_mpls_set_eth_type(struct sk_buff *skb, __be16 > > ethertype) > > +{ > > + struct ethhdr *hdr = eth_hdr(skb); > &g

Re: [PATCH net-next v3 1/2] net: sched: add mpls manipulation actions to TC

2019-06-14 Thread John Hurley
On Fri, Jun 14, 2019 at 6:22 PM David Ahern wrote: > > On 6/14/19 8:58 AM, John Hurley wrote: > > Currently, TC offers the ability to match on the MPLS fields of a packet > > through the use of the flow_dissector_key_mpls struct. However, as yet, TC > > actions do not a

Re: [PATCH net-next v2 1/3] net: sched: add mpls manipulation actions to TC

2019-06-17 Thread John Hurley
On Mon, Jun 17, 2019 at 10:18 PM Cong Wang wrote: > > On Fri, Jun 14, 2019 at 3:56 PM John Hurley wrote: > > > > On Fri, Jun 14, 2019 at 5:59 PM Cong Wang wrote: > > > > > > On Thu, Jun 13, 2019 at 10:44 AM John Hurley > > > wrote: > > &

Re: [RFC net-next 1/2] net: sched: refactor reinsert action

2019-06-17 Thread John Hurley
On Mon, Jun 17, 2019 at 7:44 PM Edward Cree wrote: > > On 14/06/2019 15:33, John Hurley wrote: > > Instead of > > returning TC_ACT_REINSERT, change the type to the new TC_ACT_CONSUMED > > which tells the caller that the packet has been stolen by another process > &g

[PATCH net-next 0/2] Track recursive calls in TC act_mirred

2019-06-24 Thread John Hurley
looping are separate issues and should be treated as such. David Miller futher points out that pcpu counters cannot track the precise skb context required to detect loops. Hence these patches are not aimed at detecting packet loops, rather, preventing stack flows arising from such loops. John Hurley

[PATCH net-next 2/2] net: sched: protect against stack overflow in TC act_mirred

2019-06-24 Thread John Hurley
-off-by: John Hurley Reviewed-by: Simon Horman --- net/sched/act_mirred.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 8c1d736..c3fce36 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -27,6 +27,9

[PATCH net-next 1/2] net: sched: refactor reinsert action

2019-06-24 Thread John Hurley
t has been stolen by another process and that no consume call is required. Moving all redirect calls to the act_mirred code is in preparation for tracking recursion created by act_mirred. Signed-off-by: John Hurley Reviewed-by: Simon Horman --- include/net/pkt_cls.h | 2 +- include/net/sch_gen

Re: [PATCH net-next 2/2] net: sched: protect against stack overflow in TC act_mirred

2019-06-25 Thread John Hurley
On Tue, Jun 25, 2019 at 9:30 AM Eyal Birger wrote: > > Hi John, > > On Mon, 24 Jun 2019 23:13:36 +0100 > John Hurley wrote: > > > TC hooks allow the application of filters and actions to packets at > > both ingress and egress of the network stack. It is possibl

Re: [PATCH net-next 2/2] net: sched: protect against stack overflow in TC act_mirred

2019-06-25 Thread John Hurley
On Tue, Jun 25, 2019 at 10:15 AM Florian Westphal wrote: > > John Hurley wrote: > > Hi Eyal, > > The value of 4 is basically a revert to what it was on older kernels > > when TC had a TTL value in the skb: > > https://elixir.bootlin.com/linux/v3.19.8/source/in

Re: [PATCH net-next 0/2] Track recursive calls in TC act_mirred

2019-06-25 Thread John Hurley
On Tue, Jun 25, 2019 at 12:18 PM Jamal Hadi Salim wrote: > > On 2019-06-24 6:13 p.m., John Hurley wrote: > > These patches aim to prevent act_mirred causing stack overflow events from > > recursively calling packet xmit or receive functions. Such events can > > occur wi

Re: [PATCH net 5/5] nfp: remove false positive offloads in flower vxlan

2018-04-18 Thread John Hurley
On Wed, Apr 18, 2018 at 8:43 AM, Or Gerlitz wrote: > On Fri, Nov 17, 2017 at 4:06 AM, Jakub Kicinski > wrote: >> From: John Hurley >> >> Pass information to the match offload on whether or not the repr is the >> ingress or egress dev. Only accept tunnel mat

Re: [PATCH net 5/5] nfp: remove false positive offloads in flower vxlan

2018-04-18 Thread John Hurley
On Wed, Apr 18, 2018 at 7:18 PM, Or Gerlitz wrote: > On Wed, Apr 18, 2018 at 3:31 PM, John Hurley > wrote: >> On Wed, Apr 18, 2018 at 8:43 AM, Or Gerlitz wrote: >>> On Fri, Nov 17, 2017 at 4:06 AM, Jakub Kicinski >>> wrote: >>>> From: John Hurle

Re: [PATCH net-next 3/4] nfp: flower: support offloading multiple rules with same cookie

2018-04-25 Thread John Hurley
On Wed, Apr 25, 2018 at 7:31 AM, Or Gerlitz wrote: > On Wed, Apr 25, 2018 at 7:17 AM, Jakub Kicinski > wrote: >> From: John Hurley >> >> When multiple netdevs are attached to a tc offload block and register for >> callbacks, a rule added to the block wil

Re: [PATCH net-next 3/4] nfp: flower: support offloading multiple rules with same cookie

2018-04-25 Thread John Hurley
On Wed, Apr 25, 2018 at 9:56 AM, Or Gerlitz wrote: > On Wed, Apr 25, 2018 at 11:51 AM, John Hurley > wrote: >> On Wed, Apr 25, 2018 at 7:31 AM, Or Gerlitz wrote: >>> On Wed, Apr 25, 2018 at 7:17 AM, Jakub Kicinski >>> wrote: >>>> From: John Hurley &g

Re: [PATCH net-next 3/4] nfp: flower: support offloading multiple rules with same cookie

2018-04-25 Thread John Hurley
On Wed, Apr 25, 2018 at 10:13 AM, Or Gerlitz wrote: > On Wed, Apr 25, 2018 at 12:02 PM, John Hurley > wrote: >> On Wed, Apr 25, 2018 at 9:56 AM, Or Gerlitz wrote: >>> On Wed, Apr 25, 2018 at 11:51 AM, John Hurley >>> wrote: >>>> On Wed, Apr 25, 20

Re: [PATCH net-next 4/4] nfp: flower: ignore duplicate cb requests for same rule

2018-04-25 Thread John Hurley
On Wed, Apr 25, 2018 at 10:17 AM, Or Gerlitz wrote: > On Wed, Apr 25, 2018 at 7:17 AM, Jakub Kicinski > wrote: >> From: John Hurley >> >> If a flower rule has a repr both as ingress and egress port then 2 >> callbacks may be generated for the same rule request.

[PATCH net 1/1] net: openvswitch: fix csum updates for MPLS actions

2019-06-27 Thread John Hurley
mes differed but after they produce the same result. Fixes: 25cd9ba0abc0 ("openvswitch: Add basic MPLS support to kernel") Fixes: bc7cc5999fd3 ("openvswitch: update checksum in {push,pop}_mpls") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman --- ne

[PATCH net-next v4 0/5] Add MPLS actions to TC

2019-07-01 Thread John Hurley
few unnecessary line breaks (Jiri Pirko) - retract hw offload patch from set (resubmit with driver changes) (Jiri) v1->v2: - ensure TCA_ID_MPLS does not conflict with TCA_ID_CTINFO (Davide Caratti) John Hurley (5): net: core: move push MPLS functionality from OvS to core helper net: core: mo

[PATCH net-next v4 1/5] net: core: move push MPLS functionality from OvS to core helper

2019-07-01 Thread John Hurley
Open vSwitch provides code to push an MPLS header to a packet. In preparation for supporting this in TC, move the push code to an skb helper that can be reused. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/linux/skbuff.h| 1 + net/core

[PATCH net-next v4 2/5] net: core: move pop MPLS functionality from OvS to core helper

2019-07-01 Thread John Hurley
Open vSwitch provides code to pop an MPLS header to a packet. In preparation for supporting this in TC, move the pop code to an skb helper that can be reused. Remove the, now unused, update_ethertype static function from OvS. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by

[PATCH net-next v4 3/5] net: core: add MPLS update core helper and use in OvS

2019-07-01 Thread John Hurley
Open vSwitch allows the updating of an existing MPLS header on a packet. In preparation for supporting similar functionality in TC, move this to a common skb helper function. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/linux/skbuff.h| 1

[PATCH net-next v4 4/5] net: sched: add mpls manipulation actions to TC

2019-07-01 Thread John Hurley
. This includes the ability to push and pop headers as well as modify the contents of new or existing headers. A further action to decrement the TTL field of an MPLS header is also provided. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/net/tc_act

[PATCH net-next v4 5/5] selftests: tc-tests: actions: add MPLS tests

2019-07-01 Thread John Hurley
Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- .../tc-testing/tc-tests/actions/mpls.json | 812 + 1 file changed, 812 insertions(+) create mode 100644

[PATCH net-next v5 5/5] selftests: tc-tests: actions: add MPLS tests

2019-07-02 Thread John Hurley
Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- .../tc-testing/tc-tests/actions/mpls.json | 812 + 1 file changed, 812 insertions(+) create mode 100644

[PATCH net-next v5 0/5] Add MPLS actions to TC

2019-07-02 Thread John Hurley
vid Ahern) - add option to manually set BOS v2-v3: - remove a few unnecessary line breaks (Jiri Pirko) - retract hw offload patch from set (resubmit with driver changes) (Jiri) v1->v2: - ensure TCA_ID_MPLS does not conflict with TCA_ID_CTINFO (Davide Caratti) John Hurley (5): net: core: move pus

[PATCH net-next v5 4/5] net: sched: add mpls manipulation actions to TC

2019-07-02 Thread John Hurley
redirect dev eth1 Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/linux/skbuff.h | 1 + include/net/tc_act/tc_mpls.h| 30 +++ include/uapi/linux/pkt_cls.h| 3 +- include/uapi/linux/tc_act/tc_mpls.h | 33 +++ net/core

[PATCH net-next v5 1/5] net: core: move push MPLS functionality from OvS to core helper

2019-07-02 Thread John Hurley
Open vSwitch provides code to push an MPLS header to a packet. In preparation for supporting this in TC, move the push code to an skb helper that can be reused. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/linux/skbuff.h| 1 + net/core

[PATCH net-next v5 3/5] net: core: add MPLS update core helper and use in OvS

2019-07-02 Thread John Hurley
Open vSwitch allows the updating of an existing MPLS header on a packet. In preparation for supporting similar functionality in TC, move this to a common skb helper function. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/linux/skbuff.h| 1

[PATCH net-next v5 2/5] net: core: move pop MPLS functionality from OvS to core helper

2019-07-02 Thread John Hurley
Open vSwitch provides code to pop an MPLS header to a packet. In preparation for supporting this in TC, move the pop code to an skb helper that can be reused. Remove the, now unused, update_ethertype static function from OvS. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by

Re: [PATCH net-next v5 0/5] Add MPLS actions to TC

2019-07-03 Thread John Hurley
On Wed, Jul 3, 2019 at 3:19 AM Willem de Bruijn wrote: > > On Tue, Jul 2, 2019 at 8:32 PM John Hurley wrote: > > > > This patchset introduces a new TC action module that allows the > > manipulation of the MPLS headers of packets. The code impliments > > function

Re: [PATCH net-next v5 5/5] selftests: tc-tests: actions: add MPLS tests

2019-07-04 Thread John Hurley
On Thu, Jul 4, 2019 at 9:40 AM Davide Caratti wrote: > > On Wed, 2019-07-03 at 01:25 +0100, John Hurley wrote: > > Add a new series of selftests to verify the functionality of act_mpls in > > TC. > > > > Signed-off-by: John Hurley > > Reviewed-by: Simon

[PATCH net-next v6 0/5] Add MPLS actions to TC

2019-07-04 Thread John Hurley
es not conflict with TCA_ID_CTINFO (Davide Caratti) John Hurley (5): net: core: move push MPLS functionality from OvS to core helper net: core: move pop MPLS functionality from OvS to core helper net: core: add MPLS update core helper and use in OvS net: sched: add mpls manipulation actions

[PATCH net-next v6 1/5] net: core: move push MPLS functionality from OvS to core helper

2019-07-04 Thread John Hurley
Open vSwitch provides code to push an MPLS header to a packet. In preparation for supporting this in TC, move the push code to an skb helper that can be reused. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked-by: Cong Wang

[PATCH net-next v6 3/5] net: core: add MPLS update core helper and use in OvS

2019-07-04 Thread John Hurley
Open vSwitch allows the updating of an existing MPLS header on a packet. In preparation for supporting similar functionality in TC, move this to a common skb helper function. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked

[PATCH net-next v6 2/5] net: core: move pop MPLS functionality from OvS to core helper

2019-07-04 Thread John Hurley
Open vSwitch provides code to pop an MPLS header to a packet. In preparation for supporting this in TC, move the pop code to an skb helper that can be reused. Remove the, now unused, update_ethertype static function from OvS. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by

[PATCH net-next v6 4/5] net: sched: add mpls manipulation actions to TC

2019-07-04 Thread John Hurley
redirect dev eth1 Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked-by: Cong Wang --- include/linux/skbuff.h | 1 + include/net/tc_act/tc_mpls.h| 30 +++ include/uapi/linux/pkt_cls.h| 3

[PATCH net-next v6 5/5] selftests: tc-tests: actions: add MPLS tests

2019-07-04 Thread John Hurley
Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- tools/testing/selftests/tc-testing/config | 1 + .../tc-testing/tc-tests/actions/mpls.json | 812

[PATCH net-next v7 5/5] tc-tests: actions: add MPLS tests

2019-07-07 Thread John Hurley
Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- tools/testing/selftests/tc-testing/config |1 + .../tc-testing/tc-tests/actions/mpls.json | 1088

[PATCH net-next v7 0/5] Add MPLS actions to TC

2019-07-07 Thread John Hurley
hw offload patch from set (resubmit with driver changes) (Jiri) v1->v2: - ensure TCA_ID_MPLS does not conflict with TCA_ID_CTINFO (Davide Caratti) John Hurley (5): net: core: move push MPLS functionality from OvS to core helper net: core: move pop MPLS functionality from OvS to core helper

[PATCH net-next v7 1/5] net: core: move push MPLS functionality from OvS to core helper

2019-07-07 Thread John Hurley
Open vSwitch provides code to push an MPLS header to a packet. In preparation for supporting this in TC, move the push code to an skb helper that can be reused. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked-by: Cong Wang

[PATCH net-next v7 3/5] net: core: add MPLS update core helper and use in OvS

2019-07-07 Thread John Hurley
Open vSwitch allows the updating of an existing MPLS header on a packet. In preparation for supporting similar functionality in TC, move this to a common skb helper function. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked

[PATCH net-next v7 4/5] net: sched: add mpls manipulation actions to TC

2019-07-07 Thread John Hurley
redirect dev eth1 Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked-by: Cong Wang --- include/linux/skbuff.h | 1 + include/net/tc_act/tc_mpls.h| 30 +++ include/uapi/linux/pkt_cls.h| 3

[PATCH net-next v7 2/5] net: core: move pop MPLS functionality from OvS to core helper

2019-07-07 Thread John Hurley
Open vSwitch provides code to pop an MPLS header to a packet. In preparation for supporting this in TC, move the pop code to an skb helper that can be reused. Remove the, now unused, update_ethertype static function from OvS. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by

[PATCH iproute2-next 0/3] add interface to TC MPLS actions

2019-07-09 Thread John Hurley
Recent kernel additions to TC allows the manipulation of MPLS headers as filter actions. The following patchset creates an iproute2 interface to the new actions and includes documentation on how to use it. John Hurley (3): lib: add mpls_uc and mpls_mc as link layer protocol names tc: add

[PATCH iproute2-next 1/3] lib: add mpls_uc and mpls_mc as link layer protocol names

2019-07-09 Thread John Hurley
Update the llproto_names array to allow users to reference the mpls protocol ids with the names 'mpls_uc' for unicast MPLS and 'mpls_mc' for multicast. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- lib/ll_proto.c | 2 ++ 1 file changed, 2 insertions(+) diff --

[PATCH iproute2-next 2/3] tc: add mpls actions

2019-07-09 Thread John Hurley
Create a new action type for TC that allows the pushing, popping, and modifying of MPLS headers. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- tc/Makefile | 1 + tc/m_mpls.c | 275 2 files changed, 276 insertions

[PATCH iproute2-next 3/3] man: update man pages for TC MPLS actions

2019-07-09 Thread John Hurley
Add a man page describing the newly added TC mpls manipulation actions. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- man/man8/tc-mpls.8 | 156 + 1 file changed, 156 insertions(+) create mode 100644 man/man8/tc-mpls.8 diff

[PATCH iproute2-next v2 1/3] lib: add mpls_uc and mpls_mc as link layer protocol names

2019-07-10 Thread John Hurley
Update the llproto_names array to allow users to reference the mpls protocol ids with the names 'mpls_uc' for unicast MPLS and 'mpls_mc' for multicast. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- lib/ll_proto.c | 2 ++ 1 file changed, 2 insertions(+) diff --

[PATCH iproute2-next v2 0/3] add interface to TC MPLS actions

2019-07-10 Thread John Hurley
lit long line in explain() message (David Ahern) - use _SL_ instead of /n in print message (David Ahern) John Hurley (3): lib: add mpls_uc and mpls_mc as link layer protocol names tc: add mpls actions man: update man pages for TC MPLS actions lib/ll_proto.c | 2 + man/man8/tc-mpl

[PATCH iproute2-next v2 2/3] tc: add mpls actions

2019-07-10 Thread John Hurley
Create a new action type for TC that allows the pushing, popping, and modifying of MPLS headers. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- tc/Makefile | 1 + tc/m_mpls.c | 276 2 files changed, 277 insertions

[PATCH iproute2-next v2 3/3] man: update man pages for TC MPLS actions

2019-07-10 Thread John Hurley
Add a man page describing the newly added TC mpls manipulation actions. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- man/man8/tc-mpls.8 | 156 + 1 file changed, 156 insertions(+) create mode 100644 man/man8/tc-mpls.8 diff

[PATCH net-next 2/2] nfp: flower: ensure ip protocol is specified for L4 matches

2019-07-10 Thread John Hurley
t;) Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/offload.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/flower/offload.c b/drivers/net/ethernet/netronome/nfp/flower

[PATCH net-next 0/2] Fix bugs in NFP flower match offload

2019-07-10 Thread John Hurley
This patchset contains bug fixes for corner cases in the match fields of flower offloads. The patches ensure that flows that should not be supported are not (incorrectly) offloaded. These include rules that match on layer 3 and/or 4 data without specified ethernet or ip protocol fields. John

[PATCH net-next 1/2] nfp: flower: fix ethernet check on match fields

2019-07-10 Thread John Hurley
9d842c1354 ("nfp: extend flower add flow offload") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/offload.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/flower/

[PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-20 Thread John Hurley
/0x100 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 4e232818bd32 ("net: sched: act_mirred: remove dependency on rtnl lock") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- net/sched/act_mirred.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-)

[PATCH net v2 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-22 Thread John Hurley
/0xac0 ? ep_scan_ready_list.constprop.22+0x1f2/0x210 ? ep_poll+0x7a/0x430 __sys_sendmsg+0x47/0x80 do_syscall_64+0x55/0x100 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 4e232818bd32 ("net: sched: act_mirred: remove dependency on rtnl lock") Signed-off-by: John Hurley Reviewed-by: Jakub Ki

Re: Fwd: [PATCH 0/6] offload Linux LAG devices to the TC datapath

2018-06-26 Thread John Hurley
On Tue, Jun 26, 2018 at 3:57 PM, Or Gerlitz wrote: >> Forwarded Message >> Subject: [PATCH 0/6] offload Linux LAG devices to the TC datapath >> Date: Thu, 21 Jun 2018 14:35:55 +0100 >> From: John Hurley >> To: d...@openvswitch.org, r...@mellanox.

[RFC net-next 3/6] drivers: net: bonding: restrict bond mods when rules are offloaded

2018-03-05 Thread John Hurley
: John Hurley --- drivers/net/bonding/bond_main.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index d9e41cf..4c146b1 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c

[RFC net-next 6/6] nfp: support offloading multiple rules with same cookie

2018-03-05 Thread John Hurley
is to be attached to is considered when searching for dublicates. Conversely, when a stats update is received from the NFP card, the host context is used alongside the cookie to map to the correct host rule. Signed-off-by: John Hurley --- drivers/net/ethernet/netronome/nfp/flower/main.h | 8

[RFC net-next 4/6] nfp: add ndo_set_mac_address for representors

2018-03-05 Thread John Hurley
A representor hardware address does not have any meaning outside of the kernel netdev/networking stack. Thus there is no need for any app specific code for setting a representors hardware address, the default eth_mac_addr is sufficient. Signed-off-by: John Hurley --- drivers/net/ethernet

[RFC net-next 2/6] driver: net: bonding: allow registration of tc offload callbacks in bond

2018-03-05 Thread John Hurley
rules, we don't care about whether the bond ports are on the same device or whether some of slaves are representor ports and some are not. Signed-off-by: John Hurley --- drivers/net/bonding/bond_main.c | 195 +++- include/net/bonding.h | 7

[RFC net-next 1/6] drivers: net: bonding: add tc offload infastructure to bond

2018-03-05 Thread John Hurley
Register an ndo and callback for linux bonds to offload TC block ingress rules. Enable tc-hw-offload to be set by the user (defaults to off). When on, the flag cannot be turned off if rules are offloaded. Signed-off-by: John Hurley --- drivers/net/bonding/bond_main.c | 64

  1   2   >