Netdev List
 help / color / mirror / Atom feed
From: Davide Caratti <dcaratti@redhat.com>
To: John Hurley <john.hurley@netronome.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, jiri@mellanox.com, xiyou.wangcong@gmail.com,
	simon.horman@netronome.com, jakub.kicinski@netronome.com,
	oss-drivers@netronome.com
Subject: Re: [PATCH net-next 1/3] net: sched: add mpls manipulation actions to TC
Date: Thu, 13 Jun 2019 15:20:36 +0200	[thread overview]
Message-ID: <b0c97579d77ef09f73ee940e27fae2a595402888.camel@redhat.com> (raw)
In-Reply-To: <1560343906-19426-2-git-send-email-john.hurley@netronome.com>

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, as yet, TC
> actions do not allow the modification or manipulation of such fields.
> 
> Add a new module that registers TC action ops to allow manipulation of
> MPLS. 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 <john.hurley@netronome.com>
> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>

[...]

> index a93680f..197621a 100644
> --- a/include/uapi/linux/pkt_cls.h
> +++ b/include/uapi/linux/pkt_cls.h
> @@ -83,6 +83,7 @@ enum {
>  #define TCA_ACT_SIMP 22
>  #define TCA_ACT_IFE 25
>  #define TCA_ACT_SAMPLE 26
> +#define TCA_ACT_MPLS 27

like I mentioned in my reply to "[PATCH net-next 1/3] net/sched: Introduce
action ct", I think that 27 is forbidden on net-next: this number is
already used in the uAPI for TCA_ID_CTINFO (see below). Like suggested in
the comment above the definition of TCA_ACT_GACT, it's sufficient to add
TCA_ID_MPLS in the enum below.

>  /* Action type identifiers*/
>  enum tca_id {
> @@ -104,6 +105,7 @@ enum tca_id {
>  	TCA_ID_SIMP = TCA_ACT_SIMP,
>  	TCA_ID_IFE = TCA_ACT_IFE,
>  	TCA_ID_SAMPLE = TCA_ACT_SAMPLE,
> +	TCA_ID_MPLS = TCA_ACT_MPLS,
>  	/* other actions go here */
>  	TCA_ID_CTINFO,
>  	__TCA_ID_MAX = 255

and the line that adds TCA_ID_MPLS to enum tca_id should be placed right
before __TCA_ID_MAX, so that the uAPI is preserved (i.e. the value of
TCA_ID_CTINFO does not change).

thanks!
-- 
davide



  parent reply	other threads:[~2019-06-13 15:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 12:51 [PATCH net-next 0/3] Add MPLS actions to TC John Hurley
2019-06-12 12:51 ` [PATCH net-next 1/3] net: sched: add mpls manipulation " John Hurley
2019-06-12 18:03   ` Marcelo Ricardo Leitner
2019-06-13 13:38     ` John Hurley
2019-06-13 13:20   ` Davide Caratti [this message]
2019-06-13 13:53     ` John Hurley
2019-06-12 12:51 ` [PATCH net-next 2/3] net: sched: include mpls actions in hardware intermediate representation John Hurley
2019-06-12 12:51 ` [PATCH net-next 3/3] selftests: tc-tests: actions: add MPLS tests John Hurley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0c97579d77ef09f73ee940e27fae2a595402888.camel@redhat.com \
    --to=dcaratti@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@mellanox.com \
    --cc=john.hurley@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=simon.horman@netronome.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox