From patchwork Fri Jan 19 05:57:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Bhansali X-Patchwork-Id: 135976 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 05490438FB; Fri, 19 Jan 2024 06:58:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76B7F427DA; Fri, 19 Jan 2024 06:58:14 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id D6F9A41153 for ; Fri, 19 Jan 2024 06:58:10 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40J4xEDq019214 for ; Thu, 18 Jan 2024 21:58:09 -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-transfer-encoding:content-type; s= pfpt0220; bh=Tc7aazNW7bfKX8FIfREHeGFf3HLK3gguYA0FeC+vgQQ=; b=XC5 dyniJCtXxRUSiQ+VjS/91tlmtkzVWAFc86HgIlpOvN4xiPSMMzCbrd+Iln0Ncqom XFLCaemJVV7Wd4XGzTJDy3oV7XP9Ew2HDGiwZkh2TWB3WrwYsJB1HVg9JVgr3X/z 1VxotZgnQtSI+cpZ61QsHkTYZc8e6iwl+GS4nPxZQ8//4r1QlPVTpKMCWDcusbT1 kYL070nFYd1TnGXYVBK94gRFsFuSZyOgRXy4wbU21+bAto6iZOT0MHeQX+0xGSmV RerfKI1cDb/AzTUYckCkNrqvJemM7mqgCTQQ2XGweaEUpt61rsAlcT3WMG4AgmAG wMkzAEbHDzZnkSOIGmQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3vpxqfvvay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 18 Jan 2024 21:58:09 -0800 (PST) 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.48; Thu, 18 Jan 2024 21:58:08 -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.48 via Frontend Transport; Thu, 18 Jan 2024 21:58:08 -0800 Received: from localhost.localdomain (unknown [10.28.36.158]) by maili.marvell.com (Postfix) with ESMTP id E22663F7088; Thu, 18 Jan 2024 21:58:05 -0800 (PST) From: Rahul Bhansali To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: Rahul Bhansali Subject: [PATCH 5/5] net/cnxk: select optimized LLC transaction type Date: Fri, 19 Jan 2024 11:27:21 +0530 Message-ID: <20240119055721.1750399-5-rbhansali@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240119055721.1750399-1-rbhansali@marvell.com> References: <20240119055721.1750399-1-rbhansali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: CfvLJttEzFhxBsdjYhru-xholH0iWWJ9 X-Proofpoint-GUID: CfvLJttEzFhxBsdjYhru-xholH0iWWJ9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-19_02,2024-01-17_01,2023-05-22_02 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 LLC transaction optimization by using LDWB LDTYPE option in SG preparation for Tx. With this, if data is present and dirty in LLC then the LLC would mark the data clean. Signed-off-by: Rahul Bhansali --- drivers/net/cnxk/cn10k_tx.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h index 664e47e1fc..fcd19be77e 100644 --- a/drivers/net/cnxk/cn10k_tx.h +++ b/drivers/net/cnxk/cn10k_tx.h @@ -331,9 +331,15 @@ cn10k_nix_tx_skeleton(struct cn10k_eth_txq *txq, uint64_t *cmd, else cmd[2] = NIX_SUBDC_EXT << 60; cmd[3] = 0; - cmd[4] = (NIX_SUBDC_SG << 60) | BIT_ULL(48); + if (!(flags & NIX_TX_OFFLOAD_MBUF_NOFF_F)) + cmd[4] = (NIX_SUBDC_SG << 60) | (NIX_SENDLDTYPE_LDWB << 58) | BIT_ULL(48); + else + cmd[4] = (NIX_SUBDC_SG << 60) | BIT_ULL(48); } else { - cmd[2] = (NIX_SUBDC_SG << 60) | BIT_ULL(48); + if (!(flags & NIX_TX_OFFLOAD_MBUF_NOFF_F)) + cmd[2] = (NIX_SUBDC_SG << 60) | (NIX_SENDLDTYPE_LDWB << 58) | BIT_ULL(48); + else + cmd[2] = (NIX_SUBDC_SG << 60) | BIT_ULL(48); } } @@ -1989,7 +1995,11 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws, senddesc01_w1 = vdupq_n_u64(0); senddesc23_w1 = senddesc01_w1; - sgdesc01_w0 = vdupq_n_u64((NIX_SUBDC_SG << 60) | BIT_ULL(48)); + if (!(flags & NIX_TX_OFFLOAD_MBUF_NOFF_F)) + sgdesc01_w0 = vdupq_n_u64((NIX_SUBDC_SG << 60) | (NIX_SENDLDTYPE_LDWB << 58) | + BIT_ULL(48)); + else + sgdesc01_w0 = vdupq_n_u64((NIX_SUBDC_SG << 60) | BIT_ULL(48)); sgdesc23_w0 = sgdesc01_w0; if (flags & NIX_TX_NEED_EXT_HDR) {