Commit 4181b39a authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2023-04-04 (ice)

This series contains updates to ice driver only.

Simei adjusts error path on adding VF Flow Director filters that were
not releasing all resources.

Lingyu adds setting/resetting of VF Flow Director filters counters
during initialization.

* '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  ice: Reset FDIR counter in FDIR init stage
  ice: fix wrong fallback logic for FDIR
====================

Link: https://lore.kernel.org/r/20230404172306.450880-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 3ce93455 83c911dc
...@@ -541,6 +541,21 @@ static void ice_vc_fdir_rem_prof_all(struct ice_vf *vf) ...@@ -541,6 +541,21 @@ static void ice_vc_fdir_rem_prof_all(struct ice_vf *vf)
} }
} }
/**
* ice_vc_fdir_reset_cnt_all - reset all FDIR counters for this VF FDIR
* @fdir: pointer to the VF FDIR structure
*/
static void ice_vc_fdir_reset_cnt_all(struct ice_vf_fdir *fdir)
{
enum ice_fltr_ptype flow;
for (flow = ICE_FLTR_PTYPE_NONF_NONE;
flow < ICE_FLTR_PTYPE_MAX; flow++) {
fdir->fdir_fltr_cnt[flow][0] = 0;
fdir->fdir_fltr_cnt[flow][1] = 0;
}
}
/** /**
* ice_vc_fdir_has_prof_conflict * ice_vc_fdir_has_prof_conflict
* @vf: pointer to the VF structure * @vf: pointer to the VF structure
...@@ -1871,7 +1886,7 @@ int ice_vc_add_fdir_fltr(struct ice_vf *vf, u8 *msg) ...@@ -1871,7 +1886,7 @@ int ice_vc_add_fdir_fltr(struct ice_vf *vf, u8 *msg)
v_ret = VIRTCHNL_STATUS_SUCCESS; v_ret = VIRTCHNL_STATUS_SUCCESS;
stat->status = VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE; stat->status = VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE;
dev_dbg(dev, "VF %d: set FDIR context failed\n", vf->vf_id); dev_dbg(dev, "VF %d: set FDIR context failed\n", vf->vf_id);
goto err_free_conf; goto err_rem_entry;
} }
ret = ice_vc_fdir_write_fltr(vf, conf, true, is_tun); ret = ice_vc_fdir_write_fltr(vf, conf, true, is_tun);
...@@ -1880,15 +1895,16 @@ int ice_vc_add_fdir_fltr(struct ice_vf *vf, u8 *msg) ...@@ -1880,15 +1895,16 @@ int ice_vc_add_fdir_fltr(struct ice_vf *vf, u8 *msg)
stat->status = VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE; stat->status = VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE;
dev_err(dev, "VF %d: writing FDIR rule failed, ret:%d\n", dev_err(dev, "VF %d: writing FDIR rule failed, ret:%d\n",
vf->vf_id, ret); vf->vf_id, ret);
goto err_rem_entry; goto err_clr_irq;
} }
exit: exit:
kfree(stat); kfree(stat);
return ret; return ret;
err_rem_entry: err_clr_irq:
ice_vc_fdir_clear_irq_ctx(vf); ice_vc_fdir_clear_irq_ctx(vf);
err_rem_entry:
ice_vc_fdir_remove_entry(vf, conf, conf->flow_id); ice_vc_fdir_remove_entry(vf, conf, conf->flow_id);
err_free_conf: err_free_conf:
devm_kfree(dev, conf); devm_kfree(dev, conf);
...@@ -1997,6 +2013,7 @@ void ice_vf_fdir_init(struct ice_vf *vf) ...@@ -1997,6 +2013,7 @@ void ice_vf_fdir_init(struct ice_vf *vf)
spin_lock_init(&fdir->ctx_lock); spin_lock_init(&fdir->ctx_lock);
fdir->ctx_irq.flags = 0; fdir->ctx_irq.flags = 0;
fdir->ctx_done.flags = 0; fdir->ctx_done.flags = 0;
ice_vc_fdir_reset_cnt_all(fdir);
} }
/** /**
......
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