From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17D7FA0A0C; Thu, 15 Jul 2021 15:43:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B996B4014D; Thu, 15 Jul 2021 15:43:47 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 1BE0940143 for ; Thu, 15 Jul 2021 15:43:46 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9FD3B5C0228; Thu, 15 Jul 2021 09:43:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 15 Jul 2021 09:43:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= +VxiIsO4zu4R5S8FeNhulVpJofq4n2oGp7+mipC5YzQ=; b=Fmq1cviVhcmSlas7 H4IaYPglJY8LQ8yNq/ApMMXTRtBChROS0TelFPjHtWucmS5YelyIZgN+aoqlEksV 5IAEcM6GPz70XCJRjvh7Grc8HUANSMJrzqRcaS7urkOS6JJUihMFBbz3h8L/zgxq F3vYiXjLnCZk28OpdJ50Yfaw/apuV1R2s9bYyhm6sPdQqSpv+VLamxO+Rw6Ypkn6 2Ol5fcauZYu32Di/mx5+9UjQVYny6Qmnbrl4jS3HzQT151v0ftBx9qeeHpZZjaRB OloDTCiCj7+1DfqwJYcWIuSaH24DslhdY+gX8VOYcFSxazr8n345PbaB5TvGbyWn 7lRVCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=+VxiIsO4zu4R5S8FeNhulVpJofq4n2oGp7+mipC5Y zQ=; b=D2MJMg9tMbxSX6wSqiDOF/I47l53kqmP459+6nOI6LQ6rEN9V19Br3T1e 9D2ZfdmgHX1h6V1r6F8hf/Ny+miSEwmSQjusxJ4QfMPxZDKbkJOTjsWnAQk1Dhf5 fxAkf8KlchmJ7iTOny332/LQKZT3Ho6MEEU9J0Mka6xNZ1a38tcsLQI+99DTvcLy 4KkiXqYxl/3CRa4s3I5fp2+EKOupD8nW1HQvrs9XzwLOR2lVEfkXMK56anej1mF0 cjWCFEeioSM4WzPjiBABDnaV71g5TCU5IQb9T0Hv7UbQy7XCgzTj/3BBzcv9Fo49 dnyNqfCvgIMC9cSDf9qUuFKeOGMTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtgdegkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Jul 2021 09:43:44 -0400 (EDT) From: Thomas Monjalon To: Ivan Malov , David Marchand Cc: dev , Andrew Rybchenko , Andy Moreton , "Yigit, Ferruh" Date: Thu, 15 Jul 2021 15:43:51 +0200 Message-ID: <4915459.6R0NE6ztUM@thomas> In-Reply-To: References: <20210707105628.16705-1-ivan.malov@oktetlabs.ru> <20210707105628.16705-2-ivan.malov@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 2/2] net/sfc: improve logging in MAE backend of RTE flow support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 15/07/2021 14:55, David Marchand: > On Wed, Jul 7, 2021 at 12:56 PM Ivan Malov wrote: > > diff --git a/drivers/net/sfc/sfc_flow.h b/drivers/net/sfc/sfc_flow.h > > index bd3b374d68..5b1f34aa7a 100644 > > --- a/drivers/net/sfc/sfc_flow.h > > +++ b/drivers/net/sfc/sfc_flow.h > > @@ -136,13 +136,21 @@ typedef int (sfc_flow_item_parse)(const struct rte_flow_item *item, > > > > struct sfc_flow_item { > > enum rte_flow_item_type type; /* Type of item */ > > + const char *name; /* Item name */ > > enum sfc_flow_item_layers layer; /* Layer of item */ > > enum sfc_flow_item_layers prev_layer; /* Previous layer of item */ > > enum sfc_flow_parse_ctx_type ctx_type; /* Parse context type */ > > sfc_flow_item_parse *parse; /* Parsing function */ > > }; > > > > -int sfc_flow_parse_pattern(const struct sfc_flow_item *flow_items, > > +#define SFC_FLOW_ITEM(_name) \ > > + .type = RTE_FLOW_ITEM_TYPE_##_name, \ > > + .name = #_name > > Using this concatenation (same for SFC_FLOW_ACTION) confuses > devtools/parse-flow-support.sh script. > > $ ./devtools/check-doc-vs-code.sh > rte_flow doc out of sync for sfc > item > item pf > item phy_port > item port_id > item pppoes > item tcp > item vf > action > > Either net/sfc keeps full RTE_FLOW_x_TYPE_y form like other drivers, > or the check script must be updated (see exclude/include helpers). Generating code with macros is also counter-intuitive for grep. I think it should be avoided and keep full form RTE_FLOW_x_TYPE_y.