From 74ed85bec2f11cf857bfa6c5ce5ab02f0945a1ca Mon Sep 17 00:00:00 2001
From: Trekkie Coder <trekkie@netlox.io>
Date: Tue, 24 Dec 2024 01:58:00 +0900
Subject: [PATCH 1/5] gh-877 Initial support for egress

---
 loxilb-ebpf          | 2 +-
 pkg/loxinet/rules.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/loxilb-ebpf b/loxilb-ebpf
index d11c87dc..fa0faa3a 160000
--- a/loxilb-ebpf
+++ b/loxilb-ebpf
@@ -1 +1 @@
-Subproject commit d11c87dc81fe20c18b1557a2cc1430edcd3fab7a
+Subproject commit fa0faa3a324d81c77c235234a68a4cef39f7bb36
diff --git a/pkg/loxinet/rules.go b/pkg/loxinet/rules.go
index eb97e062..17d8cacb 100644
--- a/pkg/loxinet/rules.go
+++ b/pkg/loxinet/rules.go
@@ -78,7 +78,7 @@ const (
 
 // constants
 const (
-	MaxLBEndPoints             = 32
+	MaxLBEndPoints             = 24
 	DflLbaInactiveTries        = 2          // Default number of inactive tries before LB arm is turned off
 	MaxDflLbaInactiveTries     = 100        // Max number of inactive tries before LB arm is turned off
 	DflLbaCheckTimeout         = 10         // Default timeout for checking LB arms

From 4b6f32665158327301b62b47fdad7fb267700d33 Mon Sep 17 00:00:00 2001
From: Trekkie Coder <trekkie@netlox.io>
Date: Tue, 24 Dec 2024 02:52:01 +0900
Subject: [PATCH 2/5] gh-877 Initial support for egress

---
 loxilb-ebpf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/loxilb-ebpf b/loxilb-ebpf
index fa0faa3a..3910ca9b 160000
--- a/loxilb-ebpf
+++ b/loxilb-ebpf
@@ -1 +1 @@
-Subproject commit fa0faa3a324d81c77c235234a68a4cef39f7bb36
+Subproject commit 3910ca9ba060c2b261ba5264518264fd04a94763

From aaf4b48fc88cc7f9070b80a402ea8c211430d80a Mon Sep 17 00:00:00 2001
From: Trekkie Coder <trekkie@netlox.io>
Date: Tue, 24 Dec 2024 03:41:09 +0900
Subject: [PATCH 3/5] gh-877 Initial support for egress

---
 loxilb-ebpf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/loxilb-ebpf b/loxilb-ebpf
index 3910ca9b..b28b0c8a 160000
--- a/loxilb-ebpf
+++ b/loxilb-ebpf
@@ -1 +1 @@
-Subproject commit 3910ca9ba060c2b261ba5264518264fd04a94763
+Subproject commit b28b0c8a63bb794a33c57324607cd4b6936960ea

From fab77ebedad0dd254ee4e22db9548959a9b1705c Mon Sep 17 00:00:00 2001
From: Trekkie Coder <trekkie@netlox.io>
Date: Tue, 24 Dec 2024 04:30:34 +0900
Subject: [PATCH 4/5] gh-877 Initial support for egress: fixed some cicd cases

---
 cicd/wrrtcplb1/validation.sh | 6 +++---
 cicd/wrrtcplb2/validation.sh | 7 +++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/cicd/wrrtcplb1/validation.sh b/cicd/wrrtcplb1/validation.sh
index a2ef39f6..367dde4b 100755
--- a/cicd/wrrtcplb1/validation.sh
+++ b/cicd/wrrtcplb1/validation.sh
@@ -39,14 +39,14 @@ respArr=( "server1" "server1" "server1"
           "server1" "server1" "server1"
           "server1" "server1" "server1"
           "server1" "server1" "server1"
-          "server1" "server1" "server1"
-          "server1" "server1" "server1"
+          "server1" "server2" "server2"
+          "server2" "server2" "server1"
           "server1" "server2" "server2"
           "server2" "server2" "server2"
           "server2" "server1"
         )
 
-for i in {0..31}
+for i in {0..23}
 do
     res=$($hexec l3h1 curl --max-time 10 -s 20.20.20.1:2020)
     echo $i:$res
diff --git a/cicd/wrrtcplb2/validation.sh b/cicd/wrrtcplb2/validation.sh
index 9e2f769c..f1c292f4 100755
--- a/cicd/wrrtcplb2/validation.sh
+++ b/cicd/wrrtcplb2/validation.sh
@@ -36,17 +36,16 @@ done
 respArr=( "server1" "server1" "server1"
           "server1" "server1" "server1"
           "server1" "server1" "server1"
-          "server1" "server1" "server1"
-          "server2" "server2" "server2"
           "server2" "server2" "server2"
           "server2" "server2" "server2"
           "server2" "server2" "server2"
           "server3" "server3" "server3"
-          "server3" "server3" "server3"
+          "server3" "server1" "server1"
+          "server1" "server3" "server3"
           "server1" "server1"
         )
 
-for i in {0..31}
+for i in {0..23}
 do
     res=$($hexec l3h1 curl --max-time 10 -s 20.20.20.1:2020)
     echo $i:$res

From daf7122df2959c5bb3f03bc2cf20a2b6e9835560 Mon Sep 17 00:00:00 2001
From: Trekkie Coder <trekkie@netlox.io>
Date: Tue, 24 Dec 2024 10:04:29 +0900
Subject: [PATCH 5/5] gh-877 Initial support for egress: fixed some cicd cases

---
 cicd/tcplbmaxep/config.sh     |  3 ++-
 cicd/tcplbmaxep/validation.sh | 21 +++++++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/cicd/tcplbmaxep/config.sh b/cicd/tcplbmaxep/config.sh
index b5285bd9..84705d08 100755
--- a/cicd/tcplbmaxep/config.sh
+++ b/cicd/tcplbmaxep/config.sh
@@ -51,4 +51,5 @@ sleep 5
 
 #configure LB
 
-create_lb_rule llb1 20.20.20.1 --tcp=2020:8080 --endpoints=35.1.1.1:1,35.1.2.1:1,35.1.3.1:1,35.1.4.1:1,35.1.5.1:1,35.1.6.1:1,35.1.7.1:1,35.1.8.1:1,35.2.1.1:1,35.2.2.1:1,35.2.3.1:1,35.2.4.1:1,35.2.5.1:1,35.2.6.1:1,35.2.7.1:1,35.2.8.1:1,35.3.1.1:1,35.3.2.1:1,35.3.3.1:1,35.3.4.1:1,35.3.5.1:1,35.3.6.1:1,35.3.7.1:1,35.3.8.1:1,35.4.1.1:1,35.4.2.1:1,35.4.3.1:1,35.4.4.1:1,35.4.5.1:1,35.4.6.1:1,35.4.7.1:1,35.4.8.1:1
+#create_lb_rule llb1 20.20.20.1 --tcp=2020:8080 --endpoints=35.1.1.1:1,35.1.2.1:1,35.1.3.1:1,35.1.4.1:1,35.1.5.1:1,35.1.6.1:1,35.1.7.1:1,35.1.8.1:1,35.2.1.1:1,35.2.2.1:1,35.2.3.1:1,35.2.4.1:1,35.2.5.1:1,35.2.6.1:1,35.2.7.1:1,35.2.8.1:1,35.3.1.1:1,35.3.2.1:1,35.3.3.1:1,35.3.4.1:1,35.3.5.1:1,35.3.6.1:1,35.3.7.1:1,35.3.8.1:1,35.4.1.1:1,35.4.2.1:1,35.4.3.1:1,35.4.4.1:1,35.4.5.1:1,35.4.6.1:1,35.4.7.1:1,35.4.8.1:1
+create_lb_rule llb1 20.20.20.1 --tcp=2020:8080 --endpoints=35.1.1.1:1,35.1.2.1:1,35.1.3.1:1,35.1.4.1:1,35.1.5.1:1,35.1.6.1:1,35.1.7.1:1,35.1.8.1:1,35.2.1.1:1,35.2.2.1:1,35.2.3.1:1,35.2.4.1:1,35.2.5.1:1,35.2.6.1:1,35.2.7.1:1,35.2.8.1:1,35.3.1.1:1,35.3.2.1:1,35.3.3.1:1,35.3.4.1:1,35.3.5.1:1,35.3.6.1:1,35.3.7.1:1,35.3.8.1:1
diff --git a/cicd/tcplbmaxep/validation.sh b/cicd/tcplbmaxep/validation.sh
index f528dabe..e5481c69 100755
--- a/cicd/tcplbmaxep/validation.sh
+++ b/cicd/tcplbmaxep/validation.sh
@@ -10,19 +10,20 @@ sleep 5
 code=0
 servIP=( "20.20.20.1" )
 servArr=(
-          "server1" "server2" "server3" "server4" 
-          "server1" "server2" "server3" "server4" 
-          "server1" "server2" "server3" "server4" 
-          "server1" "server2" "server3" "server4" 
-          "server1" "server2" "server3" "server4" 
-          "server1" "server2" "server3" "server4" 
-          "server1" "server2" "server3" "server4" 
-          "server1" "server2" "server3" "server4" 
+          "server1" "server2" "server3" 
+          "server1" "server2" "server3"
+          "server1" "server2" "server3"
+          "server1" "server2" "server3"
+          "server1" "server2" "server3"
+          "server1" "server2" "server3"
+          "server1" "server2" "server3"
+          "server1" "server2" "server3"
         )
+#ep=( "31.31.31.1" "32.32.32.1" "33.33.33.1" "34.34.34.1" )
 ep=( "31.31.31.1" "32.32.32.1" "33.33.33.1" "34.34.34.1" )
 j=0
 waitCount=0
-while [ $j -le 3 ]
+while [ $j -le 2 ]
 do
     res=$($hexec l3h1 curl --max-time 10 -s ${ep[j]}:8080)
     #echo $res
@@ -46,7 +47,7 @@ done
 
 echo "Testing Service IP: ${servIP[0]}"
 lcode=0
-for i in {0..31}
+for i in {0..23}
 do
   res=$($hexec l3h1 curl --max-time 10 -s ${servIP[0]}:2020)
   echo $res