public inbox for gwml@vger.gnuweeb.org
 help / color / mirror / Atom feed
From: reyuki <reyuki@gnuweeb.org>
To: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>
Cc: Ammar Faizi <ammarfaizi2@gnuweeb.org>,
	"GNU/Weeb Mailing List" <gwml@vger.gnuweeb.org>
Subject: Re: [PATCH gwproxy v8 2/2] gwproxy: refactor code base to add experimental raw DNS backend
Date: Tue, 9 Sep 2025 09:38:44 +0700	[thread overview]
Message-ID: <CAADvAgrOqqEdjJ6gN3sq05iTBpMFAx5Ygx8PQ=TW+FisCATiMA@mail.gmail.com> (raw)
In-Reply-To: <CAOG64qMnvo=oDmYnu0iqUq0CHUuK-54_fyQyn-DORYRkwr6h5Q@mail.gmail.com>

On Sat, Sep 6, 2025 at 1:47 PM Alviro Iskandar Setiawan wrote:
> On Sat, Sep 6, 2025 at 11:33 AM Ahmad Gani wrote:
> > I thought it was necessary to mark that a certain block belongs to the
> > experimental raw DNS feature. If I reduce the use of these marks, it might
> > introduce unnecessary code into the compiled version when this experimental
> > feature is disabled.
>
> It's necessary, but you're overusing it. Your version clutters the
> codebase so much. You had better have empty local functions which are
> compiled to nothing instead of #ifdef/#endif everywhere. Look at
> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/liburing.git/tree/src/include/liburing/sanitize.h?id=5baeec1e1200b88da1d84ba978605728d791d693

I have reduced it to 17 using a similar way with the liburing way,
is it still too much? you can take a look at this branch [1]

FYI, I've pushed some commits implementing your proposal and Sir Ammar's,
except for the third point in Sir Ammar's proposal. As Sir Ammar noted,
DNS queries are short-lived objects. If the concurrent queries exceed
2^16, I think we can assume we're being DDoS'ed and can safely ignore
further requests.

If some of you think exceeding 2^16 is realistic in production and are
willing to reproduce such a scenario and show me results where it
actually happens, I'll reconsider implementing the third point. For now,
I believe in the YAGNI principle.

[1]:
https://github.com/realyukii/gwproxy/tree/archived-experimental-raw-dns

  reply	other threads:[~2025-09-09  2:39 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29  7:55 [PATCH gwproxy v8 0/2] Initial work on integration of DNS parser lib in gwproxy Ahmad Gani
2025-08-29  7:55 ` [PATCH gwproxy v8 1/2] dnsparser: Add dns parser code Ahmad Gani
2025-08-29  7:55 ` [PATCH gwproxy v8 2/2] gwproxy: refactor code base to add experimental raw DNS backend Ahmad Gani
2025-09-05 16:26   ` Alviro Iskandar Setiawan
2025-09-06  4:32     ` Ahmad Gani
2025-09-06  5:16       ` Ahmad Gani
2025-09-06  6:17       ` Ahmad Gani
2025-09-06  6:48         ` Ahmad Gani
2025-09-06  7:02           ` Alviro Iskandar Setiawan
2025-09-06  6:47       ` Alviro Iskandar Setiawan
2025-09-09  2:38         ` reyuki [this message]
2025-09-06 11:27       ` Ahmad Gani
2025-09-06 12:01         ` Alviro Iskandar Setiawan
2025-09-06 12:58         ` Ahmad Gani
2025-09-06 13:30           ` Alviro Iskandar Setiawan
2025-09-06 13:44             ` Alviro Iskandar Setiawan
2025-09-06 14:26             ` Ahmad Gani
2025-09-06 14:30               ` Alviro Iskandar Setiawan
2025-09-07  4:22             ` Ammar Faizi
2025-09-07  5:57               ` Ammar Faizi
2025-09-07  6:39               ` Ahmad Gani
2025-09-07  6:40                 ` Ahmad Gani
2025-09-07  6:43                   ` Ammar Faizi
2025-09-07  7:06                 ` Ammar Faizi
2025-09-07  7:17                   ` Ahmad Gani
2025-09-07  9:52               ` Ahmad Gani
2025-09-07 10:19                 ` Ammar Faizi
2025-09-07 10:36                   ` Ahmad Gani
2025-09-06  7:14     ` Alviro Iskandar Setiawan
2025-09-06  7:21       ` Ahmad Gani
2025-09-06  7:47   ` Alviro Iskandar Setiawan
2025-09-06 11:01     ` Ahmad Gani
2025-09-05  9:18 ` [PATCH gwproxy v8 0/2] Initial work on integration of DNS parser lib in gwproxy Ammar Faizi
2025-09-05  9:34   ` Alviro Iskandar Setiawan

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='CAADvAgrOqqEdjJ6gN3sq05iTBpMFAx5Ygx8PQ=TW+FisCATiMA@mail.gmail.com' \
    --to=reyuki@gnuweeb.org \
    --cc=alviro.iskandar@gnuweeb.org \
    --cc=ammarfaizi2@gnuweeb.org \
    --cc=gwml@vger.gnuweeb.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