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 E5A1EA034C for ; Tue, 22 Feb 2022 20:35:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5108341174; Tue, 22 Feb 2022 20:35: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 5DFC841147; Tue, 22 Feb 2022 20:35:53 +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 21MIlBmw020298; Tue, 22 Feb 2022 11:35:52 -0800 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=Y21Q4ROIAjsuJ13cthAVHeL9CMaxdeRyX3L6yiIef7c=; b=IHgrRQho00Iom0SsUWHIgnTiNMaxcZauTMy7g7xEQhmACo1nn1MTVGjtfQuJJLhBlYwY DltZ3Rx2vegAS8Tjc+nICiqzjmI1ggiSg03bYSoFbnR7Hq6mHhbmpO/3i3iYPYSaBk/o CwQn8R06k8IA8FMBrWGSbYNS5QOayYrys/NH1NCQaKfOUWOTNUmJeJCZM9W8sa/eeD1H hSgIzf4UmMqeaJ+GuFCoqxRmfBUmRAx/QWpvbt/wu2KRhh8esqJngEXur7qCzAzWBUok pZ8t+ikOyGuTigNFLMbYz6H3mjSMLx/xPTC4xcbrjyfHT0jvwbpz2AIE/4dUMQT8kzWk 8g== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ecwaxar3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 22 Feb 2022 11:35:52 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 22 Feb 2022 11:35:51 -0800 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.18 via Frontend Transport; Tue, 22 Feb 2022 11:35:51 -0800 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id D3C843F707B; Tue, 22 Feb 2022 11:35:48 -0800 (PST) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: , Subject: [PATCH v2 12/21] net/cnxk: fix inline device RQ tag mask Date: Wed, 23 Feb 2022 01:05:03 +0530 Message-ID: <20220222193512.19292-12-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220222193512.19292-1-ndabilpuram@marvell.com> References: <20220207072932.22409-1-ndabilpuram@marvell.com> <20220222193512.19292-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: JsZeiBwhNepXqPvfaJk6XG5E-LfVApZs X-Proofpoint-ORIG-GUID: JsZeiBwhNepXqPvfaJk6XG5E-LfVApZs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-22_06,2022-02-21_02,2021-12-02_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Fix inline device rq tagmask to get packets with receive errors as type ETHDEV packets to callback handler so that packet buffers can get freed. Currently only ipsec denied packets get the right tag mask. Fixes: ee48f711f3b0 ("common/cnxk: support NIX inline inbound and outbound setup") Cc: stable@dpdk.org Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_nix_inl.c | 2 +- drivers/net/cnxk/cnxk_ethdev.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c index 003f972..11a1691 100644 --- a/drivers/common/cnxk/roc_nix_inl.c +++ b/drivers/common/cnxk/roc_nix_inl.c @@ -584,7 +584,7 @@ roc_nix_inl_dev_rq_get(struct roc_nix_rq *rq) inl_rq->flow_tag_width = 20; /* Special tag mask */ - inl_rq->tag_mask = 0xFFF00000; + inl_rq->tag_mask = rq->tag_mask; inl_rq->tt = SSO_TT_ORDERED; inl_rq->hwgrp = 0; inl_rq->wqe_skip = inl_dev->wqe_skip; diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index 3468aab..b272ede 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -3,6 +3,8 @@ */ #include +#include + static inline uint64_t nix_get_rx_offload_capa(struct cnxk_eth_dev *dev) { @@ -597,6 +599,13 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid, rxq_sp->qconf.mp = mp; if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY) { + /* Pass a tagmask used to handle error packets in inline device. + * Ethdev rq's tag_mask field will be overwritten later + * when sso is setup. + */ + rq->tag_mask = + 0x0FF00000 | ((uint32_t)RTE_EVENT_TYPE_ETHDEV << 28); + /* Setup rq reference for inline dev if present */ rc = roc_nix_inl_dev_rq_get(rq); if (rc) -- 2.8.4