Infra: AWS Update to Ubuntu 20.04
[csit.git] / fdio.infra.ansible / roles / vpp_device / files / csit-initialize-vfs-tx2.sh
1 #!/usr/bin/env bash
2
3 # Copyright (c) 2021 PANTHEON.tech and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 # Add QLogic Corp. FastLinQ QL41000 Series 10/25/40/50GbE Controller to
17 # blacklist.
18 PCI_BLACKLIST=($(lspci -Dmmd ':8070:0200' | cut -f1 -d' '))
19 # Add I350 Gigabit Network Connection 1521 to blacklist.
20 PCI_BLACKLIST+=($(lspci -Dmmd ':1521:0200' | cut -f1 -d' '))
21 # Add MT27800 Family [ConnectX-5] 1017 to blacklist.
22 PCI_BLACKLIST+=($(lspci -Dmmd ':1017:0200' | cut -f1 -d' '))
23
24 # Add Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ to whitelist.
25 PCI_WHITELIST=($(lspci -Dmmd ':1583:0200' | cut -f1 -d' '))
26
27 # See http://pci-ids.ucw.cz/v2.2/pci.ids for more info.
28
29 declare -A PF_INDICES
30 # Intel NICs
31 PF_INDICES["0000:05:00.0"]=0
32 PF_INDICES["0000:05:00.1"]=1
33 PF_INDICES["0000:91:00.0"]=0
34 PF_INDICES["0000:91:00.1"]=1