From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) by dpdk.org (Postfix) with ESMTP id ED5381B2AB for ; Tue, 4 Dec 2018 09:21:55 +0100 (CET) Received: by mail-vs1-f44.google.com with SMTP id z3so9272431vsf.7 for ; Tue, 04 Dec 2018 00:21:55 -0800 (PST) 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=BqR3A+cxXrPVRSnaPEbMqFgsdHKE+jV/tK96TrTGSNM=; b=h6iCc/snexrDCAoxagscLDxaWA6DwchRALtHi0NTwr9LBi4tItle5ff9vwhPUbBqXr zuD9bbXfDeq9NbKXl/aQnIMLiFL2UVp1W0cq4nJT70xlRVChUXhBQpnR8kM0UmA7HQrb 8z6rzSQyRXdPOf1xsRy5jO/nE1u74wOr5fWg9lbcWR4FH1Laz218LHZvYWIJ+shuOr75 oTd904QXGpcw6VA3gtt+Y+PvsjQ/Kb9ybM7pqpO4tACUqEdUz48DLFuVugQT/VdZn5l+ LrQaz6aSjVFoA1xYUn7ko3uAAUyGkD+738hjy+SxK4cPgCS9o4JKCr0R9lrtkZiHseFk 1bBg== X-Gm-Message-State: AA+aEWYdFdsO8vmozMlLWKG/EAYq+DFfhATPGeHPMWetwIFolfDpQJpw fMowGA9eRGPC89K397V48npEGG3x2c0NhT8lRoAYUQ== X-Google-Smtp-Source: AFSGD/V5Gz/9CNDuwudmgvTWasS+lWhbPr3euEm0odf50i7ZPZhugaOUX/c+FqCEFzX2ib57SV1Wos915cgRfUzXNtc= X-Received: by 2002:a67:3cd6:: with SMTP id w83mr8519786vsh.39.1543911715382; Tue, 04 Dec 2018 00:21:55 -0800 (PST) MIME-Version: 1.0 References: <20181203164724.GA12316@hmswarspite.think-freely.org> In-Reply-To: <20181203164724.GA12316@hmswarspite.think-freely.org> From: David Marchand Date: Tue, 4 Dec 2018 09:21:43 +0100 Message-ID: To: nhorman@tuxdriver.com Cc: dev@dpdk.org, Timothy Redaelli , ferruh.yigit@intel.com, adrien.mazarguil@6wind.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Marking symbols as experimental in the headers only 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: , X-List-Received-Date: Tue, 04 Dec 2018 08:21:56 -0000 On Mon, Dec 3, 2018 at 5:48 PM Neil Horman wrote: > On Mon, Dec 03, 2018 at 02:01:02PM +0100, David Marchand wrote: > > Hello Neil, > > > > Looking at > > > http://doc.dpdk.org/guides/contributing/versioning.html#experimental-apis, > > is there a real need to mark both the definition and the declaration of a > > symbol with the __rte_experimental marker ? > > > When I initially wrote the feature I marked both the function prototype > and its > definition with the macro to be consistent, as I like to make both > declaration > and definition look visually simmilar, just to ease readability, but I'm > not > bound to doing it that way per-se > > As to weather or not you can only mark the declaration as experimental, > I'm not > 100% sure. I think thats an artifact of the compiler. That is to say, the > macro expands to a compiler attribute that is applied at compile time, and > checked at link time, and I'm not sure what clang or gcc will do if there > is a > discrepancy between the attributes listed in the declaration and the > definition. > > I would say, give it a try, and if you can demonstrate that adding the > attribute > only to the declaration results in a link-time warning when external code > attempts to call an experimental function, I would have no problem > handling it > that way. > Did not experiment yet, putting this in my todolist. Just, I can see that lib/librte_pipeline/ at least only marks the declarations. -- David Marchand