summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQi Zhang <qi.z.zhang@intel.com>2019-03-25 13:44:42 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-29 17:25:31 +0100
commitfcbf52eaaf2fae93bff26d1d48967b31c6fdfc81 (patch)
tree369ec6866a4578348b56345f9f72e6540f0ed582 /drivers
parentf0c38010536931377da5f9e99ecbc916e2cc78a0 (diff)
downloaddpdk-next-eventdev-fcbf52eaaf2fae93bff26d1d48967b31c6fdfc81.zip
dpdk-next-eventdev-fcbf52eaaf2fae93bff26d1d48967b31c6fdfc81.tar.gz
dpdk-next-eventdev-fcbf52eaaf2fae93bff26d1d48967b31c6fdfc81.tar.xz
net/ice/base: return config error without queue to disable
If there is no queue to disable, return appropriate configuration error earlier without acquiring the lock. Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ice/base/ice_common.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 2362dd7..c35a2f9 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -3654,14 +3654,17 @@ ice_dis_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_queues,
if (!pi || pi->port_state != ICE_SCHED_PORT_STATE_READY)
return ICE_ERR_CFG;
- /* if queue is disabled already yet the disable queue command has to be
- * sent to complete the VF reset, then call ice_aq_dis_lan_txq without
- * any queue information
- */
- if (!num_queues && rst_src)
- return ice_aq_dis_lan_txq(pi->hw, 0, NULL, 0, rst_src, vmvf_num,
- NULL);
+ if (!num_queues) {
+ /* if queue is disabled already yet the disable queue command
+ * has to be sent to complete the VF reset, then call
+ * ice_aq_dis_lan_txq without any queue information
+ */
+ if (rst_src)
+ return ice_aq_dis_lan_txq(pi->hw, 0, NULL, 0, rst_src,
+ vmvf_num, NULL);
+ return ICE_ERR_CFG;
+ }
ice_acquire_lock(&pi->sched_lock);