lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0c97579d77ef09f73ee940e27fae2a595402888.camel@redhat.com>
Date:   Thu, 13 Jun 2019 15:20:36 +0200
From:   Davide Caratti <dcaratti@...hat.com>
To:     John Hurley <john.hurley@...ronome.com>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, jiri@...lanox.com, xiyou.wangcong@...il.com,
        simon.horman@...ronome.com, jakub.kicinski@...ronome.com,
        oss-drivers@...ronome.com
Subject: Re: [PATCH net-next 1/3] net: sched: add mpls manipulation actions
 to TC

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@...ronome.com>
> Reviewed-by: Jakub Kicinski <jakub.kicinski@...ronome.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ