net/i40e: support flow director space tracking
[dpdk.git] / drivers / net / i40e / i40e_flow.c
index 7cd5373..1f2da79 100644 (file)
@@ -17,6 +17,7 @@
 #include <rte_malloc.h>
 #include <rte_tailq.h>
 #include <rte_flow_driver.h>
+#include <rte_bitmap.h>
 
 #include "i40e_logs.h"
 #include "base/i40e_type.h"
@@ -5601,6 +5602,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
                        }
                }
 
+               fdir_info->fdir_actual_cnt = 0;
+               fdir_info->fdir_guarantee_free_space =
+                       fdir_info->fdir_guarantee_total_space;
+
                for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
                     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)
                        pf->fdir.inset_flag[pctype] = 0;