From 226c3336dcc70bd17e3471ff98106a2f8dee9ac5 Mon Sep 17 00:00:00 2001
From: jiangpengfei <jiangpengfei9@huawei.com>
Date: Tue, 11 Aug 2020 22:32:49 +0800
Subject: [PATCH 23/50] kata-runtime: set PCIBridgeMaxCapacity limit to 25

reason: set PCIBridgeMaxCapacity limit to 25.

Signed-off-by: jiangpengfei <jiangpengfei9@huawei.com>
---
 virtcontainers/qemu_arch_base_test.go | 2 +-
 virtcontainers/types/bridges.go       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/virtcontainers/qemu_arch_base_test.go b/virtcontainers/qemu_arch_base_test.go
index 169e002e..8219f3c5 100644
--- a/virtcontainers/qemu_arch_base_test.go
+++ b/virtcontainers/qemu_arch_base_test.go
@@ -175,7 +175,7 @@ func TestQemuAddDeviceToBridge(t *testing.T) {
 	}
 
 	// fail to add device to bridge cause no more available bridge slot
-	_, _, err := q.addDeviceToBridge("qemu-bridge-31", types.PCI)
+	_, _, err := q.addDeviceToBridge("qemu-bridge-26", types.PCI)
 	exceptErr := errors.New("no more bridge slots available")
 	assert.Equal(exceptErr.Error(), err.Error())
 
diff --git a/virtcontainers/types/bridges.go b/virtcontainers/types/bridges.go
index cb15a88f..c3538ce4 100644
--- a/virtcontainers/types/bridges.go
+++ b/virtcontainers/types/bridges.go
@@ -10,7 +10,7 @@ import "fmt"
 // Type represents a type of bus and bridge.
 type Type string
 
-const PCIBridgeMaxCapacity = 30
+const PCIBridgeMaxCapacity = 25
 
 const (
 	// PCI represents a PCI bus and bridge
-- 
2.14.3 (Apple Git-98)

