From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3E227256 for ; Wed, 27 Apr 2016 07:10:52 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 26 Apr 2016 22:10:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,540,1455004800"; d="scan'208";a="967339550" Received: from shwdeisgchi083.ccr.corp.intel.com (HELO [10.239.67.193]) ([10.239.67.193]) by fmsmga002.fm.intel.com with ESMTP; 26 Apr 2016 22:10:49 -0700 To: David Marchand References: <1461637474-110602-1-git-send-email-jianfeng.tan@intel.com> Cc: "dev@dpdk.org" , "Xie, Huawei" , yuanhan.liu@intel.com, sony.chacko@qlogic.com, harish.patil@qlogic.com From: "Tan, Jianfeng" Message-ID: <572049D9.7000600@intel.com> Date: Wed, 27 Apr 2016 13:10:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] virtio: fix modify drv_flags for specific device 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: Wed, 27 Apr 2016 05:10:52 -0000 Hi, On 4/26/2016 7:53 PM, David Marchand wrote: > On Tue, Apr 26, 2016 at 4:24 AM, Jianfeng Tan wrote: >> Issue: virtio's drv_flags are decided by devices types (modern vs legacy), >> and which kernel driver is used, and the negotiated features (especially >> VIRTIO_NET_STATUS) with backend, which makes it possible to multiple >> virtio devices have different versions of drv_flags, but this variable >> is currently shared by each virtio device. >> >> How to fix: dev_flags is a device-specific variable to store this info. >> >> Fixes: da978dfdc43 ("virtio: use port IO to get PCI resource") >> >> Reported-by: David Marchand >> Suggested-by: David Marchand >> Signed-off-by: Jianfeng Tan > - ethdev dev_flags is supposed to be filled with > RTE_ETH_DEV_DETACHABLE, RTE_ETH_DEV_INTR_LSC etc... not pci macros. Oops, I'll correct it in next version. > > - I would have kept the init code as it is until the > rte_eth_copy_pci_info() step, then sanitise the dev_flags, but this > might be a matter of taste. > Yes, if we keep that until rte_eth_copy_pci_info() step, the drv_flags has already been changed. Besides, I see bnx2x pmd could have similar issue, and the QLogic bnx2x maintainers are CCed to confirm. Thanks, Jianfeng