Skip to content

Commit

Permalink
net/ice/base: fix getting sched node from ID type
Browse files Browse the repository at this point in the history
[ upstream commit 8f7a83e ]

The function ice_sched_get_node_by_id_type needs to be called
with the scheduler lock held. However, the function
ice_sched_get_node also requests the scheduler lock.
It will cause the dead lock issue.

This patch replaces function ice_sched_get_node with
function ice_sched_find_node_by_teid to solve this problem.

Fixes: 93e84b1 ("net/ice/base: add basic Tx scheduler")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
Junewu7777 authored and kevintraynor committed Jun 8, 2022
1 parent 5115fe4 commit 447908e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ice/base/ice_sched.c
Expand Up @@ -4774,12 +4774,12 @@ ice_sched_get_node_by_id_type(struct ice_port_info *pi, u32 id,

case ICE_AGG_TYPE_Q:
/* The current implementation allows single queue to modify */
node = ice_sched_get_node(pi, id);
node = ice_sched_find_node_by_teid(pi->root, id);
break;

case ICE_AGG_TYPE_QG:
/* The current implementation allows single qg to modify */
child_node = ice_sched_get_node(pi, id);
child_node = ice_sched_find_node_by_teid(pi->root, id);
if (!child_node)
break;
node = child_node->parent;
Expand Down

0 comments on commit 447908e

Please sign in to comment.