[PATCH v7] net/ice: fix ice dcf control thread crash

Liao, TingtingX tingtingx.liao at intel.com
Wed May 10 11:34:39 CEST 2023


> -----Original Message-----

> From: Mingjin Ye <mingjinx.ye at intel.com<mailto:mingjinx.ye at intel.com>>

> Sent: Tuesday, April 11, 2023 10:09 AM

> To: dev at dpdk.org<mailto:dev at dpdk.org>

> Cc: Yang, Qiming <qiming.yang at intel.com<mailto:qiming.yang at intel.com>>; stable at dpdk.org<mailto:stable at dpdk.org>; Zhou, YidingX <yidingx.zhou at intel.com<mailto:yidingx.zhou at intel.com>>; Ye, MingjinX <mingjinx.ye at intel.com<mailto:mingjinx.ye at intel.com>>; Zhang, Ke1X <ke1x.zhang at intel.com<mailto:ke1x.zhang at intel.com>>; Zhang, Qi Z <qi.z.zhang at intel.com<mailto:qi.z.zhang at intel.com>>

> Subject: [PATCH v7] net/ice: fix ice dcf control thread crash

>

> The control thread accesses the hardware resources after the resources were released, which results in a segment error.

>

> The 'ice-reset' threads are detached, so thread resources cannot be reclaimed by `pthread_join` calls.

>

> This commit synchronizes the number of "ice-reset" threads by adding a variable ("vsi_update_thread_num") to the "struct ice_dcf_hw" and performing an atomic operation on this variable. When releasing HW resources, we wait for the number of "ice-reset" threads to be reduced to 0 before releasing the resources.

>

> Fixes: c7e1a1a3bfeb ("net/ice: refactor DCF VLAN handling")

> Fixes: 3b3757bda3c3 ("net/ice: get VF hardware index in DCF")

> Fixes: 7564d5509611 ("net/ice: add DCF hardware initialization")

> Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF")

> Cc: stable at dpdk.org<mailto:stable at dpdk.org>

>

> Signed-off-by: Ke Zhang <ke1x.zhang at intel.com<mailto:ke1x.zhang at intel.com>>

> Signed-off-by: Mingjin Ye <mingjinx.ye at intel.com<mailto:mingjinx.ye at intel.com>>



Tested-by: Tingting Liao <tingtingx.liao at intel.com<mailto:tingtingx.liao at intel.com>>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/stable/attachments/20230510/f8da82d5/attachment.htm>


More information about the stable mailing list