How to use Mirror in P4-16 TNAmodel?

I want to use mirror in p4-16 tna model, but in the example program, it don’t show how to associate the mirror_session with mirror table. I just want let the mirror packet to a specific port. How should I do?

Hi Leo,

As far as I can remember, the specifics of the Tofino-based architecture like TNA are discussed in the Intel Connectivity Research Program. I remember that Intel has actually published Open-Tofino and the section 7.10 in the repository’s PDF file might help you on that. Still, there might be some topics that are still only discussed in the aforementioned program. Indeed, there is a forum to ask this question :slight_smile: once you register in the link I provided.

If any other person like @vgurevich can provide more information that’s ok.

Cheers,

1 Like

Hello Leo,

I second @ederollora answer.

Just to add: Indeed, Tofino has a special table that allows you to associate a mirror session ID with the mirror port and other parameters. If you use bfrt_python, you can access this table as bfrt.mirror.cfg, but otherwise the name is $mirror.cfg. You can also find example of this table programming inside the PTF test case for tna_mirror example in the Open-Tofino repo.

If you have any follow-up questions, please ask on ICRP forum instead.

Happy hacking,
Vladimir

1 Like

Thanks for your reply! That’s help me a lot. But I still have some questions about it, I have sent a request to join ICRP and look forward to be approved.