Skip to Content.
Sympa Menu

rare-dev - Re: [rare-dev] Compilation failures for Tofino2

Subject: Rare project developers

List archive

Re: [rare-dev] Compilation failures for Tofino2


Chronological Thread 
  • From: Alexander Gall <>
  • To: <>
  • Subject: Re: [rare-dev] Compilation failures for Tofino2
  • Date: Fri, 3 Jun 2022 10:37:44 +0200

On Fri, 3 Jun 2022 10:04:14 +0200, Frédéric LOUI <>
said:

> OK, please let me know if you want me to add this --tofino2 trigger to
> bf_forwarder.py.
> Question:

> We have 3 alternatives here:
> 1- add a manual trigger « --asic=tofino2 »
> 2- make bf_forwarder.py to interrogate bf_switchd via GRPC (granted the
> fact that CPU port is identified)
> 3- Or check ONIE machines value for AS9516-32D

The forwarder alreay gets the platform passed in via --platform, so
that should be enough.

> My question is that will you maintain a machine file in your build process
> ? If yes, it can be safe to use -3-

The packaging uses per-platform flags for the compiler and
bf_forwarder (currently not used).

The port speed stuff can be inferred from the platform identifier by
the forwarder, so we should already be good there.

The CPU port must be fixed at compile time. Currently, we're using the
flags DUAL_PIPE and QUAD_PIPE to distinguish the two flavors:

#if defined DUAL_PIPE

#define CPU_PORT 192
#define RECIR_PORT 68

#elif defined QUAD_PIPE

#define CPU_PORT 320
#define RECIR_PORT 68

#else

/* Fall-through for the Tofino software emulation (Tofino model). It
doesn't emulate the CPU PCIe port, use the CPU Eth port instead. */

#define CPU_PORT 64
#define RECIR_PORT 68

#endif

We can simply use the __TARGET_TOFINO__ symbol to further distinguish
the different targets within the two pipe configurations, so no
additional flags are needed.

--
Alex


> Your opinion ?
> Frederic

>> Le 3 juin 2022 à 07:46, Alexander Gall <> a écrit :
>>
>> We'll have to
>> at least adapt the forwarder too, at least for the new supported
>> interface speeds.



Archive powered by MHonArc 2.6.19.

Top of Page