Hi,
I’m currently exploring multi-pipe and multiprogram TOFINO feature.
And I would like the test these features on WEDGE-BF100-32X hardware.
while the binding for profile_a and profile_b between Pipeline() ans Switch() is clear in multi-pipe tna_32q_2pipe example:
Pipeline(SwitchIngressParser_a(),<br>SwitchIngress_a(),<br>SwitchIngressDeparser_a(),<br>SwitchEgressParser_a(),<br>SwitchEgress_a(),<br>SwitchEgressDeparser_a()) pipeline_profile_a;<br><br>Pipeline(SwitchIngressParser_b(),<br>SwitchIngress_b(),<br>SwitchIngressDeparser_b(),<br>SwitchEgressParser_b(),<br>SwitchEgress_b(),<br>SwitchEgressDeparser_b()) pipeline_profile_b;<br><br>Switch(pipeline_profile_a, pipeline_profile_b) main;
Therefore, in the wedge-bf100-32x I can run:
run_switch -p tna_32q_2pipe (after having compiled tna_32q_2pipe.p4)
However, it is unclear as per my perspective how this binding is done in multi-program example as I dont’t have tna_32q_multiprogram.p4 that stitch these 2 programs together to the same TOFINO device/NPU.
As per multi-program property program_a and program_b can be compiled separately (or it can be TWO instances of the SAME program
in the example file i see a file: custom_conf_file → mentioning [multiprogram_custom_bfrt.conf] this file correspond include p4 description file meant to be run by “run_tofino_model -c <path to multiprogram_custom_bfrt.conf>”
My questions are:
- do I have to write a tna_32q_multiprogram.p4 binding pragram_a and program_b ? But this would involve a 3rd compilation of tna_32q_multiprogram.p4
- Is there a way to generate: [multiprogram_custom_bfrt.conf] and have run_switch using “run_switchd -p <program_a> -c <my-multiprogram_custom_bfrt.conf” / “run_switchd -p <program_b> -c <my-multiprogram_custom_bfrt.conf>” ? In case of real hardware we don’t run the model … so this file might be useless …
- The other solution would be tna_32q_multiprogram/test.py would program the pipe independently using 2 grpc client_id for program_a and program_b.
- Should I run “run_switchd” once ?:
run_switchd -p <program_a> -p <program_b> -c <my-multiprogram_custom_bfrt.conf>
-Or i’ll have to start “run_switchd” twice ?:
run_switchd -p <program_a> -c <my-multiprogram_custom_bfrt.conf><br>run_switchd -p <program_a> -c <my-multiprogram_custom_bfrt.conf>
Sorry if I miss where the information on FASTER portal.
But I could not find the right information on my BA-102 course regarding multi-pipe/program topics. (I do remember some questions were raised though on the topic)
PS: side (silly) question: on our WEDGE-BF100-32X we have only 2 pipes. So it should be a TOFINO BFN-T10-032D, however how can I check this ? On my data sheet from STORDIS I have only a reference to TOFINO-3.3 Tb/s which matches also BFN-T10-032Q (which have 4 pipes) Is the example shown above is also valid for BFN-T10-032D ?
Thanks for your help !
All the best
Frederic
EDIT: I found a "manual solution:
I copied the file in:
$SDE_INSTALL/share/tofinopd/<my_program>/<my_program>.conf
renamed it:
multi_<my_program>_custom_bfrt.conf
added <program_b> structure definition as it is in “tna_32q_multiprogram” example.
and ran bf_switchd:
./run_switchd.sh -p <program_a> <program_b> -c /path/to/multi_<my_program>_custom_bfrt.conf
in case I want to run 2 instances of the same program in 2 distinct pipes, is it sufficient to add a program definition using the same program name with a different scope ID in multi_<my_program>_custom_bfrt.conf ?
Or should I copy the full program ?:
- change the program name (my_program → my_program_a) change the pipe binding: i.e Switch(my_pipe_a)
- and respectively (my_program → my_program_b) and Switch(my_pipe_b)
Thanks for your support !
Frederic