From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9AC77A0C4E; Tue, 2 Nov 2021 16:55:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76501426DD; Tue, 2 Nov 2021 16:54:56 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 3D1A9426DD for ; Tue, 2 Nov 2021 16:54:54 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1A2CjgHb030466 for ; Tue, 2 Nov 2021 08:54:53 -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=pfpt0220; bh=FOB3yWn7UR/9trF6biOdzFZzFw37lrygsOPBuqomYFc=; b=Wwloko93V1NDJUJ9sDO19EOWpp5a0iMHwPXkOesbsM9uUH8GtNcYaOTIN5d16DXxmnKn jq50FuzsLsJiMNhdXvpkCWHspM7VMKcWVBObslmmihOgUWGt/wDXDgwHSlCpq1mlgyCy 3kkNKTpkTL2SUBfqVJ1uE3h7csO28Ii/r7Z2I1kiLO+eadYHPOScbW+/alFwLYSSfDxY nC4ecOeTo4PsEBMwL2+3ld+BRXfnpkN1uinoyryVGwFWKQ6g1uSZP0M4Wu31gWkmMFzm qQWCiqhtVg3oXk6BwT72TEDCM/rOlt1l52HPY9mxOe0Co/p4ANWzdt6vquNo8GetXT7c cQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3c35mbh5q4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 02 Nov 2021 08:54:53 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 2 Nov 2021 08:54:51 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 2 Nov 2021 08:54:51 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 9788A5B6948; Tue, 2 Nov 2021 08:54:49 -0700 (PDT) From: Nithin Dabilpuram To: , Pavan Nikhilesh , "Shijith Thotton" , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: Date: Tue, 2 Nov 2021 21:24:20 +0530 Message-ID: <20211102155421.486-9-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20211102155421.486-1-ndabilpuram@marvell.com> References: <20211102155421.486-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: 5aW20mrpaPhhB_6jasY786j0z9M1Hx6j X-Proofpoint-ORIG-GUID: 5aW20mrpaPhhB_6jasY786j0z9M1Hx6j X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-02_08,2021-11-02_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH 9/9] event/cnxk: disable drop re on vector enable for cn10k a0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Disable drop_re i.e dropping packets with receive errors on vector enable for few cn10k revisions due to HW errata. Signed-off-by: Nithin Dabilpuram --- drivers/event/cnxk/cnxk_eventdev_adptr.c | 8 ++++++++ drivers/net/cnxk/cn10k_ethdev.c | 11 ++++++++--- drivers/net/cnxk/cnxk_ethdev.h | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/event/cnxk/cnxk_eventdev_adptr.c b/drivers/event/cnxk/cnxk_eventdev_adptr.c index b9a5df0..fdcd68c 100644 --- a/drivers/event/cnxk/cnxk_eventdev_adptr.c +++ b/drivers/event/cnxk/cnxk_eventdev_adptr.c @@ -242,6 +242,10 @@ cnxk_sso_rx_adapter_queue_add( queue_conf->vector_sz, queue_conf->vector_timeout_ns, queue_conf->vector_mp); + + if (cnxk_eth_dev->vec_drop_re_dis) + rc |= roc_nix_rx_drop_re_set(&cnxk_eth_dev->nix, + false); } rox_nix_fc_npa_bp_cfg(&cnxk_eth_dev->nix, rxq_sp->qconf.mp->pool_id, true, @@ -290,6 +294,10 @@ cnxk_sso_rx_adapter_queue_del(const struct rte_eventdev *event_dev, rxq_sp->qconf.mp->pool_id, false, dev->force_ena_bp); cnxk_eth_dev->nb_rxq_sso--; + + /* Enable drop_re if it was disabled earlier */ + if (cnxk_eth_dev->vec_drop_re_dis && !cnxk_eth_dev->nb_rxq_sso) + rc |= roc_nix_rx_drop_re_set(&cnxk_eth_dev->nix, true); } if (rc < 0) diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c index 5d9536c..8378cbf 100644 --- a/drivers/net/cnxk/cn10k_ethdev.c +++ b/drivers/net/cnxk/cn10k_ethdev.c @@ -553,10 +553,15 @@ cn10k_nix_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) dev = cnxk_eth_pmd_priv(eth_dev); - /* DROP_RE is not supported with inline IPSec for CN10K A0 */ - if (roc_model_is_cn10ka_a0() || roc_model_is_cnf10ka_a0() || - roc_model_is_cnf10kb_a0()) + /* DROP_RE is not supported with inline IPSec for CN10K A0 and + * when vector mode is enabled. + */ + if ((roc_model_is_cn10ka_a0() || roc_model_is_cnf10ka_a0() || + roc_model_is_cnf10kb_a0()) && + !roc_env_is_asim()) { dev->ipsecd_drop_re_dis = 1; + dev->vec_drop_re_dis = 1; + } /* Register up msg callbacks for PTP information */ roc_nix_ptp_info_cb_register(&dev->nix, cn10k_nix_ptp_info_update_cb); diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h index 93879c8..7cbd9f1 100644 --- a/drivers/net/cnxk/cnxk_ethdev.h +++ b/drivers/net/cnxk/cnxk_ethdev.h @@ -342,6 +342,7 @@ struct cnxk_eth_dev { struct { uint64_t cq_min_4k : 1; uint64_t ipsecd_drop_re_dis : 1; + uint64_t vec_drop_re_dis : 1; }; uint64_t hwcap; }; -- 2.8.4