netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pedro Tammela <pctammela@mojatatu.com>
To: netdev@vger.kernel.org
Cc: tgraf@suug.ch, herbert@gondor.apana.org.au, davem@davemloft.net,
	dsahern@kernel.org, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, Pedro Tammela <pctammela@mojatatu.com>
Subject: [RFC PATCH net-next 0/4] rhashtable: length helper for rhashtable and rhltable
Date: Fri,  9 Jun 2023 12:13:28 -0300	[thread overview]
Message-ID: <20230609151332.263152-1-pctammela@mojatatu.com> (raw)

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


             reply	other threads:[~2023-06-09 15:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 15:13 Pedro Tammela [this message]
2023-06-09 15:13 ` [RFC PATCH net-next 1/4] rhashtable: add length helper for rhashtable and rhltable Pedro Tammela
2023-06-09 15:22   ` Eric Dumazet
2023-06-09 15:13 ` [RFC PATCH net-next 2/4] rhashtable: use new length helpers Pedro Tammela
2023-06-09 15:13 ` [RFC PATCH net-next 3/4] net/ipv4: use rhashtable length helper Pedro Tammela
2023-06-09 15:13 ` [RFC PATCH net-next 4/4] net/ipv6: " Pedro Tammela
2023-06-09 17:36 ` [RFC PATCH net-next 0/4] rhashtable: length helper for rhashtable and rhltable Jakub Kicinski
2023-06-09 18:13   ` Pedro Tammela
2023-06-09 18:21     ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230609151332.263152-1-pctammela@mojatatu.com \
    --to=pctammela@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tgraf@suug.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).