NSD - enable XDP in Debian?

Hi

I have uploaded nsd 4.13.0 to Debian unstable. According to your blog
post I noticed you added XDP support, but that it requires building with
--enable-xdp, see discussion:

https://blog.nlnetlabs.nl/enabling-more-default-features-in-nsd-4-13-0/
https://blog.nlnetlabs.nl/experimental-support-for-af_xdp-sockets-in-nsd/

What do you think about building with this flag in the Debian package?

Any reasons this may break unrelated things?

I think we are years away from a new Debian release, so it will only be
used by people tracking Debian unstable and testing, which I suspect few
use in production. Which may be a good fit to get wider testing.

/Simon

Hi,

What do you think about building with this flag in the Debian package?
[...] Which may be a good fit to get wider testing.

Building with XDP enabled in Debian testing would be great and indeed
a good fit to get wider testing.

Any reasons this may break unrelated things?

I don't think building with this flag would break anything unrelated.

(Our reason for the build flag was the introduction of additional
dependencies, which some people may find undesirable.)

Best,
Jannik

"Jannik Peters" <jannik@nlnetlabs.nl> writes:

Hi,

What do you think about building with this flag in the Debian package?
[...] Which may be a good fit to get wider testing.

Building with XDP enabled in Debian testing would be great and indeed
a good fit to get wider testing.

Thanks for confirming. I tried to enable it but ran into build errors:

https://salsa.debian.org/jas/nsd/-/jobs/8255756

As far as I some XDP objects are needed during linking, this patch fixed
it for us:

https://github.com/NLnetLabs/nsd/pull/460

With that it builds reasonable well:

https://salsa.debian.org/jas/nsd/-/pipelines/933804

Also, by default, it seems some *.o files are installed into
$(sharedfilesdir) which became /usr/share/nsd for me, see Makefile.in:

  if test -n "@xdp@"; then $(INSTALL_DATA) xdp-dns-redirect_kern.o $(DESTDIR)$(sharedfilesdir)/xdp-dns-redirect_kern.o; fi
  if test -n "@xdp@"; then $(INSTALL_DATA) xdp-dns-redirect_kern_pinned.o $(DESTDIR)$(sharedfilesdir)/xdp-dns-redirect_kern_pinned.o; fi

These are architecture-dependent files, aren't they? Is there some
standard non-/usr/share location for these files that you could use?
This may be a Debian-specific concern, I asked the same here:

https://lists.debian.org/debian-devel/2025/09/msg00143.html

/Simon

Hi Simon,

Also, by default, it seems some *.o files are installed into
$(sharedfilesdir) which became /usr/share/nsd for me, see Makefile.in:

  if test -n "@xdp@"; then $(INSTALL_DATA) xdp-dns-redirect_kern.o $(DESTDIR)$(sharedfilesdir)/xdp-dns-redirect_kern.o; fi
  if test -n "@xdp@"; then $(INSTALL_DATA) xdp-dns-redirect_kern_pinned.o $(DESTDIR)$(sharedfilesdir)/xdp-dns-redirect_kern_pinned.o; fi

These are architecture-dependent files, aren't they? Is there some
standard non-/usr/share location for these files that you could use?

Although these files are technically for a specific architecture (that being
eBPF), they are architecture-*in*dependent with regard to x86, ARM, etc.
eBPF programs are compatible across CPU architectures, as they get executed by
the eBPF "VM" inside the Linux kernel.

Best,
Jannik