]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Show that asic offload works in the fpm testing
authorDonald Sharp <sharpd@nvidia.com>
Thu, 30 Jan 2025 14:53:09 +0000 (09:53 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 31 Jan 2025 20:05:40 +0000 (15:05 -0500)
The fpm_testing_topo1 didn't turn on the fpm_listener
sending the routes back to zebra to set the asic offload.

Modify the test to tell the fpm_listener to set the offloaded
flag and reflect the route back to the dplane_fpm_nl.c code.
Also modify zebra to expect a response to the underlying fpm listener.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/fpm_testing_topo1/r1/routes_summ.json
tests/topotests/fpm_testing_topo1/r1/routes_summ_removed.json
tests/topotests/fpm_testing_topo1/test_fpm_topo1.py

index e9157bc664e17ef9517f404b229ccf2fa94ce185..12fe32cab354ed6d1f1ba3b38e022a296e3562fa 100644 (file)
@@ -3,21 +3,21 @@
     {
       "fib":1,
       "rib":1,
-      "fibOffLoaded":0,
+      "fibOffLoaded":1,
       "fibTrapped":0,
       "type":"connected"
     },
     {
       "fib":1,
       "rib":1,
-      "fibOffLoaded":0,
+      "fibOffLoaded":1,
       "fibTrapped":0,
       "type":"local"
     },
     {
       "fib":10000,
       "rib":10000,
-      "fibOffLoaded":0,
+      "fibOffLoaded":10000,
       "fibTrapped":0,
       "type":"sharp"
     }
index 8585b2bb6b7c3a76c548c3ba8be60132dc09beb1..15d3f710777786b46d6391a12878f38c472981b2 100644 (file)
@@ -3,14 +3,14 @@
     {
       "fib":1,
       "rib":1,
-      "fibOffLoaded":0,
+      "fibOffLoaded":1,
       "fibTrapped":0,
       "type":"connected"
     },
     {
       "fib":1,
       "rib":1,
-      "fibOffLoaded":0,
+      "fibOffLoaded":1,
       "fibTrapped":0,
       "type":"local"
     }
index 66cefcc2a06f0bc57604cd869423f8f463625506..b3c375549a50809ef419d7f3a616e3b8d0df490b 100644 (file)
@@ -57,7 +57,7 @@ def setup_module(module):
         router.load_config(
             TopoRouter.RD_ZEBRA,
             os.path.join(CWD, "{}/zebra.conf".format(rname)),
-            "-M dplane_fpm_nl",
+            "-M dplane_fpm_nl --asic-offload=notify_on_offload",
         )
         router.load_config(
             TopoRouter.RD_SHARP, os.path.join(CWD, "{}/sharpd.conf".format(rname))
@@ -65,6 +65,7 @@ def setup_module(module):
         router.load_config(
             TopoRouter.RD_FPM_LISTENER,
             os.path.join(CWD, "{}/fpm_stub.conf".format(rname)),
+            "-r",
         )
 
     tgen.start_router()
@@ -111,7 +112,7 @@ def test_fpm_install_routes():
         topotest.router_json_cmp, router, "show ip route summ json", expected
     )
 
-    success, result = topotest.run_and_expect(test_func, None, 60, 1)
+    success, result = topotest.run_and_expect(test_func, None, 120, 1)
     assert success, "Unable to successfully install 10000 routes: {}".format(result)
 
     # Let's remove 10000 routes
@@ -124,7 +125,7 @@ def test_fpm_install_routes():
         topotest.router_json_cmp, router, "show ip route summ json", expected
     )
 
-    success, result = topotest.run_and_expect(test_func, None, 60, 1)
+    success, result = topotest.run_and_expect(test_func, None, 120, 1)
     assert success, "Unable to remove 10000 routes: {}".format(result)