forked from kata-containers/agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updateInterface: enable hot-add nic on arm64
For now, update interface in agent will fail when hot-add nic to a running containers on arm64 as rescan pci bus will occur between up hf and bf of shpc hotplug interrupt handling. Another problem is that as pcie bridge is used when create vm for arm64, the rootBusPath will be "/devices/platform/4010000000.pcie/pci0000:00". This patch remove the implementation of rescan and change the rootBusPath for arm64. Fixes: kata-containers#544 Signed-off-by: Jianyong Wu <[email protected]>
- Loading branch information
Showing
5 changed files
with
73 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Copyright (c) 2019 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
package main | ||
|
||
import "ioutil" | ||
|
||
const ( | ||
rootBusPath = "/devices/pci0000:00" | ||
pciBusMode = 0220 | ||
) | ||
|
||
var pciBusRescanFile = sysfsDir + "/bus/pci/rescan" | ||
|
||
func rescanPciBus() error { | ||
return ioutil.WriteFile(pciBusRescanFile, []byte{'1'}, pciBusMode) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// Copyright (c) 2019 ARM Limited | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
package main | ||
|
||
const rootBusPath = "/devices/platform/4010000000.pcie/pci0000:00" | ||
|
||
func rescanPciBus() error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Copyright (c) 2019 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
package main | ||
|
||
import "ioutil" | ||
|
||
const ( | ||
rootBusPath = "/devices/pci0000:00" | ||
pciBusMode = 0220 | ||
) | ||
|
||
var pciBusRescanFile = sysfsDir + "/bus/pci/rescan" | ||
|
||
func rescanPciBus() error { | ||
return ioutil.WriteFile(pciBusRescanFile, []byte{'1'}, pciBusMode) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Copyright (c) 2019 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
package main | ||
|
||
import "ioutil" | ||
|
||
const ( | ||
rootBusPath = "/devices/pci0000:00" | ||
pciBusMode = 0220 | ||
) | ||
|
||
var pciBusRescanFile = sysfsDir + "/bus/pci/rescan" | ||
|
||
func rescanPciBus() error { | ||
return ioutil.WriteFile(pciBusRescanFile, []byte{'1'}, pciBusMode) | ||
} |