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 D43AAA051C; Fri, 26 Jun 2020 14:13:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A02601BF0B; Fri, 26 Jun 2020 14:13:33 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id E41B71BEE7 for ; Fri, 26 Jun 2020 14:13:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593173611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=z21hligQecsK1An2aGBH4nO77SGMYaxiiUVVznor+0s=; b=OVnr/YD263VzU+ULBFrYtDGR7YqLdG6QhzpXRCCWvj8PV7z8uvm/vTwKuOEA3jJyL2cIcX klbglOhfBGtA3gg8tmyttBZBFbtnsFE24wcfQecmbtoGqozARtU6MOgSYUW2W2KcUJLhqu BO4BFZAf2L0c4LtXy1+UoRSY67Gqi3w= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-27-UwiB9DyzOMC8Tb-mm3PeOQ-1; Fri, 26 Jun 2020 08:13:30 -0400 X-MC-Unique: UwiB9DyzOMC8Tb-mm3PeOQ-1 Received: by mail-vs1-f71.google.com with SMTP id b185so3025014vsb.10 for ; Fri, 26 Jun 2020 05:13:29 -0700 (PDT) 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=z21hligQecsK1An2aGBH4nO77SGMYaxiiUVVznor+0s=; b=YJAbn8WdqujY9m5j7Xl8q2p8Sb5AUNxiRDh/OTv/HVZ80oX1dFeLJrIsnN7DY5TObf 8TwG2dnHCfZWxZDRYrmCwI5DJOLx6gvrOhfajXyj98mhI/sOecH252YFAZAk0wd1vewt pT32e7C9nSF83VdTSHlv7aJtX+rUz/CUeDPohQGryq7lXWJBaaSDv74x8VvxVXX5AYwe tW5Fo0ft8QD769WwIiw2ipi6/wnBhxWKEFkICPPlfwLSHOhroKH+hoZBI/qG36/0hQI1 dmJWViM+fcXbgRNOo89cZ46BvIcOy9y+rK0Ax+c7Cbecnpvzcxl1wTTgf8QLJh7LN/Ka qhGw== X-Gm-Message-State: AOAM531W83szC3xhefQBLKS8rop25LaALwvscOZoZYF/XDHTj2FWIqCf /cbZjyx2GVcmNa37DidLmmphJcqKB5K233imh3fsJOKXhZdtBlzakG8Ar5pA+IcUKhzd3hP0ba3 uiBN8FJklXpeExaG4tnE= X-Received: by 2002:a1f:255:: with SMTP id 82mr1799920vkc.39.1593173609478; Fri, 26 Jun 2020 05:13:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNyuwa8e2wF70uXB+ibVip6OBhsDBRvKtwpWIqsCVzzNO8bEeU7xe1qvX/7bDIB4mvJfgT5tNZJBr3FjefRho= X-Received: by 2002:a1f:255:: with SMTP id 82mr1799899vkc.39.1593173609208; Fri, 26 Jun 2020 05:13:29 -0700 (PDT) MIME-Version: 1.0 References: <20200617063047.1555518-1-jerinj@marvell.com> <20200617063047.1555518-2-jerinj@marvell.com> <4becf100-7f0f-d051-a40c-3944e101381a@solarflare.com> <11e13bf9-8400-50de-4638-cdd1286915e4@solarflare.com> In-Reply-To: From: David Marchand Date: Fri, 26 Jun 2020 14:13:18 +0200 Message-ID: To: Jerin Jacob Cc: Andrew Rybchenko , Jerin Jacob Kollanukkaran , dev , Thomas Monjalon , Olivier Matz Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Fri, Jun 26, 2020 at 2:06 PM Jerin Jacob wrote: > > On Fri, Jun 26, 2020 at 5:13 PM David Marchand > wrote: > > > > On Fri, Jun 26, 2020 at 1:16 PM Jerin Jacob wrote: > > > > > Alternative is to keep variable declaration outside, > > > > > as David suggested, and I tend to agree that it is a > > > > > bit better. Macro name says 'register'. It is not > > > > > 'declare and register'. Also it avoids static-vs-extern > > > > > problem completely. The solution allows to keep the > > > > > variable declaration untouched and put constructor (macro) > > > > > at the end of fine where constructors typically reside. > > > > > > > > My only concern with that approach is that, We can not save a lot of > > > > code duplication > > > > with that scheme. ie. it is [1] vs [2]. We can change the MACRO name > > > > accordingly if that is a concern. Any suggestions? > > > > > > > > Let me know your preference on [1] vs [2], I will stick with for the > > > > next version. > > > > > > If there are no other comments, I change RTE_LOG_REGISTER to static version > > > and RTE_LOG_REGISTER_EXTERN for a non-static version and send the next version. > > > > - Having a macro that does more than what its name tells is inconvenient. > > I agree. What could be that name if we want to declare and register? > RTE_LOG_DECLARE_AND_REGISTER_EXTERN? No declaration in macro. -- David Marchand