Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BAE4C433DB for ; Sat, 13 Feb 2021 20:19:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0891164E2A for ; Sat, 13 Feb 2021 20:19:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229745AbhBMUSt (ORCPT ); Sat, 13 Feb 2021 15:18:49 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:46599 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbhBMUSs (ORCPT ); Sat, 13 Feb 2021 15:18:48 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id E8A01861; Sat, 13 Feb 2021 15:18:02 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 13 Feb 2021 15:18:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm2; bh=qqyWJP 0UxwquMWfOUM4Gy+jQLU8HtAJGgG1gkcL4AX4=; b=B8/DzhlIDpeeudXoTr0pjm Jn0lhWA1IJEuDyiiqTl/WIyfiE/gpCin/l3uQ6fa02xmQx3RG/u6Cxr10dE9FPGV 7SQEufExxkrb+q/PMJ7kKtmnxmBlUnm5lgJt7Radt13pHzYuvebWhuHoNakmpTdd aF9IMTy3tt9z7g8tPKhqadOeNGn8ef79px5qWCFjivadwcy/5Yul735l4oUvhsS/ BKdUB4+JV+ttM2dDASir1Xgx+WaIPeUAWKkG8OwZoSBPqL7zDzHMFeSEzt7X1OGq SoICXL1k6Xg73HOUQi2H6mDXs6wv8Z25fMVityxMzMogs5y4VwCMZuRYAYxqOR7w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrieefgddufedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedtffekkeefudffveegueejffejhfetgfeuuefgvedtieehudeuueekhfduheel teenucfkphepkeegrddvvdelrdduheefrdeggeenucevlhhushhtvghrufhiiigvpedune curfgrrhgrmhepmhgrihhlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Received: from localhost (igld-84-229-153-44.inter.net.il [84.229.153.44]) by mail.messagingengine.com (Postfix) with ESMTPA id ED26B108005C; Sat, 13 Feb 2021 15:18:01 -0500 (EST) Date: Sat, 13 Feb 2021 22:17:58 +0200 From: Ido Schimmel To: David Ahern Cc: Petr Machata , netdev@vger.kernel.org, David Ahern , "David S. Miller" , Jakub Kicinski , Ido Schimmel Subject: Re: [RFC PATCH 03/13] nexthop: Add netlink defines and enumerators for resilient NH groups Message-ID: <20210213201758.GB401513@shredder.lan> References: <893e22e2ad6413a98ca76134b332c8962fcd3b6a.1612815058.git.petrm@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Feb 13, 2021 at 12:16:45PM -0700, David Ahern wrote: > On 2/8/21 1:42 PM, Petr Machata wrote: > > @@ -52,8 +53,50 @@ enum { > > NHA_FDB, /* flag; nexthop belongs to a bridge fdb */ > > /* if NHA_FDB is added, OIF, BLACKHOLE, ENCAP cannot be set */ > > > > + /* nested; resilient nexthop group attributes */ > > + NHA_RES_GROUP, > > + /* nested; nexthop bucket attributes */ > > + NHA_RES_BUCKET, > > + > > __NHA_MAX, > > }; > > > > #define NHA_MAX (__NHA_MAX - 1) > > + > > +enum { > > + NHA_RES_GROUP_UNSPEC, > > + /* Pad attribute for 64-bit alignment. */ > > + NHA_RES_GROUP_PAD = NHA_RES_GROUP_UNSPEC, > > + > > + /* u32; number of nexthop buckets in a resilient nexthop group */ > > + NHA_RES_GROUP_BUCKETS, > > u32 is overkill; arguably u16 (64k) should be more than enough buckets > for any real use case. We wanted to make it future-proof, but I think we can live with 64k. At least in Spectrum the maximum is 4k. I don't know about other devices, but I guess it is not more than 64k.