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 77B0A42570; Mon, 11 Sep 2023 18:55:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7A62402D6; Mon, 11 Sep 2023 18:55:48 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 74DA5402CE for ; Mon, 11 Sep 2023 18:55:47 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 4ADCB21114; Mon, 11 Sep 2023 18:55:47 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v2 0/2] ethdev: add random item support Date: Mon, 11 Sep 2023 18:55:45 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87BA0@smartserver.smartshare.dk> In-Reply-To: <20230911074149.697944-1-michaelba@nvidia.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v2 0/2] ethdev: add random item support Thread-Index: Adnkg30FfWVnxnUERJiNAu/6jR4vJAAS3fkg References: <20230822090505.3242455-1-michaelba@nvidia.com> <20230911074149.697944-1-michaelba@nvidia.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Michael Baum" , Cc: "Ori Kam" , "Aman Singh" , "Yuying Zhang" , "Ferruh Yigit" , "Thomas Monjalon" 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 > From: Michael Baum [mailto:michaelba@nvidia.com] > Sent: Monday, 11 September 2023 08.42 >=20 > Add support for matching random value using new "rte_flow_item_random" > structure. I get it. It can be used for things like stochastic sampling. However, it doesn't provide support for e.g. 1/100 or 1/500. So here's a suggestion: Instead of "value" (which is irrelevant) & "mask" (which is what really = controls the probability), wouldn't it be better if "value" was an = inverse probability (and "mask" was irrelevant)? E.g. value=3D500 means = that there is a 1 of 500 probability of a match. Would this kind of random item better serve the purpose? Or is the random item, in its current form, also required for other = purposes?