]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
dpdk: separate i40e prestop actions from DPKD 19.11
authorLukas Sismis <lsismis@oisf.net>
Fri, 2 Jun 2023 13:59:52 +0000 (15:59 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 5 Jun 2023 09:07:02 +0000 (11:07 +0200)
In DPDK 19.11 Suricata does not setup RSS on i40e driver
with rte_flow. As a result, it should not be deinitializing
RSS configuration with rte_flow as well.

src/source-dpdk.c

index 14dd9f807125d5265a880145fa325de4bfe25d7d..18bfe7bb69c6521cd98382c182c3be1859a83449 100644 (file)
@@ -202,16 +202,16 @@ static void DevicePostStartPMDSpecificActions(DPDKThreadVars *ptv, const char *d
 
 static void DevicePreStopPMDSpecificActions(DPDKThreadVars *ptv, const char *driver_name)
 {
-    int retval;
-
     if (strcmp(driver_name, "net_i40e") == 0) {
+#if RTE_VERSION > RTE_VERSION_NUM(20, 0, 0, 0)
         // Flush the RSS rules that have been inserted in the post start section
         struct rte_flow_error flush_error = { 0 };
-        retval = rte_flow_flush(ptv->port_id, &flush_error);
+        int32_t retval = rte_flow_flush(ptv->port_id, &flush_error);
         if (retval != 0) {
             SCLogError("Unable to flush rte_flow rules: %s Flush error msg: %s",
                     rte_strerror(-retval), flush_error.message);
         }
+#endif /* RTE_VERSION > RTE_VERSION_NUM(20, 0, 0, 0) */
     }
 }