]> git.droids-corp.org - dpdk.git/commitdiff
net/ice/base: fix getting sched node from ID type
authorWenjun Wu <wenjun1.wu@intel.com>
Tue, 17 May 2022 05:09:26 +0000 (13:09 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 18 May 2022 04:22:43 +0000 (06:22 +0200)
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: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")
Cc: stable@dpdk.org
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/base/ice_sched.c

index 2620892c9e47fef9fd981d20d8954f96c460b813..e697c579be218d2d6d012c19bdafa401a4567f63 100644 (file)
@@ -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;