diff --git a/loxilb-ebpf b/loxilb-ebpf index 1d59b1913..69f670d14 160000 --- a/loxilb-ebpf +++ b/loxilb-ebpf @@ -1 +1 @@ -Subproject commit 1d59b191356414990c82ab35e25c52e4def19a4a +Subproject commit 69f670d14f900a72cc0024c530fed974dcfb78ed diff --git a/loxinet/dpebpf_linux.go b/loxinet/dpebpf_linux.go index 6641961b9..5bf92d25d 100644 --- a/loxinet/dpebpf_linux.go +++ b/loxinet/dpebpf_linux.go @@ -357,12 +357,12 @@ func (e *DpEbpfH) DpEbpfUnInit() { tk.LogIt(tk.LogInfo, "ebpf unload - %s\n", intf.Name) ifStr := C.CString(intf.Name) section := C.CString(string(C.TC_LL_SEC_DEFAULT)) - if e.RssEn { + C.llb_dp_link_attach(ifStr, section, C.LL_BPF_MOUNT_TC, 1) + if e.RssEn || intf.Name == "llb0" { xSection := C.CString(string(C.XDP_LL_SEC_DEFAULT)) C.llb_dp_link_attach(ifStr, xSection, C.LL_BPF_MOUNT_XDP, 1) C.free(unsafe.Pointer(xSection)) } - C.llb_dp_link_attach(ifStr, section, C.LL_BPF_MOUNT_TC, 1) C.free(unsafe.Pointer(ifStr)) C.free(unsafe.Pointer(section)) }