From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1381A04FB; Sat, 11 Jan 2020 14:54:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7CC171DEF6; Sat, 11 Jan 2020 14:54:48 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 1D38E1DEF3 for ; Sat, 11 Jan 2020 14:54:47 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00BDk0ss020360 for ; Sat, 11 Jan 2020 05:54:46 -0800 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=pfpt0818; bh=OdeOU8vZNO/zKnfh4Hihowl5E4BQ70PQPh+rxQ8kVKw=; b=NKATkAfn7DkDHVIgIWWnh4zi8MONMpNh37wB3LMnpNpTEXgzIU8hiRuVMH9nxOtl008k BEUozJ0UQiypPLcpdWjZGnIlo2X7YdquHRgdnTDVBx99I4c4NO2SiuuKyyW50jUD5p84 tV8OnQx8JJiktsmU6ddPWMsVLhMPqNMhokQh1aE2K8MCcXCN9hUgwf4nbqpURSYh75K1 8RR+mXyqlau+7+LdeT/+EpyGyJ144IxzQf6KYQd0+YcEx8fEY2n2SPyxCeZaiLlnY+LM UNkQHGtETfDO9Cv5Gz2haaH3HHo5ejDqpI34I3NnkJL8tQoXYOkY/bqmeB3RaE5SllYT OA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2xfert043e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 11 Jan 2020 05:54:46 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 11 Jan 2020 05:54:43 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 11 Jan 2020 05:54:44 -0800 Received: from BG-LT7430.marvell.com (bg-lt7430.marvell.com [10.28.17.37]) by maili.marvell.com (Postfix) with ESMTP id 5C8393F703F; Sat, 11 Jan 2020 05:54:41 -0800 (PST) From: To: , Nithin Dabilpuram , "Kiran Kumar K" CC: , Pavan Nikhilesh Date: Sat, 11 Jan 2020 19:24:40 +0530 Message-ID: <20200111135440.6720-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-01-11_03:2020-01-10, 2020-01-11 signatures=0 Subject: [dpdk-dev] [PATCH] net/octeontx2: perf improvement to tx vector func X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Pavan Nikhilesh Use scalar loads instead of vector loads for fields that don't need any vector operations. Change-Id: I846731cd731d347a7f7e6a2e01d89dfa189ac244 Signed-off-by: Pavan Nikhilesh Reviewed-on: https://sj1git1.cavium.com/21243 Tested-by: sa_ip-toolkits-Jenkins Tested-by: sa_ip-sw-jenkins Reviewed-by: Nithin Kumar Dabilpuram Reviewed-by: Jerin Jacob Kollanukkaran --- drivers/net/octeontx2/otx2_tx.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net/octeontx2/otx2_tx.c b/drivers/net/octeontx2/otx2_tx.c index fa533000e..9f5926560 100644 --- a/drivers/net/octeontx2/otx2_tx.c +++ b/drivers/net/octeontx2/otx2_tx.c @@ -112,7 +112,6 @@ nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts, uint64x2_t ltypes01, ltypes23; uint64x2_t xtmp128, ytmp128; uint64x2_t xmask01, xmask23; - uint64x2_t mbuf01, mbuf23; uint64x2_t cmd00, cmd01; uint64x2_t cmd10, cmd11; uint64x2_t cmd20, cmd21; @@ -137,9 +136,6 @@ nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts, sgdesc23_w0 = sgdesc01_w0; for (i = 0; i < pkts; i += NIX_DESCS_PER_LOOP) { - mbuf01 = vld1q_u64((uint64_t *)tx_pkts); - mbuf23 = vld1q_u64((uint64_t *)(tx_pkts + 2)); - /* Clear lower 32bit of SEND_HDR_W0 and SEND_SG_W0 */ senddesc01_w0 = vbicq_u64(senddesc01_w0, vdupq_n_u64(0xFFFFFFFF)); @@ -149,13 +145,11 @@ nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts, senddesc23_w0 = senddesc01_w0; sgdesc23_w0 = sgdesc01_w0; - tx_pkts = tx_pkts + NIX_DESCS_PER_LOOP; - /* Move mbufs to iova */ - mbuf0 = (uint64_t *)vgetq_lane_u64(mbuf01, 0); - mbuf1 = (uint64_t *)vgetq_lane_u64(mbuf01, 1); - mbuf2 = (uint64_t *)vgetq_lane_u64(mbuf23, 0); - mbuf3 = (uint64_t *)vgetq_lane_u64(mbuf23, 1); + mbuf0 = (uint64_t *)tx_pkts[0]; + mbuf1 = (uint64_t *)tx_pkts[1]; + mbuf2 = (uint64_t *)tx_pkts[2]; + mbuf3 = (uint64_t *)tx_pkts[3]; mbuf0 = (uint64_t *)((uintptr_t)mbuf0 + offsetof(struct rte_mbuf, buf_iova)); @@ -927,6 +921,7 @@ nix_xmit_pkts_vector(void *tx_queue, struct rte_mbuf **tx_pkts, lmt_status = otx2_lmt_submit(io_addr); } while (lmt_status == 0); + tx_pkts = tx_pkts + NIX_DESCS_PER_LOOP; } return pkts; -- 2.17.1