From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67B8CA0350; Wed, 24 Jun 2020 15:12:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ADE381D730; Wed, 24 Jun 2020 15:12:10 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id BD36D1D714 for ; Wed, 24 Jun 2020 15:12:09 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id y5so2011004iob.12 for ; Wed, 24 Jun 2020 06:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O9icfyrFIpktezIACxQmFoVnZT5JqVJV2ThyK+4HR8Q=; b=nGJkE2GRmM+6FiOkKdKcLUKT18cEkSyPvVOzRt5Jf1rbqEAt9mdYpgx75Hvd44zvFv dFrlk40WR/ijn8fUwsdjxHYU9JAz8ypqXUoP47UBD6xjxnKI5cswKniVmFiNdl0P8Fyy Qas8EUB8UhIYdlOt3JJDKcJfcAcObT+6kXHrLJqhdq6UMuFjxQbj9MK70MNC3Arw/Tuk an7cTRWNUTBcpNMxmsXpeva6HnqBfjUUgLuGMYlD830Zb3wnemwROmRezaAssdiJJ0nP mibf5/vuZEIhuqYnQRWFc8Jhq+DhIJrSWq5UxAmp8cROazkGINNXqRTcEgMDVFzJOT6s 9uwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O9icfyrFIpktezIACxQmFoVnZT5JqVJV2ThyK+4HR8Q=; b=tXQVowOEbb1YGmzepmxf1i0cwqOGUvPaCGxe/wennEj7EeIBfKPHJKtsdm8vVXwSck S0sW1cF9YXH2uMwc9FqamLEUIv2Npjzb5dz3+lMnJ3SIw794fusYu1YaxxmysQg4ggAE 0xKOivpUby8HjjxwAGCbh6HFsX1G2DCQFVj8/vlD+iO0YQTRg4OW5wOAUKzjjUnmXDBY U/jRu6MZViJjupd29z4Gr/Me6TZ1kL5qBoEd7FvIJyU0aLevX0z+9odswRUNXBjoNmCf KlX2oI4BSb5HBdIHt7fmwfvupazROtWXJ79w+ft/Y8gIMnhxZrm83736ZcYysXXbU+BQ h3Qw== X-Gm-Message-State: AOAM533WQHUCt/occeznB2wChsf0Ji1swmyhbkzpsqztar2Nn0ADsswE gSjw2EjgtuLQsqOANi+a7vzGS5ioRb5VGesw5Sg= X-Google-Smtp-Source: ABdhPJxMoH2nmItVjrehYF0KNR8maYTQe0qG9iImnpaoCN/nqt0BCy68GuZT2ZcqMV60T7uV2UupTbmn7x8/M2i7390= X-Received: by 2002:a02:6a26:: with SMTP id l38mr29101162jac.60.1593004329092; Wed, 24 Jun 2020 06:12:09 -0700 (PDT) MIME-Version: 1.0 References: <20200617063047.1555518-1-jerinj@marvell.com> <20200617063047.1555518-2-jerinj@marvell.com> In-Reply-To: From: Jerin Jacob Date: Wed, 24 Jun 2020 18:41:53 +0530 Message-ID: To: Andrew Rybchenko Cc: David Marchand , Jerin Jacob Kollanukkaran , dev , Thomas Monjalon , Olivier Matz Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 01/13] eal/log: introduce log register macro X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jun 17, 2020 at 3:51 PM Andrew Rybchenko wrote: > > On 6/17/20 1:02 PM, David Marchand wrote: > > On Wed, Jun 17, 2020 at 8:30 AM wrote: > >> > >> From: Jerin Jacob > >> > >> Introducing the RTE_LOG_REGISTER macro to avoid the code duplication > >> in the log registration process. > >> > >> It is a wrapper macro for declaring the logtype, register the log and sets > > > > Having the logtype variable declared as part of the macro will force > > us to have global symbols (for the cases where it is needed). > > I'd rather leave the declaration to the caller, and only handle the > > registering part in this macro. > > I agree with David that it is important to avoid global symbols > when it is not needed. David, Andrew, Since it is executed in "constructor" context, it will be always from the global variable. Right? i.e DPDK is not yet initialized in when "constructor" being called. In addition to that, It will be adding more lines of code in the consumer of this MACRO. Thoughts? > > >> it's level in the constructor context. > >> > > > > >