From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C5506A04DD; Wed, 28 Oct 2020 05:54:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2770D6A15; Wed, 28 Oct 2020 05:54:36 +0100 (CET) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id 3F8C56A12 for ; Wed, 28 Oct 2020 05:54:33 +0100 (CET) Received: by mail-io1-f65.google.com with SMTP id u19so4041097ion.3 for ; Tue, 27 Oct 2020 21:54:33 -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; bh=RM0bmFOOrogDZYqcVb36YTkHsEyzLTiWDhPVjjXF3TI=; b=aZPg2mkDeIHDRiI50wKJCHbrfsDaLMOLb2uhKLUZrdMruR7aqd6BOqGLgega8vzt+Z DPdGRsAKfnq+m8AY798E3qVHR0JwtIkY/QYWQ5poHg0wADmF8uhEWwobdOXQ2ieuyZXn Y8rLliqFAHGqHE+E0PeMCErzDJgDiDIwhflX5kniZdlZk4cd7X1nHHJxWwDrSPcIeYbC 2vgax8ERNEnREtFd8GGt7/J2hgwIxNOY7b0hqLWUYssqBEdqbIsTM94AG278xlU6H1uZ Mtxn2pvhnPNvKt8p2deTO35U297S1cEbQh9h/RoOI3r/hDKj8hHlA5MLyH95MMpEdDI7 GdkA== 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=RM0bmFOOrogDZYqcVb36YTkHsEyzLTiWDhPVjjXF3TI=; b=I28Aa0k0LGmR1rWj7Kxl9qQRLPBRyg48CBsHhdXie0KdFfSj0gz6D5C1UfSsuL4ev9 dAcPyxOEdcwk9gHLfczMmSYt3ZQTzzJ96/SMnd/Kg8gV0WfFaWyntwdVGZvHcaCOLfA+ B24X8p4I/nKAhFMlnVu+lZjqlz+zFsMNko/9zkwyN8W8dA/yX9cAtk0crjekmnF1dYMP JpwPfJljH7b/mRbHyo7yeYoWz2OjAxrehtTIec3KSzZbH6zPnDdpror9lXRig5adIg7f eGr66I0l9B5IRMf0ALS9gL8qmKypLjttZTzSZTBzM3ZWn6KxeoXLNc4UOj7T0OQ9U3gL nKew== X-Gm-Message-State: AOAM5335Mg6wJGXv9H7htUNvbMGkze5LO+RRwEyZGti8EFEzV98u1F2N q9VQwTAT+R9HokIJ+pwTLb5HlBD9jHosJZ00ly0= X-Google-Smtp-Source: ABdhPJzcnuBEBug2uGGytVaWD144SkEQ5v0YPDMB28yrMRcRbBHEHzgk98yr0SOOBxJ01GHPTFUBUaE11TSXyugOcec= X-Received: by 2002:a05:6602:22cf:: with SMTP id e15mr4813263ioe.1.1603860871586; Tue, 27 Oct 2020 21:54:31 -0700 (PDT) MIME-Version: 1.0 References: <20201026052105.1561859-1-thomas@monjalon.net> <20201027210115.2529025-1-thomas@monjalon.net> <20201027210115.2529025-13-thomas@monjalon.net> In-Reply-To: <20201027210115.2529025-13-thomas@monjalon.net> From: Jerin Jacob Date: Wed, 28 Oct 2020 10:24:15 +0530 Message-ID: To: Thomas Monjalon , "McDaniel, Timothy" Cc: dpdk-dev , Ferruh Yigit , David Marchand , "Richardson, Bruce" , Olivier Matz , Andrew Rybchenko , Akhil Goyal , Jerin Jacob Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3 12/15] app/eventdev: switch flow ID to dynamic mbuf field 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 Wed, Oct 28, 2020 at 2:35 AM Thomas Monjalon wrote: > > The order test stored the flow ID in the deprecated mbuf field udata64. > It is moved to a dynamic field in order to allow removal of udata64. > > Signed-off-by: Thomas Monjalon > --- > app/test-eventdev/test_order_atq.c | 4 ++-- > app/test-eventdev/test_order_common.c | 21 ++++++++++++++++----- > app/test-eventdev/test_order_common.h | 19 +++++++++++++++++++ > app/test-eventdev/test_order_queue.c | 4 ++-- > 4 files changed, 39 insertions(+), 9 deletions(-) + timothy.mcdaniel@intel.com > > diff --git a/app/test-eventdev/test_order_atq.c b/app/test-eventdev/test_order_atq.c > index cfcb1dc4e9..b135ac4e55 100644 > --- a/app/test-eventdev/test_order_atq.c > +++ b/app/test-eventdev/test_order_atq.c > @@ -35,7 +35,7 @@ order_atq_worker(void *arg, const bool flow_id_cap) > } > > if (!flow_id_cap) > - ev.flow_id = ev.mbuf->udata64; > + flow_id_copy_from_mbuf(&ev); > > if (ev.sub_event_type == 0) { /* stage 0 from producer */ > order_atq_process_stage_0(&ev); > @@ -72,7 +72,7 @@ order_atq_worker_burst(void *arg, const bool flow_id_cap) > > for (i = 0; i < nb_rx; i++) { > if (!flow_id_cap) > - ev[i].flow_id = ev[i].mbuf->udata64; > + flow_id_copy_from_mbuf(&ev[i]); > > if (ev[i].sub_event_type == 0) { /*stage 0 */ > order_atq_process_stage_0(&ev[i]); > diff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c > index dc55d93921..c5f7317440 100644 > --- a/app/test-eventdev/test_order_common.c > +++ b/app/test-eventdev/test_order_common.c > @@ -4,6 +4,8 @@ > > #include "test_order_common.h" > > +int flow_id_dynfield_offset = -1; See below, > + > int > order_test_result(struct evt_test *test, struct evt_options *opt) > { > @@ -46,13 +48,10 @@ order_producer(void *arg) > if (m == NULL) > continue; > > - const uint32_t flow = (uintptr_t)m % nb_flows; > + const flow_id_t flow = (uintptr_t)m % nb_flows; > /* Maintain seq number per flow */ > m->seqn = producer_flow_seq[flow]++; > - m->udata64 = flow; > - > - ev.flow_id = flow; > - ev.mbuf = m; > + flow_id_save(flow, m, &ev); > > while (rte_event_enqueue_burst(dev_id, port, &ev, 1) != 1) { > if (t->err) > @@ -139,6 +138,18 @@ order_test_setup(struct evt_test *test, struct evt_options *opt) > { > void *test_order; > > + static const struct rte_mbuf_dynfield flow_id_dynfield_desc = { > + .name = "test_event_dynfield_flow_id", > + .size = sizeof(flow_id_t), > + .align = __alignof__(flow_id_t), > + }; > + flow_id_dynfield_offset = > + rte_mbuf_dynfield_register(&flow_id_dynfield_desc); Since this path used in fastpath, could you move flow_id_dynfield_offset to test_order's initial entry as that cache will be warm always. > + if (flow_id_dynfield_offset < 0) { > + evt_err("failed to register mbuf field"); > + return -rte_errno; > + } > + > test_order = rte_zmalloc_socket(test->name, sizeof(struct test_order), > RTE_CACHE_LINE_SIZE, opt->socket_id); See above The rest of the eventdev and Graph changes are fine.