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 587F9A0588; Thu, 16 Apr 2020 15:24:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D08951DC8E; Thu, 16 Apr 2020 15:24:21 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id C23081DC8A for ; Thu, 16 Apr 2020 15:24:20 +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 03GDGe9r031827 for ; Thu, 16 Apr 2020 06:24:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=qmTBDAMWGGByqRviz/HKcrzpWdPt41IpuOiAhxiQUhY=; b=gOFIsALYjdr/IEniKkZXRH0P5ZRlieT4Pkcgj9ruEmORmPlxLrMx1QwgUIL00NJvoMPp s9CyOUKs8LSPb+t8eUH1N8ZMGx6qm51B8JVxWmFPjzeRbPxHxaRSqecNvs8gczDHEkYK QX6Pzp4gHns5KMIezO1pxEPH/M6hjfvZejEmQrU/i+FKoxIPq+bw+nnMEHDGfRPx6J7t DsMVSYJtNmodaJVJtZSIs7BY8ls72PaFkuSpi8+DP4TaIYumN8DhVoR4dfkgUl7Hcz7t mznSxKdCupG9Is0gVQdlxmAoJHwZovEFWY45K5QVR5uRbbOkuEV4+N0f9CfqGCm5i76K pg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 30dn8gq0p3-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 16 Apr 2020 06:24:19 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 16 Apr 2020 06:23:37 -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 06:23:38 -0700 Received: from luke.marvell.com (unknown [10.95.130.154]) by maili.marvell.com (Postfix) with ESMTP id 7B4E03F7040; Thu, 16 Apr 2020 06:23:36 -0700 (PDT) From: Lukasz Bartosik To: , CC: , , Date: Thu, 16 Apr 2020 15:23:35 +0200 Message-ID: <1587043415-10955-1-git-send-email-lbartosik@marvell.com> X-Mailer: git-send-email 2.7.4 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_03:2020-04-14, 2020-04-16 signatures=0 Subject: [dpdk-dev] [PATCH] 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. 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