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=-9.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_NEOMUTT 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 A5C1DC282C0 for ; Fri, 25 Jan 2019 13:37:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DCA4218CD for ; Fri, 25 Jan 2019 13:37:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="adrI3Q1P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728796AbfAYNhR (ORCPT ); Fri, 25 Jan 2019 08:37:17 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:36218 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726273AbfAYNhR (ORCPT ); Fri, 25 Jan 2019 08:37:17 -0500 Received: by mail-ed1-f67.google.com with SMTP id f23so7405240edb.3 for ; Fri, 25 Jan 2019 05:37:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+HTJcUDb/91My1dgGyV2iQlNV2eBai1KkG3o/CVowSU=; b=adrI3Q1PNfmrT+gXUrvpcuv43bazLcRBsbiBCH/CTRoCASG8yDTnE7e70wZlxl0lzT XpSjFTDRql90xgZtt9KTnM6jsePETK90ix0CR9qtW7qqIzWKayHPgAerpNoO5E0dsMw0 lMlzXTGGwHjJDXsEZcmTnEs3V2Y6oyFlgWed9nmpV6WTwMoSX3NWBfv3IEPJHqlY969g mq6NIDonkpNlQsIG/79Sc7t/KLhkJQEzWCVjfxMPV86kFTxt5Hm5YS59xPOCmQR6RLZI Flg11lN1vlopMyATtFxftqC5X5y4ZgXKCvTMjuJmG5ZB1LQ+ukRXebWWtEU8MN6FBO1y 2sQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+HTJcUDb/91My1dgGyV2iQlNV2eBai1KkG3o/CVowSU=; b=gWFJnQoFaom7Zf3RA5+zGV1AF7qDAOr3L+Wxf2dzZCvgIeLyEVibp2mxxWBVb8ORIY xG/kmfUGZOmuh/noxTG8IQekFmAzUliuy0Y68JUaJw+yVWllBw5rwY/Tlr/46R6roajA MQsHfnn9dAvm85t+Xumf9Je677iGSV3XmmAsClRW62Jxu6k8uLJeRJeVYV0QAUyiFPXD S2PtkMAEYeSb+SI1jr4sQgIHTNX3LMj7JR+T3iH94nAUrQCDrvHxdWVca7PG6e3DFoV8 deWu112DCUhHisoXlQHqWqdWHP9d+XdZSE2tITQznei0n8cbHWZ/VSUBEpozNmygzqvK f2OQ== X-Gm-Message-State: AJcUuke6t9hwbxSHY8EOxmxDpBsXGvzNjUT2WhJS7jBPFVifk3io0nXf 449/e+cGRvU2yMLGuYhHPiVtfA== X-Google-Smtp-Source: ALg8bN4wZM8cgC2X2jsfoQGu6J/igRmycGuLUNClyploW7PWzEL82PELawCrf9ZU8cF58Tp3f9ukAQ== X-Received: by 2002:a17:906:c2cd:: with SMTP id ch13mr9034418ejb.198.1548423435054; Fri, 25 Jan 2019 05:37:15 -0800 (PST) Received: from netronome.com ([2001:982:756:703:d63d:7eff:fe99:ac9d]) by smtp.gmail.com with ESMTPSA id a27sm12376409eda.65.2019.01.25.05.37.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 05:37:14 -0800 (PST) Date: Fri, 25 Jan 2019 14:37:13 +0100 From: Simon Horman To: Marcelo Ricardo Leitner Cc: Guy Shattah , Aaron Conole , John Hurley , 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 2/6] net/sched: flower: add support for matching on ConnTrack Message-ID: <20190125133711.f3caew4d7osr5czg@netronome.com> References: <6c976cc538f1f565b74bd2c750639af91a93adc1.1548285996.git.mleitner@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6c976cc538f1f565b74bd2c750639af91a93adc1.1548285996.git.mleitner@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Marcelo, On Fri, Jan 25, 2019 at 12:32:31AM -0200, Marcelo Ricardo Leitner wrote: > Hook on flow dissector's new interface on ConnTrack from previous patch. > > Signed-off-by: Marcelo Ricardo Leitner > --- > include/uapi/linux/pkt_cls.h | 9 +++++++++ > net/sched/cls_flower.c | 33 +++++++++++++++++++++++++++++++++ > 2 files changed, 42 insertions(+) > > diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h > index 95d0db2a8350dffb1dd20816591f3b179913fb2e..ba1f3bc01b2fdfd810e37a2b3853a1da1f838acf 100644 > --- a/include/uapi/linux/pkt_cls.h > +++ b/include/uapi/linux/pkt_cls.h > @@ -490,6 +490,15 @@ enum { > TCA_FLOWER_KEY_PORT_DST_MIN, /* be16 */ > TCA_FLOWER_KEY_PORT_DST_MAX, /* be16 */ > > + TCA_FLOWER_KEY_CT_ZONE, /* u16 */ > + TCA_FLOWER_KEY_CT_ZONE_MASK, /* u16 */ > + TCA_FLOWER_KEY_CT_STATE, /* u8 */ > + TCA_FLOWER_KEY_CT_STATE_MASK, /* u8 */ With the corresponding flow dissector patch this API is exposing the contents of an instance of enum ip_conntrack_info as an ABI for conntrack state. I believe (after getting similar review for my geneve options macthing patches for flower) that this exposes implementation details as an ABI to a degree that is not desirable. My suggested would be to define, say in the form of named bits, an ABI, that describes the state information that is exposed. These bits may not correspond directly to the implementation of ip_conntrack_info. I think there should also be some consideration of if a mask makes sense for the state as, f.e. in the implementation of enum ip_conntrack_info not all bit combinations are valid. > + TCA_FLOWER_KEY_CT_MARK, /* u32 */ > + TCA_FLOWER_KEY_CT_MARK_MASK, /* u32 */ > + TCA_FLOWER_KEY_CT_LABEL, /* 128 bits */ > + TCA_FLOWER_KEY_CT_LABEL_MASK, /* 128 bits */ > + > __TCA_FLOWER_MAX, > }; ...