19
SAI PTF Test

PTF Test Demo… · 1270 1271 1272 1273 1274 1275 1276 - def sai thrift create v Ian (client, v Ian id) : v1an attr list attribute value — sai thrift attribute value t (ul 6=v1an

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

SAI PTF Test

PTF

• Packet Testing Framework

• Python based

• Scapy

• https://github.com/p4lang/ptf/tree/master

SAI PTF

• SAI

• Thrift• Generate functions used for RPC calls

• PTF• Build, send and verify packet

• https://github.com/opencomputeproject/SAI/tree/master/test/saithrift

Topology

• Example

Switch Host

Port 3

Port 5

Port 7

Port 9

eth4

eth5

eth6

eth7

Configuration file

• Switch• portmap.ini

• profile.ini

• https://github.com/opencomputeproject/SAI/tree/master/test/saithrift/src/msn_2700

Sample Test Code

Sample Test Code

Sample Test Code

Sample Test Code

Sample Test CodeBuild a packet

Send packet from port 0 Verify packet received at port 1

Build a packet

Build a packet

Sample Test Code

Sample Test Code

PTF NN

PTF Demo

• https://github.com/opencomputeproject/SAI/blob/master/test/saithrift/tests/sail2.py

PTF NN Demo

• https://github.com/p4lang/ptf/tree/fe3cd89e332d9b0e673230e06a1a7ff29d688df5/ptf_nn

Q & A

Thanks!