Subject: Rare project developers
List archive
- From: mc36 <>
- To: Alexander Gall <>
- Cc:
- Subject: Re: [rare-dev] RARE@400G
- Date: Tue, 28 Jun 2022 12:43:36 +0200
hi,
thanks for the work and the explanation... finally i managed to have a vm
with the model at uses the external ports
with the attached ports.json... the veth pair is created fine, and brought
up, but, the physical ports are not...
they stay down in linux after a reboot and never brought up... ifconfig up
them is not enough, i have to reload
process bfswd too....
br,
cs
On 6/28/22 10:45, Alexander Gall wrote:
On Wed, 8 Jun 2022 08:24:30 +0200, Alexander Gall <> said:
On Tue, 7 Jun 2022 11:49:53 +0200, mc36 <> said:
another idea, you support now onie_machine=model in /etc/machine.conf
please consider splitting it to two... let's say model_veth where the current
functionality would be exposed, and model_ext where you dont spin up the veth
creation but start with an external port map exposing the vm physical
interfaces...
this way one could drop the image to gns3 and surround it with other boxes...
this is how i start my dataplane vm:
https://github.com/rare-freertr/freeRtr/blob/master/misc/p4bf/r1.sh
https://github.com/rare-freertr/freeRtr/blob/master/misc/p4bf/r2.sh
https://github.com/rare-freertr/freeRtr/blob/master/misc/p4bf/ports.json
This is on my todo list. What I'm planning to do is to make the
port-configuration JSON file (i.e. your ports.json) for the model
configurable and have a wrapper that creates the veths specified in
that file (if there are any).
Added in
https://bitbucket.software.geant.org/projects/RARE/repos/rare-nix/commits/89aa6ee7b467bd76c174313b41bc082968ce6c5e
With this, the freerouter systemd service is started with the
environment variable
TOFINO_MODEL_PORTINFO=/etc/freertr/ports.json
It only has an effect if RARE is running on the model pseudo-platform,
i.e. if /etc/machine.conf contains eiter onie_machine=model or
onie_machine=modelT2.
By default /etc/freertr/ports.json does not exist. In that case, the
model binary is started without "-f" and thus uses the built-in
portinfo files with the mappings
Tofino1:
port 0 -> veth0
port 1 -> veth2
...
port 16 -> veth32
port 64 -> veth250 (CPU port)
Tofino2:
port 8 -> veth0
port 9 -> veth2
...
port 24 -> veth32
port 2 -> veth250 (CPU port)
The wrapper script that starts the model and bf_switchd first creates
all of those veth pairs (and deletes them when the service is
stopped).
/etc/freertr/rtr-hw.txt maps the cpuport process to veth251.
If /etc/freertr/ports.json exists, it is passed to the model binary
with "-f /etc/freertr/ports.json". In addition, instead of creating
the default veth pairs, the wrapper for the model and bf_switchd also
parses the portinfo file and creates only those veth pairs specified
by the "PortToVeth" JSON objcets. For example
{
"PortToVeth": [
{
"device_port": 8,
"veth1": 0,
"veth2": 1
},
{
"device_port": 2,
"veth1": 250,
"veth2": 251
}
]
}
will create the pairs veth0/veth1 and veth250/veth251. Interfaces
referred to by "PortToIf" objects must already exist or be created by
other means.
The CPU port must always be mapped to the pair veth250/veth251 due to
the fixed setting in rtr-hw.txt. The RARE profiles are compiled with
the CPU port assigned to port 64 for Tofino and 2 for Tofino2 (it
could be arbitrary but this choice is compatible with the default
ports.json files built into the model binary). Hence, the file must
always include
{
"device_port": 64,
"veth1": 250,
"veth2": 251
}
for Tofino and
{
"device_port": 2,
"veth1": 250,
"veth2": 251
}
for Tofino2.
--
Alex
Attachment:
ports.json
Description: application/json
- [rare-dev] RARE@400G, Alexander Gall, 06/03/2022
- Re: [rare-dev] RARE@400G, mc36, 06/03/2022
- Re: [rare-dev] RARE@400G, Alexander Gall, 06/03/2022
- Re: [rare-dev] RARE@400G, mc36, 06/07/2022
- Re: [rare-dev] RARE@400G, mc36, 06/07/2022
- Re: [rare-dev] RARE@400G, mc36, 06/07/2022
- Re: [rare-dev] RARE@400G, Alexander Gall, 06/08/2022
- Re: [rare-dev] RARE@400G, mc36, 06/08/2022
- Re: [rare-dev] RARE@400G, Tim Chown, 06/08/2022
- Re: [rare-dev] RARE@400G, Alexander Gall, 06/28/2022
- Re: [rare-dev] RARE@400G, mc36, 06/28/2022
- Re: [rare-dev] RARE@400G, Alexander Gall, 06/28/2022
- Re: [rare-dev] RARE@400G, mc36, 06/28/2022
- Re: [rare-dev] RARE@400G, mc36, 06/08/2022
- Re: [rare-dev] RARE@400G, mc36, 06/07/2022
- Re: [rare-dev] RARE@400G, mc36, 06/07/2022
Archive powered by MHonArc 2.6.19.