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 0BD16A04B5; Tue, 27 Oct 2020 16:34:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D24F86CA1; Tue, 27 Oct 2020 16:34:02 +0100 (CET) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 6773A6A15 for ; Tue, 27 Oct 2020 16:34:00 +0100 (CET) Received: by mail-pl1-f193.google.com with SMTP id v22so931635ply.12 for ; Tue, 27 Oct 2020 08:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kUP5s8m3bng+4QzTn39uRuIdt5V28r+Bp3T761B7xDw=; b=tQ5sxOGb4BTFKW6R542ZfMNKyVzJI2JkrsxfGcktOZiYKMC9Z5N4tu79AbSExsLh2Q 0l7HM7fGxJDXuZN4sMhikuRAe/3G7XKebjSY+WRVTariwVT68dm5GkMf33ygjKMJnROU GH7SqWyfLey/sSvZLZD0qPcUwzumtTsSQmxY5xZv6yhlB+T+HnJ4pZp4FHzwdg2+Mdkz yd0TDpK6e636sQAJTzYO/qdxcLQVWdYpSc6dn1da3uJihk6MOrskkF0j6kCV5aT3D1FZ gsgea+HDrgjX+4QbegbOnzvXkkk1QX30gKN/nNLktyXaqTU7fRVdZnWBEjy+A8UfuTYc ozPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kUP5s8m3bng+4QzTn39uRuIdt5V28r+Bp3T761B7xDw=; b=J4xw+6FrMsOndyE5ynE48jEo8W88kElvTyacXwc+j3yv65ypiiN92W81D4KcHiRTrU uXEumYG30+q0LMork7SrhT5ctIU905d9ccpKnWDM3TbJx+zAleF8j9q8l/KWWoFTKu5Q +ViIUu/b755WUdUWG10CAKXjfPp4Muqk+iygcnX2KfsQNueT256OlO+YF9S/y5qrH+7q ThT/TqL8d1q4SAH4a/m2DeaeKlE/7fpHQhqOalGTuAMvhCJybA9cinOJ9iplIn8NHDhM Rv8bKoJ47GyBFelUO+AEanglsgS1pBld/E3uCxzhNz6IWdl2qGvpTIosZL2uKC6PJVVP Ib6A== X-Gm-Message-State: AOAM530QmQWtuLg23bnH4jtfSnzZwMSdQ4U7R9QNPGC03cuN0LWy58Fc WVAQW4T2m17Z/3SKATe4ZIY= X-Google-Smtp-Source: ABdhPJzVnEai2wA33YVHnoEQ0BoKilgooFlm4Kbd1VNRIBPl3WsC4KCEudxysAWdX9HDLLFVanvUaQ== X-Received: by 2002:a17:90a:db55:: with SMTP id u21mr967340pjx.235.1603812838659; Tue, 27 Oct 2020 08:33:58 -0700 (PDT) Received: from gmail.com ([1.6.215.26]) by smtp.gmail.com with ESMTPSA id q16sm2535482pfu.206.2020.10.27.08.33.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Oct 2020 08:33:58 -0700 (PDT) Date: Tue, 27 Oct 2020 21:03:53 +0530 From: Nithin Dabilpuram To: Thomas Monjalon Cc: dev@dpdk.org, ferruh.yigit@intel.com, david.marchand@redhat.com, bruce.richardson@intel.com, olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru, akhil.goyal@nxp.com, Pavan Nikhilesh Message-ID: References: <20201026052105.1561859-1-thomas@monjalon.net> <20201026222013.2147904-5-thomas@monjalon.net> <3912863.aCUjeiqxCm@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3912863.aCUjeiqxCm@thomas> Subject: Re: [dpdk-dev] [PATCH v2 04/15] node: switch IPv4 metadata 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 Tue, Oct 27, 2020 at 03:33:35PM +0100, Thomas Monjalon wrote: > 27/10/2020 15:23, Nithin Dabilpuram: > > On Mon, Oct 26, 2020 at 11:20:02PM +0100, Thomas Monjalon wrote: > > > The node_mbuf_priv1 was stored 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 > > > --- > > > --- a/lib/librte_node/ip4_lookup.c > > > +++ b/lib/librte_node/ip4_lookup.c > > > +int node_mbuf_priv1_dynfield_offset; > > > + > > > > This change doesn't work in secondary as it is process local memory. > > Yes that's an issue. > Can we copy the value when starting a secondary process? Currently there is no call back which will be called only in secondary. Can you move this value to node->ctx 8'th byte offset ? Node context is of size 16 bytes and should be sufficient. Currently first 8 B of node->ctx is used to store that socket's lpm pointer. > > [...] > > > static __rte_always_inline struct node_mbuf_priv1 * > > > node_mbuf_priv1(struct rte_mbuf *m) > > > { > > > - return (struct node_mbuf_priv1 *)&m->udata64; > > > + return RTE_MBUF_DYNFIELD(m, > > > + node_mbuf_priv1_dynfield_offset, struct node_mbuf_priv1 *); > > > > There is a performance regression of ~1.4% in our platform (Octeontx2) because > > of this change. > > Yes that's the price to pay for a more extensible DPDK. > It is much cheaper than not having room for new features, > or having features conflicting on the same mbuf field like here. > >