From 6b86f8fa0a24c7d2a9060470b046ca16c12f01fe Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Sun, 2 Jul 2023 00:40:44 +0900 Subject: [PATCH 1/4] packet tracing helpers --- Makefile | 1 + loxilb-ebpf | 2 +- loxinet/dpebpf_linux.go | 9 +++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8e3d79bc9..81ea9e8c3 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ docker-cp: build docker cp loxilb $(loxilbid):/root/loxilb-io/loxilb/loxilb docker cp /opt/loxilb/llb_ebpf_main.o $(loxilbid):/opt/loxilb/llb_ebpf_main.o docker cp /opt/loxilb/llb_xdp_main.o $(loxilbid):/opt/loxilb/llb_xdp_main.o + docker cp loxilb-ebpf/kernel/loxilb_dp_debug $(loxilbid):/usr/local/sbin/ docker-cp-ebpf: build docker cp /opt/loxilb/llb_ebpf_main.o $(loxilbid):/opt/loxilb/llb_ebpf_main.o diff --git a/loxilb-ebpf b/loxilb-ebpf index 4b19090b6..106fff7c8 160000 --- a/loxilb-ebpf +++ b/loxilb-ebpf @@ -1 +1 @@ -Subproject commit 4b19090b66832d10b3dd4db4d8b5943dcd2407b4 +Subproject commit 106fff7c8fdfb6a0777699af783cb121d13591c6 diff --git a/loxinet/dpebpf_linux.go b/loxinet/dpebpf_linux.go index c1a815c37..d64676d5d 100644 --- a/loxinet/dpebpf_linux.go +++ b/loxinet/dpebpf_linux.go @@ -243,6 +243,7 @@ func DpEbpfInit(clusterEn bool, nodeNum int, rssEn bool, logLevel tk.LogLevelT) } cfg.nodenum = C.int(nodeNum) cfg.loglevel = 1 + cfg.no_loader = 0 DpEbpfDPLogLevel(&cfg, logLevel) @@ -406,19 +407,19 @@ func (e *DpEbpfH) DpPortPropMod(w *PortDpWorkQ) int { tk.LogIt(tk.LogError, "ebpf load - %d error\n", w.PortNum) return EbpfErrEbpfLoad } - + ethHandle, err := ethtool.NewEthtool() if err != nil { tk.LogIt(tk.LogError, "ethtoo handle create - %d(%s) error %s\n", w.PortNum, w.LoadEbpf, err.Error()) } defer ethHandle.Close() - + /* We need to enable tx sctp checksumming offload */ features := map[string]bool{ - "tx-checksum-sctp" : true, + "tx-checksum-sctp": true, } err = ethHandle.Change(w.LoadEbpf, features) - + if err != nil { tk.LogIt(tk.LogError, "Intf %s unable to change Tx offload: %s\n", w.LoadEbpf, err.Error()) } From f6f0e32f9606619057c31f4f7cffcdbbfa784b4c Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Sun, 2 Jul 2023 16:04:21 +0900 Subject: [PATCH 2/4] packet tracing helpers --- Dockerfile | 1 + loxilb-ebpf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 892181e3d..5e1546414 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,6 +50,7 @@ RUN mkdir -p /root/loxilb-io/loxilb/ # Install loxilb RUN git clone --recurse-submodules https://github.com/loxilb-io/loxilb /root/loxilb-io/loxilb/ && cd /root/loxilb-io/loxilb/ && go get . && make && cp loxilb-ebpf/utils/mkllb_bpffs.sh /usr/local/sbin/mkllb_bpffs && cp api/certification/* /opt/loxilb/cert/ && cd - +RUN cp /root/loxilb-io/loxilb/loxilb-ebpf/kernel/loxilb_dp_debug /usr/local/sbin/loxilb_dp_debug RUN cp /root/loxilb-io/loxilb/loxilb /usr/local/sbin/loxilb RUN rm -fr /root/loxilb-io/loxilb/* RUN rm -fr /root/loxilb-io/loxilb/.git diff --git a/loxilb-ebpf b/loxilb-ebpf index 106fff7c8..75dddcc19 160000 --- a/loxilb-ebpf +++ b/loxilb-ebpf @@ -1 +1 @@ -Subproject commit 106fff7c8fdfb6a0777699af783cb121d13591c6 +Subproject commit 75dddcc19a1986bb0ed37a5e34a90d3e3bfdd423 From 9fb6cb4cb86b31d4b9065f36376090354261531a Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Sun, 2 Jul 2023 22:29:50 +0900 Subject: [PATCH 3/4] packet tracing helpers --- loxilb-ebpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loxilb-ebpf b/loxilb-ebpf index 75dddcc19..94fa0fc6a 160000 --- a/loxilb-ebpf +++ b/loxilb-ebpf @@ -1 +1 @@ -Subproject commit 75dddcc19a1986bb0ed37a5e34a90d3e3bfdd423 +Subproject commit 94fa0fc6aebbae3f2150b6345bdad3606f828088 From 35feb5dc3aa0148bf39c5b26e7de8fdc9a9b4ba4 Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Sun, 2 Jul 2023 23:19:24 +0900 Subject: [PATCH 4/4] rss optimizations --- loxilb-ebpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loxilb-ebpf b/loxilb-ebpf index 94fa0fc6a..c7ebc0fbd 160000 --- a/loxilb-ebpf +++ b/loxilb-ebpf @@ -1 +1 @@ -Subproject commit 94fa0fc6aebbae3f2150b6345bdad3606f828088 +Subproject commit c7ebc0fbdab631451a390a895a382dac4f988d6a