mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 23:04:20 +01:00
runtime/network: Use PciPath type through network handling
The "PCI address" returned by Endpoint::PciPath() isn't actually a PCI
address (DDDD:BB:DD.F), but rather a PCI path. Rename and use the
PciPath type to clean this up and the various parts of the network
code connected to it.
Forward port of
3e589713cf
fixes #1040
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
package persistapi
|
||||
|
||||
import (
|
||||
vcTypes "github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/types"
|
||||
"github.com/vishvananda/netlink"
|
||||
)
|
||||
|
||||
@@ -48,7 +49,7 @@ type PhysicalEndpoint struct {
|
||||
type MacvtapEndpoint struct {
|
||||
// This is for showing information.
|
||||
// Remove this field won't impact anything.
|
||||
PCIAddr string
|
||||
PCIPath vcTypes.PciPath
|
||||
}
|
||||
|
||||
type TapEndpoint struct {
|
||||
@@ -75,7 +76,7 @@ type VhostUserEndpoint struct {
|
||||
// This is for showing information.
|
||||
// Remove these fields won't impact anything.
|
||||
IfaceName string
|
||||
PCIAddr string
|
||||
PCIPath vcTypes.PciPath
|
||||
}
|
||||
|
||||
// NetworkEndpoint contains network interface information
|
||||
|
||||
Reference in New Issue
Block a user