提交 41dee78e 编写于 作者: J Jedrzej Jagielski 提交者: Yang Yingliang

i40e: Fix log TC creation failure when max num of queues is exceeded

stable inclusion
from linux-4.19.201
commit 498d7ab105ed4e853065ddc64b2da11e971c0dc0

--------------------------------

[ Upstream commit ea52faae ]

Fix missing failed message if driver does not have enough queues to
complete TC command. Without this fix no message is displayed in dmesg.

Fixes: a9ce82f7 ("i40e: Enable 'channel' mode in mqprio for TC configs")
Signed-off-by: NGrzegorz Szczurek <grzegorzx.szczurek@intel.com>
Signed-off-by: NJedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: NImam Hassan Reza Biswas <imam.hassan.reza.biswas@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 19fc190e
...@@ -6762,6 +6762,8 @@ static int i40e_validate_mqprio_qopt(struct i40e_vsi *vsi, ...@@ -6762,6 +6762,8 @@ static int i40e_validate_mqprio_qopt(struct i40e_vsi *vsi,
} }
if (vsi->num_queue_pairs < if (vsi->num_queue_pairs <
(mqprio_qopt->qopt.offset[i] + mqprio_qopt->qopt.count[i])) { (mqprio_qopt->qopt.offset[i] + mqprio_qopt->qopt.count[i])) {
dev_err(&vsi->back->pdev->dev,
"Failed to create traffic channel, insufficient number of queues.\n");
return -EINVAL; return -EINVAL;
} }
if (sum_max_rate > i40e_get_link_speed(vsi)) { if (sum_max_rate > i40e_get_link_speed(vsi)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册