XDP-Newbies Archive mirror
 help / color / mirror / Atom feed
From: Prashant Batra <prbatra.mail@gmail.com>
To: xdp-newbies@vger.kernel.org
Subject: Redirect to AF_XDP socket not working with bond interface in native mode
Date: Tue, 19 Dec 2023 16:15:56 +0530	[thread overview]
Message-ID: <CAAAYKZPF8BiBy_aPnJA2z1n+2M8Xj6ZdETCm5+dQd3U+A_mMTA@mail.gmail.com> (raw)

Hi,

I am new to XDP and exploring it's working with different interface
types supported in linux. One of my use cases is to be able to receive
packets from the bond interface.
I used xdpsock sample program specifying the bond interface as the
input interface. However the packets received on the bond interface
are not handed over to the socket by the kernel if the socket is bound
in native mode. The packets are neither being passed to the kernel.
Note that the socket creation does succeed.
In skb mode this works and I am able to receive packets in the
userspace. But in skb mode as expected the performance is not that
great.

Is AF_XDP sockets on bond not supported in native mode? Or since the
packet has be to be handed over to the bond driver post reception on
the phy port, a skb allocation and copy to it is indeed a must?

Another thing I notice is that other XDP programs attached to bond
interface with targets like DROP, REDIRECT to other interface works
and perform better than AF_XDP (skb) based. Does this mean that these
are not allocating skb?

Kindly share your thoughts and advice.

Thanks,
Prashant

             reply	other threads:[~2023-12-19 10:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 10:45 Prashant Batra [this message]
2023-12-19 10:58 ` Redirect to AF_XDP socket not working with bond interface in native mode Prashant Batra
2023-12-19 13:47 ` Magnus Karlsson
2023-12-19 20:18   ` Prashant Batra
2023-12-20  8:24     ` Magnus Karlsson
2023-12-21 12:39       ` Prashant Batra
2023-12-21 13:45         ` Magnus Karlsson
2023-12-22 11:23           ` Prashant Batra
2024-01-02  9:57             ` Magnus Karlsson
2024-01-11 10:41               ` Prashant Batra
2024-01-15  9:22                 ` Magnus Karlsson
2024-01-16 12:48                   ` Prashant Batra
2024-01-16 12:59                     ` Magnus Karlsson
2024-01-17  6:07                       ` Prashant Batra
2024-01-17  7:41                         ` Magnus Karlsson
2024-01-19 12:43                           ` Prashant Batra
2024-01-19 13:04                             ` Toke Høiland-Jørgensen
     [not found]                               ` <CAD0p+fUM5DcG44cxYXU3fMd9PgTjhTaMCH_oy=4iejJ41zxHpA@mail.gmail.com>
2024-03-18 18:41                                 ` Christian Deacon
2024-03-19  7:52                                   ` Magnus Karlsson
2024-03-19 11:57                                     ` Toke Høiland-Jørgensen
2024-03-19 12:29                                       ` Magnus Karlsson

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=CAAAYKZPF8BiBy_aPnJA2z1n+2M8Xj6ZdETCm5+dQd3U+A_mMTA@mail.gmail.com \
    --to=prbatra.mail@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).