To see the SSDK version, execute the following command:
# pdsctl show version
An example output of the version is shown below.
Firmware Version : 1.70.2-S-1
Pipeline : rudra
P4 Program : hello_world
Build Time : Thu Sep 7 07:45:19 PDT 2023
To see the interfaces of the simulator, execute the command:
# ifconfig
This command shows a list of all the available interfaces. Eth1/1 and Eth1/2 are the interfaces from the simulator. An example output of the interfaces is shown below.
Eth1-1: flags=323<UP,BROADCAST,RUNNING,PROMISC> mtu 1500
ether 00:03:00:00:01:01 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Eth1-2: flags=323<UP,BROADCAST,RUNNING,PROMISC> mtu 1500
ether 00:03:00:00:01:02 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
As a part of the simulator startup, the PDS App process is started. It reads the following file that contains instructions to create the NACL table and populate specific entries into the table:
/sw/nic/rudra/src/conf/hello_world/config.json
To see the NACL table load information in the config.json file, execute the command:
# cat /sw/nic/rudra/src/conf/hello_world/config.json
You can see the table definition is defined in the base key attribute, in the first part of the config.json file:
...
"base": {
"description": "base dynamic nacl config to program p4 table, base config required prior to any CRUD operations",
"send_intf": "Eth1-1",
"verify_intf": "Eth1-2",
"table_config": [
{
"dmac": "00:00:00:00:10:02",
"sip": "1.2.3.4",
"dip": "2.3.4.5",
"sport": 345,
"dport": 456,
"action": "nacl_redirect"
},
{
"dmac": "00:00:00:00:10:04",
"sip": "5.5.5.5",
"dip": "1.2.1.2",
"sport": 486,
"dport": 524,
"action": "nacl_permit"
},
{
"dmac": "00:50:00:00:10:23",
"sip": "3.5.6.2",
"dip": "4.2.0.8",
"sport": 918,
"dport": 835,
"action": "nacl_drop"
}
]
},
...
To see that the NACL table is loaded and available in the pipeline, execute the command:
# dpctl debug show nacl
[root@dsc_ssdk nic]# dpctl show pipeline internal table nacl
An example output of the NACL table is shown below.
RP - Rx packet TP - Tunnel pkt
Act - Action (R - Redirect, P - Permit, D - Drop)
KT - Key type DF - Don't fragment
-----------------------------------------------------------------------------------
Idx LifType Lif RP TP KT Proto SPort DPort Act Nexthop Data CoPPIdx DF
-----------------------------------------------------------------------------------
0 5 0 1 0 V4 17 345 456 R 1 /65 - - 0
1 5 0 1 0 V4 17 486 524 P - - - 0
2 5 0 1 0 V4 17 918 835 D - - - 0
9 * 65 * * * * * * R 3 /4 - - *
10 * 2 * * * * * * R 1 /65 - - *
15 * 68 * * * * * * P - - - *
16 3 * * * * * * * D - - - 1
17 5 * 1 1 * * * * D - - - 1
18 * * * * * * * * D - - - *
19 * * * * V6 * * * D - - - *
20 * * * * V4 * * * D - - - *
21 * * * * V6 * * * D - - - *
127 * * * * * * * * P - - - *
[root@dsc_ssdk nic]#