> 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?
- [PATCH v4 3/8] net/af_packet: use generi... Stephen Hemminger
- [PATCH v4 4/8] net/af_xdp: use generic S... Stephen Hemminger
- [PATCH v4 5/8] net/pcap: use generic SW ... Stephen Hemminger
- [PATCH v4 6/8] net/ring: use generic SW ... Stephen Hemminger
- [PATCH v4 7/8] net/tap: use generic SW s... Stephen Hemminger
- [PATCH v4 8/8] net/null: use generic SW ... Stephen Hemminger
- [PATCH v5 0/9] Generic 64 bit counters Stephen Hemminger
- [PATCH v5 1/9] eal: generic 64 bit count... Stephen Hemminger
- RE: [PATCH v5 1/9] eal: generic 64 b... Wathsala Wathawana Vithanage
- Re: [PATCH v5 1/9] eal: generic ... Stephen Hemminger
- Re: [PATCH v5 1/9] eal: gene... Honnappa Nagarahalli
- Re: [PATCH v5 1/9] eal:... Stephen Hemminger
- Re: [PATCH v5 1/9] eal:... Honnappa Nagarahalli
- [PATCH v5 2/9] ethdev: add common counte... Stephen Hemminger
- RE: [PATCH v5 2/9] ethdev: add commo... Wathsala Wathawana Vithanage
- [PATCH v5 3/9] net/af_packet: use generi... Stephen Hemminger
- [PATCH v5 4/9] net/af_xdp: use generic S... Stephen Hemminger
- [PATCH v5 5/9] net/pcap: use generic SW ... Stephen Hemminger
- [PATCH v5 6/9] test/pmd_ring: initialize... Stephen Hemminger
- [PATCH v5 7/9] net/ring: use generic SW ... Stephen Hemminger
- [PATCH v5 8/9] net/tap: use generic SW s... Stephen Hemminger