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-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by gnuweeb.org (Postfix) with ESMTPSA id 8B89D8061E for ; Tue, 16 Aug 2022 17:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1660669966; bh=nDFCvAaQMkhB+Mcgpr34Nit3SifQC9jFyaQownoaPhE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=b0xCYe1LO2QiFRnz8yf0OJ6BMXHJ61FW/mnpCLCYZF1nDhw9gAGGSP/HdADjjPQ2W loGWYiO0hS9Wzr14VpWZlB792UzYCikcNgKB3vuHulyLLtggF95797tmtpvAxtnwpi +Mg832Tc0MgQp4zFa0CsskZXM39wPAv6lMIyvUD9TE4bZfFA9XIX0lhvU4lCNt66bi aBsylRDggsyOppkFOLVJ6FD5EbyutfBy9ZoUgAmdrzehTz3rERcdqUziREnKbUN9Sf tzqBB1R9j/vWBeWORINF80O1SnalOv4yva1y5+DiPyKv2erydv0yFin2FibF35OcpQ 72nAVslg7hABw== Received: by mail-lj1-f174.google.com with SMTP id by6so11152323ljb.11 for ; Tue, 16 Aug 2022 10:12:46 -0700 (PDT) X-Gm-Message-State: ACgBeo3beJc7joXi96E5mESq3jwL2QtwRbs1Js8Admcv7UgxmHGrml3Q uYgIDcH8nPelmOKlGXcEk41XN7vG4D7wvxqHlQ4= X-Google-Smtp-Source: AA6agR69Mge9vZuTQg/4qPvM1X6e6KB2FgXd2B3NKcnSbUeRJJUdrvhBrjakJ+XDa9d/hB/3j7nZzZJLtAOpM0M8g9o= X-Received: by 2002:a05:651c:b10:b0:25f:ddb7:694 with SMTP id b16-20020a05651c0b1000b0025fddb70694mr7099412ljr.75.1660669964608; Tue, 16 Aug 2022 10:12:44 -0700 (PDT) MIME-Version: 1.0 References: <20220816165314.3875649-1-ammarfaizi2@gnuweeb.org> <20220816165314.3875649-5-ammarfaizi2@gnuweeb.org> In-Reply-To: <20220816165314.3875649-5-ammarfaizi2@gnuweeb.org> From: Alviro Iskandar Setiawan Date: Wed, 17 Aug 2022 00:12:33 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH ncns v1 4/4] chnet: ring: Only notify CQE free slot when it's available To: Ammar Faizi Cc: "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" List-Id: On Tue, Aug 16, 2022 at 11:53 PM Ammar Faizi wrote: > In `CNRingCtx::WaitCQE`, we don't actually always need to call > `NotifyWaitCQEFreeSlot()`. To reduce the call overhead, just check > whether the CQE slot is available or not. If it's available, then call > it, otherwise, just don't. > > Signed-off-by: Ammar Faizi This doesn't work, can't even be compiled: ../../chnet/chnet_ring.cc:381:16: error: use of undeclared identifier 'cq_mask' if (cq_size < cq_mask + 1) ^ 1 error generated. -- Viro