diff options
author | Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> | 2018-09-19 20:23:13 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-10-02 10:13:23 -0400 |
commit | 4fb33f3107e194793bf947183f29ddce5d80a19f (patch) | |
tree | 28180a6f6d72085556a16f950ae60af85149db5d /drivers/net/ethernet/intel/ice/ice_main.c | |
parent | 5726ca0e5eaad0f194979e66c29c1d22029f1041 (diff) |
ice: Expand use of VSI handles part 2/2
This patch is a continuation of the previous patch where VSI
handles are used instead of VSI numbers.
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_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_main.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 5fc5455e3a4d..49fd5911fdc4 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c | |||
@@ -253,7 +253,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
253 | clear_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags); | 253 | clear_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags); |
254 | if (vsi->current_netdev_flags & IFF_PROMISC) { | 254 | if (vsi->current_netdev_flags & IFF_PROMISC) { |
255 | /* Apply TX filter rule to get traffic from VMs */ | 255 | /* Apply TX filter rule to get traffic from VMs */ |
256 | status = ice_cfg_dflt_vsi(hw, vsi->vsi_num, true, | 256 | status = ice_cfg_dflt_vsi(hw, vsi->idx, true, |
257 | ICE_FLTR_TX); | 257 | ICE_FLTR_TX); |
258 | if (status) { | 258 | if (status) { |
259 | netdev_err(netdev, "Error setting default VSI %i tx rule\n", | 259 | netdev_err(netdev, "Error setting default VSI %i tx rule\n", |
@@ -263,7 +263,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
263 | goto out_promisc; | 263 | goto out_promisc; |
264 | } | 264 | } |
265 | /* Apply RX filter rule to get traffic from wire */ | 265 | /* Apply RX filter rule to get traffic from wire */ |
266 | status = ice_cfg_dflt_vsi(hw, vsi->vsi_num, true, | 266 | status = ice_cfg_dflt_vsi(hw, vsi->idx, true, |
267 | ICE_FLTR_RX); | 267 | ICE_FLTR_RX); |
268 | if (status) { | 268 | if (status) { |
269 | netdev_err(netdev, "Error setting default VSI %i rx rule\n", | 269 | netdev_err(netdev, "Error setting default VSI %i rx rule\n", |
@@ -274,7 +274,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
274 | } | 274 | } |
275 | } else { | 275 | } else { |
276 | /* Clear TX filter rule to stop traffic from VMs */ | 276 | /* Clear TX filter rule to stop traffic from VMs */ |
277 | status = ice_cfg_dflt_vsi(hw, vsi->vsi_num, false, | 277 | status = ice_cfg_dflt_vsi(hw, vsi->idx, false, |
278 | ICE_FLTR_TX); | 278 | ICE_FLTR_TX); |
279 | if (status) { | 279 | if (status) { |
280 | netdev_err(netdev, "Error clearing default VSI %i tx rule\n", | 280 | netdev_err(netdev, "Error clearing default VSI %i tx rule\n", |
@@ -283,8 +283,8 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
283 | err = -EIO; | 283 | err = -EIO; |
284 | goto out_promisc; | 284 | goto out_promisc; |
285 | } | 285 | } |
286 | /* Clear filter RX to remove traffic from wire */ | 286 | /* Clear RX filter to remove traffic from wire */ |
287 | status = ice_cfg_dflt_vsi(hw, vsi->vsi_num, false, | 287 | status = ice_cfg_dflt_vsi(hw, vsi->idx, false, |
288 | ICE_FLTR_RX); | 288 | ICE_FLTR_RX); |
289 | if (status) { | 289 | if (status) { |
290 | netdev_err(netdev, "Error clearing default VSI %i rx rule\n", | 290 | netdev_err(netdev, "Error clearing default VSI %i rx rule\n", |
@@ -3310,7 +3310,7 @@ int ice_set_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size) | |||
3310 | struct ice_aqc_get_set_rss_keys *buf = | 3310 | struct ice_aqc_get_set_rss_keys *buf = |
3311 | (struct ice_aqc_get_set_rss_keys *)seed; | 3311 | (struct ice_aqc_get_set_rss_keys *)seed; |
3312 | 3312 | ||
3313 | status = ice_aq_set_rss_key(hw, vsi->vsi_num, buf); | 3313 | status = ice_aq_set_rss_key(hw, vsi->idx, buf); |
3314 | 3314 | ||
3315 | if (status) { | 3315 | if (status) { |
3316 | dev_err(&pf->pdev->dev, | 3316 | dev_err(&pf->pdev->dev, |
@@ -3321,8 +3321,8 @@ int ice_set_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size) | |||
3321 | } | 3321 | } |
3322 | 3322 | ||
3323 | if (lut) { | 3323 | if (lut) { |
3324 | status = ice_aq_set_rss_lut(hw, vsi->vsi_num, | 3324 | status = ice_aq_set_rss_lut(hw, vsi->idx, vsi->rss_lut_type, |
3325 | vsi->rss_lut_type, lut, lut_size); | 3325 | lut, lut_size); |
3326 | if (status) { | 3326 | if (status) { |
3327 | dev_err(&pf->pdev->dev, | 3327 | dev_err(&pf->pdev->dev, |
3328 | "Cannot set RSS lut, err %d aq_err %d\n", | 3328 | "Cannot set RSS lut, err %d aq_err %d\n", |
@@ -3353,7 +3353,7 @@ int ice_get_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size) | |||
3353 | struct ice_aqc_get_set_rss_keys *buf = | 3353 | struct ice_aqc_get_set_rss_keys *buf = |
3354 | (struct ice_aqc_get_set_rss_keys *)seed; | 3354 | (struct ice_aqc_get_set_rss_keys *)seed; |
3355 | 3355 | ||
3356 | status = ice_aq_get_rss_key(hw, vsi->vsi_num, buf); | 3356 | status = ice_aq_get_rss_key(hw, vsi->idx, buf); |
3357 | if (status) { | 3357 | if (status) { |
3358 | dev_err(&pf->pdev->dev, | 3358 | dev_err(&pf->pdev->dev, |
3359 | "Cannot get RSS key, err %d aq_err %d\n", | 3359 | "Cannot get RSS key, err %d aq_err %d\n", |
@@ -3363,8 +3363,8 @@ int ice_get_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size) | |||
3363 | } | 3363 | } |
3364 | 3364 | ||
3365 | if (lut) { | 3365 | if (lut) { |
3366 | status = ice_aq_get_rss_lut(hw, vsi->vsi_num, | 3366 | status = ice_aq_get_rss_lut(hw, vsi->idx, vsi->rss_lut_type, |
3367 | vsi->rss_lut_type, lut, lut_size); | 3367 | lut, lut_size); |
3368 | if (status) { | 3368 | if (status) { |
3369 | dev_err(&pf->pdev->dev, | 3369 | dev_err(&pf->pdev->dev, |
3370 | "Cannot get RSS lut, err %d aq_err %d\n", | 3370 | "Cannot get RSS lut, err %d aq_err %d\n", |