From: Haiyue Wang Date: Thu, 21 Jan 2021 17:31:37 +0000 (+0800) Subject: net/ice: drain out DCF AdminQ command queue X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5d4ca9b0a23585b1fb8d71d7af34fba26369cbea;p=dpdk.git net/ice: drain out DCF AdminQ command queue The virtchnl message is handled one by one by checking opcode to match the response for the request. The DCF AdminQ command with buffer needs two virtchnl commands, one is to handle the AdminQ descriptor, the other is to the handle AdminQ buffer. If both of them are sent to PF successfully, it needs to wait two responses from PF, even if the AdminQ descriptor command gets the failure response. Since PF will handle them one by one, and send back the response for each. If not wait for the buffer message response until timeout to drain out the virtchnl command queue, it will cause the next AdminQ command with buffer to get the stall buffer response from previous. Fixes: daa714d55c72 ("net/ice: handle AdminQ command by DCF") Cc: stable@dpdk.org Signed-off-by: Haiyue Wang Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c index dbe42fa3df..d72a6f357e 100644 --- a/drivers/net/ice/ice_dcf.c +++ b/drivers/net/ice/ice_dcf.c @@ -505,9 +505,7 @@ ice_dcf_send_aq_cmd(void *dcf_hw, struct ice_aq_desc *desc, } do { - if ((!desc_cmd.pending && !buff_cmd.pending) || - (!desc_cmd.pending && desc_cmd.v_ret != IAVF_SUCCESS) || - (!buff_cmd.pending && buff_cmd.v_ret != IAVF_SUCCESS)) + if (!desc_cmd.pending && !buff_cmd.pending) break; rte_delay_ms(ICE_DCF_ARQ_CHECK_TIME);