[RFC PATCH net-next 0/4] rhashtable: length helper for rhashtable and rhltable

From
Pedro Tammela <hidden>
Date
2023-06-09 15:13:50
Whenever someone wants to retrieve the total number of elements in a
rhashtable/rhltable it needs to open code the access to 'nelems'.
Therefore provide a helper for such operation and convert two accesses as
an example.

Pedro Tammela (4):
  rhashtable: add length helper for rhashtable and rhltable
  rhashtable: use new length helpers
  net/ipv4: use rhashtable length helper
  net/ipv6: use rhashtable length helper

 include/linux/rhashtable.h | 16 ++++++++++++++++
 lib/rhashtable.c           |  2 +-
 lib/test_rhashtable.c      |  4 ++--
 net/ipv4/proc.c            |  3 ++-
 net/ipv6/proc.c            |  3 ++-
 5 files changed, 23 insertions(+), 5 deletions(-)

-- 
2.39.2
Thread (9 messages) 9 messages, 3 authors, last reply 2023-06-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help