sonic-buildimage/platform/mellanox/docker-syncd-mlnx/ecmp_calculator/packet_scheme.py
Lior Avramov e5808020a7
Add ECMP calculator tool (#12482)
- Why I did it
Added ECMP calculator tool.

- How I did it
New files were added.

- How to verify it
Manual tests performed according to tests chapter in HLD
Automated tests will be added by verification.
2022-12-04 17:14:25 +02:00

141 lines
5.4 KiB
Python
Executable File

#!/usr/bin/env python3
PACKET_SCHEME = {
"type" : "object",
"properties" :
{
"packet_info" :
{
"type" : "object",
"properties" :
{
"outer" :
{
"type" : "object",
"properties" :
{
"layer2" :
{
"type" : "object",
"properties" :
{
"smac": {"type": "string"},
"dmac": {"type": "string"},
"ethertype": {"type": "number"},
"outer_vid": {"type": "number"},
"outer_pcp": {"type": "number"},
"outer_dei": {"type": "number"},
"inner_vid": {"type": "number"},
"inner_pcp": {"type": "number"},
"inner_dei": {"type": "number"}
}
},
"arp" :
{
"type" : "object",
"properties" :
{
"spa": {"type": "string"},
"tpa": {"type": "string"}
}
},
"ipv4" :
{
"type" : "object",
"properties" :
{
"sip": {"type": "string"},
"dip": {"type": "string"},
"proto": {"type": "number"}
},
"required": ["dip"]
},
"ipv6" :
{
"type" : "object",
"properties" :
{
"sip": {"type": "string"},
"dip": {"type": "string"},
"mflag": {"type": "number"},
"next_header": {"type": "number"},
"dscp": {"type": "number"},
"ecn": {"type": "number"},
"l3_length": {"type": "number"},
"flow_label": {"type": "number"}
},
"required": ["dip"]
},
"tcp_udp" :
{
"type" : "object",
"properties" :
{
"sport": {"type": "number"},
"dport": {"type": "number"}
}
},
"vxlan_nvgre" :
{
"type" : "object",
"properties" :
{
"vni": {"type": "number"}
}
}
}
},
"inner" :
{
"type" : "object",
"properties" :
{
"layer2" :
{
"type" : "object",
"properties" :
{
"smac": {"type": "string"},
"dmac": {"type": "string"},
"ethertype": {"type": "number"}
}
},
"ipv4" :
{
"type" : "object",
"properties" :
{
"sip": {"type": "string"},
"dip": {"type": "string"},
"mflag": {"type": "number"},
"proto": {"type": "number"}
}
},
"ipv6" :
{
"type" : "object",
"properties" :
{
"sip": {"type": "string"},
"dip": {"type": "string"},
"mflag": {"type": "number"},
"next_header": {"type": "number"},
"flow_label": {"type": "number"}
}
},
"tcp_udp" :
{
"type" : "object",
"properties" :
{
"sport": {"type": "number"},
"dport": {"type": "number"}
}
}
}
}
}
}
}
}