[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a08bde08fce26054754172786ced8bd671079833.camel@redhat.com>
Date: Thu, 13 Jun 2019 12:16:59 +0200
From: Davide Caratti <dcaratti@...hat.com>
To: Paul Blakey <paulb@...lanox.com>, Jiri Pirko <jiri@...lanox.com>,
Roi Dayan <roid@...lanox.com>,
Yossi Kuperman <yossiku@...lanox.com>,
Oz Shlomo <ozsh@...lanox.com>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
Aaron Conole <aconole@...hat.com>,
Zhike Wang <wangzhike@...com>
Cc: Rony Efraim <ronye@...lanox.com>, nst-kernel@...hat.com,
John Hurley <john.hurley@...ronome.com>,
Simon Horman <simon.horman@...ronome.com>,
Justin Pettit <jpettit@....org>
Subject: Re: [PATCH net-next 1/3] net/sched: Introduce action ct
hello Paul!
On Tue, 2019-06-11 at 16:28 +0300, Paul Blakey wrote:
> +#endif /* __NET_TC_CT_H */
> diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h
> index a93680f..c5264d7 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_CT 27
^^ I think you can't use 27 (act_ctinfo forgot to explicitly define it),
or the uAPI will break. See below:
> /* Action type identifiers*/
> enum tca_id {
> @@ -106,6 +107,7 @@ enum tca_id {
> TCA_ID_SAMPLE = TCA_ACT_SAMPLE,
> /* other actions go here */
> TCA_ID_CTINFO,
> + TCA_ID_CT,
> __TCA_ID_MAX = 255
> };
and (minor ntit) the comment
/* other actions go here */
should be interpreted like
/* other actions go right above this comment */
otherwise the comment will float up as we continue adding new TC actions.
After your patch CTinfo and CT will have the same ID:
[dcaratti@...alhost tmp.j4kzBzv3oe]$ cat prova.c
#include <stdio.h>
#define UNO 1
#define DUE 2
#define TRE 3
#define QUATTRO 4
enum {
TCA_ID_UNO = UNO,
TCA_ID_DUE = DUE,
TCA_ID_TRE = TRE,
TCA_ID_CTINFO,
TCA_ID_QUATTRO = QUATTRO,
TCA_ID_MAX
};
int main (int argc, const char *argv[])
{
printf("%d %d %d %d %d %d\n", TCA_ID_UNO, TCA_ID_DUE, TCA_ID_TRE,
TCA_ID_CTINFO, TCA_ID_QUATTRO, TCA_ID_MAX);
return 0;
}
[dcaratti@...alhost tmp.j4kzBzv3oe]$ gcc prova.c -o prova
[dcaratti@...alhost tmp.j4kzBzv3oe]$ ./prova
1 2 3 4 4 5
[dcaratti@...alhost tmp.j4kzBzv3oe]$
so, I think you should use 28. And I will send a patch for net-next now
that adds the missing define for TCA_ID_CTINFO. Ok?
--
davide
Powered by blists - more mailing lists