From: Petr Machata <petrm@nvidia.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: David Ahern <dsahern@gmail.com>, Petr Machata <petrm@nvidia.com>,
<netdev@vger.kernel.org>, David Ahern <dsahern@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Ido Schimmel <idosch@nvidia.com>
Subject: Re: [RFC PATCH 03/13] nexthop: Add netlink defines and enumerators for resilient NH groups
Date: Mon, 15 Feb 2021 12:43:51 +0100 [thread overview]
Message-ID: <875z2tbloo.fsf@nvidia.com> (raw)
In-Reply-To: <20210213201758.GB401513@shredder.lan>
Ido Schimmel <idosch@idosch.org> writes:
> 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.
OK, no problem. I was thinking of keeping the API as u32, and tracking
as u16 internally, but let's not add baggage at this stage already. Push
comes to shove there can be another u32 attribute mutexed with this one.
next prev parent reply other threads:[~2021-02-15 11:45 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 20:42 [RFC PATCH 00/13] nexthop: Resilient next-hop groups Petr Machata
2021-02-08 20:42 ` [RFC PATCH 01/13] nexthop: Pass nh_config to replace_nexthop() Petr Machata
2021-02-08 20:42 ` [RFC PATCH 02/13] nexthop: __nh_notifier_single_info_init(): Make nh_info an argument Petr Machata
2021-02-08 20:42 ` [RFC PATCH 03/13] nexthop: Add netlink defines and enumerators for resilient NH groups Petr Machata
2021-02-13 19:16 ` David Ahern
2021-02-13 20:17 ` Ido Schimmel
2021-02-15 11:43 ` Petr Machata [this message]
2021-02-08 20:42 ` [RFC PATCH 04/13] nexthop: Add implementation of resilient next-hop groups Petr Machata
2021-02-13 19:22 ` David Ahern
2021-02-15 11:44 ` Petr Machata
2021-02-13 19:38 ` David Ahern
2021-02-13 20:20 ` Ido Schimmel
2021-02-08 20:42 ` [RFC PATCH 05/13] nexthop: Add data structures for resilient group notifications Petr Machata
2021-02-08 20:42 ` [RFC PATCH 06/13] nexthop: Implement notifiers for resilient nexthop groups Petr Machata
2021-02-08 20:42 ` [RFC PATCH 07/13] nexthop: Allow setting "offload" and "trap" indication of nexthop buckets Petr Machata
2021-02-08 20:42 ` [RFC PATCH 08/13] nexthop: Allow reporting activity " Petr Machata
2021-02-08 20:42 ` [RFC PATCH 09/13] nexthop: Add netlink handlers for resilient nexthop groups Petr Machata
2021-02-08 20:42 ` [RFC PATCH 10/13] nexthop: Add netlink handlers for bucket dump Petr Machata
2021-02-08 20:42 ` [RFC PATCH 11/13] nexthop: Add netlink handlers for bucket get Petr Machata
2021-02-08 20:42 ` [RFC PATCH 12/13] nexthop: Notify userspace about bucket migrations Petr Machata
2021-02-08 20:42 ` [RFC PATCH 13/13] nexthop: Enable resilient next-hop groups Petr Machata
2021-02-13 18:57 ` [RFC PATCH 00/13] nexthop: Resilient " David Ahern
2021-02-13 19:16 ` Ido Schimmel
2021-02-13 19:17 ` David Ahern
2021-02-13 20:16 ` Ido Schimmel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875z2tbloo.fsf@nvidia.com \
--to=petrm@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=dsahern@kernel.org \
--cc=idosch@idosch.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).