sonic-buildimage/platform/mellanox/docker-syncd-mlnx/ecmp_calculator/packet_scheme.py
Lior Avramov 97cdb6af5c
[Mellanox] Add copyright header to ECMP calculator files (#14825)
- Why I did it
Add NVIDIA Copyright header to NVIDIA files added lately

- How I did it
Add NVIDIA Copyright header for the relevant files

- How to verify it
N/A (only commented text was added).
2023-05-02 10:35:16 +03:00

157 lines
6.0 KiB
Python
Executable File

#!/usr/bin/env python3
#
# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES.
# Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
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"}
}
}
}
}
}
}
}
}