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 2061C454DF; Mon, 24 Jun 2024 13:57:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B12A64026E; Mon, 24 Jun 2024 13:57:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id C71E84026C for ; Mon, 24 Jun 2024 13:57:42 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45OARDWq022070 for ; Mon, 24 Jun 2024 04:57:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=pfpt0220; bh=P+8LYyUfjffkpylAdls4LJLYX mnApfIZY8yank+n4l8=; b=RmzP77J1dNLcPXHnZodOZioiwGPfTJuIGg0ozQ0Ue Lp9kfvrkX5QKgcHC5Vn+qUZJJy4CWB9kzXrT/aA2102Q832HmpMgDKz06ll/U57v D1JwnzrSa3LzWA+ONXDPuQk9ovN9xpQHtN50nxntgPLzt2ojW+KmpzcZuieq3G34 173WTU4HXlT9JJywLfHgVtzBoa/LwiVe8gmGTaqM2M/wn9uwaya3ewTL38WmsRlq Q1M+ypPIgvv7K3cHQu4GY05OIMMLjklOkhwT6Ckp75gW/cH+OXwlB15UrDkoiEPD Y3/mA652IW44HqVhMNB7WFmTFNYP3j2vnqBE9KZ4V19pA== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3yy72f08hy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 24 Jun 2024 04:57:41 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 24 Jun 2024 04:57:40 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 24 Jun 2024 04:57:40 -0700 Received: from localhost.localdomain (unknown [10.29.52.211]) by maili.marvell.com (Postfix) with ESMTP id 4EF203F7077; Mon, 24 Jun 2024 04:57:38 -0700 (PDT) From: Harman Kalra To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra CC: , , Amit Prakash Shukla Subject: [PATCH v2 1/5] net/cnxk: fix stale offload flag reset Date: Mon, 24 Jun 2024 17:27:29 +0530 Message-ID: <20240624115733.191307-1-hkalra@marvell.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240624074822.88955-1-hkalra@marvell.com> References: <20240624074822.88955-1-hkalra@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: 6HJfofg72VAqlLKnhB8W5hUfcegEnT7s X-Proofpoint-GUID: 6HJfofg72VAqlLKnhB8W5hUfcegEnT7s X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-24_09,2024-06-24_01,2024-05-17_01 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 From: Amit Prakash Shukla mbuf buffer is not reset on tx and hence few fields has stale data from previous packets. Due to stale offload flags, in one of the scenarios with OVS, VxLAN offload flag was set while packet did not have the VxLAN header. In the OVS packet path, the flag was read and accordingly VxLAN processing was done but as packet did not have VxLAN header it caused segfault. This patch resets mbuf offload flags in rx burst function. Fixes: 46ebc0323151 ("net/cnxk: add eswitch Rx/Tx") Signed-off-by: Amit Prakash Shukla --- V2: * Added fixes tag drivers/net/cnxk/cnxk_eswitch_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cnxk/cnxk_eswitch_rxtx.c b/drivers/net/cnxk/cnxk_eswitch_rxtx.c index d57e32b091..0200392f2d 100644 --- a/drivers/net/cnxk/cnxk_eswitch_rxtx.c +++ b/drivers/net/cnxk/cnxk_eswitch_rxtx.c @@ -194,7 +194,7 @@ cnxk_eswitch_dev_rx_burst(struct cnxk_eswitch_dev *eswitch_dev, uint16_t qid, mbuf->vlan_tci = rx->vtag0_tci; /* Populate RSS hash */ mbuf->hash.rss = cqe->tag; - mbuf->ol_flags |= RTE_MBUF_F_RX_RSS_HASH; + mbuf->ol_flags = RTE_MBUF_F_RX_RSS_HASH; pkts[pkt] = mbuf; roc_prefetch_store_keep(mbuf); plt_esw_dbg("Packet %d rec on queue %d esw qid %d hash %x mbuf %p vlan tci %d", -- 2.18.0