diff options
author | Anjali Singhai Jain <anjali.singhai@intel.com> | 2014-02-12 01:33:25 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-03-14 19:30:03 -0400 |
commit | 55a5e60b9f583f64a6c95cfe869dd2d65ae53a95 (patch) | |
tree | 769c369562564b3593c53c03b04de071cf9764d5 /drivers/net/ethernet/intel/i40e/i40e_ethtool.c | |
parent | 61dade7e9201162cba683cff103cebbdf06655d4 (diff) |
i40e: Add code to handle FD table full condition
Add code to enforce the following policy:
- If the HW reports filter programming error, we check if it's due to a
full table.
- If so, we go ahead and turn off new rule addition for ATR and then SB
in that order.
- We monitor the programmed filter count, if enough room is created due
to filter deletion/reset, we then re-enable SB and ATR new rule addition.
Change-ID: I69d24b29e5c45bc4fa861258e11c2fa7b8868748
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index 718a3e0f7de4..8ee224fdc1d1 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c | |||
@@ -1460,6 +1460,7 @@ static int i40e_del_fdir_entry(struct i40e_vsi *vsi, | |||
1460 | 1460 | ||
1461 | ret = i40e_update_ethtool_fdir_entry(vsi, NULL, fsp->location, cmd); | 1461 | ret = i40e_update_ethtool_fdir_entry(vsi, NULL, fsp->location, cmd); |
1462 | 1462 | ||
1463 | i40e_fdir_check_and_reenable(pf); | ||
1463 | return ret; | 1464 | return ret; |
1464 | } | 1465 | } |
1465 | 1466 | ||
@@ -1483,9 +1484,16 @@ static int i40e_add_del_fdir_ethtool(struct i40e_vsi *vsi, | |||
1483 | if (!vsi) | 1484 | if (!vsi) |
1484 | return -EINVAL; | 1485 | return -EINVAL; |
1485 | 1486 | ||
1486 | fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; | ||
1487 | pf = vsi->back; | 1487 | pf = vsi->back; |
1488 | 1488 | ||
1489 | if (!(pf->flags & I40E_FLAG_FD_SB_ENABLED)) | ||
1490 | return -EOPNOTSUPP; | ||
1491 | |||
1492 | if (add && (pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED)) | ||
1493 | return -ENOSPC; | ||
1494 | |||
1495 | fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; | ||
1496 | |||
1489 | if (fsp->location >= (pf->hw.func_caps.fd_filters_best_effort + | 1497 | if (fsp->location >= (pf->hw.func_caps.fd_filters_best_effort + |
1490 | pf->hw.func_caps.fd_filters_guaranteed)) { | 1498 | pf->hw.func_caps.fd_filters_guaranteed)) { |
1491 | return -EINVAL; | 1499 | return -EINVAL; |