net/iavf: fix flow director after queue reconfigured
authorLeyi Rong <leyi.rong@intel.com>
Wed, 20 May 2020 06:39:50 +0000 (14:39 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 21 May 2020 13:53:14 +0000 (15:53 +0200)
FDIR ID parsing will not be handled correctly after queue reconfigured,
enable FDIR ID parsing per Q regardless of fdir_ref_cnt to fix it.

Fixes: f71dbf852d46 ("net/iavf: add flow director enabled switch value")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/iavf/iavf_rxtx.h

index 7396884..59625a9 100644 (file)
@@ -509,8 +509,8 @@ void iavf_fdir_rx_proc_enable(struct iavf_adapter *ad, bool on)
 {
        if (on) {
                /* enable flow director processing */
-               if (ad->fdir_ref_cnt++ == 0)
-                       FDIR_PROC_ENABLE_PER_QUEUE(ad, on);
+               FDIR_PROC_ENABLE_PER_QUEUE(ad, on);
+               ad->fdir_ref_cnt++;
        } else {
                if (ad->fdir_ref_cnt >= 1) {
                        ad->fdir_ref_cnt--;