All of lore.kernel.org
 help / color / mirror / Atom feed
From: jiri at resnulli.us (Jiri Pirko)
Subject: [Linux-kselftest-mirror] [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests
Date: Tue, 16 Jan 2018 00:17:35 +0100	[thread overview]
Message-ID: <20180115231735.GI2103@nanopsycho> (raw)
In-Reply-To: <df929bcd-f15e-1897-fc54-c9aba9b65667@gmail.com>

Mon, Jan 15, 2018 at 09:14:56PM CET, dsahern at gmail.com wrote:
>On 1/15/18 12:18 PM, Ido Schimmel wrote:
>> One of the nice things about network namespaces is that they allow one
>> to easily create and test complex environments.
>> 
>> Unfortunately, these namespaces can not be used with actual switching
>> ASICs, as their ports can not be migrated to other network namespaces
>> (NETIF_F_NETNS_LOCAL) and most of them probably do not support the
>> L1-separation provided by namespaces.
>> 
>> However, a similar kind of flexibility can be achieved by using VRFs and
>> by looping the switch ports together. For example:
>> 
>>                              br0
>>                               +
>>                vrf-h1         |           vrf-h2
>>                  +        +---+----+        +
>>                  |        |        |        |
>>     192.0.2.1/24 +        +        +        + 192.0.2.2/24
>>                swp1     swp2     swp3     swp4
>>                  +        +        +        +
>>                  |        |        |        |
>>                  +--------+        +--------+
>> 
>> The VRFs act as lightweight namespaces representing hosts connected to
>> the switch.
>> 
>> This approach for testing switch ASICs has several advantages over the
>> traditional method that requires multiple physical machines, to name a
>> few:
>> 
>> 1. Only the device under test (DUT) is being tested without noise from
>> other system.
>> 
>> 2. Ability to easily provision complex topologies. Testing bridging
>> between 4-ports LAGs or 8-way ECMP requires many physical links that are
>> not always available. With the VRF-based approach one merely needs to
>> loopback more ports.
>> 
>> These tests are written with switch ASICs in mind, but they can be run
>> on any Linux box using veth pairs to emulate physical loopbacks.
>> 
>> Feedback is is welcome. Particularly regarding the best location for
>> these tests (e.g., current location, tools/testing/selftests/net).
>> 
>
>Awesome. Thanks for working on this.
>
>A couple of feature requests:
>1. an option to pause on any error to allow inspection of the setup

Good idea. Should be easy to add.


>
>2. an option to configure the system and leave it in that state (ie,
>don't trap exit and run cleanup). By extension, an option is needed to
>do cleanup only.

Checkout the last patch. It has "noprepare" and "nocleanup" options.
So I guess you imagine something like that, but generic?


>
>This framework will be very useful.
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: jiri@resnulli.us (Jiri Pirko)
Subject: [Linux-kselftest-mirror] [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests
Date: Tue, 16 Jan 2018 00:17:35 +0100	[thread overview]
Message-ID: <20180115231735.GI2103@nanopsycho> (raw)
Message-ID: <20180115231735.e9kIOHeC0469rKsY5agaSl3yiCSReVuGvl6vgWsSNWY@z> (raw)
In-Reply-To: <df929bcd-f15e-1897-fc54-c9aba9b65667@gmail.com>

Mon, Jan 15, 2018@09:14:56PM CET, dsahern@gmail.com wrote:
>On 1/15/18 12:18 PM, Ido Schimmel wrote:
>> One of the nice things about network namespaces is that they allow one
>> to easily create and test complex environments.
>> 
>> Unfortunately, these namespaces can not be used with actual switching
>> ASICs, as their ports can not be migrated to other network namespaces
>> (NETIF_F_NETNS_LOCAL) and most of them probably do not support the
>> L1-separation provided by namespaces.
>> 
>> However, a similar kind of flexibility can be achieved by using VRFs and
>> by looping the switch ports together. For example:
>> 
>>                              br0
>>                               +
>>                vrf-h1         |           vrf-h2
>>                  +        +---+----+        +
>>                  |        |        |        |
>>     192.0.2.1/24 +        +        +        + 192.0.2.2/24
>>                swp1     swp2     swp3     swp4
>>                  +        +        +        +
>>                  |        |        |        |
>>                  +--------+        +--------+
>> 
>> The VRFs act as lightweight namespaces representing hosts connected to
>> the switch.
>> 
>> This approach for testing switch ASICs has several advantages over the
>> traditional method that requires multiple physical machines, to name a
>> few:
>> 
>> 1. Only the device under test (DUT) is being tested without noise from
>> other system.
>> 
>> 2. Ability to easily provision complex topologies. Testing bridging
>> between 4-ports LAGs or 8-way ECMP requires many physical links that are
>> not always available. With the VRF-based approach one merely needs to
>> loopback more ports.
>> 
>> These tests are written with switch ASICs in mind, but they can be run
>> on any Linux box using veth pairs to emulate physical loopbacks.
>> 
>> Feedback is is welcome. Particularly regarding the best location for
>> these tests (e.g., current location, tools/testing/selftests/net).
>> 
>
>Awesome. Thanks for working on this.
>
>A couple of feature requests:
>1. an option to pause on any error to allow inspection of the setup

Good idea. Should be easy to add.


>
>2. an option to configure the system and leave it in that state (ie,
>don't trap exit and run cleanup). By extension, an option is needed to
>do cleanup only.

Checkout the last patch. It has "noprepare" and "nocleanup" options.
So I guess you imagine something like that, but generic?


>
>This framework will be very useful.
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Jiri Pirko <jiri@resnulli.us>
To: David Ahern <dsahern@gmail.com>
Cc: Ido Schimmel <idosch@mellanox.com>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	davem@davemloft.net, shuah@kernel.org,
	nikolay@cumulusnetworks.com, roopa@cumulusnetworks.com,
	andy@greyhouse.net, jiri@mellanox.com, mlxsw@mellanox.com,
	saeedm@mellanox.com, tariqt@mellanox.com, jhs@mojatatu.com,
	lucasb@mojatatu.com, f.fainelli@gmail.com,
	vivien.didelot@savoirfairelinux.com, andrew@lunn.ch,
	jakub.kicinski@netronome.com, simon.horman@netronome.com
Subject: Re: [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests
Date: Tue, 16 Jan 2018 00:17:35 +0100	[thread overview]
Message-ID: <20180115231735.GI2103@nanopsycho> (raw)
In-Reply-To: <df929bcd-f15e-1897-fc54-c9aba9b65667@gmail.com>

Mon, Jan 15, 2018 at 09:14:56PM CET, dsahern@gmail.com wrote:
>On 1/15/18 12:18 PM, Ido Schimmel wrote:
>> One of the nice things about network namespaces is that they allow one
>> to easily create and test complex environments.
>> 
>> Unfortunately, these namespaces can not be used with actual switching
>> ASICs, as their ports can not be migrated to other network namespaces
>> (NETIF_F_NETNS_LOCAL) and most of them probably do not support the
>> L1-separation provided by namespaces.
>> 
>> However, a similar kind of flexibility can be achieved by using VRFs and
>> by looping the switch ports together. For example:
>> 
>>                              br0
>>                               +
>>                vrf-h1         |           vrf-h2
>>                  +        +---+----+        +
>>                  |        |        |        |
>>     192.0.2.1/24 +        +        +        + 192.0.2.2/24
>>                swp1     swp2     swp3     swp4
>>                  +        +        +        +
>>                  |        |        |        |
>>                  +--------+        +--------+
>> 
>> The VRFs act as lightweight namespaces representing hosts connected to
>> the switch.
>> 
>> This approach for testing switch ASICs has several advantages over the
>> traditional method that requires multiple physical machines, to name a
>> few:
>> 
>> 1. Only the device under test (DUT) is being tested without noise from
>> other system.
>> 
>> 2. Ability to easily provision complex topologies. Testing bridging
>> between 4-ports LAGs or 8-way ECMP requires many physical links that are
>> not always available. With the VRF-based approach one merely needs to
>> loopback more ports.
>> 
>> These tests are written with switch ASICs in mind, but they can be run
>> on any Linux box using veth pairs to emulate physical loopbacks.
>> 
>> Feedback is is welcome. Particularly regarding the best location for
>> these tests (e.g., current location, tools/testing/selftests/net).
>> 
>
>Awesome. Thanks for working on this.
>
>A couple of feature requests:
>1. an option to pause on any error to allow inspection of the setup

Good idea. Should be easy to add.


>
>2. an option to configure the system and leave it in that state (ie,
>don't trap exit and run cleanup). By extension, an option is needed to
>do cleanup only.

Checkout the last patch. It has "noprepare" and "nocleanup" options.
So I guess you imagine something like that, but generic?


>
>This framework will be very useful.

  reply	other threads:[~2018-01-15 23:17 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 19:18 [Linux-kselftest-mirror] [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests idosch
2018-01-15 19:18 ` Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 01/12] selftests: forwarding: Add initial testing framework idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-17 20:56   ` dsahern
2018-01-17 20:56     ` David Ahern
2018-01-17 20:56     ` [Linux-kselftest-mirror] " David Ahern
2018-01-17 21:18     ` andrew
2018-01-17 21:18       ` Andrew Lunn
2018-01-17 21:18       ` [Linux-kselftest-mirror] " Andrew Lunn
2018-01-17 21:26       ` dsahern
2018-01-17 21:26         ` David Ahern
2018-01-17 21:26         ` [Linux-kselftest-mirror] " David Ahern
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 02/12] selftests: forwarding: Add a test for FDB learning idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:41   ` andrew
2018-01-15 19:41     ` Andrew Lunn
2018-01-15 19:41     ` [Linux-kselftest-mirror] " Andrew Lunn
2018-01-15 20:05     ` idosch
2018-01-15 20:05       ` Ido Schimmel
2018-01-15 20:05       ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 21:01       ` andrew
2018-01-15 21:01         ` Andrew Lunn
2018-01-15 21:01         ` [Linux-kselftest-mirror] " Andrew Lunn
2018-01-17 20:48   ` dsahern
2018-01-17 20:48     ` David Ahern
2018-01-17 20:48     ` [Linux-kselftest-mirror] " David Ahern
2018-01-17 21:01     ` jiri
2018-01-17 21:01       ` Jiri Pirko
2018-01-17 21:01       ` [Linux-kselftest-mirror] " Jiri Pirko
2018-01-17 22:46       ` roopa
2018-01-17 22:46         ` Roopa Prabhu
2018-01-17 22:46         ` [Linux-kselftest-mirror] " Roopa Prabhu
2018-01-17 22:59         ` roopa
2018-01-17 22:59           ` Roopa Prabhu
2018-01-17 22:59           ` [Linux-kselftest-mirror] " Roopa Prabhu
2018-01-17 23:31           ` jiri
2018-01-17 23:31             ` Jiri Pirko
2018-01-17 23:31             ` [Linux-kselftest-mirror] " Jiri Pirko
2018-01-18  0:15             ` dsahern
2018-01-18  0:15               ` David Ahern
2018-01-18  0:15               ` [Linux-kselftest-mirror] " David Ahern
2018-01-18  7:16               ` idosch
2018-01-18  7:16                 ` Ido Schimmel
2018-01-18  7:16                 ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-18  7:51                 ` jiri
2018-01-18  7:51                   ` Jiri Pirko
2018-01-18  7:51                   ` [Linux-kselftest-mirror] " Jiri Pirko
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 03/12] selftests: forwarding: Add a test for flooded traffic idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 04/12] selftests: forwarding: Add a test for basic IPv4 and IPv6 routing idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 05/12] selftests: forwarding: Create test topology for multipath routing idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 06/12] selftests: forwarding: Test IPv4 weighted nexthops idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 07/12] selftests: forwarding: Test IPv6 " idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 08/12] selftests: forwarding: Add tc offload check helper idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 09/12] selftests: forwarding: Add MAC get helper idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 10/12] selftests: forwarding: Allow to get netdev interfaces names from commandline idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 11/12] selftests: forwarding: Allow to pass commandline options idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 19:18 ` [Linux-kselftest-mirror] [RFC PATCH net-next 12/12] selftests: forwarding: Introduce tc flower matching tests idosch
2018-01-15 19:18   ` Ido Schimmel
2018-01-15 19:18   ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-15 20:14 ` [Linux-kselftest-mirror] [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests dsahern
2018-01-15 20:14   ` David Ahern
2018-01-15 20:14   ` [Linux-kselftest-mirror] " David Ahern
2018-01-15 23:17   ` jiri [this message]
2018-01-15 23:17     ` Jiri Pirko
2018-01-15 23:17     ` [Linux-kselftest-mirror] " Jiri Pirko
2018-01-15 23:48     ` dsahern
2018-01-15 23:48       ` David Ahern
2018-01-15 23:48       ` [Linux-kselftest-mirror] " David Ahern
2018-01-16  7:59       ` idosch
2018-01-16  7:59         ` Ido Schimmel
2018-01-16  7:59         ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-17 22:51   ` f.fainelli
2018-01-17 22:51     ` Florian Fainelli
2018-01-17 22:51     ` [Linux-kselftest-mirror] " Florian Fainelli
2018-01-17 23:11     ` andrew
2018-01-17 23:11       ` Andrew Lunn
2018-01-17 23:11       ` [Linux-kselftest-mirror] " Andrew Lunn
2018-01-18  7:41       ` idosch
2018-01-18  7:41         ` Ido Schimmel
2018-01-18  7:41         ` [Linux-kselftest-mirror] " Ido Schimmel
2018-01-18 12:46         ` andrew
2018-01-18 12:46           ` Andrew Lunn
2018-01-18 12:46           ` [Linux-kselftest-mirror] " Andrew Lunn

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=20180115231735.GI2103@nanopsycho \
    --to=unknown@example.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.