From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by gnuweeb.org (Postfix) with ESMTPSA id 68EB480C2C for ; Fri, 2 Sep 2022 06:04:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1662098656; bh=5wv1FRwjtHTsyU5ym4Tk37flfqv47hU4ToU4RSBI7sU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=k5kLb6p04IKAhsqpvZkZHaFzxTeBlvizhbm7T2jIBCHyM/z3mdZfsEur/wEWB5FES 9uJpYTcHKP+42gjejH8y7nbQHsIgxUqKE097P2XnnOb3ERSFzko26opQywS+e5NTSt g0CM7lNmxaoId63OmY/8SKw+qqCtT6z/Gc9SuMcQ3BacOie1ipefWqcIFX0ZWpHDz6 OkbHrwIaFiNFyQ7CuEjSibIGb0hr/nbN1stJH8BbxSrJGCPld2ByL2ncBAVcvoXaCJ xjt+CFyklV7Y7lFm3e0c6PIl+Y890yQy27ZiPPhOQEsuA7PKAzOVmoVd9IBIZaSmRi kBIdG1vaeVDAQ== Received: by mail-lj1-f178.google.com with SMTP id r27so799917ljn.0 for ; Thu, 01 Sep 2022 23:04:16 -0700 (PDT) X-Gm-Message-State: ACgBeo2ekWhyn9/WZew3UWIJ4dBQSpRS5odfUXJgUquPj5JCnl/wfQcn 2ee2pK4ivNvsVgtHVSen5l+joYKNoA071r8QWCw= X-Google-Smtp-Source: AA6agR7T+SHU2sG4BKVImWbni4dx665N8fFyyMZeXM1hlO7xRCc0dVy1u/D0AqBOke9bcLpAq+jug3SYm+g9vcNIoJQ= X-Received: by 2002:a05:651c:b2c:b0:25e:6e68:ff51 with SMTP id b44-20020a05651c0b2c00b0025e6e68ff51mr10315002ljr.349.1662098654338; Thu, 01 Sep 2022 23:04:14 -0700 (PDT) MIME-Version: 1.0 References: <20220902011548.2506938-1-ammar.faizi@intel.com> <20220902011548.2506938-3-ammar.faizi@intel.com> In-Reply-To: <20220902011548.2506938-3-ammar.faizi@intel.com> From: Alviro Iskandar Setiawan Date: Fri, 2 Sep 2022 13:04:03 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RESEND PATCH liburing v1 02/12] t/poll-link: Don't brute force the port number To: Ammar Faizi Cc: Jens Axboe , Dylan Yudaken , Facebook Kernel Team , Pavel Begunkov , io-uring Mailing List , "GNU/Weeb Mailing List" , Kanna Scarlet , Muhammad Rizki Content-Type: text/plain; charset="UTF-8" List-Id: On Fri, Sep 2, 2022 at 8:18 AM Ammar Faizi wrote: > static void signal_var(int *var) > { > pthread_mutex_lock(&mutex); > *var = 1; > @@ -80,45 +81,37 @@ void *recv_thread(void *arg) > ret = io_uring_queue_init(8, &ring, 0); > assert(ret == 0); > > int s0 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); > assert(s0 != -1); > > int32_t val = 1; > ret = setsockopt(s0, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val)); > assert(ret != -1); > ret = setsockopt(s0, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); > assert(ret != -1); > > - struct sockaddr_in addr; > + struct sockaddr_in addr = { }; move this variable to the top plz, with that fixed: Reviewed-by: Alviro Iskandar Setiawan tq -- Viro