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 9209042865; Wed, 29 Mar 2023 17:41:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 294C840EDF; Wed, 29 Mar 2023 17:41:59 +0200 (CEST) Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) by mails.dpdk.org (Postfix) with ESMTP id 9CE9F400D6 for ; Wed, 29 Mar 2023 17:41:57 +0200 (CEST) Received: by mail-vs1-f51.google.com with SMTP id i10so13679027vss.5 for ; Wed, 29 Mar 2023 08:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680104517; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nHPoVd0HAX+GRqidUBg6IV+UGxB/+7n98rDwRrvsaRs=; b=f/XKTjLDYCbpQiC0Rej6gUzlVUr6EspTiTJczLYicW5ttdPfQpm1q62HuSoPjniPIt ZxbQsy4AAZRgblxnmMI5MwStgs5C+AUP7enaitsLB9pnWV2gdQF2F/pRpwWYMCh5pEXw oOrMw5Zlq8AXn9ADLSMVflmfKhpgFF9slmZLak5h6ayNn7eoPkgUgEvFWDEk2mZpAruC vUHRVETrmx09MIoU61ckGB6ZGiJnb7tBPDTQiYdhzxHmttjVMd01lTLdDcYO4lLx5Hfm iMGTS46FFiAaKnIjzRi33s5Cdhufzj3VXL6J+9p69m8K0NC64saRrdghbRW0cO6654SZ 0lCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680104517; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nHPoVd0HAX+GRqidUBg6IV+UGxB/+7n98rDwRrvsaRs=; b=Ygm5vdFzyfn7JvHtKGuhZRuc2EXLP97oqJdkhGTi1pvMUUJMRr4qc/7u3csN3cOV2L mpnT8CaYatfR5bULTR9y+AfGwY0N6IBeRLTUhMBYlJeiPP8xEnu1DfCTpZckReiocTac zAuKXCCndjGbF2PrDJXgwLf0idRWGOugYbDJ/vtgV6WcLZGGW7lNV3sGnxFr+ey1shuL 85IdkWaQCpnhyeTeUWV+77Aqu8tpkIUpXIw5n70XANotfeBko/OtMpYylwohZ8Hk+6Fu +/2AJnT4V73tL+9EgYbCQQim79k1tqoKIryeSQzbopnIBukmKDUGm89oxA+cjowyfmbd wl/g== X-Gm-Message-State: AAQBX9dnmaRRDH42TBnvkcf3EbjHuLWkeg0XBMfvxr2ItLCn5p3TkdTN YcOKQdLc0q/DthgRJcNxzHJbH+N2Ee/b6iny1hUYkB9nY+g= X-Google-Smtp-Source: AKy350Z5sfBOfykDHR5u/0nbRKRvNN4gUnbJtd/UcJzlhYrotW0OwL/CvjBwkPfSSsQEemVBb3x9DMxeXcX5g9jd9ls= X-Received: by 2002:a67:c202:0:b0:425:d096:fd42 with SMTP id i2-20020a67c202000000b00425d096fd42mr10523894vsj.5.1680104516969; Wed, 29 Mar 2023 08:41:56 -0700 (PDT) MIME-Version: 1.0 References: <20230324021622.1369006-1-zhirun.yan@intel.com> <20230329064340.2550530-1-zhirun.yan@intel.com> <20230329064340.2550530-4-zhirun.yan@intel.com> <20230329083425.3f504f80@hermes.local> In-Reply-To: <20230329083425.3f504f80@hermes.local> From: Jerin Jacob Date: Wed, 29 Mar 2023 21:11:30 +0530 Message-ID: Subject: Re: [PATCH v3 03/15] graph: move node process into inline function To: Stephen Hemminger Cc: Zhirun Yan , dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, cunming.liang@intel.com, haiyue.wang@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, Mar 29, 2023 at 9:04=E2=80=AFPM Stephen Hemminger wrote: > > 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 =3D=3D RTE_GRAPH_FENCE); > > + objs =3D node->objs; > > + rte_prefetch0(objs); > > + > > + if (rte_graph_has_stats_feature()) { > > + start =3D rte_rdtsc(); > > + rc =3D node->process(graph, node, objs, node->idx); > > + node->total_cycles +=3D rte_rdtsc() - start; > > + node->total_calls++; > > + node->total_objs +=3D rc; > > + } else { > > + node->process(graph, node, objs, node->idx); > > + } > > + node->idx =3D 0; > > +} > > + > > Why inline? Doing everything as inlines has long term ABI > impacts. And this is not a super critical performance path. This is one of the real fast path routine.