File: constants.py

package info (click to toggle)
networking-mlnx 1%3A13.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 704 kB
  • sloc: python: 4,863; sh: 180; makefile: 36
file content (56 lines) | stat: -rw-r--r-- 1,892 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 2013 Mellanox Technologies, Ltd
#
# 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.

VENDOR = '0x15b3'
VIF_TYPE_HOSTDEV = 'ib_hostdev'


VPORT_STATE_ATTACHED = 'attached'
VPORT_STATE_PENDING = 'pending'
VPORT_STATE_UNPLUGGED = 'unplugged'

UNTAGGED_VLAN_ID = 4095

INVALID_MAC = '00:00:00:00:00:00'

# MLNX4
MLNX4_ADMIN_GUID_PATH = "/sys/class/infiniband/%s/iov/ports/%s/admin_guids/%s"
MLNX4_GUID_INDEX_PATH = "/sys/class/infiniband/%s/iov/%s/ports/%s/gid_idx/0"
MLNX4_PKEY_INDEX_PATH = "/sys/class/infiniband/%s/iov/%s/ports/%s/pkey_idx/%s"

# MLNX5
MLNX5_GUID_NODE_PATH = ('/sys/class/infiniband/%(module)s/device/sriov/'
                      '%(vf_num)s/node')
MLNX5_GUID_PORT_PATH = ('/sys/class/infiniband/%(module)s/device/sriov/'
                      '%(vf_num)s/port')
MLNX5_GUID_POLICY_PATH = ('/sys/class/infiniband/%(module)s/device/sriov/'
                        '%(vf_num)s/policy')
UNBIND_PATH = '/sys/bus/pci/drivers/mlx5_core/unbind'
BIND_PATH = '/sys/bus/pci/drivers/mlx5_core/bind'

MLNX4_INVALID_GUID = 'ffffffffffffffff'
MLNX5_INVALID_GUID = 'ff:ff:ff:ff:ff:ff:ff:ff'

CONN_URL = '%(transport)s://%(addr)s:%(port)s'

MLNX4_VF_DEVICE_TYPE_LIST = ('0x1004', )
MLNX5_VF_DEVICE_TYPE_LIST = ('0x1014', '0x1016', '0x1018')

MLNX4_VF_DEVICE_TYPE = 'MLNX4'
MLNX5_VF_DEVICE_TYPE = 'MLNX5'

SOCKET_OS_PORT = '60001'
SOCKET_OS_TRANSPORT = 'tcp'
SOCKET_OS_ADDR = '0.0.0.0'