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 832E1463FB; Wed, 12 Mar 2025 18:20:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CAEC40663; Wed, 12 Mar 2025 18:20:00 +0100 (CET) Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) by mails.dpdk.org (Postfix) with ESMTP id 25708402D3 for ; Wed, 12 Mar 2025 18:19:59 +0100 (CET) Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 41F3925402BD; Wed, 12 Mar 2025 13:19:58 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Wed, 12 Mar 2025 13:19:58 -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:subject:subject:to:to; s=fm1; t=1741799998; x=1741886398; bh=R2K2TVlp7dU7+xDFPo9faKJn3Due0pI3u/ouwQRD59o=; b= ZCQ4zrfYXG9DM4Qd4+Qxv0xEWwpUb4AAVRWf2BIV1gJg1z0bm65Hp/IZrRpbXQsH X2n3TUMU0IDM1cXyiWRkFXSLZBRcZXFURwdcP5ZvPHF31eIa5QsHxwlsqusgZKIj pY8PTBTS2V72VdIwKarHvDNI7rFcqHYYOuiYub2eFlW0TDCnrKKQXJ5zm73SGRH1 oYGiLBFgf/1Ij0tWutZdaTzZh+epj5Sdlo5o43g6seznnrm8i/+RDflWgXIBURtG UtpjdS1QWuQoWXUUxNX5HyVFnK7vtvsD6ZbPh+aL8ucXWbPhXE4nxLjxceXlrWQY UWYHbXVj87uRpkpuXE8/Mg== 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:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1741799998; x= 1741886398; bh=R2K2TVlp7dU7+xDFPo9faKJn3Due0pI3u/ouwQRD59o=; b=o wG15G3MixzedoCwNUjznauQLQSgKar8W6gx7QDqZyYGqx+8H/p0VlNNFnbWzrZvj 0tK/EdYhBef7ZaSxK0bdBeHiyGW7mr9aP/B85KuXtVEIkfSma7Ce2jy2Ta4xOaou 78tSzP2PRP9qsAdvNi+9csLW/mGAbUWzo72i6sGW5+peOyvX/cmgGnjNgZqnL2CE IME4EbzWbqtg9J94HRMVOyL8JN2djXVs9Zm1Jq1H9XNEjrV+UMwrJICbQbsuCH1N T7xo9H8D2xRGuicXbKwGJryW4giKnOPBKADfo76WUCrWaRN/oj3g/TyYXYCPFyl3 2jwlqwj4VFzchYYDTd4Jg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvdehieehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddt jeenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonh hjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeejudevheeiveduuddtveffgfdt geekueevjeffjeegtdeggeekgfdvuefgfeekjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght pdhnsggprhgtphhtthhopeejpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehhrg hrrhihrdhvrghnrdhhrggrrhgvnhesihhnthgvlhdrtghomhdprhgtphhtthhopegsrhhu tggvrdhrihgthhgrrhgushhonhesihhnthgvlhdrtghomhdprhgtphhtthhopehgvghtvg hlshhonhesnhhvihguihgrrdgtohhmpdhrtghpthhtohepuggvvhesughpughkrdhorhhg pdhrtghpthhtohepmhhkrghshhgrnhhisehnvhhiughirgdrtghomhdprhgtphhtthhope highhoohhtohhrohhvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepshhtvghphhgvnhes nhgvthifohhrkhhplhhumhgsvghrrdhorhhg X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Mar 2025 13:19:56 -0400 (EDT) From: Thomas Monjalon To: "Van Haaren, Harry" , Bruce Richardson , Gregory Etelson Cc: "dev@dpdk.org" , "mkashani@nvidia.com" , "igootorov@gmail.com" , Stephen Hemminger Subject: Re: [PATCH v2] rust: support raw DPDK API Date: Wed, 12 Mar 2025 18:19:55 +0100 Message-ID: <3618203.GKX7oQKdZx@thomas> In-Reply-To: References: <20250306133713.393057-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 10/03/2025 17:25, Bruce Richardson: > On Mon, Mar 10, 2025 at 04:13:21PM +0000, Van Haaren, Harry wrote: > > Looking at the above parts of "Port abstraction in Rust", I'm not sure it really adds anything. > > It feels a bit "middle of the road" (aka, adding some "abstraction", but not going far enough). > > > > What if we took an even smaller step: remove the Rust struct concepts, and just call the "dpdk::raw::*" unsafe > > functions directly, as if they were C code. No "struct Port, impl Port", and no "Iterator > That would show "correct" usage of the raw generated bindings, and provide raw API unit-tests. > > > > Yes, definite +1 for this. Let's not try and have a half-C, half-Rust set > of APIs, but instead let's have a clean low-level mapping directly to C > functions, and then build a proper, safe API on top of that. +1 about limiting this patch to a low-level unsafe binding, while allowing a safe high-level API to be created later.