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 C0CCAA00BE; Tue, 7 Jul 2020 05:22:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AB02B1DD37; Tue, 7 Jul 2020 05:22:09 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id D6BD81DC30 for ; Tue, 7 Jul 2020 05:22:07 +0200 (CEST) IronPort-SDR: O0vzvF9UapQpowSwOod8kDss2ghBX2dwGL2u0V1km3YinJLGa8znR/JmqXxqRAiFf7hZr8yKUv 1NWsniUl4QxQ== X-IronPort-AV: E=McAfee;i="6000,8403,9674"; a="146607887" X-IronPort-AV: E=Sophos;i="5.75,321,1589266800"; d="scan'208";a="146607887" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 20:22:06 -0700 IronPort-SDR: c8ZUArZIOqFyKFd3+bLuirpwhbODWEWc2hua7Ny3E+4X2HNn1VOHhum2h6PkBDcwZ5sOZBQ8Gx 0rL7xJDw4UvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,321,1589266800"; d="scan'208";a="297209756" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 06 Jul 2020 20:22:06 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Jul 2020 20:22:06 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Jul 2020 20:22:05 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Jul 2020 20:22:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i31SeLFtIaXd+jYNCJlDUpjb3Fk/0CiXxS4tCihwAOyKzhFhqofh3wLRY4u9sUh0AoQUNLmOqzwBWaE+eRprEazMlPzgbaXsSJOUvg1css8NnNjAnVtfUk9Cr4EMUxBhuY2Vyih1kCBFOYX1wz5kjlseSwl81oFbOs89DuXvyw1DybKfzrHixqmtb8if2MNdwUvowvcAmTQwanWhHk6CJ+S0ABntIcDRt77PkZF/XYgAbfcnrHri/r9Dioi+yeX59cnio0RDvpItbcAFy/jzl8xRzb4azwhX44x4MzekU185hI1zlQcatlVWKmLmNmHfpAVnjeGjUsSOY9ENvlC2hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ryrt3CQEpcly1ccvkwAlj3ihgNYyPeWLrhB4l0jIEtw=; b=XyeZpyGxqbmdmY2nBrWPe1J8fp6bJH/Rnw8S0oyRl/63oC+V/f/ym6H2eIGgdrKlmBbAH9l9E9UymTez3+EPRwdv4ift3OdOlbX7mhKC6hy4CsAINHnKNGtjMAx58oi7HNqZjzB7lNcBJ+/bNP/A8+MzLP7YlHEekk0tQakHTOyNVhaajvGaGwle6NSneyGVmYLHcvoX/AplfWr3FjxmnqNpysneZhVAF8sQAryjWKiGIgckx3/hWNzg2Udh8RyOuPMWniTGEki3UkCbe0LxTfvmdcpbDS/bI2bQWEOquI7gSCZ4Zefaz8z0bzvcUdgVrI5iwSoHDpTttcqHQTEktA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ryrt3CQEpcly1ccvkwAlj3ihgNYyPeWLrhB4l0jIEtw=; b=zI5aAiXiEj+V+ir+3EOUaz9nAo4XB6yyowbKYGsKQdnsNxH5qcWnYlCBcUCYlTUGN8vcjCg0QrX6T9JDgdB50l74C8upgXFGhpaKBh7etBK5XAUsMjlMoqqDcDP4YABtyrAZTeyjdTCqekL7Aa9LExDezoR09n2WoSMuuU3ut34= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB3709.namprd11.prod.outlook.com (2603:10b6:208:f3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Tue, 7 Jul 2020 03:22:03 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::7cde:8326:5010:c47e]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::7cde:8326:5010:c47e%7]) with mapi id 15.20.3153.029; Tue, 7 Jul 2020 03:22:03 +0000 From: "Xia, Chenbo" To: Adrian Moreno , "dev@dpdk.org" , "Ye, Xiaolong" , "shahafs@mellanox.com" , "matan@mellanox.com" , "maxime.coquelin@redhat.com" , "Wang, Xiao W" , "viacheslavo@mellanox.com" CC: "jasowang@redhat.com" , "lulu@redhat.com" Thread-Topic: [PATCH v3 4/8] vhost: check vDPA configuration succeed Thread-Index: AQHWU4g2z5HCj99tOEyEbXc3TMF8uqj7dG9Q Date: Tue, 7 Jul 2020 03:22:03 +0000 Message-ID: References: <20200706112452.1474533-1-amorenoz@redhat.com> <20200706112452.1474533-5-amorenoz@redhat.com> In-Reply-To: <20200706112452.1474533-5-amorenoz@redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0305e427-9daf-4409-2784-08d82224eb61 x-ms-traffictypediagnostic: MN2PR11MB3709: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1227; x-forefront-prvs: 0457F11EAF x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 84dd8U9jwed3qQcp31VBYhXfSfLEBEQyfe4bQZh++IlTEo9A41kMDdU20t0T0EH+0ScePb7XK/48LZD//ZpczUixle6FJ/OOkopHigpfXSrQHd/vKStek+/MM7k+22lqiSu2ApBVK3gO2Ida/2Bdb4ZplDWqzcZTYOBDXSYC4D/69UuvUNZEkQZ8vmzWWKfHKRRR2inzz5NjN3AebHuO0P2H8QyNBfThSDZadpJeeLCM/tA0U/GGll5K9cf283pfxd6HvSroFc0YX1mJVVGlH0cSoQv754QYKL271K0FF+7LlaqDkRmDZb3ofNgJVo+WBycpKpW3HGBLFm4qstdleq/93QmIxUcMlqV/jGNmfl/HB/IWWAecZHcKPKOpd+58 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(366004)(346002)(39860400002)(136003)(396003)(83380400001)(8936002)(478600001)(4326008)(316002)(33656002)(110136005)(5660300002)(54906003)(52536014)(2906002)(9686003)(55016002)(8676002)(53546011)(7696005)(6506007)(76116006)(86362001)(66446008)(64756008)(66556008)(186003)(66476007)(71200400001)(26005)(66946007)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: DNPgkjRSQgfUU9lx1KRVxxp7LJOr8kRV/MQWPU4+IqxWQnWwDnW4LH77/81ZmyCW99MvfpMxQhuMNtAi4ki8GPTKq/287xKaTm5sp3SU8WZxOeHrzpFHMHmNjTqoM2KeqqlmxUSXDJmM3YtwbNI27dlhg/sG49cgc0yxhyPqUn81i5snasNZjMbUb7G+SaU7YvZRlKSsjJ7rcPhsd1KNjPru8y2hUYbKLaWZvP8AXLgT/f/Rd4cMALEfL42mZHYa2LVB+yrb1+/cAZreuvWFVkwaUk9IWh0nwxtdu8AvLFEjDDUgnliMQC93x1NTfb60aSptd4YYsSuLYNwgzysHmLsIbqMvh6WyfB36JPaCiNoRQHrfaiSrMFfufOptBRGfga/8hFaxKSKFDXZ4n4PCmVUACLmMjUW8e7kSFnenhrPi4ApAt3LgJeh9SfW8RBfNcG6W4yR4bglTmEkaoBOZYqQJSzVeIM91iEjuUy77hkj2t54FyjJG7WdJ/ZVVLNPB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4063.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0305e427-9daf-4409-2784-08d82224eb61 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jul 2020 03:22:03.4456 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Vylx/arxbG/fcqVG+yUAUwTx4x55waTZ1RHZkA2JSatt+73jf4C2AHcDxMDrBg9yHpgRHxze4mQjVQDuWt59+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3709 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 4/8] vhost: check vDPA configuration succeed 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" > -----Original Message----- > From: Adrian Moreno > Sent: Monday, July 6, 2020 7:25 PM > To: dev@dpdk.org; Xia, Chenbo ; Ye, Xiaolong > ; shahafs@mellanox.com; matan@mellanox.com; > maxime.coquelin@redhat.com; Wang, Xiao W ; > viacheslavo@mellanox.com > Cc: jasowang@redhat.com; lulu@redhat.com > Subject: [PATCH v3 4/8] vhost: check vDPA configuration succeed >=20 > From: Maxime Coquelin >=20 > This patch checks whether vDPA device configuration succeed and does not = set > the CONFIGURED flag if it didn't. >=20 > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/vhost_user.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.= c index > 6be5c771b..bf079c914 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -2849,8 +2849,11 @@ vhost_user_msg_handler(int vid, int fd) > goto out; >=20 > if (!(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) { > - vdpa_dev->ops->dev_conf(dev->vid); > - dev->flags |=3D VIRTIO_DEV_VDPA_CONFIGURED; > + if (vdpa_dev->ops->dev_conf(dev->vid)) > + VHOST_LOG_CONFIG(ERR, > + "Failed to configure vDPA device\n") > + else > + dev->flags |=3D VIRTIO_DEV_VDPA_CONFIGURED; > } >=20 > out: > -- > 2.26.2 Reviewed-by: Chenbo Xia