XDP-Newbies Archive mirror
 help / color / mirror / Atom feed
From: Howard Lum <hlum@synamedia.com>
To: "xdp-newbies@vger.kernel.org" <xdp-newbies@vger.kernel.org>
Subject: af_xdp_user.c limits
Date: Tue, 31 May 2022 22:32:57 +0000	[thread overview]
Message-ID: <CWXP265MB55671EE214D9307E179AE3F3C8DC9@CWXP265MB5567.GBRP265.PROD.OUTLOOK.COM> (raw)

I have some questions regarding the limits in
https://github.com/xdp-project/xdp-tutorial/blob/master/advanced03-AF_XDP/af_xdp_user.c

NUM_FRAMES is hard-coded to 4096. Can I change NUM_FRAMES to 65536 to buffer a large number of packets?

FRAME_SIZE is hard-coded to XSK_UMEM__DEFAULT_FRAME_SIZE which is 4096 bytes in my setup. Can I just change FRAME_SIZE to 2048 to save memory?

XSK_RING_CONS__DEFAULT_NUM_DESCS is used to set the rx ring size to 2048. I have a NIC that can handle 8192 packets. Should I adjust the rx ring size to match?

XSK_RING_PROD__DEFAULT_NUM_DESCS is used to set the tx ring size to 2048. Similarly, should I adjust the tx ring size to match the NIC?

Howard


This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately and delete this message and any attachment from your system. Do not copy them or disclose the contents to any other person.

             reply	other threads:[~2022-05-31 22:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 22:32 Howard Lum [this message]
2022-06-01 12:37 ` af_xdp_user.c limits Maciej Fijalkowski

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=CWXP265MB55671EE214D9307E179AE3F3C8DC9@CWXP265MB5567.GBRP265.PROD.OUTLOOK.COM \
    --to=hlum@synamedia.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).