From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id BF052A034C;
	Thu, 28 Jul 2022 21:32:55 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 62D8F40151;
	Thu, 28 Jul 2022 21:32:55 +0200 (CEST)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [170.10.129.124])
 by mails.dpdk.org (Postfix) with ESMTP id 819BB4014F
 for <dev@dpdk.org>; Thu, 28 Jul 2022 21:32:53 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1659036772;
 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=8NP8TAGXuWcwlKKPRe/oU7rvAZkAocrtnumN41cflrE=;
 b=IKVRRZCj2gQqaOrtOB4K4tbJ0wu1j5yXpRxvord9f+wWG2U18k2GiYNGvjIXL3W3jQHJwy
 SadX/qtroZCNwoEOF5vPgPCORQTAZ94A4soNAUIqubwT76k0ejkaIFaAuRsQ66ZMQGSSxk
 NMTro/zsoruJmfSF0gGJWm7XnHBVE7M=
Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com
 [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 us-mta-207-DKWy942hM0mslnr7pTjD4w-1; Thu, 28 Jul 2022 15:32:51 -0400
X-MC-Unique: DKWy942hM0mslnr7pTjD4w-1
Received: by mail-lf1-f71.google.com with SMTP id
 q21-20020a194315000000b0048a78fe600dso929480lfa.9
 for <dev@dpdk.org>; Thu, 28 Jul 2022 12:32:51 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=8NP8TAGXuWcwlKKPRe/oU7rvAZkAocrtnumN41cflrE=;
 b=LKoG9YlsjmpU1jDGg4ZOabU43UhfbsEsh5z7K2ekcylTJdWTbyIyv/EYSKmqKVb6tw
 iuHw/cvxYI8ql/5b3rrwVXWolbuW3Gi2qg8is80iOu+O8pAxjKhJFn9tDaAlyCINfOlU
 TQ0h28u6ClhjmgHtAiYIz1hqkfrgk5bXVbHomWFUCtfS18SLmuW9e4gTSB20Vf8RKRAG
 gWyPyCZuFrY9UviJi66UZHe+OhmRQc/AcVEgxinl68PIHEBsyoO5KlnkFadzJoLZH9XW
 x5EV5ksz4s14p8EZ6yl+uXHFg30eYF1rvTB6OOVVf9Y+Hfgl1U2TGn9VrAVfrn+Q15RX
 dN+w==
X-Gm-Message-State: AJIora9awvZucNyGmRjpMiHbCwImHrEBSzi1oo8dUVIY48fQt+Cryimo
 CmtaXvSTkebm0eUx4xB6VTIAqsy+d7JiOjU9QA8HwxwUfz+ndoKLFoPZHZos616kbfC4TSJOi6T
 8tgPRLyII6WwmojZvstY=
X-Received: by 2002:a2e:9941:0:b0:25b:c885:3143 with SMTP id
 r1-20020a2e9941000000b0025bc8853143mr105028ljj.477.1659036769867; 
 Thu, 28 Jul 2022 12:32:49 -0700 (PDT)
X-Google-Smtp-Source: AGRyM1sKvJMhDgSQp7RakdJMB/JrV41EKCwtZ5S1z0HoT1WU9TIgUlyYy8FGvPxuMcmc/WJtPapCeGUfrpF9zFRV2Zs=
X-Received: by 2002:a2e:9941:0:b0:25b:c885:3143 with SMTP id
 r1-20020a2e9941000000b0025bc8853143mr105013ljj.477.1659036769651; Thu, 28 Jul
 2022 12:32:49 -0700 (PDT)
MIME-Version: 1.0
References: <20220628144643.1213026-1-david.marchand@redhat.com>
 <20220728152640.547725-1-david.marchand@redhat.com>
 <20220728152640.547725-9-david.marchand@redhat.com>
 <YuK7cnyTmdJtx5wQ@bricha3-MOBL.ger.corp.intel.com>
In-Reply-To: <YuK7cnyTmdJtx5wQ@bricha3-MOBL.ger.corp.intel.com>
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 28 Jul 2022 21:32:38 +0200
Message-ID: <CAJFAV8wHxhJ20c-1d6qyhDspe2OzE7VtW6Cxb2Ap7i54dy3zUQ@mail.gmail.com>
Subject: Re: [RFC v3 08/26] dev: move unrelated macros from header
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev <dev@dpdk.org>, Fan Zhang <roy.fan.zhang@intel.com>, 
 Ashish Gupta <ashish.gupta@marvell.com>, Qiming Yang <qiming.yang@intel.com>, 
 Wenjun Wu <wenjun1.wu@intel.com>, Shijith Thotton <sthotton@marvell.com>, 
 Srisivasubramanian Srinivasan <srinivasan@marvell.com>,
 Chengwen Feng <fengchengwen@huawei.com>, 
 Kevin Laatz <kevin.laatz@intel.com>, Thomas Monjalon <thomas@monjalon.net>, 
 Ferruh Yigit <ferruh.yigit@xilinx.com>,
 Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, 
 Olivier Matz <olivier.matz@6wind.com>, Ori Kam <orika@nvidia.com>, 
 Akhil Goyal <gakhil@marvell.com>, Maxime Coquelin <maxime.coquelin@redhat.com>,
 Chenbo Xia <chenbo.xia@intel.com>
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"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Thu, Jul 28, 2022 at 6:38 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Jul 28, 2022 at 05:26:22PM +0200, David Marchand wrote:
> > RTE_FUNC_PTR_OR_* macros have nothing to do with the rte_device object
> > and associated API.
> > Move them to rte_common.h and include it where needed.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
>
> Personally, I really don't like these macros at all. I think having the
> check explicitly in the code would be far more readable, and would only be
> one line of code longer than the macro call. Is there some private header
> file we could move these to instead of rte_common.h so we can drop their
> use in future if we decide to?

I don't like them either.
Not sure where to put them though...

My "grep-all" shows no user in the projects consuming DPDK I track.
We could mark those macros deprecated, fix our code and drop them later.


-- 
David Marchand