From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 85ACF11C5 for ; Tue, 26 Apr 2016 13:54:09 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id e201so107943783wme.0 for ; Tue, 26 Apr 2016 04:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VYQPW01rODWSmdNe0+FntXGhp/Pe81w8eCdwGx9x4pY=; b=hFuY9/whCqci6iuM9f697NwDpyIyKeskNqmVXfJ8g0cnu6u0l7ebxYRVfKXTJ+WDwW V1FaFpX1LPr6L/Lco3wBpG17a3yq7I3txte0vehRM1u/Meg5RbUNf3sNtDDLg3z4W8Ru /DwWhpgL5ip1FjnPCArYM8DHBmk6MvjgGCgy5MskneJlvWRr9kAEw5G5858CaFTEeA8t FqJvyhkfva87wJEB4Di5i004UfoB5jzYAe4fZ0wJssFUM8Fw58btNO37Qyy/HTbiLP8e 9Ijmooct1dvm+tjBgAR7h4Gq6sHJjWB1gTmCB0elsQLeE03lzYKL7YioW5E94HWnf7Rc blkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VYQPW01rODWSmdNe0+FntXGhp/Pe81w8eCdwGx9x4pY=; b=Ri0FRcoal38wlaQSWvUS5ZLXEmuJ7vjinT3e+vfhUymlE0prJZM9a9qmQK8bK2Haqv 7g1ynNBnBxAYYBxJg5CGjxmVB7nnoHP2IBs/x5HYimZ4qS21k7X2oiY2P5em+F4h+C6b OeQNGM+P92+MuqM8PNlQHQaCEEgvZtJAzJLSqylPdDR5c48vW5U/bH2IK+zEcmw+VmgW +XGp57A7/SrOvQ+Fl/QcQleM1uTtw1Bsff7LS/DAM4uBC5K/9dFf3kZnyf54Uktm2uBl sEiJEl8Q8rkiOcyh97qtN5N+WyiQft4iJjy7NRkEQsykq0HjH8f0wx6Mm8i4f8oGzDQx yPPQ== X-Gm-Message-State: AOPr4FVQ4s53EZGEHgpVj+P+vKEqDRi4hLx+kCThTBUz64RqPJa7TEpf0kS7x7d1jtdTBnaKflqvsd60Kx3HxZvH X-Received: by 10.194.37.106 with SMTP id x10mr2679398wjj.135.1461671649275; Tue, 26 Apr 2016 04:54:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.96.2 with HTTP; Tue, 26 Apr 2016 04:53:49 -0700 (PDT) In-Reply-To: <1461637474-110602-1-git-send-email-jianfeng.tan@intel.com> References: <1461637474-110602-1-git-send-email-jianfeng.tan@intel.com> From: David Marchand Date: Tue, 26 Apr 2016 13:53:49 +0200 Message-ID: To: Jianfeng Tan Cc: "dev@dpdk.org" , "Xie, Huawei" , yuanhan.liu@intel.com Content-Type: text/plain; charset=UTF-8 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: Tue, 26 Apr 2016 11:54:09 -0000 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. - 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. -- David Marchand