From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A1B9BC36E for ; Wed, 1 Jul 2015 04:15:40 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 30 Jun 2015 19:15:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,382,1432623600"; d="scan'208";a="738142016" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by fmsmga001.fm.intel.com with ESMTP; 30 Jun 2015 19:15:38 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 1 Jul 2015 10:15:37 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.165]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.46]) with mapi id 14.03.0224.002; Wed, 1 Jul 2015 10:15:37 +0800 From: "Ouyang, Changchun" To: "Xie, Huawei" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 4/4] vhost: add comment for potential unwanted callback on listenfds Thread-Index: AQHQsxYxH2v3690Uw02EQf4Oa9y+853F4Vuw Date: Wed, 1 Jul 2015 02:15:35 +0000 Message-ID: References: <1434649260-26317-2-git-send-email-huawei.xie@intel.com> <1435656050-3539-1-git-send-email-huawei.xie@intel.com> <1435656050-3539-5-git-send-email-huawei.xie@intel.com> In-Reply-To: <1435656050-3539-5-git-send-email-huawei.xie@intel.com> 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 v4 4/4] vhost: add comment for potential unwanted callback on listenfds 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: Wed, 01 Jul 2015 02:15:41 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei Xie > Sent: Tuesday, June 30, 2015 5:21 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v4 4/4] vhost: add comment for potential > unwanted callback on listenfds >=20 > add comment for potential unwanted callback on listenfds >=20 > v4 changes: > add comment for potential unwanted callback on listenfds >=20 > Signed-off-by: Huawei Xie Acked-by: Changchun Ouyang > --- > lib/librte_vhost/vhost_user/fd_man.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/lib/librte_vhost/vhost_user/fd_man.c > b/lib/librte_vhost/vhost_user/fd_man.c > index bd30f8d..d68b270 100644 > --- a/lib/librte_vhost/vhost_user/fd_man.c > +++ b/lib/librte_vhost/vhost_user/fd_man.c > @@ -242,6 +242,13 @@ fdset_event_dispatch(struct fdset *pfdset) >=20 > pthread_mutex_unlock(&pfdset->fd_mutex); >=20 > + /* > + * When select is blocked, other threads might unregister > + * listenfds from and register new listenfds into fdset. > + * When select returns, the entries for listenfds in the fdset > + * might have been updated. It is ok if there is unwanted call > + * for new listenfds. > + */ > ret =3D select(maxfds + 1, &rfds, &wfds, NULL, &tv); > if (ret <=3D 0) > continue; > -- > 1.8.1.4