From patchwork Mon Mar 11 19:56:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Hutchings X-Patchwork-Id: 226688 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C67C02C02B2 for ; Tue, 12 Mar 2013 06:57:02 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754206Ab3CKT47 (ORCPT ); Mon, 11 Mar 2013 15:56:59 -0400 Received: from webmail.solarflare.com ([12.187.104.25]:16841 "EHLO webmail.solarflare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753621Ab3CKT46 (ORCPT ); Mon, 11 Mar 2013 15:56:58 -0400 Received: from [10.17.20.137] (10.17.20.137) by ocex02.SolarFlarecom.com (10.20.40.31) with Microsoft SMTP Server (TLS) id 14.1.355.2; Mon, 11 Mar 2013 12:56:57 -0700 Message-ID: <1363031815.2608.54.camel@bwh-desktop.uk.solarflarecom.com> Subject: [PATCH net-next 17/22] sfc: Explicitly prefetch RX hash prefix, not just Ethernet heade From: Ben Hutchings To: David Miller CC: , , Date: Mon, 11 Mar 2013 19:56:55 +0000 In-Reply-To: <1363030400.2608.37.camel@bwh-desktop.uk.solarflarecom.com> References: <1363030400.2608.37.camel@bwh-desktop.uk.solarflarecom.com> Organization: Solarflare X-Mailer: Evolution 3.2.3 (3.2.3-3.fc16) MIME-Version: 1.0 X-Originating-IP: [10.17.20.137] X-TM-AS-Product-Ver: SMEX-10.0.0.1412-7.000.1014-19708.004 X-TM-AS-Result: No--7.951100-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Currently we prefetch from the Ethernet header, but we will also read the hash prefix. In practice they should be in the same cache line and this won't hurt, but it is still pointless to add on the hash prefix size. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/rx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c index 23d67d1..8e78a2f 100644 --- a/drivers/net/ethernet/sfc/rx.c +++ b/drivers/net/ethernet/sfc/rx.c @@ -458,7 +458,7 @@ void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index, /* Prefetch nice and early so data will (hopefully) be in cache by * the time we look at it. */ - prefetch(efx_rx_buf_va(rx_buf) + efx->type->rx_buffer_hash_size); + prefetch(efx_rx_buf_va(rx_buf)); /* Pipeline receives so that we give time for packet headers to be * prefetched into cache.