From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C6AAC282D8 for ; Fri, 1 Feb 2019 13:23:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0440420869 for ; Fri, 1 Feb 2019 13:23:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726967AbfBANXn (ORCPT ); Fri, 1 Feb 2019 08:23:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62770 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726190AbfBANXn (ORCPT ); Fri, 1 Feb 2019 08:23:43 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DFE0C804EE; Fri, 1 Feb 2019 13:23:42 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-32.gru2.redhat.com [10.97.116.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE9AA1001F3C; Fri, 1 Feb 2019 13:23:37 +0000 (UTC) Received: by localhost.localdomain (Postfix, from userid 1000) id 27D16180C41; Fri, 1 Feb 2019 11:23:36 -0200 (-02) Date: Fri, 1 Feb 2019 11:23:36 -0200 From: Marcelo Leitner To: Paul Blakey Cc: Guy Shattah , Aaron Conole , John Hurley , Simon Horman , Justin Pettit , Gregory Rose , Eelco Chaudron , Flavio Leitner , Florian Westphal , Jiri Pirko , Rashid Khan , Sushil Kulkarni , Andy Gospodarek , Roi Dayan , Yossi Kuperman , Or Gerlitz , Rony Efraim , "davem@davemloft.net" , netdev@vger.kernel.org Subject: Re: [RFC PATCH net-next 1/6 v2] net/sched: Introduce act_ct Message-ID: <20190201132335.GP10660@localhost.localdomain> References: <1548748926-23822-2-git-send-email-paulb@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1548748926-23822-2-git-send-email-paulb@mellanox.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 01 Feb 2019 13:23:43 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jan 29, 2019 at 10:02:01AM +0200, Paul Blakey wrote: ... > diff --git a/include/uapi/linux/tc_act/tc_ct.h b/include/uapi/linux/tc_act/tc_ct.h > new file mode 100644 > index 0000000..6dbd771 > --- /dev/null > +++ b/include/uapi/linux/tc_act/tc_ct.h > @@ -0,0 +1,29 @@ > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > +#ifndef __UAPI_TC_CT_H > +#define __UAPI_TC_CT_H > + > +#include > +#include > + > +#define TCA_ACT_CT 18 > + > +struct tc_ct { > + tc_gen; > + __u16 zone; > + __u32 labels[4]; > + __u32 labels_mask[4]; > + __u32 mark; > + __u32 mark_mask; > + bool commit; This is one of the points that our implementations differs. You used a struct and wrapped it into TCA_CT_PARMS attribute, while I broke it up into several attributes. cls_flower and act_bpf, for example, doesn't use structs, but others do. Both have pros and cons and I imagine this topic probably was already discussed but I'm not aware of a recommendation. Do we have one? > +}; > + > +enum { > + TCA_CT_UNSPEC, > + TCA_CT_PARMS, > + TCA_CT_TM, > + TCA_CT_PAD, > + __TCA_CT_MAX > +}; > +#define TCA_CT_MAX (__TCA_CT_MAX - 1) > + > +#endif /* __UAPI_TC_CT_H */ ...