From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stephen@networkplumber.org>
Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com
 [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id CB6745A57
 for <dev@dpdk.org>; Sat, 16 May 2015 01:57:31 +0200 (CEST)
Received: by padbw4 with SMTP id bw4so35623289pad.0
 for <dev@dpdk.org>; Fri, 15 May 2015 16:57:31 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-type:content-transfer-encoding;
 bh=L2WSr34MJm22pffjGy9tMbr7EMhm2JeP16ZwjaCRi9g=;
 b=ZA/sME3E/SHZ7nrNb7brcFigkbu0xFLGmVh+LY+X3xHMQhuKiDKFgfChEDGLJe6D/G
 SNHgIWUDEyqnTLX8JBbvoLPfTvvzBgeJMwvvYE2MqjoqK/OyukVdij+iZVkD0bRmohfJ
 G8CfC1IleHAmM422ddOZ852R3OEkioy+poISUTHNtWgToZZXas2QFZsBqm2+OYkhba3P
 wvgdP5TUUL7pTwopDDWDVfcfAddRBZ36fMrK2qAQsPqRnRPYgPdjLlEaHbTiXDBlUXR6
 i41zJY5/Ru/ZjIu3kEKQUCPCv7VqjkFVtXoWkFx4MEDeBpcGqKjOpLkMlbCio9wOg7On
 gT2Q==
X-Gm-Message-State: ALoCoQkDMTYkxdooI177dE35TsHLXbfbkBpCEGvJzjwE+nxcvfbV/BnZkQeAiEPxUmJdSOYYDAFR
X-Received: by 10.70.88.170 with SMTP id bh10mr22864035pdb.62.1431734251198;
 Fri, 15 May 2015 16:57:31 -0700 (PDT)
Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net.
 [50.53.82.155])
 by mx.google.com with ESMTPSA id pd5sm2945216pbb.25.2015.05.15.16.57.30
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 15 May 2015 16:57:30 -0700 (PDT)
Date: Fri, 15 May 2015 16:57:33 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Shaopeng He <shaopeng.he@intel.com>
Message-ID: <20150515165733.7d5571e3@urahara>
In-Reply-To: <1431680162-13704-1-git-send-email-shaopeng.he@intel.com>
References: <1431680162-13704-1-git-send-email-shaopeng.he@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] fm10k: support XEN domain0
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 15 May 2015 23:57:32 -0000

On Fri, 15 May 2015 16:56:02 +0800
Shaopeng He <shaopeng.he@intel.com> wrote:

> fm10k was failing to run in XEN domain0, as the physical
> memory for DMA should be allocated and translated
> in a different way for XEN domain0. So
> rte_memzone_reserve_bounded() should be used for DMA
> memory allocation, and rte_mem_phy2mch() should be used
> for DMA memory address translation to support running
> fm10k PMD in XEN domain0.
> 
> Signed-off-by: Shaopeng He <shaopeng.he@intel.com>

I agree with Thomas that this code has spread everywhere and should
be in a common spot.

Also, we discovered as part of the Xen net-front driver that it
should be a runtime determination, not a config option!