From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2525DC4332B for ; Mon, 23 Mar 2020 10:50:21 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id A85C32076A for ; Mon, 23 Mar 2020 10:50:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EKk3WEIp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A85C32076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 738671C038; Mon, 23 Mar 2020 11:50:19 +0100 (CET) Received: from mail-il1-f196.google.com (mail-il1-f196.google.com [209.85.166.196]) by dpdk.org (Postfix) with ESMTP id 7ACD91C02E for ; Mon, 23 Mar 2020 11:50:18 +0100 (CET) Received: by mail-il1-f196.google.com with SMTP id m7so8542806ilg.5 for ; Mon, 23 Mar 2020 03:50:18 -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:content-transfer-encoding; bh=C5KXRWqAnYwcYZq3KwJt8OBRJsTuNJvpIbLOzBsVnBc=; b=EKk3WEIp/lfzScd9Qtf4e+EuC84rC1SblpvCxO3PQYaPVQBqBHWxbd3yTLItPv1FEA 8HJtWPgwKL+mORk1w2zKG7B1QXDcHKIwLjxzU1N5cXGHc9VrnLvV2f1qVO5XYZJ7HRue smnvYxY54s2rJpbcro+rPXmENHV9mWhuX+OXvIQoFe+Qf/Z0VyuHnm5SY2pt87fq7hAt hmNhSeNSZBOcPBByv3Q/n8YBVpsl9amzfZiB18oaqQySzHDpTgogR13NVeVM4/LudcGE nXCD3DjfiJMNkSW2/rfhMrNnSRHfVjCRJBJ+6577t+rI6I1tQo5iZsemFEI15RMSUVMH U1LA== 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:content-transfer-encoding; bh=C5KXRWqAnYwcYZq3KwJt8OBRJsTuNJvpIbLOzBsVnBc=; b=fYz7/kflkxVabFuqR9oNh4rgzgXQhWrQscfDnr71h/qxD5DFCnTUhyC0Nqd/t9wCXN zA3j/mp/6kaV7KzhK6tRsBqZ8BtSwq3wi7XPHOHxyXlGoIiV0G3Vj2B633kTWzuNco9e pyNJW+GgN9FYBVdSxYa9vLmYDFP6/8oguU2Drtd30Wx3W3IJ/q2Jc9sf+h74DY2/g5gx C7U5GJBlKfXmHOpHUiEODbE27ieRpxIr6dUJ5iDOmLYrClSuD2hcdoFSBzz6Qg7u2eBq EzjA07xeFBuaay7yH1Jxju6RdO24gbL0cmX9wMd8jZjFK0vwVDGdULr9PtsZtFNN4HWv r+hA== X-Gm-Message-State: ANhLgQ3k6fz+0wsBRUoeW82YyvabqMCRpgVAhLSravT+4FcbvFmPq2a7 97wf5dcCfV7XAIeroCZefow7BFHIlANjtOmC2s0= X-Google-Smtp-Source: ADFU+vuBc5+xKVhkDugClB+AlgdbpG4x35FlJQ1rc4m7B9su8//e/1ZZY7zE9lWtNwqiDjlBAlsH6M4ITpcy+Z3cMmA= X-Received: by 2002:a92:2804:: with SMTP id l4mr2225143ilf.130.1584960617686; Mon, 23 Mar 2020 03:50:17 -0700 (PDT) MIME-Version: 1.0 References: <20200318190241.3150971-1-jerinj@marvell.com> <20200318190241.3150971-13-jerinj@marvell.com> <1ac5c9be-fe5f-939a-6325-c8449f7fc76a@ericsson.com> In-Reply-To: From: Jerin Jacob Date: Mon, 23 Mar 2020 16:20:01 +0530 Message-ID: To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: "jerinj@marvell.com" , Sunil Kumar Kori , "dev@dpdk.org" , "thomas@monjalon.net" , "bruce.richardson@intel.com" , "david.marchand@redhat.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v1 12/32] eal/trace: implement registration payload 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 Mon, Mar 23, 2020 at 3:48 PM Mattias R=C3=B6nnblom wrote: > > On 2020-03-23 10:24, Jerin Jacob wrote: > > On Fri, Mar 20, 2020 at 12:45 AM Mattias R=C3=B6nnblom > > wrote: > >> On 2020-03-18 20:02, jerinj@marvell.com wrote: > >>> From: Jerin Jacob > >>> > >>> + > >>> +#define rte_trace_ctf_u64(in)\ > >>> + RTE_BUILD_BUG_ON(sizeof(uint64_t) !=3D sizeof(typeof(in)));\ > >>> + __rte_trace_emit_ctf_field(sizeof(uint64_t), RTE_STR(in), "uint= 64_t") > >> Delegate to a generic macro, to which you pass the type and the "in" > >> parameter. > > Not delegated to have a generic patch to catch the following error in > > compile time. > > > > uint32_t val =3D 12; > > > > rte_trace_ctf_u64(val) > > If you pass the type as I suggested, is there something preventing > generating exactly the same code as the non-delegating macros? > > > #define __rte_trace_cft(in, in_type) \ > > RTE_BUILD_BUG_ON(sizeof(in_type), !=3D sizeof(typeof(in))); > > __rte_trace_emit_cft_field(sizeof(in_type), RTE_STR(in), > RTE_STR(in_type)) > > #define rte_trace_cft_u64(in) \ > > __rte_trace_ctf(in, uint64_t) This will work. I will change to this scheme in v2. > >