Skip to content

Commit

Permalink
cni: add more debug
Browse files Browse the repository at this point in the history
Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan committed Oct 31, 2023
1 parent d04fdc0 commit 31c129c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/nad_with_syncer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
"logFile": "afxdp-cni.log", # CNI log file location (optional)
"logLevel": "debug", # CNI logging level (optional)
"dpSyncer": true, # Sync with Device Plugin over gRPC MUST BE SET for bpf map pinning
"skipUnloadBpf": true,
"skipUnloadBpf": true, # Skip unloading BPF locally
"ipam": { # CNI IPAM plugin and associated config (optional)
"type": "host-local",
"subnet": "192.168.1.0/24",
Expand Down
1 change: 0 additions & 1 deletion internal/deviceplugin/poolManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ func (pm *PoolManager) Allocate(ctx context.Context,
}

if pm.BpfdClientEnable {
logging.Infof("BpfProg %s BpfSec %s", pm.BpfProg, pm.BpfSec)
err, xskmap := pm.BpfdClient.SubmitXdpProg(device.Name(), pm.Node, pm.DevicePrefix, pm.BpfProg, pm.BpfSec)
if err != nil {
logging.Errorf("Error SubmitXdpProg to bpfd %v", err)
Expand Down
5 changes: 3 additions & 2 deletions internal/dpcnisyncerserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ func (s *SyncerServer) DelNetDev(ctx context.Context, in *pb.DeleteNetDevReq) (*
if s.BpfdClientEnable && !s.BpfMapPinEnable {
err := s.BpfdClient.DeleteXdpProg(netDevName)
if err != nil {
logging.Errorf("Could NOT delete BPF Prog for %s", netDevName)
return &pb.DeleteNetDevResp{Ret: -1}, errors.Wrapf(err, "Could NOT delete BPF Prog for %s: %v", netDevName, err.Error())
logging.Errorf("BpfdClient could NOT delete BPF Prog for %s", netDevName)
return &pb.DeleteNetDevResp{Ret: -1}, errors.Wrapf(err, "BpfdClient could NOT delete BPF Prog for %s: %v", netDevName, err.Error())
}

logging.Infof("Network interface %s deleted", netDevName)
return &pb.DeleteNetDevResp{Ret: 0}, nil
}

Expand Down

0 comments on commit 31c129c

Please sign in to comment.