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 8E091436A2; Fri, 8 Dec 2023 19:54:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EC98402BF; Fri, 8 Dec 2023 19:54:17 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2080.outbound.protection.outlook.com [40.107.237.80]) by mails.dpdk.org (Postfix) with ESMTP id E308540144 for ; Fri, 8 Dec 2023 19:54:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PqcgYJRHyPUweobbobg324g819ul2F/lJ72y2oALQFwN6zbfl33NqNkZP+TjyeRvcaQjmaTLAOSFl8bLMxZRZm818Ho3ulBLYSyAD4uGqY3wdi+9wsF9CiCQlaytCHMTHV/wrcJp0nC25sfAyj3b0Q92mO2wOJVzqFlJ0x5381Ik1iKAhQS9fPV1cTND2UA4Wys7nm6z9e8XEcKy55B+AThDRX/XLenVWm6nfUpWMU9Jxt7mgKkVFFky2g5gWR7R0Qkam4vfmUzxs7ribNXC/oGVIHkwrWufE5Qd/UBFDOKUiO9fLw3QkPPwCInvS/Erdry7IiOcuC9NRkQC/mXcCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LP1G0UKRElm9/1m6aensK1fs9ZX8osFwiHW4dqkxAiU=; b=MrVlkwfkh5NaXxD1EcSKm3QekUooQExFgwZUXJbkP3JlNP1KT61i4ct8KyqnzIJmX+ujPcO77+Py5Bf1xcrkUPgukKbZybni4wQ/fvyZw1DYdvaFlLQaxj9Yb31lODerhByx/EGm7t4riyWJ79OIqbShtCkUOW00plZsmoVn18hhPCP6Y0Oq+MMqyxfo7LXp3siswb4JcpvVubfqeuVLGSOuja0x/WcDlf2buNW/hJCcaQlRPr/K6uZPbRgYNAg8eeanpGceLDbVfUrFYy6GjxTkBBHgfMYGsTpsGptb1ZU8RksfNrnOAhJOApKEFlY3y080shO6FH9LX/1rYBlR2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LP1G0UKRElm9/1m6aensK1fs9ZX8osFwiHW4dqkxAiU=; b=DcLXN+hrCgwPR+umYtlOYVziit5COZ9FOoOVysHoaaimYpLduUK5FBxuphNxYsBmmrcni4lc6ovViLW30pGwLQcb2S0nbA94Hl9HPCw9BICNeAADyaWErBgNo/AkRXO7yL8P1bV8cZztOK2zqIiXf11H4qWxm3Byej+5aBoT+cvEif9u5G9SIylobgQiVpQMIbbSeTqvW6m81lEFz2cM5k1wgC5SHg8X8woxTyTYcor4Qsz1r8hnspyuDrOoKYKUftSFqMYSI3bF/uqUcZji2TOvIZZN6462vRxpIXBxrBH5tfuDX+/tOTbnGw9RPqTdZJF5Vysp9antkLh6uv2nDQ== Received: from IA1PR12MB8311.namprd12.prod.outlook.com (2603:10b6:208:3fa::12) by MN2PR12MB4096.namprd12.prod.outlook.com (2603:10b6:208:1dc::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.25; Fri, 8 Dec 2023 18:54:14 +0000 Received: from IA1PR12MB8311.namprd12.prod.outlook.com ([fe80::2d14:dd8e:f91d:3175]) by IA1PR12MB8311.namprd12.prod.outlook.com ([fe80::2d14:dd8e:f91d:3175%3]) with mapi id 15.20.7068.027; Fri, 8 Dec 2023 18:54:13 +0000 From: Dariusz Sosnowski To: Michael Baum , "dev@dpdk.org" CC: Ori Kam , Aman Singh , Yuying Zhang , Ferruh Yigit , "NBU-Contact-Thomas Monjalon (EXTERNAL)" Subject: RE: [PATCH v3 1/2] ethdev: add random item support Thread-Topic: [PATCH v3 1/2] ethdev: add random item support Thread-Index: AQHaI6rirHHuLdYCH0iNkamN5iQ2fLCfpaKw Date: Fri, 8 Dec 2023 18:54:13 +0000 Message-ID: References: <20230911074149.697944-1-michaelba@nvidia.com> <20231130163215.666239-1-michaelba@nvidia.com> <20231130163215.666239-2-michaelba@nvidia.com> In-Reply-To: <20231130163215.666239-2-michaelba@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA1PR12MB8311:EE_|MN2PR12MB4096:EE_ x-ms-office365-filtering-correlation-id: 1c2db22c-2953-40ab-fcc6-08dbf81f1266 x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KsW2oV1SyPxv5oJwnMjQzDhQK7Vl0BQh0x+BLub8BK3E0hax5uOUlgKLEDIQBndbtTQe442jyVx2lr4kyqfYjkJlaUyzEsw4q07dZmEMdmmXW3AYTiWwTUApmhntFwTjCSg8PBoe4KadrDoPFZnv2cSTOZQb28lLn3bF/kp691xJUgy3coorX5d6S1VQIUE6tTaMp27Wf2dwKV7oLN0cZaK0WCv844esKXWJxtvYO6qKTDnAv7TPJN0XyRg5I5VvYauEp8w4qjkPIznwETrfeQ0I7rEYZK0aA8DA43ccM65vtrqdmsI94uvED73K5jQX3ElD5Py2FXoy8mAGGdam5tPXlxIC+6NyboTWY6PwUXfvpkGHiCYBnL7TbJRsK+1nebmJCaRluXro3zY++MMo2naEdapxTb7wEfKIKmUpML+/MsxGk26SJ7XhTE9p/yl7sWqWcS23Huhz7jPT+x1ednPhM7bmnWSgLuU+P3HH3suf/lDdd/lC+rnGPYIf01gX9Ob/MlYzd1sXAw6/lnLm/6nVfoPY/4ACC+Sl1+9ViUfx+OLq6Ai5ksfUykx20Yqqth48xlQUdFbpFlJCfwEVzRxLaK0nevmi/qYa1WAPXZMQlqQAohxn5XkHPUAzG6pxwSaQkoQGtG1gyQyZFCt8lZYElpB1IN9wYZ8kWk4lXAA= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR12MB8311.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(396003)(376002)(136003)(366004)(39860400002)(230273577357003)(230173577357003)(230922051799003)(186009)(451199024)(1800799012)(64100799003)(4326008)(66556008)(66946007)(122000001)(38100700002)(76116006)(2906002)(52536014)(83380400001)(86362001)(5660300002)(316002)(110136005)(55016003)(54906003)(64756008)(8936002)(8676002)(66446008)(66476007)(478600001)(26005)(38070700009)(41300700001)(55236004)(71200400001)(9686003)(6506007)(7696005)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?JEvtH/0/f5yT+N9aYkqjsb652nlqfsiptuue28XjwODZcamNUHdkd3LrXoQW?= =?us-ascii?Q?RWy2QQ/w2zBp5EWRrtwa4TUTPHzoTXof5lclVMMJw3LyAM+Tiy2HDy6r4daN?= =?us-ascii?Q?uWCGm9BjqnPZxCOrHpd4iiaePPMRMfBxhFZBdZk9G6sppStlCASKg2dlEnGg?= =?us-ascii?Q?rmzxNxN4tZaLnYeb+fCc75nuPcpmlqzG8wMXNgkmH8yCzqS6fc2DjRzw2lf/?= =?us-ascii?Q?IlfuVrh7HkZU7SxA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Cok?= =?us-ascii?Q?ll4LDZMGfdrUNpkfx80y2LjeuQT5OtmRP3ll/BlBIn0Zege1uAxMi52dbVf9?= =?us-ascii?Q?AwTucqO+vPneQ7bWpRWgVDlaRNZ+BHkLrgKP3AjceIXGd6p5O0Yxk9SNGgQT?= =?us-ascii?Q?KfIHI4OvnYI/me2vhDDu/qT9bEX2jGjGhRhPF8nzXKaoPxrJyaC/0kYMRZyx?= =?us-ascii?Q?LtexXQrMZbF/tNoicXRXunf1I2Z9uO+9iC1B4/hFtXobFI4L6bJcREHmqPiu?= =?us-ascii?Q?XvUlnj3cIg5/EtYP0T+iIYVb1MfJnStp2FxGdfCz0LFoa7yEhikvvn4QYqEl?= =?us-ascii?Q?r294Bj+YW+bw/D5gDNJbkpLQA7g6URkJ58U5tgXywSjugnp8ZZbnAj7lmfrx?= =?us-ascii?Q?TnTRf3nUj07Zn+vhNcwfYL3eU7wYW6Q4JZwcxXE0cfJ54N1gC6kMMoiZws64?= =?us-ascii?Q?0TrxVMzRLA/qyHtW70I0gsKTfjReZ2KRYxNLHNhw?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB8311.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c2db22c-2953-40ab-fcc6-08dbf81f1266 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Dec 2023 18:54:13.8859 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ATY1MXgbYPhdhP6pKJ0Tk9CswTwVVU2JbN0wqq1duXx+iOFcCVdTDiJqSjJqxBpqq3OhB7QJ9lTK52J2WU/2KQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4096 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 Hi Michael, > +Item: ``RANDOM`` > +^^^^^^^^^^^^^^^^ > + > +Matches a random value. > + > +The rundom number is generated by PMD, s/rundom/random I'm not sure that mentioning PMD here is fully correct, because in my opini= on it implies that SW generates it. HW, SW and system clock were mentioned as examples of sources of randomness= in previous discussions on this API. Also, I think it's worth adding that "number =3D=3D unsigned integer with a= t most 32 bits." It gives some leeway for any driver implementing this API - value is uint32= _t but not all bits must be used. For example, some HW may support only 16-bit random number generation. Such HW might implement validation on mask, where mask with more than 16 bi= ts would be rejected. What do you think about the following proposal based on those comments? =20 "A random unsigned integer (at most 32-bit) is generated for each packet during flow rule processing, by either HW, SW or some external source. Application can match on either exact value or range of values." > +Application shouldn't assume that this value is kept during the life > +time of the packet. s/life time/lifetime Best regards, Dariusz Sosnowski