From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 5A27BAFD7 for ; Tue, 27 May 2014 16:45:58 +0200 (CEST) Received: by mail-wg0-f45.google.com with SMTP id m15so9420825wgh.4 for ; Tue, 27 May 2014 07:46:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=gbFmwlCj2ThS41oJmS0IPY+hYE6a/MPwj0MOCruZsLA=; b=AdGVCmVUIH72cijq15QuhXrB0q/k2nBdhT+EyhhUmHcOLM5Yqd6jOEfJcyRpZVWrQE 4GzzW63HpmBhv8OLdfmx675HdyjOP7p72k95x/fuQ3jjwZQdFkUEs/8/wDUcaN7RThrn xXlfrCCvOmhM4SbofCDQCxUaQsLTdmNnhPImMiFu096hRGoXZFWd67JNKL/TD0KACH2x M68MT3GeycmlnqlAJZGeBzfw4o1U+qmv8uyyzre70mHXg+wpbIDPIsS5i/iF32/x3gjc PxqIHzeGRDYmjaYlCP18I387pufzZqRY6VxtU/sDhHxJvGkgCi5/GeFfH/c+75HSmJs5 uf3Q== X-Gm-Message-State: ALoCoQkz2unn3z9porbIiOMir7yrxd1g0NCWuYfArAFJ0YVICosNUqZy5KPH5JtYB65uXLHe20V8 X-Received: by 10.194.243.104 with SMTP id wx8mr40769466wjc.32.1401201968833; Tue, 27 May 2014 07:46:08 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id oy4sm26518413wjb.41.2014.05.27.07.46.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 May 2014 07:46:08 -0700 (PDT) From: Thomas Monjalon To: "Burakov, Anatoly" Date: Tue, 27 May 2014 16:46:04 +0200 Message-ID: <3757253.C786Iy0Bh3@xps13> Organization: 6WIND User-Agent: KMail/4.13 (Linux/3.14.4-1-ARCH; KDE/4.13.0; x86_64; ; ) In-Reply-To: References: <1481821.surW3tcQHd@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 07/16] Add support for VFIO interrupts, add VFIO header 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: Tue, 27 May 2014 14:45:58 -0000 2014-05-27 14:40, Burakov, Anatoly: > > 2014-05-27 14:29, Burakov, Anatoly: > > > > > I don't know if there is something defined in a Linux header which > > > > > could help to check if VFIO is supported. But in general, it's > > > > > better to check for a macro belonging to the feature instead of > > > > > checking kernel version. > > > > > > Not sure VFIO defines any macros anywhere, but I'll look into it, > > > > thanks. > > > > > > There probably isn't. At least I don't see anything in commit log. So > > > unless there's a way to get config options from kernel at compile-time > > > in userspace code, I don't think we can do anything else than kernel > > > version check. > > > > Isn't it sufficient to check VFIO_API_VERSION? > > I believe you have to #include before you can get that macro. > The header file isn't present on kernels earlier than 3.6. Oh yes, you're right :) -- Thomas