netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davide Caratti <dcaratti@redhat.com>
To: Paul Blakey <paulb@mellanox.com>, Jiri Pirko <jiri@mellanox.com>,
	Roi Dayan <roid@mellanox.com>,
	Yossi Kuperman <yossiku@mellanox.com>,
	Oz Shlomo <ozsh@mellanox.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	Aaron Conole <aconole@redhat.com>, Zhike Wang <wangzhike@jd.com>
Cc: Rony Efraim <ronye@mellanox.com>,
	nst-kernel@redhat.com, John Hurley <john.hurley@netronome.com>,
	Simon Horman <simon.horman@netronome.com>,
	Justin Pettit <jpettit@ovn.org>
Subject: Re: [PATCH net-next 1/3] net/sched: Introduce action ct
Date: Thu, 13 Jun 2019 12:16:59 +0200	[thread overview]
Message-ID: <a08bde08fce26054754172786ced8bd671079833.camel@redhat.com> (raw)
In-Reply-To: <1560259713-25603-2-git-send-email-paulb@mellanox.com>

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@localhost 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@localhost tmp.j4kzBzv3oe]$ gcc prova.c -o prova
[dcaratti@localhost tmp.j4kzBzv3oe]$ ./prova 
1 2 3 4 4 5
[dcaratti@localhost 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


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

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 13:28 [PATCH net-next 0/3] net/sched: Introduce tc connection tracking Paul Blakey
2019-06-11 13:28 ` [PATCH net-next 1/3] net/sched: Introduce action ct Paul Blakey
2019-06-11 13:59   ` Toke Høiland-Jørgensen
2019-06-11 14:15     ` Paul Blakey
2019-06-11 15:34       ` Toke Høiland-Jørgensen
2019-06-11 15:53         ` Marcelo Ricardo Leitner
2019-06-11 20:23           ` Toke Høiland-Jørgensen
2019-06-13 13:46             ` Paul Blakey
2019-06-13 14:08               ` Toke Høiland-Jørgensen
2019-06-14 18:07           ` Cong Wang
2019-06-14 19:24             ` Marcelo Ricardo Leitner
2019-06-18 16:03               ` Cong Wang
2019-06-20  7:32                 ` Paul Blakey
2019-06-24 17:46                   ` Cong Wang
2019-06-13 11:00       ` Kevin Darbyshire-Bryant
2019-06-12 18:04   ` Marcelo Ricardo Leitner
2019-06-13 13:44     ` Paul Blakey
2019-06-12 19:55   ` Florian Westphal
2019-06-13 13:39     ` Paul Blakey
2019-06-13 10:16   ` Davide Caratti [this message]
2019-06-13 10:49     ` Davide Caratti
2019-06-13 13:40       ` Paul Blakey
2019-06-14 18:02   ` Cong Wang
2019-06-16  7:29     ` Paul Blakey
2019-06-19 18:33   ` Marcelo Ricardo Leitner
2019-06-20  7:07     ` Paul Blakey
2019-06-11 13:28 ` [PATCH net-next 2/3] net/flow_dissector: add connection tracking dissection Paul Blakey
2019-06-11 13:28 ` [PATCH net-next 3/3] net/sched: cls_flower: Add matching on conntrack info Paul Blakey

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=a08bde08fce26054754172786ced8bd671079833.camel@redhat.com \
    --to=dcaratti@redhat.com \
    --cc=aconole@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=john.hurley@netronome.com \
    --cc=jpettit@ovn.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nst-kernel@redhat.com \
    --cc=ozsh@mellanox.com \
    --cc=paulb@mellanox.com \
    --cc=roid@mellanox.com \
    --cc=ronye@mellanox.com \
    --cc=simon.horman@netronome.com \
    --cc=wangzhike@jd.com \
    --cc=yossiku@mellanox.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;
as well as URLs for NNTP newsgroup(s).