Port enumaration / IDs for internal entry list - P4

93 views
Skip to first unread message

BaySay

unread,
Nov 28, 2022, 10:51:15 AM11/28/22
to open-nfp
Hi,
In P4_16 program, I would like define - hard code port numbers, for some certain actions.
In confiuration file, we can set and use Pyhsical and Virtual port IDs such like p0, p4, v0.0-v0.3. But I would like to define these internally, directly in the program.

In one of a past conversation, they have a mapping to an integer value, and can be seen via nfp-rte tools, but I couldnt find it. (Ive seen some NBI valuses, ID, Label )..
I tried via "nfp" (port and mac settings), "nfp-x", rtecli, service logs, but no chance.

how can we handle this?

regards,
Bayhan

BaySay

unread,
Nov 28, 2022, 10:53:42 AM11/28/22
to open-nfp
minor correction of a sentence:
In one of the past conversation, they have mentioned about mapping these  to an integer value,  ....

Maksymilian Czudziak

unread,
Nov 29, 2022, 3:31:05 AM11/29/22
to open-nfp
I don't know with which tool you can do that. BSP tools you may find in `/opt/netronome/bin/`, there are around 100 tools there.
I found the information about hard code port numbers on this forum and confirmed it using P4_16. I confirmed it using registers, configured the table to set egress port to vf0.0/p0 and then write to register what was retrieved from the table. That way, found out that vf0.0 is 0300 (vf0.1 is 0301 etc.) and p0 is 0000 (p1 is 0001 etc.). 

Regards

BaySay

unread,
Nov 30, 2022, 3:20:40 PM11/30/22
to open-nfp
thanks, it works.
Reply all
Reply to author
Forward
0 new messages