public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsdist/, net-dns/dnsdist/files/
Date: Fri, 28 Mar 2025 15:06:20 +0000 (UTC)	[thread overview]
Message-ID: <1743174245.c9bcc34ea9b8c2a5d2b9c0e5261ec8de6b3c3edf.sam@gentoo> (raw)

commit:     c9bcc34ea9b8c2a5d2b9c0e5261ec8de6b3c3edf
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Fri Mar 28 11:52:56 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 28 15:04:05 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9bcc34e

net-dns/dnsdist: fix compatibility with boost::lockfree >=1.87.0

Revbump since the new patch changes the generated code.

Closes: https://bugs.gentoo.org/952826
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/41343
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...ist-1.9.8-r1.ebuild => dnsdist-1.9.8-r2.ebuild} |  5 +-
 ...9.8-fix-compat-with-boost-lockfree-1.87.0.patch | 90 ++++++++++++++++++++++
 2 files changed, 94 insertions(+), 1 deletion(-)

diff --git a/net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild b/net-dns/dnsdist/dnsdist-1.9.8-r2.ebuild
similarity index 95%
rename from net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild
rename to net-dns/dnsdist/dnsdist-1.9.8-r2.ebuild
index b51d68a3dba2..bebf3ec0d2ed 100644
--- a/net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild
+++ b/net-dns/dnsdist/dnsdist-1.9.8-r2.ebuild
@@ -49,7 +49,10 @@ RDEPEND="acct-group/dnsdist
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
-PATCHES=( "${FILESDIR}/1.9.8-quiche-0.23.patch" )
+PATCHES=(
+	"${FILESDIR}/1.9.8-quiche-0.23.patch"
+	"${FILESDIR}/1.9.8-fix-compat-with-boost-lockfree-1.87.0.patch"
+)
 
 src_prepare() {
 	default

diff --git a/net-dns/dnsdist/files/1.9.8-fix-compat-with-boost-lockfree-1.87.0.patch b/net-dns/dnsdist/files/1.9.8-fix-compat-with-boost-lockfree-1.87.0.patch
new file mode 100644
index 000000000000..69b03b1047df
--- /dev/null
+++ b/net-dns/dnsdist/files/1.9.8-fix-compat-with-boost-lockfree-1.87.0.patch
@@ -0,0 +1,90 @@
+Patch from: https://github.com/PowerDNS/pdns/pull/15181
+Fixed file paths for dnsdist tarball.
+
+Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
+
+From: Remi Gacogne <remi.gacogne@powerdns.com>
+Date: Mon, 10 Feb 2025 11:24:28 +0100
+Subject: [PATCH] dnsdist-1.9.x: Fix compatibility with boost::lockfree >= 1.87.0
+
+In https://github.com/boostorg/lockfree/pull/90 `boost::lockfree::spsc_queue`
+introduced moved semantics, which is great, but added restrictions
+to the callback functor that did not exist before, breaking the API.
+This PR fixes that by updating our callbacks to expect an object
+instead of a reference.
+
+(cherry picked from commit 05543aed8ccff2270a65d3f9b75e6e9d894b8b45)
+---
+ dnsdist-xsk.cc | 6 +++---
+ xsk.cc         | 4 ++--
+ xsk.hh         | 4 ++--
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/dnsdist-xsk.cc b/dnsdist-xsk.cc
+index 7e83c510093e..dcbd79459796 100644
+--- a/dnsdist-xsk.cc
++++ b/dnsdist-xsk.cc
+@@ -48,7 +48,7 @@ void XskResponderThread(std::shared_ptr<DownstreamState> dss, std::shared_ptr<Xs
+       if ((pollfds[0].revents & POLLIN) != 0) {
+         needNotify = true;
+         xskInfo->cleanSocketNotification();
+-        xskInfo->processIncomingFrames([&](XskPacket& packet) {
++        xskInfo->processIncomingFrames([&](XskPacket packet) {
+           if (packet.getDataLen() < sizeof(dnsheader)) {
+             xskInfo->markAsFree(packet);
+             return;
+@@ -167,7 +167,7 @@ void XskRouter(std::shared_ptr<XskSocket> xsk)
+         if ((fds.at(fdIndex).revents & POLLIN) != 0) {
+           ready--;
+           const auto& info = xsk->getWorkerByDescriptor(fds.at(fdIndex).fd);
+-          info->processOutgoingFrames([&](XskPacket& packet) {
++          info->processOutgoingFrames([&](XskPacket packet) {
+             if ((packet.getFlags() & XskPacket::UPDATE) == 0) {
+               xsk->markAsFree(packet);
+               return;
+@@ -202,7 +202,7 @@ void XskClientThread(ClientState* clientState)
+     while (!xskInfo->hasIncomingFrames()) {
+       xskInfo->waitForXskSocket();
+     }
+-    xskInfo->processIncomingFrames([&](XskPacket& packet) {
++    xskInfo->processIncomingFrames([&](XskPacket packet) {
+       if (XskProcessQuery(*clientState, holders, packet)) {
+         packet.updatePacket();
+         xskInfo->pushToSendQueue(packet);
+diff --git a/xsk.cc b/xsk.cc
+index 5851f1b9b79e..d246a1d72e83 100644
+--- a/xsk.cc
++++ b/xsk.cc
+@@ -1185,7 +1185,7 @@ bool XskWorker::hasIncomingFrames()
+   return d_incomingPacketsQueue.read_available() != 0U;
+ }
+ 
+-void XskWorker::processIncomingFrames(const std::function<void(XskPacket& packet)>& callback)
++void XskWorker::processIncomingFrames(const std::function<void(XskPacket packet)>& callback)
+ {
+   if (d_type == Type::OutgoingOnly) {
+     throw std::runtime_error("Looking for incoming packets in an outgoing-only XSK Worker");
+@@ -1194,7 +1194,7 @@ void XskWorker::processIncomingFrames(const std::function<void(XskPacket& packet
+   d_incomingPacketsQueue.consume_all(callback);
+ }
+ 
+-void XskWorker::processOutgoingFrames(const std::function<void(XskPacket& packet)>& callback)
++void XskWorker::processOutgoingFrames(const std::function<void(XskPacket packet)>& callback)
+ {
+   d_outgoingPacketsQueue.consume_all(callback);
+ }
+diff --git a/xsk.hh b/xsk.hh
+index 2f3e7c372e35..ff36be5ecd96 100644
+--- a/xsk.hh
++++ b/xsk.hh
+@@ -312,8 +312,8 @@ public:
+   void pushToProcessingQueue(XskPacket& packet);
+   void pushToSendQueue(XskPacket& packet);
+   bool hasIncomingFrames();
+-  void processIncomingFrames(const std::function<void(XskPacket& packet)>& callback);
+-  void processOutgoingFrames(const std::function<void(XskPacket& packet)>& callback);
++  void processIncomingFrames(const std::function<void(XskPacket packet)>& callback);
++  void processOutgoingFrames(const std::function<void(XskPacket packet)>& callback);
+   void markAsFree(const XskPacket& packet);
+   // notify worker that at least one packet is available for processing
+   void notifyWorker() const;


             reply	other threads:[~2025-03-28 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28 15:06 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-29 20:31 [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsdist/, net-dns/dnsdist/files/ Sam James
2025-03-27 12:05 Sam James
2023-04-19  0:34 Arsen Arsenović
2017-06-14  7:48 Michał Górny

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=1743174245.c9bcc34ea9b8c2a5d2b9c0e5261ec8de6b3c3edf.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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