From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 86DEFA0588; Thu, 16 Apr 2020 17:47:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 386831C1E3; Thu, 16 Apr 2020 17:47:48 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 363631D152; Thu, 16 Apr 2020 17:47:46 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03GFV0nw014551; Thu, 16 Apr 2020 08:47:45 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=KG5Mg4OaZB49kj8QOFVV7SoYdhNKkjDVQNJEDlrKxQ0=; b=KPx9Qe0KZ8gWbefXYiG0ghIrM97jGQ0zPOxmmjDJO9Eou+1rLDpjP9vbUPWse/89nNHz 2Cws3JODJ7IswbrbgGvA3g8bSUXCTqMPd1OOSjcfq+pcv+1kqy3xjEZvKVTmwz1uMaAD WHLkhH6eDQpr/u9uhVdEVi/GYczfOg1ot0EJ2gzq+ie4ukxOg0qCymnRSx/bekxb1gXx R/5zs8vnnQMTGCq+w9ldTG3OmmNVcSK5xUhsy1aYzVAiU4nH5ET5RhR51x9AYZTfPx4b RB9SghHi+yoekhkU7L1kVa+YEGrtRtGeYbHGdy5cMu0k+1DPpw4BXM1IxYPpsmPWFX4D 2g== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 30dn8gqnw1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 16 Apr 2020 08:47:45 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 16 Apr 2020 08:47:43 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 16 Apr 2020 08:47:43 -0700 Received: from luke.marvell.com (unknown [10.95.130.158]) by maili.marvell.com (Postfix) with ESMTP id 0225B3F703F; Thu, 16 Apr 2020 08:47:41 -0700 (PDT) From: Lukasz Bartosik To: , CC: , , , Date: Thu, 16 Apr 2020 17:47:40 +0200 Message-ID: <1587052060-22042-1-git-send-email-lbartosik@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1587043415-10955-1-git-send-email-lbartosik@marvell.com> References: <1587043415-10955-1-git-send-email-lbartosik@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-16_06:2020-04-14, 2020-04-16 signatures=0 Subject: [dpdk-dev] [PATCH v2] event/octeontx2: fix queue removal from Rx adapter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When eth port queue is removed from Rx adapter using rte_event_eth_rx_adapter_queue_del() it incorrectly initializes CQ context instead of modifying it. This might lead to a crash when CQ context is modified as a part of rte_eth_dev_stop() sequence as CQ will hold invalid entries. This is responsibility of an application to call rte_event_eth_rx_adapter_queue_del() to remove eth port queue from Rx adapter in tear down sequence. Fixes: 37720fc1fba8 ("event/octeontx2: add Rx adapter") Cc: stable@dpdk.org Signed-off-by: Lukasz Bartosik --- drivers/event/octeontx2/otx2_evdev_adptr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/event/octeontx2/otx2_evdev_adptr.c b/drivers/event/octeontx2/otx2_evdev_adptr.c index 233cba2..8bdcfa3 100644 --- a/drivers/event/octeontx2/otx2_evdev_adptr.c +++ b/drivers/event/octeontx2/otx2_evdev_adptr.c @@ -133,7 +133,7 @@ sso_rxq_disable(struct otx2_eth_dev *dev, uint16_t qid) aq = otx2_mbox_alloc_msg_nix_aq_enq(mbox); aq->qidx = qid; aq->ctype = NIX_AQ_CTYPE_CQ; - aq->op = NIX_AQ_INSTOP_INIT; + aq->op = NIX_AQ_INSTOP_WRITE; aq->cq.ena = 1; aq->cq.caching = 1; @@ -144,7 +144,7 @@ sso_rxq_disable(struct otx2_eth_dev *dev, uint16_t qid) rc = otx2_mbox_process(mbox); if (rc < 0) { - otx2_err("Failed to init cq context"); + otx2_err("Failed to enable cq context"); goto fail; } -- 2.7.4