From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1757385561; bh=wqkWn5v30hssAmUh0JL3aQN8F7jJGbt8oee30fqmHqM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=Nvb+O5m8fyDOyAU5hjasKyWYoR3ZXC75oMFAQIyuzqYH2nCT7tPyD9YwNSrc9FB6Y U5BitI1oE/IWyfrJ2NVGg5p3ycqgsMNExOoYDES1+ihI0fVZ8VIKQStT2T2eQw3HXq tbXyP6pGUfBghNaCx3Ntm3QnLhwGKwyaA1yJywC3zEZIMHDfZusplI7r1Aw6gDUMa2 stG1E8SlNPn7ne0GVrJSxUzTn7egmBZwU/55+SBz5Ehmprt0NsOkekiWwzzfdZCBrN 0yKGtemrN4Ubq0mlDGii9CD2nV+W3Hkk9Wp9NocVch+eQXATHWJmaouBpyNW+5qInW dBt87FSI8/qKQ== Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id E0A6F3127A78 for ; Tue, 9 Sep 2025 02:39:21 +0000 (UTC) Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-5607c2f1598so5177718e87.3 for ; Mon, 08 Sep 2025 19:39:21 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXX0/y5bYFUX661Se1EI9iMplDCyza254CccQp+bitA8laeO6gl11VnX8X/JLlVPcv0rsdf@vger.gnuweeb.org X-Gm-Message-State: AOJu0YzqNQlIWiO6mgSMV8G0sEHGxJJuZ46RX05myFAUTW2xUtt783GB +qhjar7MHU83M6h5fSDxth4YNSzBEI4u+3rCw2faPZjy+LIJACb0HVlJ3ASCD1dBErtx+lvyXUw 9Qh1LJq1wOmS5hzDuXXD8rQvEgchZvtU= X-Google-Smtp-Source: AGHT+IFHf5RDlUgiq1PEvB7cPPH7NmDFR14504H2HbNETJ+tBOuQuFLKHJbuInOqQXipOupSI1dKpbeds/NMgIHScv0= X-Received: by 2002:a05:651c:b13:b0:338:8b9:2930 with SMTP id 38308e7fff4ca-33b58fa330bmr27171641fa.9.1757385561246; Mon, 08 Sep 2025 19:39:21 -0700 (PDT) MIME-Version: 1.0 References: <20250829075557.598176-1-reyuki@gnuweeb.org> <20250829075557.598176-3-reyuki@gnuweeb.org> In-Reply-To: From: reyuki Date: Tue, 9 Sep 2025 09:38:44 +0700 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXzx7gZJIRpvEUISL1MLWQo7TwoZX60UbB1lHIyRhdnqNwTjWAL7EDZMf0o Message-ID: Subject: Re: [PATCH gwproxy v8 2/2] gwproxy: refactor code base to add experimental raw DNS backend To: Alviro Iskandar Setiawan Cc: Ammar Faizi , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: On Sat, Sep 6, 2025 at 1:47=E2=80=AFPM Alviro Iskandar Setiawan wrote: > On Sat, Sep 6, 2025 at 11:33=E2=80=AFAM 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 mi= ght > > introduce unnecessary code into the compiled version when this experime= ntal > > 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/s= rc/include/liburing/sanitize.h?id=3D5baeec1e1200b88da1d84ba978605728d791d69= 3 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