diff options
author | Maciej Fijalkowski <maciej.fijalkowski@intel.com> | 2019-02-28 18:25:52 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-05-02 04:08:00 -0400 |
commit | a92e1bb6ade7526f0c2b7b462516b1941e965504 (patch) | |
tree | 39049c0d49109cc6fb8cac6c566b0847f2629fee /drivers/net/ethernet/intel/ice/ice_lib.c | |
parent | 1553f4f77a495b4e78f7083f1f8341bef6dbe9c7 (diff) |
ice: Validate ring existence and its q_vector per VSI
When stopping Tx rings, we use 'i' as an ring array index for looking up
whether the ice_ring exists and have assigned a q_vector. This checks
rings only within a given TC and we need to go through every ring in
VSI. Use 'q_idx' instead.
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 61bb9e92f6ce..57b2873a6123 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c | |||
@@ -2072,7 +2072,8 @@ ice_vsi_stop_tx_rings(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src, | |||
2072 | for (i = 0; i < vsi->tc_cfg.tc_info[tc].qcount_tx; i++) { | 2072 | for (i = 0; i < vsi->tc_cfg.tc_info[tc].qcount_tx; i++) { |
2073 | u16 v_idx; | 2073 | u16 v_idx; |
2074 | 2074 | ||
2075 | if (!rings || !rings[i] || !rings[i]->q_vector) { | 2075 | if (!rings || !rings[q_idx] || |
2076 | !rings[q_idx]->q_vector) { | ||
2076 | err = -EINVAL; | 2077 | err = -EINVAL; |
2077 | goto err_out; | 2078 | goto err_out; |
2078 | } | 2079 | } |