From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aer-iport-3.cisco.com (aer-iport-3.cisco.com [173.38.203.53]) by dpdk.org (Postfix) with ESMTP id 73779C2DC for ; Thu, 11 Jun 2015 00:20:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=730; q=dns/txt; s=iport; t=1433974803; x=1435184403; h=from:to:cc:subject:date:message-id; bh=N2W8Jtoo3xcs5MnhsLmztAdLG0DMrpWJSTvP2JWM0k8=; b=PY/YqcxS3E0ExjWn7U3FH9v66bTZ+KrlN3gQruryGMNRU8MgepYodpQU y8RNrCSQ4keSA3emlbsKuC4GxOkpOkgYsdaFj7PQh1sxeGn/jEp0u5trT 8uxH9pGQHJQRFQwI6i9zo95OouAYwoD6h7rEhC/FeHMcNgaIFuN4cAnRh A=; X-IronPort-AV: E=Sophos;i="5.13,590,1427760000"; d="scan'208";a="514342376" Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP; 10 Jun 2015 22:20:02 +0000 Received: from proteus.cisco.com (proteus.cisco.com [10.55.15.254]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id t5AMK2tM023388; Wed, 10 Jun 2015 22:20:02 GMT From: Damjan Marion To: dev@dpdk.org Date: Thu, 11 Jun 2015 00:19:25 +0200 Message-Id: <1433974765-136411-1-git-send-email-damarion@cisco.com> X-Mailer: git-send-email 2.1.4 Cc: Damjan Marion Subject: [dpdk-dev] [PATCH] i40e: prefetch next mbuf in rx alloc code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 22:20:03 -0000 This patch improves performance of vectored rx on i40e devices. Signed-off-by: Damjan Marion --- drivers/net/i40e/i40e_rxtx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 2de0ac4..152e9e6 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -778,6 +778,11 @@ i40e_rx_alloc_bufs(struct i40e_rx_queue *rxq) rxdp = &rxq->rx_ring[alloc_idx]; for (i = 0; i < rxq->rx_free_thresh; i++) { + + /* Prefetch next mbuf */ + if (i < (rxq->rx_free_thresh - 1)) + rte_prefetch0 (rxep[i+1].mbuf); + mb = rxep[i].mbuf; rte_mbuf_refcnt_set(mb, 1); mb->next = NULL; -- 2.1.4