From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id B6C66A0093;
	Tue, 26 Apr 2022 06:14:16 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 5A747406A2;
	Tue, 26 Apr 2022 06:14:16 +0200 (CEST)
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by mails.dpdk.org (Postfix) with ESMTP id 6BD8240691
 for <dev@dpdk.org>; Tue, 26 Apr 2022 06:14:14 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1650946454; x=1682482454;
 h=from:to:cc:subject:date:message-id:references:
 in-reply-to:content-transfer-encoding:mime-version;
 bh=4L80GENYMxNi6Tx6Tfm7dlNE4XFV8Z4NwSHFRWQuGYY=;
 b=amJgILxaOtNtv/FdJzYbAffHugWEDrHWgTmxwd0MKZNiqurIrwcN8DG+
 IWUPiXJpviiA2PpBgwIIxPVfydno3Ebi68X9FPQC8Kze/h8ck2whx53uF
 9VSkKb+t0WI3Wahc3a6XkQBUTrmfm2rCDGStbePNXft3aFzFNl2AGpZS+
 RYJ4JWuwF2SKOmQPJZhMD8jriKe2uj8zBWkkeJcRfM5NwA0eG6nrbn20Y
 57e6xoMrbW/De4XMxZTMyYmcSHorKj2NIaz/Pmkw94b/LfGEqYcY2RzeD
 pFHv1be9s0jbv85NxTUh2zWJzjh2sKwUG8bnZYviORVJ9GlhbS/uxzzvt g==;
X-IronPort-AV: E=McAfee;i="6400,9594,10328"; a="265248731"
X-IronPort-AV: E=Sophos;i="5.90,290,1643702400"; d="scan'208";a="265248731"
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 25 Apr 2022 21:13:47 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.90,290,1643702400"; d="scan'208";a="650004336"
Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84])
 by FMSMGA003.fm.intel.com with ESMTP; 25 Apr 2022 21:13:46 -0700
Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by
 fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2308.27; Mon, 25 Apr 2022 21:13:46 -0700
Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by
 fmsmsx604.amr.corp.intel.com ([10.18.126.84]) with mapi id 15.01.2308.027;
 Mon, 25 Apr 2022 21:13:46 -0700
From: "Pei, Andy" <andy.pei@intel.com>
To: "Xia, Chenbo" <chenbo.xia@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>, "Cao, Gang"
 <gang.cao@intel.com>, "Liu, Changpeng" <changpeng.liu@intel.com>,
 "david.marchand@redhat.com" <david.marchand@redhat.com>
Subject: RE: [PATCH v6 08/16] usertools: add support for virtio blk device
Thread-Topic: [PATCH v6 08/16] usertools: add support for virtio blk device
Thread-Index: AQHYVWD32z/OEO+aNU6MLxcf0AfRfa0AqtfwgADyLuA=
Date: Tue, 26 Apr 2022 04:13:46 +0000
Message-ID: <b070d5399e8b41b8a6f173798f896a0a@intel.com>
References: <1643093258-47258-2-git-send-email-andy.pei@intel.com>
 <1650530034-59744-1-git-send-email-andy.pei@intel.com>
 <1650530034-59744-9-git-send-email-andy.pei@intel.com>
 <SN6PR11MB35041927CBAF05CDBCF606E89CF89@SN6PR11MB3504.namprd11.prod.outlook.com>
In-Reply-To: <SN6PR11MB35041927CBAF05CDBCF606E89CF89@SN6PR11MB3504.namprd11.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
dlp-product: dlpe-windows
dlp-version: 11.6.401.20
dlp-reaction: no-action
x-originating-ip: [10.239.127.36]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

Hi Chenbo,

Thanks for your reply.
I will send out a new version, and put blk device into misc devices.

> -----Original Message-----
> From: Xia, Chenbo <chenbo.xia@intel.com>
> Sent: Monday, April 25, 2022 9:53 PM
> To: Pei, Andy <andy.pei@intel.com>; dev@dpdk.org
> Cc: maxime.coquelin@redhat.com; Cao, Gang <gang.cao@intel.com>; Liu,
> Changpeng <changpeng.liu@intel.com>; david.marchand@redhat.com
> Subject: RE: [PATCH v6 08/16] usertools: add support for virtio blk devic=
e
>=20
> > -----Original Message-----
> > From: Pei, Andy <andy.pei@intel.com>
> > Sent: Thursday, April 21, 2022 4:34 PM
> > To: dev@dpdk.org
> > Cc: Xia, Chenbo <chenbo.xia@intel.com>; maxime.coquelin@redhat.com;
> > Cao, Gang <gang.cao@intel.com>; Liu, Changpeng
> > <changpeng.liu@intel.com>
> > Subject: [PATCH v6 08/16] usertools: add support for virtio blk device
> >
> > Add virtio blk device support to devbind.
> >
> > Signed-off-by: Andy Pei <andy.pei@intel.com>
> > ---
> >  usertools/dpdk-devbind.py | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
> > index ace4627..cbe336f 100755
> > --- a/usertools/dpdk-devbind.py
> > +++ b/usertools/dpdk-devbind.py
> > @@ -14,6 +14,8 @@
> >  from os.path import join as path_join
>=20
> Supporting it in this script or not, it should not be named as 'XXX_class=
'.
> And even may not be defined as new class. Maybe go to misc devices for
> now?
> I'd like to hear others' opinion.
>=20
> And Stephen commented about using driverctl, please reply to that.
>=20
> Thanks,
> Chenbo
>=20
> >
> >  # The PCI base class for all devices
> > +virtio_blk_class =3D {'Class': '01', 'Vendor': "1af4", 'Device': '1001=
',
> > +                    'SVendor': '8086', 'SDevice': '0002'}
> >  network_class =3D {'Class': '02', 'Vendor': None, 'Device': None,
> >                   'SVendor': None, 'SDevice': None}
> > acceleration_class =3D {'Class': '12', 'Vendor': None, 'Device': None,
> > @@ -72,6 +74,7 @@  cn9k_ree =3D {'Class': '08', 'Vendor': '177d',
> > 'Device': 'a0f4',
> >                   'SVendor': None, 'SDevice': None}
> >
> > +virtio_blk_devices =3D [virtio_blk_class]
> >  network_devices =3D [network_class, cavium_pkx, avp_vnic, ifpga_class]
> > baseband_devices =3D [acceleration_class]  crypto_devices =3D
> > [encryption_class, intel_processor_class] @@ -587,6 +590,9 @@ def
> > show_status():
> >      Displays to the user what devices are bound to the igb_uio
> > driver, the
> >      kernel driver or to no driver'''
> >
> > +    if status_dev in ["virtio_blk", "all"]:
> > +        show_device_status(virtio_blk_devices, "virtio_blk")
> > +
> >      if status_dev in ["net", "all"]:
> >          show_device_status(network_devices, "Network", if_field=3DTrue=
)
> >
> > @@ -746,6 +752,7 @@ def do_arg_actions():
> >          if b_flag is not None:
> >              clear_data()
> >              # refresh if we have changed anything
> > +            get_device_details(virtio_blk_devices)
> >              get_device_details(network_devices)
> >              get_device_details(baseband_devices)
> >              get_device_details(crypto_devices)
> > @@ -769,6 +776,7 @@ def main():
> >      parse_args()
> >      check_modules()
> >      clear_data()
> > +    get_device_details(virtio_blk_devices)
> >      get_device_details(network_devices)
> >      get_device_details(baseband_devices)
> >      get_device_details(crypto_devices)
> > --
> > 1.8.3.1
>=20