Skip to content

Commit 9782923

Browse files
committed
logging: Reduce device discovering verbosity
The `DiscoverSriovDevices` routine produces a huge amount of log entries, making debugging problems hard. Remove log entries that can produce a log line for each configured VF and which does not produce any change in the environment. Signed-off-by: Andrea Panattoni <[email protected]>
1 parent 8fe7a5e commit 9782923

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

pkg/host/internal/network/network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (n *network) TryToGetVirtualInterfaceName(pciAddr string) string {
7575
func (n *network) TryGetInterfaceName(pciAddr string) string {
7676
names, err := n.dputilsLib.GetNetNames(pciAddr)
7777
if err != nil || len(names) < 1 {
78-
log.Log.Error(err, "TryGetInterfaceName(): failed to get interface name")
78+
log.Log.Error(err, "TryGetInterfaceName(): failed to get interface name", "pciAddress", pciAddr)
7979
return ""
8080
}
8181
netDevName := names[0]

pkg/host/internal/vdpa/vdpa.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,9 @@ func (v *vdpa) DeleteVDPADevice(pciAddr string) error {
9494
func (v *vdpa) DiscoverVDPAType(pciAddr string) string {
9595
expectedVDPAName := generateVDPADevName(pciAddr)
9696
funcLog := log.Log.WithValues("device", pciAddr, "name", expectedVDPAName)
97-
funcLog.V(2).Info("DiscoverVDPAType() discover device type")
9897
_, err := v.netlinkLib.VDPAGetDevByName(expectedVDPAName)
9998
if err != nil {
10099
if errors.Is(err, syscall.ENODEV) {
101-
funcLog.V(2).Info("DiscoverVDPAType(): VDPA device for VF not found")
102100
return ""
103101
}
104102
if errors.Is(err, syscall.ENOENT) {

0 commit comments

Comments
 (0)