From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 0D96A1B11A for ; Fri, 5 Oct 2018 15:31:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2018 06:31:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,344,1534834800"; d="scan'208";a="78741166" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.49]) ([10.237.221.49]) by orsmga007.jf.intel.com with ESMTP; 05 Oct 2018 06:31:36 -0700 To: Dekel Peled , wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com, dev@dpdk.org, olivier.matz@6wind.com, adrien.mazarguil@6wind.com, thomas@monjalon.net, arybchenko@solarflare.com Cc: shahafs@mellanox.com, orika@mellanox.com References: <1537108670-11380-1-git-send-email-dekelp@mellanox.com> <1538056677-33846-2-git-send-email-dekelp@mellanox.com> From: Ferruh Yigit Openpgp: preference=signencrypt Message-ID: <0d34ba46-336c-6853-55d3-19b8f46d2db9@intel.com> Date: Fri, 5 Oct 2018 14:31:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1538056677-33846-2-git-send-email-dekelp@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 1/3] ethdev: support metadata as flow rule criteria X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2018 13:31:41 -0000 On 9/27/2018 2:57 PM, Dekel Peled wrote: > As described in [1], a new rte_flow item is added to support metadata > to use as flow rule match pattern. > The metadata is an opaque item, fully controlled by the application. > > The use of metadata is relevant for egress rules only. > It can be set in the flow rule using the RTE_FLOW_ITEM_META. > > In order to avoid change in mbuf API, exisitng field buf.hash.fdir.hi > is used to carry the metadata item. This field is used only in > ingress packets, so using it for egress metadata will not cause > conflicts. > > Application should set the packet metadata in the mbuf dedicated field, > and set the PKT_TX_METADATA flag in the mbuf->ol_flags. > The NIC will use the packet metadata as match criteria for relevant > flow rules. > > This patch introduces metadata item type for rte_flow RTE_FLOW_ITEM_META, > along with corresponding struct rte_flow_item_meta and ol_flag > PKT_TX_METADATA. > > [1] "[RFC,v2] ethdev: support metadata as flow rule criteria" > http://mails.dpdk.org/archives/dev/2018-August/110194.html > > Signed-off-by: Dekel Peled <...> > @@ -526,6 +532,12 @@ struct rte_mbuf { > uint32_t hi; > /**< First 4 flexible bytes or FD ID, dependent on > PKT_RX_FDIR_* flag in ol_flags. */ > + /** > + * Above member has optional use on egress: > + * Application specific metadata value > + * for flow rule match. > + * Valid if PKT_TX_METADATA is set. > + */ > } fdir; /**< Filter identifier if FDIR enabled */ Any objection/comment to use hash.fdir.hi for this new "metadata" meaning? Olivier?