From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 012EAA0562; Wed, 1 Apr 2020 05:14:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F5D21BECB; Wed, 1 Apr 2020 05:14:47 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id D12531BEC5 for ; Wed, 1 Apr 2020 05:14:44 +0200 (CEST) IronPort-SDR: lNSjJVkTE7ohe6JOAjdwFjkDC8VtvsAr9rUNUFXl3wobvwQUjn+BsVvrvQCY9VOJVZPmxn6Zv7 c8MQ7qLDzBdA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 20:14:43 -0700 IronPort-SDR: R9+pVOQoIeSwYAJou+EgVWHQ2v9jOaueT493jwQisCxls2uDdir+MP3ryLuKBLELp9PR52U2dK 8P9aVytEliHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,330,1580803200"; d="scan'208";a="240325215" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga007.fm.intel.com with ESMTP; 31 Mar 2020 20:14:43 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 20:14:43 -0700 Received: from bgsmsx106.gar.corp.intel.com (10.223.43.196) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 20:14:43 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.36]) by BGSMSX106.gar.corp.intel.com ([169.254.1.21]) with mapi id 14.03.0439.000; Wed, 1 Apr 2020 08:44:42 +0530 From: "Varghese, Vipin" To: "vattunuru@marvell.com" , "dev@dpdk.org" CC: "jerinj@marvell.com" , "alex.williamson@redhat.com" , "thomas@monjalon.net" , "david.marchand@redhat.com" Thread-Topic: [dpdk-dev] [RFC v1 1/1] vfio: set vf token and gain vf device access Thread-Index: AQHV8qdPZACCmwP5J0St1vyzb3j2AahjvA0g Date: Wed, 1 Apr 2020 03:14:41 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D499193@BGSMSX101.gar.corp.intel.com> References: <20200305043311.17065-1-vattunuru@marvell.com> In-Reply-To: <20200305043311.17065-1-vattunuru@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC v1 1/1] vfio: set vf token and gain vf device access 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Snipped > diff --git a/lib/librte_eal/linux/eal/eal_vfio.c > b/lib/librte_eal/linux/eal/eal_vfio.c > index 01b5ef3..e2fdd35 100644 > --- a/lib/librte_eal/linux/eal/eal_vfio.c > +++ b/lib/librte_eal/linux/eal/eal_vfio.c DPDK supports freebsd where `/dev/pci` can be probed like Linux `/sys/bus/p= ci`. Will you be adding the functions in `lib/librte_eal/freebsd/eal/` fold= er or implement as `NOT supported`? What about window ` lib/librte_eal/windows/eal/`? snipped > + snprintf(linkname, sizeof(linkname), > + "%s/%s/physfn", sysfs_base, dev_addr); Would you like to check the pointer sysfs_base or dev_addr? > int > rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr, > int *vfio_dev_fd, struct vfio_device_info *device_info) @@ - Snipped > + ret =3D is_vf_token_required(sysfs_base, dev_addr); The return value from the above function is 0 or -1.=20 > + /* if negative, something failed */ > + if (ret < 0) > + return -1; > + > + if (ret =3D=3D 0) { Will it be ok to skip this check? > + /* vf_token required to open device file descriptor */ > + rte_uuid_unparse(uuid_token, > + vf_token, sizeof(vf_token)); > + snprintf(dev, sizeof(dev), > + "%s vf_token=3D%s", dev_addr, vf_token); > + } snipped general comment `can we use EAL LOG for info, warn, error`?