> On May 16, 2024, at 10:29 PM, Stephen Hemminger <step...@networkplumber.org> > wrote: > > On Fri, 17 May 2024 02:39:02 +0000 > Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> wrote: > >>> On May 16, 2024, at 4:42 PM, Stephen Hemminger <step...@networkplumber.org> >>> wrote: >>> >>> On Thu, 16 May 2024 18:22:23 +0000 >>> Wathsala Wathawana Vithanage <wathsala.vithan...@arm.com> wrote: >>> >>>> Hi Stephen, >>>> >>>>> +__rte_experimental >>>>> +static inline uint64_t >>>>> +rte_counter64_fetch(const rte_counter64_t *counter) { >>>>> + return *counter; >>>>> +} >>>> >>>> What if the address pointed by counter is not aligned and the >>>> architecture doesn't support atomic (untorn) loads on non-aligned loads? >>>> >>>> --wathsala >>> >>> Then the driver is using it incorrectly. For the use case of a set of >>> counters >>> (even if embedded in another struct), the compiler takes care of this. >>> >>> Remember this is an internal API, not something that needs to handle user >>> abuse. >> If it is internal API, should the API name have double underscore prefix to >> indicate the same? >> > > Other parts of ethdev have internal API's with similar names already. > None of them use underscore. At least, these are marked internal. Should we use ‘@internal’ in the function descriptions?
> > 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; > };