Commit 89132783 authored by Anjali Singhai Jain's avatar Anjali Singhai Jain Committed by Jeff Kirsher

i40e: Use the new i40e_get_fd_cnt_all function in other places

We have a function to calculate this, so update the code to use the function.

Change-ID: Ia345b6fe6ec7f0b2dcf1199471b0d0f959ad3908
Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 082def10
...@@ -4712,8 +4712,7 @@ void i40e_fdir_check_and_reenable(struct i40e_pf *pf) ...@@ -4712,8 +4712,7 @@ void i40e_fdir_check_and_reenable(struct i40e_pf *pf)
(pf->flags & I40E_FLAG_FD_SB_ENABLED)) (pf->flags & I40E_FLAG_FD_SB_ENABLED))
return; return;
fcnt_prog = i40e_get_current_fd_count(pf); fcnt_prog = i40e_get_current_fd_count(pf);
fcnt_avail = pf->hw.fdir_shared_filter_count + fcnt_avail = i40e_get_fd_cnt_all(pf);
pf->fdir_pf_filter_count;
if (fcnt_prog < (fcnt_avail - I40E_FDIR_BUFFER_HEAD_ROOM)) { if (fcnt_prog < (fcnt_avail - I40E_FDIR_BUFFER_HEAD_ROOM)) {
if ((pf->flags & I40E_FLAG_FD_SB_ENABLED) && if ((pf->flags & I40E_FLAG_FD_SB_ENABLED) &&
(pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED)) { (pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED)) {
......
...@@ -451,9 +451,7 @@ static void i40e_fd_handle_status(struct i40e_ring *rx_ring, ...@@ -451,9 +451,7 @@ static void i40e_fd_handle_status(struct i40e_ring *rx_ring,
/* filter programming failed most likely due to table full */ /* filter programming failed most likely due to table full */
fcnt_prog = i40e_get_current_fd_count(pf); fcnt_prog = i40e_get_current_fd_count(pf);
fcnt_avail = pf->hw.fdir_shared_filter_count + fcnt_avail = i40e_get_fd_cnt_all(pf);
pf->fdir_pf_filter_count;
/* If ATR is running fcnt_prog can quickly change, /* If ATR is running fcnt_prog can quickly change,
* if we are very close to full, it makes sense to disable * if we are very close to full, it makes sense to disable
* FD ATR/SB and then re-enable it when there is room. * FD ATR/SB and then re-enable it when there is room.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment