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 1DD532C8 for ; Thu, 29 Jun 2017 06:29:05 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2017 21:29:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,278,1496127600"; d="scan'208";a="120585864" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 28 Jun 2017 21:29:04 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 28 Jun 2017 21:29:04 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 28 Jun 2017 21:29:04 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0319.002; Thu, 29 Jun 2017 12:29:02 +0800 From: "Guo, Jia" To: "Wu, Jingjing" , "Zhang, Helin" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 1/2] eal: add uevent api for hot plug Thread-Index: AQHS7/8+XNwDzzREK0ys+5plHkTMfKI6l9iAgACoGgA= Date: Thu, 29 Jun 2017 04:29:01 +0000 Message-ID: <01BA8470C017D6468C8290E4B9C5E1E83B23E1DD@shsmsx102.ccr.corp.intel.com> References: <1495986280-26207-1-git-send-email-jia.guo@intel.com> <1498648044-57541-1-git-send-email-jia.guo@intel.com> <9BB6961774997848B5B42BEC655768F810DB5864@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F810DB5864@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal: add uevent api for hot plug 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: , X-List-Received-Date: Thu, 29 Jun 2017 04:29:06 -0000 VGhlIGJ1ZiBoYXZlIGNvbnRhaW4gbG90IG9mIGNvbnNpc3RlbnQgJy8wJywgc28gaXQgaXMgd2h5 IEkgbmVlZCB0byBjaGVjayB0aGF0LiBhbnl3YXkgSSB3aWxsIHJlZmluZSB0aGF0IGFuZCBvdGhl ciByZXR1cm4gaXNzdWUgaW4gdjMuDQoNClRoYW5rcyBqaW5namluZyAuDQoNCkJlc3QgcmVnYXJk cywNCkplZmYgR3VvDQoNCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IFd1LCBK aW5namluZyANClNlbnQ6IFRodXJzZGF5LCBKdW5lIDI5LCAyMDE3IDEwOjI1IEFNDQpUbzogR3Vv LCBKaWEgPGppYS5ndW9AaW50ZWwuY29tPjsgWmhhbmcsIEhlbGluIDxoZWxpbi56aGFuZ0BpbnRl bC5jb20+DQpDYzogZGV2QGRwZGsub3JnDQpTdWJqZWN0OiBSRTogW1BBVENIIHYyIDEvMl0gZWFs OiBhZGQgdWV2ZW50IGFwaSBmb3IgaG90IHBsdWcNCg0KPiArDQo+ICtpbnQNCj4gK3J0ZV91ZXZl bnRfY29ubmVjdCh2b2lkKQ0KPiArew0KPiArCXN0cnVjdCBzb2NrYWRkcl9ubCBhZGRyOw0KPiAr CWludCByZXQ7DQo+ICsJaW50IG5ldGxpbmtfZm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