From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 37F8A2716 for ; Fri, 3 Jul 2015 04:03:55 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 02 Jul 2015 19:03:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,396,1432623600"; d="scan'208";a="755208595" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by fmsmga002.fm.intel.com with ESMTP; 02 Jul 2015 19:03:53 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 3 Jul 2015 10:03:37 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.165]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.168]) with mapi id 14.03.0224.002; Fri, 3 Jul 2015 10:03:36 +0800 From: "Ouyang, Changchun" To: "Xie, Huawei" , "dev@dpdk.org" Thread-Topic: [PATCH 3/3] vhost: call api to unregister vhost driver Thread-Index: AQHQtHfcPM/uRQZO70S5LVcAZLuYx53I/wjg Date: Fri, 3 Jul 2015 02:03:35 +0000 Message-ID: References: <1435807983-20383-1-git-send-email-changchun.ouyang@intel.com> <1435807983-20383-4-git-send-email-changchun.ouyang@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 3/3] vhost: call api to unregister vhost driver 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: Fri, 03 Jul 2015 02:03:55 -0000 > -----Original Message----- > From: Xie, Huawei > Sent: Thursday, July 2, 2015 5:38 PM > To: Ouyang, Changchun; dev@dpdk.org > Cc: Cao, Waterman; Xu, Qian Q > Subject: Re: [PATCH 3/3] vhost: call api to unregister vhost driver >=20 > On 7/2/2015 11:33 AM, Ouyang, Changchun wrote: > > > > /* Start CUSE session. */ > > rte_vhost_driver_session_start(); > > + > > + /* Unregister vhost driver. */ > > + ret =3D rte_vhost_driver_unregister((char *)&dev_basename); > > + if (ret !=3D 0) > > + rte_exit(EXIT_FAILURE,"vhost driver unregister failure.\n"); > > + > Better remove the above code. > It is duplicated with signal handler and actually > rte_vhost_driver_session_start never returns. How about call one function to replace the code snippet? I think we need unregister there, it give us a clear example what the vhost= lib caller need to do at the ramp down stage.=20 Maybe 'never return' will be changed some day. >=20 > > return 0; > > > > }