From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6A60F28F3 for ; Tue, 10 Jan 2017 10:11:26 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 10 Jan 2017 01:11:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,343,1477983600"; d="scan'208";a="1081258760" Received: from shwdeisgchi083.ccr.corp.intel.com (HELO [10.239.67.193]) ([10.239.67.193]) by orsmga001.jf.intel.com with ESMTP; 10 Jan 2017 01:11:23 -0800 To: Thomas Monjalon References: <1480689075-66977-1-git-send-email-jianfeng.tan@intel.com> <46af618f-c01b-3571-78fc-12d10859a4a1@redhat.com> <4fa4d06c-d359-df12-a073-7c2c2540b634@intel.com> <1642339.XEY7yvBjzp@xps13> Cc: dev@dpdk.org, Jason Wang , yuanhan.liu@linux.intel.com, ferruh.yigit@intel.com, cunming.liang@intel.com From: "Tan, Jianfeng" Message-ID: <18d44cff-0fdb-02df-95c1-2c49945fde45@intel.com> Date: Tue, 10 Jan 2017 17:11:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1642339.XEY7yvBjzp@xps13> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 5/7] net/virtio_user: add vhost kernel support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 09:11:26 -0000 On 1/10/2017 4:46 PM, Thomas Monjalon wrote: > 2017-01-10 14:11, Tan, Jianfeng: >> On 1/9/2017 12:39 PM, Jason Wang wrote: >>> On 2016年12月23日 15:14, Jianfeng Tan wrote: >> [...] >>>> +/* TUNSETIFF ifr flags */ >>>> +#define IFF_TAP 0x0002 >>>> +#define IFF_NO_PI 0x1000 >>>> +#define IFF_ONE_QUEUE 0x2000 >>>> +#define IFF_VNET_HDR 0x4000 >>>> +#define IFF_MULTI_QUEUE 0x0100 >>>> +#define IFF_ATTACH_QUEUE 0x0200 >>>> +#define IFF_DETACH_QUEUE 0x0400 >>> Do we really want to duplicate those things which has been exposed by >>> uapi here? >> You mean those defined in ? Redefine those common >> macros, or include standard header file, with respective pros and cons. >> DPDK prefers the redefinition way as far as I understand, doesn't it? > What is the benefit of copying defines instead of including? (1) Avoid compiling errors that old version missed some of macros. (2) Better for portability (does not apply here). I might take it for granted a little bit as I see some very popular open source projects behave like this way, like QEMU, HAProxy, etc.