From: Stephen Hemminger <stephen@networkplumber.org>
To: Andrea Mayer <andrea.mayer@uniroma2.it>
Cc: David Ahern <dsahern@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Shrijeet Mukherjee <shrijeet@gmail.com>,
Jakub Kicinski <kuba@kernel.org>, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Donald Sharp <sharpd@cumulusnetworks.com>,
Roopa Prabhu <roopa@cumulusnetworks.com>,
Dinesh Dutt <didutt@gmail.com>,
Stefano Salsano <stefano.salsano@uniroma2.it>,
Paolo Lungaroni <paolo.lungaroni@cnit.it>,
Ahmed Abdelsalam <ahabdels@gmail.com>
Subject: Re: [RFC,net-next, 2/5] vrf: track associations between VRF devices and tables
Date: Sat, 13 Jun 2020 12:28:59 -0700 [thread overview]
Message-ID: <20200613122859.4f5e2761@hermes.lan> (raw)
In-Reply-To: <20200612164937.5468-3-andrea.mayer@uniroma2.it>
On Fri, 12 Jun 2020 18:49:34 +0200
Andrea Mayer <andrea.mayer@uniroma2.it> wrote:
> + /* shared_tables:
> + * count how many distinct tables does not comply with the
> + * strict mode requirement.
> + * shared_table value must be 0 in order to switch to strict mode.
> + *
> + * example of evolution of shared_table:
> + * | time
> + * add vrf0 --> table 100 shared_tables = 0 | t0
> + * add vrf1 --> table 101 shared_tables = 0 | t1
> + * add vrf2 --> table 100 shared_tables = 1 | t2
> + * add vrf3 --> table 100 shared_tables = 1 | t3
> + * add vrf4 --> table 101 shared_tables = 2 v t4
> + *
> + * shared_tables is a "step function" (or "staircase function")
> + * and is increased by one when the second vrf is associated to a table
> + *
> + * at t2, vrf0 and vrf2 are bound to table 100: shared_table = 1.
> + *
> + * at t3, another dev (vrf3) is bound to the same table 100 but the
> + * shared_table counters is still 1.
> + * This means that no matter how many new vrfs will register on the
> + * table 100, the shared_table will not increase (considering only
> + * table 100).
> + *
> + * at t4, vrf4 is bound to table 101, and shared_table = 2.
> + *
> + * Looking at the value of shared_tables we can immediately know if
> + * the strict_mode can or cannot be enforced. Indeed, strict_mode
> + * can be enforced iff shared_table = 0.
> + *
> + * Conversely, shared_table is decreased when a vrf is de-associated
> + * from a table with exactly two associated vrfs.
> + */
> + int shared_tables;
Should this be unsigned?
Should it be a fixed size?
next prev parent reply other threads:[~2020-06-13 19:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 16:49 [RFC,net-next, 0/5] Strict mode for VRF Andrea Mayer
2020-06-12 16:49 ` [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping Andrea Mayer
2020-06-12 17:51 ` Jakub Kicinski
2020-06-13 22:35 ` Andrea Mayer
2020-06-14 0:37 ` David Ahern
2020-06-14 21:56 ` Andrea Mayer
2020-06-12 16:49 ` [RFC,net-next, 2/5] vrf: track associations between VRF devices and tables Andrea Mayer
2020-06-13 19:28 ` Stephen Hemminger [this message]
2020-06-13 22:53 ` Andrea Mayer
2020-06-14 0:34 ` David Ahern
2020-06-14 21:23 ` Andrea Mayer
2020-06-12 16:49 ` [RFC,net-next, 3/5] vrf: add sysctl parameter for strict mode Andrea Mayer
2020-06-12 17:52 ` Jakub Kicinski
2020-06-13 22:40 ` Andrea Mayer
2020-06-12 16:49 ` [RFC,net-next, 4/5] vrf: add l3mdev registration for table to VRF device lookup Andrea Mayer
2020-06-12 16:49 ` [RFC,net-next, 5/5] selftests: add selftest for the VRF strict mode Andrea Mayer
2020-06-12 17:05 ` [RFC,net-next, 0/5] Strict mode for VRF Dinesh G Dutt
2020-06-13 22:29 ` Andrea Mayer
[not found] ` <3099cf72-d54c-494c-b11a-0131138f6d41@Spark>
2020-06-14 0:33 ` David Ahern
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=20200613122859.4f5e2761@hermes.lan \
--to=stephen@networkplumber.org \
--cc=ahabdels@gmail.com \
--cc=andrea.mayer@uniroma2.it \
--cc=davem@davemloft.net \
--cc=didutt@gmail.com \
--cc=dsahern@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paolo.lungaroni@cnit.it \
--cc=roopa@cumulusnetworks.com \
--cc=sharpd@cumulusnetworks.com \
--cc=shrijeet@gmail.com \
--cc=shuah@kernel.org \
--cc=stefano.salsano@uniroma2.it \
/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).