-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuring port recirculation #33
Comments
Hi, See the
The 2 passes through tofino are coded as: In the folded-pipe case, to process 1024B=256 elements per packet, we recirculate every packet 3 times (we need 4 passes through tofino to consume the data), and only the packet from the last worker is recirculated 7 additional times to harvest the results (Tofino1 ALUs have asymmetric read and write bandwidth). See the The 11 passes through tofino are coded as: Each CONSUME pass writes 256B in Tofino's registers, and each HARVEST pass reads 128B from the registers. We skip HARVEST0 because we are able to merge the CONSUME3 pass with the collection of the first chunk of results. For the additional 3 CONSUME passes, we use all the front panel ports of pipes 1,2,3. Since we recirculate all packets, we need as much bandwidth for a recirculation pass as the incoming traffic. For the HARVEST passes (done only for 1/N packets) we use ports 64 and 68 in all pipes for recirculation, except port 64 in pipe 2 (port 320) because that is the one that goes to the switch CPU:
You can change the ports used for recirculation by changing:
p4app-switchML/dev_root/controller/switchml.py Lines 126 to 135 in b5c74a0
One important detail to keep in mind is that registers in tofino are pipe-local, for this reason:
because the harvest passes are reading the data written during the consume pass. |
Thank you very much for the thorough walkthrough. So just to clarify something, for the 2-pipe switches (such as the BF2556-1T I'm using) for which the folded-pipe case is not enabled, thus 256B payloads (64 elements per packet), in order to use the additional front panel ports that correspond to the second pipe, all that is needed is to change the parser to whitelist these ports, correct? since the only port that is used for recirculation as you described is port 68 which is already in loopback by default. Thus, no need to change the dictionary or the ports that are put in loopback mode manually for the folded pipe case. Is this correct or did I miss something? |
Yes, that is correct, only the parser must be changed in this case. All
ports except 68 should transition to `parse_ethernet`.
…On Wed, Nov 23, 2022, 10:54 PM Konstantinos Fertakis < ***@***.***> wrote:
Thank you very much for the thorough walkthrough.
So just to clarify something, for the 2-pipe switches (such as the
BF2556-1T I'm using) for which the folded-pipe case is not enabled, thus
256B payloads (64 elements per packet), in order to use the additional
front panel ports that correspond to the second pipe, all that is needed is
to change the parser to whitelist these ports, correct? since the only port
that is used for recirculation as you described is port 68 which is already
in loopback by default. Thus, no need to change the dictionary or the ports
that are put in loopback mode manually for the folded pipe case. Is this
correct or did I miss something?
—
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSVKUNUQLZQKHRUZHAQU63WJ2HBLANCNFSM6AAAAAASG26KRU>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
Could there be any additional place where the ports for pipe 1,2,3 are disabled somehow? I have commented out the recirculation parsing logic as shown below:
but I get a strange behavior when I include a worker from these ports in the execution: packets don't seem to be sent back to the workers, rather they seem to be dropped. Also, workers report locally zero received packets. Any ideas why could that be? Thank you again. |
Could it be perhaps that it is related to what you described @AmedeoSapio that registers in tofino are pipe-local and thus we can't have workers of the same job spanning different pipes? As it would lead to CONSUM0 happening on a different pipe than that of HARVEST? Thanks. |
So I think the issue is indeed related to having workers on different pipes concurrently on the same job. I've tested this by only including workers on pipe number 3 (previously reserved in the parser for recirculation) and the execution completed successfully. I'll open a separate issue for this for better readability. |
Hi,
I'm running some SwitchML benchmarks on a BF2556-1T switch and I would like to use some of its QSFP ports in the experiments. However, these ports correspond to the pipe num.3 which are all statically reserved for packet recirculation by the SwitchML P4 code here:
p4app-switchML/dev_root/p4/parsers.p4
Lines 46 to 59 in 7ded628
Could you let me know what changes I would need to make in order to make use of these ports? Could I perhaps substitute the target ports with some other free ports from pipe 0 for performing packet recirculation? Is there a specific number of ports that need to be in recirculation mode in order for SwitchML to operate normally?
Thank you in advance,
The text was updated successfully, but these errors were encountered: