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 EC38644045; Fri, 17 May 2024 05:29:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B22E140285; Fri, 17 May 2024 05:29:13 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id A68384027F for ; Fri, 17 May 2024 05:29:12 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1ee7963db64so1710625ad.1 for ; Thu, 16 May 2024 20:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1715916552; x=1716521352; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=3h/E3pIYsQegFmHRJRPFZkg7KQpp1zLt/xtV3dSgjgc=; b=3CWMpYqrtZDE6biiJpPcdS4PEJ8J5pMj+5/1v6DQUpgnSVw1MASbp0j9hclN6WIBkj ayv10LkIgSwAEkCA4dc7M5q9txTy7gN7rFTOaY1jkvp0RpLRON3AdQ2PSUDUnx2L+LDV 1ZDuSsVyoIrsP83pmAQl8k6IheRbXaokqfaIGxc/9UrHCFCRkRaNKQiSv2avnzx4KZXB 3IcWy6B3hSY39CluMSxO952tndEZ/3E08sTRDAGtTz4JZWWbGsJmbge6NVvuJyUS16L0 cT7ZYHYqs4M/Vcl8QGCpZDKcKbf7yGG+jGdwQac4xmM+yR/9wjE2JMiFhbT6CQ+aiZET OxTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715916552; x=1716521352; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3h/E3pIYsQegFmHRJRPFZkg7KQpp1zLt/xtV3dSgjgc=; b=qu8JqVQtymDMJJhH4N8tjtEFa7QsssMPJPjDlUN5Spdo0ed3KAq99JDb5WsOU0WJ/6 DZ75pWGscmUR8p+mB9e2VUkn2SDnqrvG1KbHl1Kal8zKlcPO0vy4xyKlbQDL7Jpc9ZZS 0wnUrJpoJezetE0fAg/ZNj7K5lTpUEGNX2YhNDEMzzdEk7mTSb9xYNy3H16IiypOkTgE v0Ig9TzR5ZHUrj4lhBAnJB+YgufwIPHmJ944lXJwmu1PHUq3gi4eSGAtDKxEuIbobBbu HGHSxPORNBCH2TvfNssZXDVTY2tZvrKTOpI7T+XaiAlZzLWWabambTblwEz/V3aP7FAU UubA== X-Forwarded-Encrypted: i=1; AJvYcCW4eBtsjOklCETAfdHjyGVSNJRWkhC+xsZMrKFUP7LPCjqPsh6mOpe0BHArEvTsB3e/TciMouAXgXg15wo= X-Gm-Message-State: AOJu0Yx9fox2KDimsqJ1VSr/vF1DAgfyz/LVEJJ83igrHncHTN9llQiF FyG5rKUjwBI/vslunNNmORYnbcyhTkWfX8v2bgZs4q7fRTaoOwqsZCwvq3//PFGDE4Xb3Reprgk XF4w= X-Google-Smtp-Source: AGHT+IEJkBzFiSIqVUZ9jyRKvY5LMNcO3ylUPjPOpvElieLK/rvGEYVCKcwwJjM6OmDPdu0dS+5TmQ== X-Received: by 2002:a17:902:e745:b0:1e2:a166:b5b0 with SMTP id d9443c01a7336-1f0af115c6amr42961845ad.64.1715916551659; Thu, 16 May 2024 20:29:11 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0bf319f8sm146151425ad.161.2024.05.16.20.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 20:29:11 -0700 (PDT) Date: Thu, 16 May 2024 20:29:09 -0700 From: Stephen Hemminger To: Honnappa Nagarahalli Cc: Wathsala Wathawana Vithanage , "dev@dpdk.org" , Morten =?UTF-8?B?QnLDuHJ1cA==?= , nd Subject: Re: [PATCH v5 1/9] eal: generic 64 bit counter Message-ID: <20240516202909.461f7fbc@hermes.local> In-Reply-To: <8B018085-D88B-4243-979C-D1C55E64F99D@arm.com> References: <20240510050507.14381-1-stephen@networkplumber.org> <20240516154327.64104-1-stephen@networkplumber.org> <20240516154327.64104-2-stephen@networkplumber.org> <20240516144241.4c287701@hermes.local> <8B018085-D88B-4243-979C-D1C55E64F99D@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Fri, 17 May 2024 02:39:02 +0000 Honnappa Nagarahalli wrote: > > On May 16, 2024, at 4:42=E2=80=AFPM, Stephen Hemminger wrote: > >=20 > > On Thu, 16 May 2024 18:22:23 +0000 > > Wathsala Wathawana Vithanage wrote: > > =20 > >> Hi Stephen, > >> =20 > >>> +__rte_experimental > >>> +static inline uint64_t > >>> +rte_counter64_fetch(const rte_counter64_t *counter) { > >>> + return *counter; > >>> +} =20 > >>=20 > >> What if the address pointed by counter is not aligned and the > >> architecture doesn't support atomic (untorn) loads on non-aligned load= s?=20 > >>=20 > >> --wathsala =20 > >=20 > > Then the driver is using it incorrectly. For the use case of a set of c= ounters > > (even if embedded in another struct), the compiler takes care of this. > >=20 > > Remember this is an internal API, not something that needs to handle us= er > > abuse. =20 > If it is internal API, should the API name have double underscore prefix = to indicate the same? >=20 Other parts of ethdev have internal API's with similar names already. None of them use underscore. INTERNAL { global: rte_eth_dev_allocate; rte_eth_dev_allocated; rte_eth_dev_attach_secondary; rte_eth_dev_callback_process; rte_eth_dev_create; rte_eth_dev_destroy; rte_eth_dev_get_by_name; rte_eth_dev_is_rx_hairpin_queue; rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; rte_eth_dev_internal_reset; rte_eth_devargs_parse; rte_eth_devices; rte_eth_dma_zone_free; rte_eth_dma_zone_reserve; rte_eth_hairpin_queue_peer_bind; rte_eth_hairpin_queue_peer_unbind; rte_eth_hairpin_queue_peer_update; rte_eth_ip_reassembly_dynfield_register; rte_eth_link_speed_ethtool; # WINDOWS_NO_EXPORT rte_eth_link_speed_glink; # WINDOWS_NO_EXPORT rte_eth_link_speed_gset; # WINDOWS_NO_EXPORT rte_eth_pkt_burst_dummy; rte_eth_representor_id_get; rte_eth_switch_domain_alloc; rte_eth_switch_domain_free; rte_flow_fp_default_ops; };