From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0054.outbound.protection.outlook.com [104.47.36.54]) by dpdk.org (Postfix) with ESMTP id 38E2F3195 for ; Tue, 23 Jan 2018 16:03:21 +0100 (CET) Received: from CY4PR03CA0010.namprd03.prod.outlook.com (2603:10b6:903:33::20) by BL2PR03MB467.namprd03.prod.outlook.com (2a01:111:e400:c27::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Tue, 23 Jan 2018 15:03:19 +0000 Received: from BN1BFFO11FD037.protection.gbl (2a01:111:f400:7c10::1:155) by CY4PR03CA0010.outlook.office365.com (2603:10b6:903:33::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Tue, 23 Jan 2018 15:03:19 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD037.mail.protection.outlook.com (10.58.144.100) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Tue, 23 Jan 2018 15:03:19 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id w0NEHuN7022706; Tue, 23 Jan 2018 07:18:04 -0700 From: Nipun Gupta To: CC: , , Nipun Gupta Date: Tue, 23 Jan 2018 19:47:53 +0530 Message-ID: <1516717073-6020-3-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516717073-6020-1-git-send-email-nipun.gupta@nxp.com> References: <1516717073-6020-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131611933997174139; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(376002)(39860400002)(396003)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(86362001)(106466001)(47776003)(97736004)(2950100002)(50226002)(356003)(2351001)(53936002)(69596002)(8936002)(81166006)(81156014)(8676002)(77096007)(26005)(4326008)(50466002)(5660300001)(336011)(36756003)(48376002)(6862004)(54906003)(76176011)(104016004)(305945005)(2906002)(51416003)(498600001)(316002)(16586007)(68736007)(6666003)(85426001)(105606002); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR03MB467; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD037; 1:/vgFQuO2t0pIRkRvRDGs01jrJ4dyg2wKB4XNOdI7CFJ3+KOg4CePpN689UXwEuQmykRXyMkYzNhvfAlsZo9JEdsYfm9C5vKNOWGJsSmkDktGkOaayrYfCwErV0pwiuQ0 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: db0ac82e-eeb6-4791-2c1a-08d56272708f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BL2PR03MB467; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB467; 3:GNjRqttWJiXOfjvew228C3aIF0vyNIXSYnFwm4Epjmla2ofAohjsMKZrFGrtDXG1WW1PmSFZNb55n1aOTP8X4/CUzfOKr1KmLMXpzCQh+GDp7/VsRgeNaRdpZKzwvfpYjhtTr+vcev0o00BIdvHZDGYG0xbgwgbpV47LqOF0IzgGw6jBhzv8lqSbZPApCZ/LWjEls9T60WP8y7gNG7UP2vsscVcsmVfgV+OBOcvmvBLTHzw+eNKWL+5h7TV6vXAmc+AeJIoksns3voCeCCXXq8T9IGr3EIbxgxm8OjKbHzezYj4ixGtfCIfqqTvGVryXDbDcRNmlCmpF4cniPFh81w==; 25:8d3KTndLAPSsUuJnMZK67bceRcPxKB5wQ2HIBEjRA8Y/nFc+4+oUHjVsyxDmeuY8VJ+SK0kt4/E/xHSjYKCRCJkIxgaP5zIeW843NAMc9epKqfaEckWDHLOlT1+rgfCKFGxLnEbsGcGYZn9j+xeV6k6T0PV5zy6rBRcrr9g4BadF2qOupvQxoI6lQxDdLbS00KhyelWZrXYKr0cSZgmGFodCtBP8KOveHY01aaLG7C8nYuLde9xAuhMlEh2TdDnUuJoRrmYpwhzApIfGAS3Ldeu/k8w88EF9K1TviySRrAxqeMWdSNJwJQ6SkxDfMigfA9qrHhrH9/5Zl+nyvWuFoA==; 31:Ae+McJ4eeVmqR7vr6h/BHMH3QwkEetN7tyXGPCrKmia3hK7esnhk+kE2Gg/I1qq+FYbSDUa7WETYx9NfAHfiRnShsH+g79EaELhh9sWOZB0n3Gfzl9b3OFDy2HrfB7K3Fp/HPHjAN1+gRAFmzIdkMd1raMRolFKuW17lhhYt9CAualyrGYHpYu+PyNFYxfrdjkmpjPCXDbt0sdCEE683xw== X-MS-TrafficTypeDiagnostic: BL2PR03MB467: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231023)(2400081)(944501161)(6055026)(6096035)(20161123561025)(20161123565025)(20161123556025)(20161123563025)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(201708071742011); SRVR:BL2PR03MB467; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BL2PR03MB467; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB467; 4:SYOSiq7JTyhCPXjApwN3wmn2BJwe5H7p4LqUZyuRXSRLEFFABrPhz4yjw1GORZHwzg91g2DRmQlEHOKbn2kTNjyz1tBy9KXB+kYsYTDQ2iNv2K2EmoVzoyJISQEC53fKsLHe/OhgaZd5i7c6mqAGCd1oCz2/G27M4P5Rlr1NqH67e2knSLryln6GE0nBrlIkbDXiL7lBOroftwmF4ecFgR2P9pDO9hllt8D4i2RtniRQmYHKe5Vq40B5LNwMZt69dVeh3m1yMCEPZyPgiLFk9GTnTOmM1p5XW6OBVCQ/3XQmzIXdwOz/IqrN43HHHoss X-Forefront-PRVS: 05610E64EE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB467; 23:IJ1AVaF/13CGWJyDWNLXIdhV87B3h6u4S7+RXHS9DQ?= =?us-ascii?Q?dIPrh/s9YAmuQsdB1H4sK6me9WKhGliOznuMG7ZggZ7kgTCHjX8jXlU1jOwv?= =?us-ascii?Q?UZs5zrENaiwEK8k4y50NiR32/CEHpXl7Jx92WaBmb+YteIA62uHTDZtPikJZ?= =?us-ascii?Q?tdntJ/06chx2Z1uxlBz67oUCC6FIYw2ZYGGDJ+xa/896FRerVOHQMTFSKTo+?= =?us-ascii?Q?fdjRSUrqwGSRsEcQ/oLuND720pHYZFwFiDU8V25AR1Fj07JgHoFSwgN2e+V+?= =?us-ascii?Q?FzlsmFfk0XGslOuJpee6ycv+Xsx2YEsY4OplzOc/WE2gy7TLS+RM+lZ8w+Er?= =?us-ascii?Q?7iSqLOYtP0XX2OFWb8KP52HexUKG9qi/m/v04jL1lbu5xQB41THqakhAgXQS?= =?us-ascii?Q?SQ78feUr/QhhsEzLBSC9L+NQZicxnlUyCs3wplC93zmBTC6D3LovqHE1s6LQ?= =?us-ascii?Q?+jwzA4eJ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y6/518R5gtQTWGW+hyGrFvyARiBmOsJbFMIuWUfXFNzVT+/VzhEC0WraXDK3H5QflFcMfmfMlIbqzKGwecrDF9sA==; 5:eSpSSv77FVJneceMdz4W2gSi1U6m1m9JfmsmOmao3xLokA/70hWZPIxHud2xW++0j9xYxE+ku9SgRRAfuARaRa/+GaCDE47IK2CzBSoSU7WOEUOx7s17CadpXU3CtIJX1IB3CtDzHESxkMFSbJ9W2apTGaguDQX7wsOfFvdenuI=; 24:gbzOgonIZ5L4P4hy5VNQ6c7lY8NP1YQlE2dO3TMge+M9FArD9cTefAdYRVkaYZIZ5wChScUU2IC6h/8c9uuLSZDRJ1mVF9MfBwoSSVysPDY=; 7:idNpNT4KqYd72qDbxDlUB+aerlsOyeegsmPYJ8BAPd7dqZkrQ0stsr+noTNfQwpM5v8ei8LP70wit+1N67X/tZKCcdYfuyqwS0WY0nlPkOBMBT+xLm2o6vqG2wmdMIOBRo0HWLG1FFZr4KpmDmc0ZtWBqNXEOmdUIYCeHATh+2w6ll3m/utxrIED6HzsVTKiqwC/YgvZx2N0l7Bmu+NdDK5DyzTLVTVPuREUWFbr5fKXq+VONuPl7zQEcT+O0zYb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2018 15:03:19.4678 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db0ac82e-eeb6-4791-2c1a-08d56272708f X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB467 Subject: [dpdk-dev] [PATCH 3/3] net/dpaa2: prefetch the annotation in event processing 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: , X-List-Received-Date: Tue, 23 Jan 2018 15:03:21 -0000 This patch adds software prefetching of the annotation which is accessed by the driver to fetch the parsing results. The changes also include as many instructions in between prefetching memory and using it. Signed-off-by: Nipun Gupta --- drivers/net/dpaa2/dpaa2_rxtx.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 3d45669..fee7e4c 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -676,7 +676,8 @@ void __attribute__((hot)) struct dpaa2_queue *rxq, struct rte_event *ev) { - ev->mbuf = eth_fd_to_mbuf(fd); + rte_prefetch0((void *)(DPAA2_GET_FD_ADDR(fd) + + DPAA2_FD_PTA_SIZE + 16)); ev->flow_id = rxq->ev.flow_id; ev->sub_event_type = rxq->ev.sub_event_type; @@ -686,18 +687,22 @@ void __attribute__((hot)) ev->queue_id = rxq->ev.queue_id; ev->priority = rxq->ev.priority; + ev->mbuf = eth_fd_to_mbuf(fd); + qbman_swp_dqrr_consume(swp, dq); } -void dpaa2_dev_process_atomic_event(struct qbman_swp *swp __attribute__((unused)), - const struct qbman_fd *fd, - const struct qbman_result *dq, - struct dpaa2_queue *rxq, - struct rte_event *ev) +void __attribute__((hot)) +dpaa2_dev_process_atomic_event(struct qbman_swp *swp __attribute__((unused)), + const struct qbman_fd *fd, + const struct qbman_result *dq, + struct dpaa2_queue *rxq, + struct rte_event *ev) { - uint8_t dqrr_index = qbman_get_dqrr_idx(dq); + uint8_t dqrr_index; - ev->mbuf = eth_fd_to_mbuf(fd); + rte_prefetch0((void *)(DPAA2_GET_FD_ADDR(fd) + + DPAA2_FD_PTA_SIZE + 16)); ev->flow_id = rxq->ev.flow_id; ev->sub_event_type = rxq->ev.sub_event_type; @@ -707,6 +712,9 @@ void dpaa2_dev_process_atomic_event(struct qbman_swp *swp __attribute__((unused) ev->queue_id = rxq->ev.queue_id; ev->priority = rxq->ev.priority; + ev->mbuf = eth_fd_to_mbuf(fd); + + dqrr_index = qbman_get_dqrr_idx(dq); ev->mbuf->seqn = dqrr_index + 1; DPAA2_PER_LCORE_DQRR_SIZE++; DPAA2_PER_LCORE_DQRR_HELD |= 1 << dqrr_index; -- 1.9.1