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 7BAB245C76; Mon, 4 Nov 2024 13:11:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6848140E41; Mon, 4 Nov 2024 13:11:06 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id AC8D140BA4 for ; Mon, 4 Nov 2024 13:11:04 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 72A332027D for ; Mon, 4 Nov 2024 13:11:04 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Risk of rte_ether_addr_copy() causing bugs Date: Mon, 4 Nov 2024 13:11:02 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F86F@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Risk of rte_ether_addr_copy() causing bugs Thread-Index: Adsusp4ipxURFpKqSnShkSSthoN5Pg== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: 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 Unlike memcpy() and other copy functions, rte_ether_addr_copy() takes = the destination as the second parameter. Not following well established conventions adds a high risk of causing = bugs in the applications/libraries/drivers; it is likely that developers = expect copy() functions to take parameters in the usual memcpy() order, = and pass the parameters to rte_ether_addr_copy() in that order instead = of the reverse order expected by rte_ether_addr_copy(). How can we fix this? One way would be to introduce a new copy function and mark the old = function deprecated (due to risk of bugs). Does the community support such a change? And what would be a good name for the new function? Any other ideas for fixing it? Med venlig hilsen / Kind regards, -Morten Br=F8rup