From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 923E342572;
	Mon, 11 Sep 2023 21:12:00 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 43AC540647;
	Mon, 11 Sep 2023 21:11:55 +0200 (CEST)
Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com
 [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id 30091402E5
 for <dev@dpdk.org>; Mon, 11 Sep 2023 21:11:54 +0200 (CEST)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.west.internal (Postfix) with ESMTP id D2FD632002E2;
 Mon, 11 Sep 2023 15:11:52 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute5.internal (MEProxy); Mon, 11 Sep 2023 15:11:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm1; t=
 1694459512; x=1694545912; bh=RjmPYSWM9pXe+29WLPo5F9WnQOSqvQA3civ
 hZie65/k=; b=fSDWWN77KvS/gMuZd4mkYtfC7wcVw4RuzQVmTzIyMbusCXjwIg8
 vy/6PuX818X1C5Njlg2Fw8Nd5PSjh7C9oVRZOteFqHTMa3tG+yDMUHG8XOItPIuM
 /5gH34uRJduCksdAjtIbE2hMk6VTQkTeg/3AubL+0UNFpvczEvAMZgbkNybDXjsG
 Kb50pAkbiRXF5liWgx8mylhMLWDZCEs4b3sMB7Jm4sAskdXZ9IDbVFF0oi5+wt83
 zEpePgYkep6NXtBuXjiIY9ocjGY4bX8/bMhecaOxyg8KUt632/om6QxmmmCjfccr
 69mdjZXfT54Va7IWNIwioXdbAuwpTZBPYnQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1694459512; x=1694545912; bh=RjmPYSWM9pXe+29WLPo5F9WnQOSqvQA3civ
 hZie65/k=; b=0rv537VosGzPXGDZdLy5E3LhCvQZlwcTVld3MoPhpGARayDgIDO
 KN/ENjb2hAlGxj0ACdSs2wt6P1hS1oN6ZdbM7Uwk9SK8bvk4Rf57vT4kp1JNMZ0a
 A7OhDuG2W4qJqOGHUlMcdcmpzrtpsIhJ4YEC7Hys8PJ7r0cUVhfstO5Dta9rtjbJ
 RZB5YAf5adKS+O2ckx8CDPV5v5XJr7Cz7peFTlU5zD4bB+rjzHMI4/s/l1PA6I70
 fr4f2YtasbE3z11DpT26dWMORMegBBTMrOCzhn4Jv4T1XwSBxUFMukfEExDEXlag
 JsX9/DT7H+qTf7/dmRdgMkjrFjJLCX49yyA==
X-ME-Sender: <xms:eGb_ZAarp4qlaz62Kk39BtR9AitbqWFRF1qfHSVR_iuIaeoa7htKTA>
 <xme:eGb_ZLZRidLz065xd5I-MAZYjWoRZ9GyC0KBGSKYUD_NkVDG1R_ua8oYYJNtTl2ym
 H4f4efja1rz7UKe6A>
X-ME-Received: <xmr:eGb_ZK-mCSOPvggALtTEhKCCmcE32X-yFGQT3ZHbR6n3orWrcxB-k8p4hI_sa0O-a2cAoPX0taqcxqq1xG7AWnB5ZTuxWFNDOsAYoKcIdUU>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeigedgudefudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhho
 mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne
 cuggftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddt
 ieekgfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth
X-ME-Proxy: <xmx:eGb_ZKqeFEcrawrQLLWO7_IUqLSRmJiPqqONcvf_TyO-LdNiHpYRRg>
 <xmx:eGb_ZLoOULcRD3XWwTjcckm_Ul57OGbbszJQ71fAyZ-iIz7wqSIxsw>
 <xmx:eGb_ZIT9r1pvpiu4Aw59QYbAAHrzmzTtlyOeF1FDked3DRtjRDlczQ>
 <xmx:eGb_ZMmGkSIEIt75RjJDFyNJuepAndbZ1T9flvKM-hLfpCef_XUgcg>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 11 Sep 2023 15:11:50 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Michael Baum <michaelba@nvidia.com>
Cc: dev@dpdk.org, Ori Kam <orika@nvidia.com>,
 Aman Singh <aman.deep.singh@intel.com>,
 Yuying Zhang <yuying.zhang@intel.com>, Ferruh Yigit <ferruh.yigit@amd.com>
Subject: Re: [PATCH v2 1/2] ethdev: add random item support
Date: Mon, 11 Sep 2023 17:59:56 +0200
Message-ID: <16778441.Ash8RoxBsO@thomas>
In-Reply-To: <20230911074149.697944-2-michaelba@nvidia.com>
References: <20230822090505.3242455-1-michaelba@nvidia.com>
 <20230911074149.697944-1-michaelba@nvidia.com>
 <20230911074149.697944-2-michaelba@nvidia.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

11/09/2023 09:41, Michael Baum:
> Add support for a new item type "RTE_FLOW_ITEM_TYPE_RANDOM".
> This item enables to match on some random value as a part of flow rule.
> 
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> ---
> +Item: ``RANDOM``
> +^^^^^^^^^^^^^^^^
> +
> +Matches a random value.
> +
> +This value is not based on the packet data/headers.
> +Application shouldn't assume that this value is kept during the life time of
> +the packet.
> +
> +- ``value``: Random value.

I think it is the opposite:
the value is defined by the application, right?
Then it matches randomly based on a number generator?

Please describe where the random is generated and what is the range.

We could also wonder why it is not integrated in the existing sampling item.