From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 05CB542865; Wed, 29 Mar 2023 17:34:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A28C40EDF; Wed, 29 Mar 2023 17:34:29 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id C893C400D6 for ; Wed, 29 Mar 2023 17:34:27 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id w4so15281855plg.9 for ; Wed, 29 Mar 2023 08:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1680104067; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=XkTVJ+QzCcpyV8BqTlyXNaaltRortyu5sLukMhZaVco=; b=McyzQ+Fq8KPswR5zjjVlEdTCgELHNh3WdFUyVoLQgKt+YlhRv3HyhGFk6oar7YQzeb +X54iklVkCfjsfw23Sjy2K6cUv2Ig36fcXG0XUsYE+/N2IEq2odAjlyj/xlWaTfqh5gz +xYY4dwtBDM9Munal0oafulUyDav9ZSMurdQIEAUsN+sijpUCDW05QZixlqytD5LQLsD iwmPB+lB4WbShVHv/ODd0gTI6i1F0rwDj/7B00fNkSShtwMM5i9Nu+h5FLiWlrqk3iyS LATXxwtUvnjSMY4nL1O2MTsBKOUGr7Q4vGHWwfUta7GRPp5w5zH4zvHURH/zv5AaHNb2 yg4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680104067; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XkTVJ+QzCcpyV8BqTlyXNaaltRortyu5sLukMhZaVco=; b=soi65v3e0rFi5W4gP5dpP8U42hByWZxQUn0xTGAJ+aPN7pIpjPtZYBbwZWTHaQPZb+ TFjI3ImprRffV5EQTFoEZqK7cnSpi0lx02KNnZ4xpLVcCmUVPb+sVbuFJe4ZtgX9ZHgI 2TPjjts06EdB4Nt9o4x5pzHZlttRs2aQ0KFlGAF2qGbpLOKU0QvP4wX81p8qsRCb14zh 1VKnQZJU22JjR+g4zP8OrY1ayPMuWAVpNjDUrX16madw0OGpYZpZ6BwRnhzmiMNQ0dVZ tNqM4FpOF3aimlxPas1+xUD5qUmRXoRjLBOdAuxb33MT1i5WY7JkN/A2GEZUXaZe85y8 lzew== X-Gm-Message-State: AAQBX9fMXltqYuAeuHQZ/iMDmrMo1qXoWBMqPneF7Tq57p3W1xFdjnrH RLReNmXr4soGTlNRlOEc5fjpeA== X-Google-Smtp-Source: AKy350bKn0nrfLQTUQY7tQvBp7wkrlcH3S7qPc8NjCKza82cPJP4DC0QXkcpJMm7M4tVRyAe4oZpZw== X-Received: by 2002:a17:903:4305:b0:19e:8bfe:7d70 with SMTP id jz5-20020a170903430500b0019e8bfe7d70mr18225992plb.52.1680104066967; Wed, 29 Mar 2023 08:34:26 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id jk1-20020a170903330100b001a1d5d47105sm8140764plb.53.2023.03.29.08.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:34:26 -0700 (PDT) Date: Wed, 29 Mar 2023 08:34:25 -0700 From: Stephen Hemminger To: Zhirun Yan Cc: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, cunming.liang@intel.com, haiyue.wang@intel.com Subject: Re: [PATCH v3 03/15] graph: move node process into inline function Message-ID: <20230329083425.3f504f80@hermes.local> In-Reply-To: <20230329064340.2550530-4-zhirun.yan@intel.com> References: <20230324021622.1369006-1-zhirun.yan@intel.com> <20230329064340.2550530-1-zhirun.yan@intel.com> <20230329064340.2550530-4-zhirun.yan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 29 Mar 2023 15:43:28 +0900 Zhirun Yan wrote: > +/** > + * @internal > + * > + * Enqueue a given node to the tail of the graph reel. > + * > + * @param graph > + * Pointer Graph object. > + * @param node > + * Pointer to node object to be enqueued. > + */ > +static __rte_always_inline void > +__rte_node_process(struct rte_graph *graph, struct rte_node *node) > +{ > + uint64_t start; > + uint16_t rc; > + void **objs; > + > + RTE_ASSERT(node->fence == RTE_GRAPH_FENCE); > + objs = node->objs; > + rte_prefetch0(objs); > + > + if (rte_graph_has_stats_feature()) { > + start = rte_rdtsc(); > + rc = node->process(graph, node, objs, node->idx); > + node->total_cycles += rte_rdtsc() - start; > + node->total_calls++; > + node->total_objs += rc; > + } else { > + node->process(graph, node, objs, node->idx); > + } > + node->idx = 0; > +} > + Why inline? Doing everything as inlines has long term ABI impacts. And this is not a super critical performance path.