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 BE7A8A04DD; Tue, 20 Oct 2020 10:43:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 375DBAD2B; Tue, 20 Oct 2020 10:43:19 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 617BAAD28; Tue, 20 Oct 2020 10:43:16 +0200 (CEST) IronPort-SDR: hGbm4GGzGomYDPze8q99JY7QxecY3+ZF5+3pso6wDaCx8hruv+J8oaI2JQsrcnR+wXVdxMAwL0 N38Hl1LZAu5A== X-IronPort-AV: E=McAfee;i="6000,8403,9779"; a="228808043" X-IronPort-AV: E=Sophos;i="5.77,396,1596524400"; d="scan'208";a="228808043" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 01:43:14 -0700 IronPort-SDR: h7aQ5AQy2iLOqHEKT8gOmjnzQomXxGRMGt4RhkgD8O6TU0KJfTmh/XcTBkOcQMcIhVwWp13+Lr e2HZZRFJjP9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,396,1596524400"; d="scan'208";a="522307436" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga006.fm.intel.com with ESMTP; 20 Oct 2020 01:43:14 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) 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.1713.5; Tue, 20 Oct 2020 01:43:10 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 20 Oct 2020 16:43:08 +0800 Received: from shsmsx605.ccr.corp.intel.com ([10.109.6.215]) by SHSMSX605.ccr.corp.intel.com ([10.109.6.215]) with mapi id 15.01.1713.004; Tue, 20 Oct 2020 16:43:08 +0800 From: "Jiang, YuX" To: Adrian Moreno , "dev@dpdk.org" CC: "Wang, Yinan" , "Fu, Patrick" , "stable@dpdk.org" , Maxime Coquelin , "Xia, Chenbo" , "Wang, Zhihong" , "Jiang, YuX" , "Zhang, XiX" Thread-Topic: [dpdk-dev] [PATCH] virtio-user: fix backend selection if stat fails Thread-Index: AQHWprEHBHA2t0C72U2nTaeQQ/pv4KmgLJPg Date: Tue, 20 Oct 2020 08:43:08 +0000 Message-ID: <4d29d46c322d48c59ec7c167e76cb38f@intel.com> References: <20201020071628.323641-1-amorenoz@redhat.com> In-Reply-To: <20201020071628.323641-1-amorenoz@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] virtio-user: fix backend selection if stat fails 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" Tested-by: JiangYuX Best Regards Jiang yu > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Adrian Moreno > Sent: Tuesday, October 20, 2020 3:16 PM > To: dev@dpdk.org > Cc: Wang, Yinan ; Fu, Patrick > ; amorenoz@redhat.com; stable@dpdk.org; Maxime > Coquelin ; Xia, Chenbo > ; Wang, Zhihong > Subject: [dpdk-dev] [PATCH] virtio-user: fix backend selection if stat fa= ils >=20 > If stat fails it means the backend must be vhost-user in server mode >=20 > Bugzilla ID: 559 > Fixes: f908b22ea47a ("net/virtio: move backend type selection to ethdev") > Cc: stable@dpdk.org >=20 > Signed-off-by: Adrian Moreno > --- > drivers/net/virtio/virtio_user_ethdev.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/virtio/virtio_user_ethdev.c > b/drivers/net/virtio/virtio_user_ethdev.c > index 042665bc0..ce74d08ab 100644 > --- a/drivers/net/virtio/virtio_user_ethdev.c > +++ b/drivers/net/virtio/virtio_user_ethdev.c > @@ -560,9 +560,10 @@ virtio_user_backend_type(const char *path) > struct stat sb; >=20 > if (stat(path, &sb) =3D=3D -1) { > - PMD_INIT_LOG(ERR, "Stat fails: %s (%s)\n", path, > + PMD_INIT_LOG(INFO, "Stat fails: %s (%s)\n", path, > strerror(errno)); > - return VIRTIO_USER_BACKEND_UNKNOWN; > + /* Must be vhost-user in server mode */ > + return VIRTIO_USER_BACKEND_VHOST_USER; > } >=20 > if (S_ISSOCK(sb.st_mode)) { > -- > 2.26.2