forked from lop-devops/tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.pci_info
246 lines (194 loc) · 8.5 KB
/
README.pci_info
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
PCI INFO
========
USAGE:
------
# ./pci_info.py --help
usage: pci_info.py [-h] [--pci-address PCI_ADDR] [--show-info]
[--create-config] [--additional-params ADD_PARAMS]
optional arguments:
-h, --help show this help message and exit
--pci-address PCI_ADDR
pci address, comma separated
--vnic vNIC_INT
vNIC interface name
--veth vETH_INT
vETH interface name
--hnv HNV_INT
HNV interface name
--show-info Show the pci details
--create-config Create test config and input files
--additional-params ADD_PARAMS
Additional parameters(key=value) to the input file,
space separated
ARGUMENT DETAILS:
-----------------
--pci-address PCI_ADDR
Use this option to specify for which pci address the details should be collected.
Use comma separated values to provide multiple pci addresses.
If not provided, collects details for all pci addresses in the system.
--vnic vNIC_INT
Use this option to specify for which vNIC interface the details should be collected.
If "vNIC_INT" not provided, then the first available vNIC interface from system will be used by default.
--veth vETH_INT
Use this option to specify for which vETH interface the details should be collected.
If "vETH_INT" not provided, then the first available vETH interface from system will be used by default.
--hnv HNV_INT
Use this option to specify for which vHNV interface the details should be collected.
If "HNV_INT" not provided, then the first available HNV interface from system will be used by default.
--pci-address-blocklist PCI_ADDR_BLOCKLIST
Use this option to leave out pci addresses from the list.
Use comma separated values to provide multiple pci addresses.
--type TYPE
Use this option to specify for what type of adapters the details should be collected.
Use comma separated values to provide multiple types.
If not provided, collects details for all types of adapters in the system.
--type-blocklist TYPE_BLOCKLIST
Use this option to leave out adapter types from the list.
Use comma separated values to provide multiple adapter types.
--show-info
Option to display collected details to the user or not.
The output is a python dictionary.
--create-config
Option to create config file if required.
Suppose the system has one pci card, which is nvme: Then, a cfg file named
io_nvme_<pci_address>_fvt.cfg is generated in config/tests/host/
It also generates input file (Check --input-file section of main README).
The details for input file is got via config file at config/wrapper/pci_input_cfg.txt
The details are dynamic, and the dictionary values can be used to edit the input config
file.
Example:
1. Suppose the input file needs to be updated with "disk = /dev/mapper/mpathac", ie,
one of the multipath disk, which is the value of the key "mpath_disks" on the
pci dictionary.
So, the conf file "config/wrapper/pci_input_cfg.txt" needs to have:
disk = mpath_disks:0
2. Suppose the input file needs to be updated with "wwids = <multiple / all wwids>",
which is the value of the key "mpath_wwids" on the pci dictionary.
So, the conf file "config/wrapper/pci_input_cfg.txt" needs to have:
wwids = mpath_wwids:all
3. Suppose the input file needs to be updated with "MODULES = lpfc",
which is the value of the key "driver" on the pci dictionary.
So, the conf file "config/wrapper/pci_input_cfg.txt" needs to have:
MODULES = driver
--additional-params ADD_PARAMS
If the collected information is not enough for some tests, this provision can be used
to provide additional static arguments. They are key=value pairs, separated by space.
Additional params per pci address is supported, if they are provided before the key=value
pair, separated by ::.
If no pci address is specified, these additional params are for all test configs.
Example:
--additional-params "0005:60:00::a=b c=d"
a = b is only for the specified pci address, and c = d is for all test configs.
Additional params for virtual interfaces is supported, if they are provided key=value
pair, separated by ",".
Example:
--additional-params device_ip=192.168.100.184,peer_ip=192.168.100.104,netmask=255.255.255.0,
peer_ips="192.168.100.104 192.168.110.104",peer_interfaces="env4 env5"
EXAMPLES:
---------
A. For pci devices
++++++++++++++++++
# ./pci_info.py --pci-address "0202:60:00,0102:60:00" --show-info
[{'adapter_description': 'Emulex Corporation Lancer Gen6: LPe32000 Fibre Channel Host Adapter',
'adapter_id': '10df:e300:1014:0615',
'adapter_type': 'fc',
'class': 'scsi_host',
'disks': ['/dev/sdaa',
'/dev/sdab',
'/dev/sdx',
'/dev/sdy',
'/dev/sdg',
'/dev/sdd',
'/dev/sde',
'/dev/sdc'],
'driver': 'lpfc',
'firmware': '11.4.415.5',
'functions': ['0102:60:00.0', '0102:60:00.1'],
'interfaces': ['host11', 'host13'],
'is_root_disk': False,
'mpath_disks': [],
'mpath_wwids': [],
'pci_root': '0102:60:00',
'slot': 'U78CD.001.FZHV738-P1-C2'},
{'adapter_description': 'QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA',
'adapter_id': '1077:2532:1014:f304',
'adapter_type': 'fc',
'class': 'scsi_host',
'disks': ['/dev/sdbu',
'/dev/sdbt',
'/dev/sdbv',
'/dev/sdbq',
'/dev/sdar',
'/dev/sdas',
'/dev/sdz',
'/dev/sdj'],
'driver': 'qla2xxx',
'firmware': '8.07.00',
'functions': ['0202:60:00.0', '0202:60:00.1'],
'interfaces': ['host17', 'host15'],
'is_root_disk': False,
'mpath_disks': ['/dev/mapper/mpathac',
'/dev/mapper/mpathae'],
'mpath_wwids': ['360050768028383d7f0000000000000a5',
'360050768028383d7f000000000000033'],
'pci_root': '0202:60:00',
'slot': 'U78CD.001.FZHV738-P2-C2'}]
# ./pci_info.py --pci-address "0202:60:00,0102:60:00" --create-config --additional-params "peer_ip=131.1.1.89 peer_interfaces=eth1,eth2"
peer_ip=131.1.1.89 peer_interfaces=eth1,eth2
['peer_ip=131.1.1.89', 'peer_interfaces=eth1,eth2']
--run-suite host_io_fc_0102_60_00_fvt,host_io_fc_0202_60_00_fvt --input-file io_input.txt
# cat io_input.txt
[io_fc_0102_60_00_fvt]
disks = ""
wwids = ""
pci_device = "0102:60:00.0"
MODULES = "lpfc"
peer_ip = "131.1.1.89"
peer_interfaces = "eth1,eth2"
[io_fc_0202_60_00_fvt]
disk = "/dev/mapper/mpathac"
disks = "/dev/mapper/mpathac,/dev/mapper/mpathae"
wwids = "360050768028383d7f0000000000000a5,360050768028383d7f000000000000033"
pci_device = "0202:60:00.0"
MODULES = "qla2xxx"
peer_ip = "131.1.1.89"
peer_interfaces = "eth1,eth2"
B. For virtual devices
++++++++++++++++++++++
# ./pci_info.py --vnic env4 --show-info [ or ] ./pci_info.py --vnic --show-info
[{'adapter_type': 'vnic',
'driver': 'ibmvnic',
'interfaces': ['env3', 'env4', 'env8'],
'macaddress': 'ba:70:c4:97:1a:04',
'public_interface_ip': '9.xxxxx'}]
# ./pci_info.py --vnic env4 --create-config
04:42:56 INFO : python avocado-setup.py --run-suite host_io_vnic_stress_fvt --input-file io_input.txt
[io_vnic_stress_fvt]
host_interfaces = "env3 env4"
interfaces = "env3 env4"
bond_interfaces = "env3 env4"
htx_host_interfaces = "env3 env4"
host_public_ip = "9xxxx"
interface = "env3"
module = "ibmvnic"
macaddress = "ba:70:c4:97:1a:03"
# ./pci_info.py --vnic env4 --additional-params device_ip=192.168.100.184,peer_ip=192.168.100.104,netmask=255.255.255.0,host_ip=192.168.100.184,netmasks=255.255.255.0,peer_ips="192.168.100.104 192.168.110.104",peer_interfaces="env4 env5",hmc_username=hscroot,hmc_pwd=abcd --create-config
# cat io_input.txt
[io_vnic_stress_fvt]
host_interfaces = "env3 env4"
interfaces = "env3 env4"
bond_interfaces = "env3 env4"
htx_host_interfaces = "env3 env4"
host_public_ip = "9.xxxxx"
interface = "env3"
module = "ibmvnic"
macaddress = "ba:70:c4:97:1a:04"
hmc_pwd = abcd
hmc_username = hscroot
mac_id = "025dc3a7d703"
host_ip = 192.168.100.184
netmask = 255.255.255.0
netmasks = 255.255.255.0
peer_ips = 192.168.100.104 192.168.110.104
host_ips = "110.10.10.212 111.10.10.212"
peer_interfaces = env4 env5