From patchwork Thu Feb 23 17:40:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Hutchings X-Patchwork-Id: 142682 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 3DBC6B6EEE for ; Fri, 24 Feb 2012 04:40:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754719Ab2BWRkS (ORCPT ); Thu, 23 Feb 2012 12:40:18 -0500 Received: from exchange.solarflare.com ([216.237.3.220]:7232 "EHLO ocex02.SolarFlarecom.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752207Ab2BWRkR (ORCPT ); Thu, 23 Feb 2012 12:40:17 -0500 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; Thu, 23 Feb 2012 09:40:16 -0800 Message-ID: <1330018814.2511.2.camel@bwh-desktop> Subject: [PATCH net-next 1/5] sfc: Specify that the VFDI status page has page alignment and size From: Ben Hutchings To: David Miller CC: , Date: Thu, 23 Feb 2012 17:40:14 +0000 In-Reply-To: <1330018734.2511.1.camel@bwh-desktop> References: <1330018734.2511.1.camel@bwh-desktop> Organization: Solarflare Communications X-Mailer: Evolution 3.2.3 (3.2.3-1.fc16) MIME-Version: 1.0 X-Originating-IP: [10.17.20.137] X-TM-AS-Product-Ver: SMEX-10.0.0.1412-6.800.1017-18728.006 X-TM-AS-Result: No--6.753200-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 This requirement was meant to be implied in the name 'status page'. One out-of-tree VF driver allocates a buffer using the structure size and not a full page - hence the current odd specification - but in practice that allocation will be padded and aligned to at least 4KB. Therefore, we can specify this and have the option to extend the structure up to 4KB without worrying about VF drivers using odd-shaped buffers. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/vfdi.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/sfc/vfdi.h b/drivers/net/ethernet/sfc/vfdi.h index 656fa70..225557c 100644 --- a/drivers/net/ethernet/sfc/vfdi.h +++ b/drivers/net/ethernet/sfc/vfdi.h @@ -152,7 +152,8 @@ enum vfdi_op { * all traffic at this receive queue. * @u.mac_filter.flags: MAC filter flags. * @u.set_status_page.dma_addr: Base address for the &struct vfdi_status. - * This address must be such that the structure fits within a page. + * This address must be page-aligned and the PF may write up to a + * whole page (allowing for extension of the structure). * @u.set_status_page.peer_page_count: Number of additional pages the VF * has provided into which peer addresses may be DMAd. * @u.set_status_page.peer_page_addr: Array of DMA addresses of pages.