Re: [PATCH net 2/2] net/sched: fix corrupted L2 header with MPLS 'push' and 'pop' actions

2019-10-11 Thread John Hurley
tween the > > network header and the mac header (when not at TC ingress), and use it in > > MPLS 'push'/'pop' core functions. > > > > CC: Lorenzo Bianconi > > Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC") > > Signed-off-by: Davide Caratti > Acked-by: John Hurley > Reviewed-by: Simon Horman >

Re: [PATCH net 2/2] net/sched: fix corrupted L2 header with MPLS 'push' and 'pop' actions

2019-10-11 Thread John Hurley
On Fri, Oct 11, 2019 at 8:34 AM Simon Horman wrote: > > On Thu, Oct 10, 2019 at 08:43:53PM +0200, Davide Caratti wrote: > > the following script: > > > > # tc qdisc add dev eth0 clsact > > # tc filter add dev eth0 egress protocol ip matchall \ > > > action mpls push protocol mpls_uc label 0x355

Re: [PATCH net 1/2] net: avoid errors when trying to pop MLPS header on non-MPLS packets

2019-10-11 Thread John Hurley
the same regardless of the presence / absence of > > MPLS header(s) in the original packet, we can let skb_mpls_pop() return 0 > > when dealing with non-MPLS packets. > > > > Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC") > > Signed-off-

Re: [RFC net-next 0/2] prevent sync issues with hw offload of flower

2019-10-04 Thread John Hurley
On Fri, Oct 4, 2019 at 4:58 PM Vlad Buslov wrote: > > > On Fri 04 Oct 2019 at 18:39, John Hurley wrote: > > On Thu, Oct 3, 2019 at 6:19 PM Vlad Buslov wrote: > >> > >> > >> On Thu 03 Oct 2019 at 19:59, John Hurley wrote: > >>

Re: [RFC net-next 0/2] prevent sync issues with hw offload of flower

2019-10-04 Thread John Hurley
On Thu, Oct 3, 2019 at 6:19 PM Vlad Buslov wrote: > > > On Thu 03 Oct 2019 at 19:59, John Hurley wrote: > > On Thu, Oct 3, 2019 at 5:26 PM Vlad Buslov wrote: > >> > >> > >> On Thu 03 Oct 2019 at 02:14, John Hurley wrote: > >> > Hi, >

Re: [RFC net-next 2/2] net: sched: fix tp destroy race conditions in flower

2019-10-03 Thread John Hurley
On Thu, Oct 3, 2019 at 5:18 PM Vlad Buslov wrote: > > > On Thu 03 Oct 2019 at 02:14, John Hurley wrote: > > Flower has rule HW offload functions available that drivers can choose to > > register for. For the deletion case, these are triggered after filters > > ha

Re: [RFC net-next 0/2] prevent sync issues with hw offload of flower

2019-10-03 Thread John Hurley
On Thu, Oct 3, 2019 at 5:26 PM Vlad Buslov wrote: > > > On Thu 03 Oct 2019 at 02:14, John Hurley wrote: > > Hi, > > > > Putting this out an RFC built on net-next. It fixes some issues > > discovered in testing when using the TC API of OvS to generate flower >

[RFC net-next 0/2] prevent sync issues with hw offload of flower

2019-10-02 Thread John Hurley
nd the hw delete messages from tcf_proto destroys, preventing them racing with duplicate adds. It also moves the check for 'deleting' to before the sending the hw add message. John Hurley (2): net: sched: add tp_op for pre_destroy net: sched: fix tp destroy race conditions in flower

[RFC net-next 2/2] net: sched: fix tp destroy race conditions in flower

2019-10-02 Thread John Hurley
flower: handle concurrent tcf proto deletion") Signed-off-by: John Hurley Reported-by: Louis Peens --- net/sched/cls_flower.c | 55 +++--- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/net/sched/cls_flower.c b/net/sched/cls_fl

[RFC net-next 1/2] net: sched: add tp_op for pre_destroy

2019-10-02 Thread John Hurley
ot;) Signed-off-by: John Hurley Reported-by: Louis Peens --- include/net/sch_generic.h | 3 +++ net/sched/cls_api.c | 29 - 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 637548d..e458d

Re: [PATCH net v3] net/sched: cls_api: Fix nooffloaddevcnt counter when indr block call success

2019-09-23 Thread John Hurley
On Mon, Sep 23, 2019 at 5:20 AM wenxu wrote: > > Hi John & Jakub > > There are some limitations for indirect tc callback work with skip_sw ? > Hi Wenxu, This is not really a limitation. As Or points out, indirect block offload is not supposed to work with skip_sw. Indirect offload allows us to h

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

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

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

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

[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

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

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

[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

[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

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

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

[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

[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

[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

[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

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

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

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

[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

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

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;

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

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

[PATCH net-next 1/1] nfp: flower: fix size_t compile warning

2019-04-17 Thread John Hurley
andle merge hint messages") Signed-off-by: John Hurley Acked-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/netronome/nfp/flower/cmsg.c b/drivers/net/ethernet/netronome/nfp/flo

[PATCH net-next 1/1] nfp: flower: fix implicit fallthrough warning

2019-04-16 Thread John Hurley
rule") Signed-off-by: John Hurley Reported-by: Stephen Rothwell Reviewed-by: Jiong Wang Reviewed-by: Simon Horman --- drivers/net/ethernet/netronome/nfp/flower/offload.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/netronome/nfp/flower/offload.c b/drivers/ne

Re: [RFC net-next 1/1] net: sched: fix hw filter offload in tc flower

2019-04-04 Thread John Hurley
On Wed, Apr 3, 2019 at 5:42 PM Vlad Buslov wrote: > > > On Wed 03 Apr 2019 at 15:37, John Hurley wrote: > > Recent refactoring of fl_change aims to use the classifier spinlock to > > avoid the need for rtnl lock. In doing so, the fl_hw_replace_filer() > > function was

  1   2   >