return;
 
        /* Reset FDir counters as we're replaying all existing filters */
-       pf->fd_tcp_rule = 0;
+       pf->fd_tcp4_filter_cnt = 0;
+       pf->fd_udp4_filter_cnt = 0;
+       pf->fd_ip4_filter_cnt = 0;
 
        hlist_for_each_entry_safe(filter, node,
                                  &pf->fdir_filter_list, fdir_node) {
        /* replay FDIR SB filters */
        if (vsi->type == I40E_VSI_FDIR) {
                /* reset fd counters */
-               pf->fd_add_err = pf->fd_atr_cnt = 0;
+               pf->fd_add_err = 0;
+               pf->fd_atr_cnt = 0;
                i40e_fdir_filter_restore(vsi);
        }
 
                hlist_del(&filter->fdir_node);
                kfree(filter);
        }
+
        pf->fdir_pf_active_filters = 0;
+       pf->fd_tcp4_filter_cnt = 0;
+       pf->fd_udp4_filter_cnt = 0;
+       pf->fd_ip4_filter_cnt = 0;
 }
 
 /**
        if (fcnt_prog < (fcnt_avail - I40E_FDIR_BUFFER_HEAD_ROOM * 2)) {
                if ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&
                    (pf->hw_disabled_flags & I40E_FLAG_FD_ATR_ENABLED) &&
-                   (pf->fd_tcp_rule == 0)) {
+                   (pf->fd_tcp4_filter_cnt == 0)) {
                        pf->hw_disabled_flags &= ~I40E_FLAG_FD_ATR_ENABLED;
                        if (I40E_DEBUG_FD & pf->hw.debug_mask)
                                dev_info(&pf->pdev->dev, "ATR is being enabled since we have space in the table and there are no conflicting ntuple rules\n");
        } else {
                /* replay sideband filters */
                i40e_fdir_filter_restore(pf->vsi[pf->lan_vsi]);
-               if (!disable_atr && !pf->fd_tcp_rule)
+               if (!disable_atr && !pf->fd_tcp4_filter_cnt)
                        pf->hw_disabled_flags &= ~I40E_FLAG_FD_ATR_ENABLED;
                clear_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state);
                if (I40E_DEBUG_FD & pf->hw.debug_mask)
                pf->flags &= ~I40E_FLAG_FD_SB_ENABLED;
                pf->hw_disabled_flags &= ~I40E_FLAG_FD_SB_ENABLED;
                /* reset fd counters */
-               pf->fd_add_err = pf->fd_atr_cnt = pf->fd_tcp_rule = 0;
-               pf->fdir_pf_active_filters = 0;
+               pf->fd_add_err = 0;
+               pf->fd_atr_cnt = 0;
                /* if ATR was auto disabled it can be re-enabled. */
                if ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&
                    (pf->hw_disabled_flags & I40E_FLAG_FD_ATR_ENABLED)) {
 
                                 fd_data->pctype, fd_data->fd_id);
        }
 
+       if (add)
+               pf->fd_udp4_filter_cnt++;
+       else
+               pf->fd_udp4_filter_cnt--;
+
        return 0;
 }
 
        }
 
        if (add) {
-               pf->fd_tcp_rule++;
+               pf->fd_tcp4_filter_cnt++;
                if ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&
                    I40E_DEBUG_FD & pf->hw.debug_mask)
                        dev_info(&pf->pdev->dev, "Forcing ATR off, sideband rules for TCP/IPv4 flow being applied\n");
                pf->hw_disabled_flags |= I40E_FLAG_FD_ATR_ENABLED;
        } else {
-               pf->fd_tcp_rule = (pf->fd_tcp_rule > 0) ?
-                                 (pf->fd_tcp_rule - 1) : 0;
-               if (pf->fd_tcp_rule == 0) {
+               pf->fd_tcp4_filter_cnt--;
+               if (pf->fd_tcp4_filter_cnt == 0) {
                        if ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&
                            I40E_DEBUG_FD & pf->hw.debug_mask)
                                dev_info(&pf->pdev->dev, "ATR re-enabled due to no sideband TCP/IPv4 rules\n");
                }
        }
 
+       if (add)
+               pf->fd_ip4_filter_cnt++;
+       else
+               pf->fd_ip4_filter_cnt--;
+
        return 0;
 }