Closed zshi-redhat closed 2 years ago
The link down/up in cmd/sriov/main.go
in current implemention flushes the ipv6 addr configured via host-local ipam plugin, need to pull the setting of effective MAC address out from SetupVF and move it after calling IPAM (so that it avoids linking down/up the interface, and still be able to trigger ipv4 garp pkg by setting the MAC).
Not sure why unit test is failing:
•panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x795ca1]
goroutine 20 [running]:
github.com/k8snetworkplumbingwg/sriov-cni/pkg/sriov.(*sriovManager).SetupVF.func1(0x91e120, 0xc000183eb0, 0x0, 0x0)
/home/travis/gopath/src/github.com/k8snetworkplumbingwg/sriov-cni/.gopath/src/github.com/k8snetworkplumbingwg/sriov-cni/pkg/sriov/sriov.go:244 +0xc1
github.com/containernetworking/plugins/pkg/ns.(*netNS).Do.func1(0x91e120, 0xc000183eb0, 0x0, 0x0)
/home/travis/gopath/src/github.com/k8snetworkplumbingwg/sriov-cni/.gopath/pkg/mod/github.com/containernetworking/plugins@v0.8.7/pkg/ns/ns_linux.go:197 +0x2cc
github.com/containernetworking/plugins/pkg/ns.(*netNS).Do.func2(0xc0001f4910, 0xc000192d60, 0x91e120, 0xc000183eb0, 0xc000183ec0)
/home/travis/gopath/src/github.com/k8snetworkplumbingwg/sriov-cni/.gopath/pkg/mod/github.com/containernetworking/plugins@v0.8.7/pkg/ns/ns_linux.go:218 +0x76
created by github.com/containernetworking/plugins/pkg/ns.(*netNS).Do
/home/travis/gopath/src/github.com/k8snetworkplumbingwg/sriov-cni/.gopath/pkg/mod/github.com/containernetworking/plugins@v0.8.7/pkg/ns/ns_linux.go:215 +0x224
FAIL github.com/k8snetworkplumbingwg/sriov-cni/pkg/sriov 0.016s
ok github.com/k8snetworkplumbingwg/sriov-cni/pkg/utils 0.016s
FAIL
Makefile:95: recipe for target 'test' failed
make: *** [test] Error 1
@martinkennelly @adrianchiris Do you have any clue?
Do you have any clue?
Hmmm, does this reproduce when you run locally ? can you try replacing %q for %v in L255 ?
Do you have any clue?
Hmmm, does this reproduce when you run locally ?
Yes
can you try replacing %q for %v in L255 ?
This doesn't help.
@zshi-redhat I see the issue you are having. I replicated it even on latest ice driver & latest iavf driver. I do not see the issue when using iproute2. I notice the issue does not occur when you ensure the admin mac is set to a valid default (i.e. not 00:00:00:00:00:00) I will investigate this more.
@zshi-redhat I have asked for help internally with this issue - setting the VF effective mac address fails silently for E800. Trying to set the effective mac on a VF produces the kernel messages:
[ 2324.101392] ice 0000:02:00.0: VF 0 failed opcode 10, retval: -53 │
[ 2324.101425] iavf 0000:02:01.0: Failed to add MAC filter, error IAVF_ERR_ADMIN_QUEUE_ERROR
The opcode / retval do not give hints as to why it is failing.
@zshi-redhat I changed to production E800 series card, default centos 8.3 driver version - 0.8.2-k, fw 2.32 and your patch works as expected. I set / unset mac and noticed correct restoration of previous VF mac address. Waiting for your environment details over slack IM.
@zshi-redhat I think this PR can be closed.
Fixes #177
Signed-off-by: Zenghui Shi zshi@redhat.com