Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756870AbaAITxT (ORCPT ); Thu, 9 Jan 2014 14:53:19 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:63124 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755982AbaAITxJ (ORCPT ); Thu, 9 Jan 2014 14:53:09 -0500 X-IronPort-AV: E=Sophos;i="4.95,633,1384300800"; d="scan'208";a="89285057" Message-ID: <52CEFE21.8060608@citrix.com> Date: Thu, 9 Jan 2014 19:53:05 +0000 From: Zoltan Kiss User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Wei Liu CC: , , , , , =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= , David Vrabel Subject: Re: [PATCH net-next v3 1/9] xen-netback: Introduce TX grant map definitions References: <1389139818-24458-1-git-send-email-zoltan.kiss@citrix.com> <1389139818-24458-2-git-send-email-zoltan.kiss@citrix.com> <20140109153010.GE12164@zion.uk.xensource.com> In-Reply-To: <20140109153010.GE12164@zion.uk.xensource.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.2.133] X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/01/14 15:30, Wei Liu wrote: > On Wed, Jan 08, 2014 at 12:10:10AM +0000, Zoltan Kiss wrote: >> v3: >> - fix comment in xenvif_tx_dealloc_action() >> - call unmap hypercall directly instead of gnttab_unmap_refs(), which does >> unnecessary m2p_override. Also remove pages_to_[un]map members > > Is it worthy to have another function call > gnttab_unmap_refs_no_m2p_override in Xen core driver, or just add a > parameter to control wether we need to touch m2p_override? I *think* it > will benefit block driver as well? > > (CC Roger and David for input) Yep, it worth, but let's make it a different patch >> --- a/drivers/net/xen-netback/netback.c >> +++ b/drivers/net/xen-netback/netback.c >> @@ -771,6 +771,19 @@ static struct page *xenvif_alloc_page(struct xenvif *vif, >> return page; >> } >> >> +static inline void xenvif_tx_create_gop(struct xenvif *vif, u16 pending_idx, >> + struct xen_netif_tx_request *txp, >> + struct gnttab_map_grant_ref *gop) > > Indentation. I fixed it and the later ones up, hopefully I haven't missed anything. > >> + >> + spin_lock_irqsave(&vif->dealloc_lock, flags); >> + do { >> + pending_idx = ubuf->desc; >> + ubuf = (struct ubuf_info *) ubuf->ctx; >> + index = pending_index(vif->dealloc_prod); >> + vif->dealloc_ring[index] = pending_idx; >> + /* Sync with xenvif_tx_action_dealloc: > > xenvif_tx_dealloc_action I suppose. Yes. >> + /* Already unmapped? */ >> + if (vif->grant_tx_handle[pending_idx] == >> + NETBACK_INVALID_HANDLE) { >> + netdev_err(vif->dev, >> + "Trying to unmap invalid handle! " >> + "pending_idx: %x\n", pending_idx); >> + continue; > > You seemed to miss the BUG_ON we discussed? > > See thread starting <52AF1A84.3090304@citrix.com>. Indeed, despite I wrote it in the version history :) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/