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 4956342A08 for ; Thu, 27 Apr 2023 08:28:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43D4A410DD; Thu, 27 Apr 2023 08:28:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 658C940F18; Thu, 27 Apr 2023 08:28:37 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33QK57LW006730; Wed, 26 Apr 2023 23:28:36 -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-transfer-encoding : content-type; s=pfpt0220; bh=76zfDGYNmnod8bDKPZX9kxdkIBT6oaB+jgqyaSY38wo=; b=gwKJQIKrUju4AWwL4f99cRFXoJCYMoMaBQNLJBhzyluhsEWDuZm/kozQihuovEKJNfoo I/hXeHOO2HTq/lyru9OseTR0qu+HFOiqH0l/Q/stOlejdhf50AWkeOYiwfbHU40cfNaH vy5OtnLcKgFx8aeYoqgrbfjrESLXUPliIQev5LMC4XZ8CIIETso4jHVSUFGERNd0TwfN l4ueIfos7JO2q+T2/F5eQMIfZPYda9ZzEUjL6AF21QwxDO73BaJoesznbe91nqMadw2c nSAHIKXTLBCIgaZqPmyLcND1hrkjC4XZQR9T/jEldGeL1z7Mml7MKMKMhUcNvpjGMiUS tA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3q7apa23w2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 26 Apr 2023 23:28:36 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 26 Apr 2023 23:28:34 -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.48 via Frontend Transport; Wed, 26 Apr 2023 23:28:34 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id F26213F707E; Wed, 26 Apr 2023 23:28:32 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , , , Subject: [PATCH v1] event/cnxk: fix setting event attributes in empty get work Date: Thu, 27 Apr 2023 11:58:17 +0530 Message-ID: <9e4d4654e6a1d7f6c5fb69ad01421117b8599f41.1682576830.git.sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: MKPMKC72O8v4JWdSdvQVBZmicW1zh-Ys X-Proofpoint-GUID: MKPMKC72O8v4JWdSdvQVBZmicW1zh-Ys X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-27_04,2023-04-26_03,2023-02-09_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 Even when no events are dequeued, it is important to update event attributes as they provide valuable information for checking the work slot state and other attributes. Fixes: c0a9774f030d ("event/cnxk: move post-processing to separate function") Signed-off-by: Shijith Thotton --- drivers/event/cnxk/cn10k_worker.h | 3 +++ drivers/event/cnxk/cn9k_worker.h | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h index 06c71c6092..beae2be903 100644 --- a/drivers/event/cnxk/cn10k_worker.h +++ b/drivers/event/cnxk/cn10k_worker.h @@ -282,6 +282,9 @@ cn10k_sso_hws_get_work_empty(struct cn10k_sso_hws *ws, struct rte_event *ev, ws->gw_rdata = gw.u64[0]; if (gw.u64[1]) cn10k_sso_hws_post_process(ws, gw.u64, flags); + else + gw.u64[0] = (gw.u64[0] & (0x3ull << 32)) << 6 | + (gw.u64[0] & (0x3FFull << 36)) << 4 | (gw.u64[0] & 0xffffffff); ev->event = gw.u64[0]; ev->u64 = gw.u64[1]; diff --git a/drivers/event/cnxk/cn9k_worker.h b/drivers/event/cnxk/cn9k_worker.h index 1ce4b044e8..47eea70b5f 100644 --- a/drivers/event/cnxk/cn9k_worker.h +++ b/drivers/event/cnxk/cn9k_worker.h @@ -353,8 +353,10 @@ cn9k_sso_hws_get_work_empty(uint64_t base, struct rte_event *ev, #endif if (gw.u64[1]) - cn9k_sso_hws_post_process(gw.u64, mbuf, flags, lookup_mem, - tstamp); + cn9k_sso_hws_post_process(gw.u64, mbuf, flags, lookup_mem, tstamp); + else + gw.u64[0] = (gw.u64[0] & (0x3ull << 32)) << 6 | + (gw.u64[0] & (0x3FFull << 36)) << 4 | (gw.u64[0] & 0xffffffff); ev->event = gw.u64[0]; ev->u64 = gw.u64[1]; -- 2.25.1