XDP-Newbies Archive mirror
 help / color / mirror / Atom feed
From: 越峰裴 <peiyuefeng@gmail.com>
To: xdp-newbies@vger.kernel.org
Subject: Re: How to calculate the actual size of the memory occupied by the map in the bpf program?
Date: Fri, 28 Jul 2023 11:51:32 +0800	[thread overview]
Message-ID: <CA+hDufCfhfrnDKkuNG=exYqDOCR0QiAPoagzbLwwYZPa_+282w@mail.gmail.com> (raw)
In-Reply-To: <CA+hDufANB4-u3Hb2ZLX-3P3KMQkLqGub6g7y9LHgkmLmHjKL5Q@mail.gmail.com>

 The value of memlock can be seen through bpftool map, but this number
is not the actual size of the map, but only the data size of key and
value.

 Is there any way to estimate the actual size of the map in memory
based on the size of max_entries and key|value?

 Is there any way to know the actual size of each map in the current
xdp program?

 Best Regards
 Dalu Pay

           reply	other threads:[~2023-07-28  3:51 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CA+hDufANB4-u3Hb2ZLX-3P3KMQkLqGub6g7y9LHgkmLmHjKL5Q@mail.gmail.com>]

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='CA+hDufCfhfrnDKkuNG=exYqDOCR0QiAPoagzbLwwYZPa_+282w@mail.gmail.com' \
    --to=peiyuefeng@gmail.com \
    --cc=xdp-newbies@vger.kernel.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).