xdp-newbies.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henning Fehrmann <henning.fehrmann@aei.mpg.de>
To: "xdp-newbies@vger.kernel.org" <xdp-newbies@vger.kernel.org>
Subject: Re: make XDP program aware of multi buffer
Date: Wed, 30 Nov 2022 09:54:35 +0100	[thread overview]
Message-ID: <Y4caS5Bh7M9SDJf9@mephisto.aei.uni-hannover.de> (raw)
In-Reply-To: <87cz95zyen.fsf@toke.dk>

> You just replace:
> 
> SEC("xdp")
> 
> with
> 
> SEC("xdp.frags")
> 
> in your source file and, assuming your libbpf version is up-to-date,
> that should be it as far as the kernel is concerned.

Nice. It loads now. I appreciate the work done for multi buffer packets.

> 
> However, you obviously also need to make sure there are no semantic
> issues in your program before doing this. I.e., data_end is no longer
> the end of your packet, so if you are using data_end-data to calculate
> the packet len, that will no longer be accurate. If you need to access
> data beyond the first frag you'll need to use the
> xdp_{load,store}_bytes() helpers.

I guess, this is not the case or does bpf_redirect needs it if I have
multi frame packets?
I realized that redirection actually doesn't happen if the packets
exceed the page size.

Thank you,
Henning

  reply	other threads:[~2022-11-30  8:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 12:14 make XDP program aware of multi buffer Henning Fehrmann
2022-11-29 13:24 ` Toke Høiland-Jørgensen
2022-11-30  8:54   ` Henning Fehrmann [this message]
2022-11-30 13:11     ` Toke Høiland-Jørgensen

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=Y4caS5Bh7M9SDJf9@mephisto.aei.uni-hannover.de \
    --to=henning.fehrmann@aei.mpg.de \
    --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 NNTP newsgroup(s).