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 C87ADA0C4E; Mon, 25 Oct 2021 19:23:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9669240E32; Mon, 25 Oct 2021 19:23:41 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 458A84003E for ; Mon, 25 Oct 2021 19:23:40 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9581F5C00E6; Mon, 25 Oct 2021 13:23:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 25 Oct 2021 13:23:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= 3EU4b4ZsXbQDDBpnm8qKIEqDsEXtZhyULroZsdbRz5Q=; b=UjWVJSmsFs1oCeVO m+UT8GmVmRBI/QOvbJCeWzmp68zmz/DO8LGy08obIDHzwliZy5MV9E7j2Lgo+T+u lYaX8UkVDmUxWxM2jKnFLhN6BsApFR8QIkyOmrzEIsJQvpkenGRfSLk8yl688Jmw o7EUO3oHXoFJ1LwryYUO9pGlPlQhmMY5s1mQKwbStom+AYBhS39PhVjCRPap8LU8 fSxmk+MVGcV/sOMRxMIn6LC8eWMY4NbanuDafm8EBGrA3jz8jsneYfmB3XkaTe4U Axerc3KTViMH5uFHafK4uXk9ulnVU7yLLzaFw6TYnV/yx00OF/sMLFVauoeuKhYx g9xG9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=3EU4b4ZsXbQDDBpnm8qKIEqDsEXtZhyULroZsdbRz 5Q=; b=QbIi5evUNudYdfZYNtR9kXuKNdJ9Jg6jOvzMvBnUG9b5sXitJJ06DmvkB XP8wy77UDozPkIupCqn5vqZqIXRXrCrfC7wQTi4ADZYMyFig+gUkfPy6Wv7WBMJF RqB+I1WmcIdgaIMt97HjepwfTiF3adHbwv74lLdlBbHoJgACAKYeLbNat5AZk29E MVUxyN+MDuamchWu+7mVykKf3fZXcqNssVva7N+h+BTZn6i6CGnhyS2ie5GHJTX/ JYIauOmz1WzZJHQxYjnkO5aay/v7XRqgljRuJCqME4fKICwil+grfOZDYLDkANzm o4j74f8IREmmtfl+6TkQvKinXLfqQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedguddtkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 13:23:38 -0400 (EDT) From: Thomas Monjalon To: Vladimir Medvedkin Cc: dev@dpdk.org, konstantin.ananyev@intel.com, conor.walsh@intel.com Date: Mon, 25 Oct 2021 19:23:37 +0200 Message-ID: <8937505.KMVrHqqNeC@thomas> In-Reply-To: <1630943759-362969-1-git-send-email-vladimir.medvedkin@intel.com> References: <1630943759-362969-1-git-send-email-vladimir.medvedkin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] fib: add rib extension size parameter 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 Sender: "dev" 06/09/2021 17:55, Vladimir Medvedkin: > This patch adds a new parameter to the fib configuration to specify > the size of the extension for internal RIB structure. It looks to be an announced API change. What happens if the new field is not initialized in the app? At least it would deserve a note in the release notes in API changes I think. > --- a/examples/l3fwd/l3fwd_fib.c > +++ b/examples/l3fwd/l3fwd_fib.c > @@ -426,6 +426,7 @@ setup_fib(const int socketid) > /* Create the fib IPv4 table. */ > config_ipv4.type = RTE_FIB_DIR24_8; > config_ipv4.max_routes = (1 << 16); > + config_ipv4.rib_ext_sz = 0; > config_ipv4.default_nh = FIB_DEFAULT_HOP; > config_ipv4.dir24_8.nh_sz = RTE_FIB_DIR24_8_4B; > config_ipv4.dir24_8.num_tbl8 = (1 << 15); > @@ -475,6 +476,7 @@ setup_fib(const int socketid) > > config.type = RTE_FIB6_TRIE; > config.max_routes = (1 << 16) - 1; > + config.rib_ext_sz = 0; > config.default_nh = FIB_DEFAULT_HOP; > config.trie.nh_sz = RTE_FIB6_TRIE_4B; > config.trie.num_tbl8 = (1 << 15); > diff --git a/lib/fib/rte_fib.c b/lib/fib/rte_fib.c > index b354d4b..6ca180d 100644 > --- a/lib/fib/rte_fib.c > +++ b/lib/fib/rte_fib.c > @@ -164,7 +164,7 @@ rte_fib_create(const char *name, int socket_id, struct rte_fib_conf *conf) > return NULL; > } > > - rib_conf.ext_sz = 0; > + rib_conf.ext_sz = conf->rib_ext_sz; > rib_conf.max_nodes = conf->max_routes * 2; > > rib = rte_rib_create(name, socket_id, &rib_conf); > diff --git a/lib/fib/rte_fib.h b/lib/fib/rte_fib.h > index acad209..570b4b6 100644 > --- a/lib/fib/rte_fib.h > +++ b/lib/fib/rte_fib.h > @@ -84,6 +84,8 @@ struct rte_fib_conf { > /** Default value returned on lookup if there is no route */ > uint64_t default_nh; > int max_routes; > + /** Size of the node extension in the internal RIB struct */ > + unsigned int rib_ext_sz; > union { > struct { > enum rte_fib_dir24_8_nh_sz nh_sz;