Skip to Content.
Sympa Menu

rare-dev - Re: [rare-dev] Workaround for compiler bug

Subject: Rare project developers

List archive

Re: [rare-dev] Workaround for compiler bug


Chronological Thread 
  • From: mc36 <>
  • To: Alexander Gall <>
  • Cc: , Frédéric LOUI <>
  • Subject: Re: [rare-dev] Workaround for compiler bug
  • Date: Thu, 22 Dec 2022 13:12:30 +0100

hi,
so i don't run the profiles at all for the feature testing or development,
except on my stordis... not everything have a profile...:)
so i build special vms with the c-* files from
https://github.com/rare-freertr/freeRtr/tree/master/misc/p4bf and i used the
sde9.11 imho...
well, this assembler bug is quite funny, btw the others are too... :)
imho we really should open a ticket at the community forum with these or wait
until they mention the bugid in the release notes...
thanks,
cs


On 12/22/22 12:55, Alexander Gall wrote:
On Thu, 15 Dec 2022 13:55:20 +0100, mc36 <> said:

well, so i don't have a tofino2 at hand so all i can tell you is that
the "no dead code elimination" was tested on the modem... according
to your finding, that is you had a model-only workaround, i'm afraid
to say a thing but worth a try... in the model, all the tests passed
after adding this hack to my tofino2 vm...

For all profiles? Which SDE version did you use? Did you run the
optimizer?

I'm unable to optimize some of the profiles with
"--no-dead-code-elimination":

vpls
geant-testbed
renater-peering-l3
nop-mchome

Those all fail with "no phv record" for some of the fields in ig_md
for all combinations of parameters the optimizer is trying. That's
with SDE 9.7.4. With 9.11.1 it gets even worse, e.g.

running /nix/store/vyhk6qd7fg9254dh5dry3hbfdfk6fvfa-bf-sde-model-9.11.1/bin/bf-p4c -I.
-I../p4src/ -Xp4c="--no-dead-code-elimination" -b tofino2 -a t2na
-DDUAL_PIPE optimizer821280.p4...

optimizer821280.tofino2/pipe/optimizer821280.bfa:4231: error: No phv record
ig_md.bridge_src
optimizer821280.tofino2/pipe/optimizer821280.bfa:4239: error: No phv record
ig_md.bridge_src
Assembler BUG
terminate called without an active exception

--
Alex

br,
cs

On 12/15/22 13:25, Alexander Gall wrote:
Hi Fr d ric

Thanks for helping to debug the issue with the dropped packets on
Tofino2. Do I understand correctly that disabling dead-code
eliminiation when compiling for Tofino2 is a workaround for this
problem until Intel fixes the bug (P4C-5045) in the compiler?

If so, I will add the --no-dead-code-elimination flag to the build
procedure for Tofino2-based platforms in the rare-nix repo.

My previous workaround (commit 09e14ee4 in the rare repo) only worked
on the model but not on the ASIC. I notice that it has already been
removed by the combination of commits 5b0e759 and 3d6d736. That's fine
but I'm not sure if it was intentional (I'm still unhappy with these
automated commits...).




Archive powered by MHonArc 2.6.19.

Top of Page