i40e: Add a FD flush counter to ethtool

This helps know how many times the interface had to flush and replay FD
filter table, which gives an indication on how often we are getting FD
table full situation.

Also check on certain pf states before proceeding to add or delete
filters since we can't add or delete filters if we are in those states.

Change-ID: I97f5bbbea7146833ea61af0e08ea794fccba1780
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index cab9c9e..712a23b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -5189,6 +5189,7 @@
 		wr32(&pf->hw, I40E_PFQF_CTL_1,
 		     I40E_PFQF_CTL_1_CLEARFDTABLE_MASK);
 		i40e_flush(&pf->hw);
+		pf->fd_flush_cnt++;
 		pf->fd_add_err = 0;
 		do {
 			/* Check FD flush status every 5-6msec */