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 7C5FE456CB; Sun, 28 Jul 2024 09:04:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 29BF24028A; Sun, 28 Jul 2024 09:04:12 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 6D55340261 for ; Sun, 28 Jul 2024 08:42:47 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 3F15F120B for ; Sun, 28 Jul 2024 08:42:46 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 32ABB115F; Sun, 28 Jul 2024 08:42:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=ALL_TRUSTED,AWL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=4.0.0 X-Spam-Score: -1.3 Received: from [192.168.1.86] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 9D65810EC; Sun, 28 Jul 2024 08:42:43 +0200 (CEST) Message-ID: <298cc5e7-bb47-46a9-a904-c583edff7daa@lysator.liu.se> Date: Sun, 28 Jul 2024 08:42:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] eal: add support for TRNG with Arm RNG feature To: Wathsala Wathawana Vithanage , Shunzhi Wen , "thomas@monjalon.net" , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Ruifeng Wang , Bruce Richardson , Tyler Retzlaff , Min Zhou , David Christensen , Stanislaw Kardach , Konstantin Ananyev Cc: "dev@dpdk.org" , nd , Jack Bond-Preston , Dhruv Tripathi , Honnappa Nagarahalli References: <20240723212703.721050-1-shunzhi.wen@arm.com> <536d1325-ee15-4630-9ae9-00cef9411d34@lysator.liu.se> <2d28f42f-480b-4070-8ba2-1353a742b46d@lysator.liu.se> <5d409e6a-1d61-4d8a-b9ab-8cbcf7838ad0@lysator.liu.se> Content-Language: en-US From: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP 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 On 2024-07-28 00:45, Wathsala Wathawana Vithanage wrote: >> If your patch are to have non-zero chance of being accepted, it should include >> a base implementation based on getrandom() (and the Windows equivalent), >> with the proper optimizations (e.g., batching entropy requests to the kernel >> on a per-lcore basis). >> >> You would also need to provide a rationale why ARM CPU HW random >> numbers are better than what the kernel can offer. The only potential reason I >> can think of is performance, so you would need to quantify that in some way. >> >> In addition, reliance on CPU CSRNG would need to be a build-time option, and >> disabled by default. >> >> Plus, what I've mentioned several times, give a rationale why DPDK should >> have this functionality. >> > > Thank you for the clarification. If I understood correctly following is what's needed. > ...to have a non-zero chance of getting accepted. > 1- An implementation of rte_csrand that calls getrandom() with per-core entropy caching. Which will be the default for DPDK. > 2- Build time flag to enable HW CSRNG for those who want to override the default kernel getrandom() feature. > 3- Rationale for why CPU HW CSRNG is required. > > To elaborate on Item 3, the rationale is simple, we want to enable the HW feature for those who need it. That's circular. "The reason we want this feature implementation to be included is to satisfy those who want this feature implementation." Stop thinking like an ARM developer on a "software enablement" mission, and start thinking like a DPDK library or application developer.