From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF030A0350; Wed, 24 Jun 2020 21:14:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 82F671D9BD; Wed, 24 Jun 2020 21:14:06 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 586EF1D9AE for ; Wed, 24 Jun 2020 21:14:05 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 8CC205C013B; Wed, 24 Jun 2020 15:14:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 24 Jun 2020 15:14:04 -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= w6+ue7Ijst3nd9E8pjFX3E2/oOepNeFi/DFz5920f+Y=; b=LmrD5vjVVtebf7v4 gsHi7+B9ZlqN6cSrq7JKqGn9gYGopRI/KU76flSNKbmPpNxxOcKcBRG2F9sY8286 A8bBX59CvdZhy2wTMvpFczEj/gdKdEbNQF9yIGoohN5IThT86JQOYdullU3JKZeY aPm6wLsQUX/FZnFE4e05/TILPzF/L39ojC6RXWwCpTPaB47EyiOxscK0kNsoUl+u qs3Mq6DctA5YzQZBkuEJ2oKlfpOlFGeHb8ly5UKvy5Oj4OOGFNzXoFvwv7GKlA9k 31D1Jc8TvEnlxTzptH053FcmLofDTsJ6xeJJSwW3Cz91me786lx7JZjI5aBK/vnC E2G2EQ== 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=w6+ue7Ijst3nd9E8pjFX3E2/oOepNeFi/DFz5920f +Y=; b=snprsBGogRijVWfrvcaGnC5C2fy38v2qEsO2rh9W54HO66puDp3Tp8hMG KT3YoZHGM3ju/mqAeHfzDQ76E+qVPWkoUn2UZ2KzIWoJ7qjNiTpnxIsFJ+O10eD2 iXXr2/X1FLPXmZjc8rylhEerkXgZOBfXiw0BSb3GBpUO1Gw/fqGcLCGKM3YRSuuG Vgq6mxrNuM3qKLEKWQUalxgFFhOtjzaV+iYLRFxnmJKPS5xi8sx+PTCyJz/XMx+Y Ve5pURu/W/4lkKCrN069p3+yNGSgjdhOuE/TuNg9QwhVU1WQv4SGNUf1O7jeD3XD tRD9xH1VH5QQQ8/W+r7YGV/VWaA/Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudekjedgudeftdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D1A0C30676D7; Wed, 24 Jun 2020 15:14:02 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org, orika@mellanox.com, viacheslavo@mellanox.com, matan@mellanox.com, rasland@mellanox.com, Jiawei Wang , ian.stokes@intel.com, fbl@redhat.com Date: Wed, 24 Jun 2020 21:14:00 +0200 Message-ID: <2485129.Ey0JF50IP2@thomas> In-Reply-To: <20200624110956.28b821db@hermes.lan> References: <20200611131946.11629-1-jiaweiw@mellanox.com> <7858203.UFLHXkIILB@thomas> <20200624110956.28b821db@hermes.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [RFC] ethdev: introduce sample action for rte flow 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 24/06/2020 20:09, Stephen Hemminger: > > > +/** > > > + * @warning > > > + * @b EXPERIMENTAL: this structure may change without prior notice > > > + * > > > + * RTE_FLOW_ACTION_TYPE_SAMPLE > > > + * > > > + * Adds a sample action to a matched flow. > > > + * > > > + * The matching packets will be duplicated to a special queue or vport > > > + * in the predefined probabiilty, All the packets continues processing > > > + * on the default flow path. > > > + * > > > + * When the sample ratio is set to 1 then the packets will be 100% mirrored. > > > + * Additional action list be supported to add for sampled or mirrored packets. > > > + */ > > > +struct rte_flow_action_sample { > > > + /* packets sampled equals to '1/ratio' */ > > > + const uint32_t ratio; > > > + /* sub-action list specific for the sampling hit cases */ > > > + const struct rte_flow_action *actions; > > > +}; > > Putting const on the ratio value is not necessary. > Other flow_actions don't do that. > > Note: rte_flow action structures seem to have lots of holes. > The value of those holes is undefined. You may want to swap the fields. Why is it a problem to have holes with undefined value? If swapping, the hole will be at the end, right?