From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00190b01.pphosted.com (mx0b-00190b01.pphosted.com [67.231.157.127]) by dpdk.org (Postfix) with ESMTP id 874275F2A for ; Wed, 20 Mar 2019 14:52:52 +0100 (CET) Received: from pps.filterd (m0122331.ppops.net [127.0.0.1]) by mx0b-00190b01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2KDqoXe025721; Wed, 20 Mar 2019 13:52:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=jan2016.eng; bh=dO9IIBUb/KotwGpSDQKxfoxAEUcLIgw0eUPSbVS26GA=; b=Rww9HZZYyoURmo7C76D1ldS0fgDAgW6PW5zow/hgqKYGNTO5uXZ18lpYAESHxbnRcuvY xpoFGBJ3ZE19lIwtepQks5+OXnBAHUN+o3fap/smpYxL8YIRPewtoMek0jNcYjSb4hM9 qqYaknBYDLjTYRQ4xowm8MabHDJRGJUitoLxf+FfJGdwf58HHHjgQh9+J9gkPdmassDc IpdPiRNPwMJV5CzBGhWpAPZmSEtg2W6oRU1KlYA83c+pivGbj/XCmNoe43DXRAlyfUvO EVTUefl+A2l5IfgOIk/nqwyCHQBpbiJ5KfizPBZrUjwE4Kv0KL+bcpCH+/T6MVLWdA2/ 4g== Received: from prod-mail-ppoint3 (a96-6-114-86.deploy.static.akamaitechnologies.com [96.6.114.86] (may be forged)) by mx0b-00190b01.pphosted.com with ESMTP id 2rbp6585ha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2019 13:52:51 +0000 Received: from pps.filterd (prod-mail-ppoint3.akamai.com [127.0.0.1]) by prod-mail-ppoint3.akamai.com (8.16.0.27/8.16.0.27) with SMTP id x2KDlQST021911; Wed, 20 Mar 2019 09:52:50 -0400 Received: from email.msg.corp.akamai.com ([172.27.25.31]) by prod-mail-ppoint3.akamai.com with ESMTP id 2r8vfyraa4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2019 09:52:49 -0400 Received: from USTX2EX-DAG1MB3.msg.corp.akamai.com (172.27.27.103) by ustx2ex-dag1mb6.msg.corp.akamai.com (172.27.27.107) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 20 Mar 2019 06:52:45 -0700 Received: from USTX2EX-DAG1MB3.msg.corp.akamai.com ([172.27.27.103]) by ustx2ex-dag1mb3.msg.corp.akamai.com ([172.27.27.103]) with mapi id 15.00.1473.003; Wed, 20 Mar 2019 08:52:45 -0500 From: "Sanford, Robert" To: Erik Gabriel Carrillo , "thomas@monjalon.net" , "dev@dpdk.org" CC: "nhorman@tuxdriver.com" Thread-Topic: [PATCH v4 1/2] timer: allow timer management in shared memory Thread-Index: AQHU1EDuw0hakajaDke+tnCFUAJA1aYUsKQA Date: Wed, 20 Mar 2019 13:52:45 +0000 Message-ID: <40792313-7864-470F-B188-9AA1A0F072B8@akamai.com> References: <1544739996-26011-1-git-send-email-erik.g.carrillo@intel.com> <1551892822-23967-1-git-send-email-erik.g.carrillo@intel.com> <1551892822-23967-2-git-send-email-erik.g.carrillo@intel.com> In-Reply-To: <1551892822-23967-2-git-send-email-erik.g.carrillo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/10.10.0.180812 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.19.132.235] Content-Type: text/plain; charset="utf-8" Content-ID: <869F80FE2F276F44AD527AE91E8B03B0@akamai.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-20_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903200106 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-20_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903200107 Subject: Re: [dpdk-dev] [PATCH v4 1/2] timer: allow timer management in shared memory 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: Wed, 20 Mar 2019 13:52:53 -0000 SGkgRXJpaywNCg0KSSBoYXZlIGEgZmV3IHF1ZXN0aW9ucyBhbmQgY29tbWVudHMgb24gdGhpcyBw YXRjaCBzZXJpZXMuDQoNCjEuIERvbid0IHlvdSB0aGluayB3ZSBuZWVkIG5ldyB0ZXN0cyAoaW4g dGVzdC90ZXN0LykgdG8gdmVyaWZ5IHRoZSBzZWNvbmRhcnktcHJvY2VzcyBBUElzPw0KMi4gSSBz dWdnZXN0IHdlIGRlZmluZSBkZWZhdWx0X2RhdGFfaWQgYXMgY29uc3QsIGFuZCBleHBsaWNpdGx5 IHNldCBpdCB0byAwLg0KMy4gVGhlIG91dGVyIGZvci1sb29wIGluIHJ0ZV90aW1lcl9hbHRfbWFu YWdlKCkgdG91Y2hlcyBiZXlvbmQgdGhlIGVuZCBvZiBwb2xsX2xjb3Jlc1tdLiBJIHN1Z2dlc3Qg YSBjaGFuZ2UgbGlrZSB0aGlzOg0KDQotICAgICAgIGZvciAoaSA9IDAsIHBvbGxfbGNvcmUgPSBw b2xsX2xjb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RFBES18yLjAgew0KIA0KIAlsb2NhbDogKjsNCiB9Ow0K Kw0KK0RQREtfMTkuMDUgew0KKwlnbG9iYWw6DQorDQorCXJ0ZV90aW1lcl9kdW1wX3N0YXRzOw0K KwlydGVfdGltZXJfbWFuYWdlOw0KKwlydGVfdGltZXJfcmVzZXQ7DQorCXJ0ZV90aW1lcl9zdG9w Ow0KKwlydGVfdGltZXJfc3Vic3lzdGVtX2luaXQ7DQorfSBEUERLXzIuMDsNCisNCitFWFBFUklN RU5UQUwgew0KKwlnbG9iYWw6DQorDQorCXJ0ZV90aW1lcl9hbHRfZHVtcF9zdGF0czsNCisJcnRl X3RpbWVyX2FsdF9tYW5hZ2U7DQorCXJ0ZV90aW1lcl9hbHRfcmVzZXQ7DQorCXJ0ZV90aW1lcl9h bHRfc3RvcDsNCisJcnRlX3RpbWVyX2RhdGFfYWxsb2M7DQorCXJ0ZV90aW1lcl9kYXRhX2RlYWxs b2M7DQorCXJ0ZV90aW1lcl9zdWJzeXN0ZW1fZmluYWxpemU7DQorfTsNCi0tIA0KMi42LjQNCg0K DQo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 4BA28A00E6 for ; Wed, 20 Mar 2019 14:53:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 613541B113; Wed, 20 Mar 2019 14:52:59 +0100 (CET) Received: from mx0b-00190b01.pphosted.com (mx0b-00190b01.pphosted.com [67.231.157.127]) by dpdk.org (Postfix) with ESMTP id 874275F2A for ; Wed, 20 Mar 2019 14:52:52 +0100 (CET) Received: from pps.filterd (m0122331.ppops.net [127.0.0.1]) by mx0b-00190b01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2KDqoXe025721; Wed, 20 Mar 2019 13:52:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=jan2016.eng; bh=dO9IIBUb/KotwGpSDQKxfoxAEUcLIgw0eUPSbVS26GA=; b=Rww9HZZYyoURmo7C76D1ldS0fgDAgW6PW5zow/hgqKYGNTO5uXZ18lpYAESHxbnRcuvY xpoFGBJ3ZE19lIwtepQks5+OXnBAHUN+o3fap/smpYxL8YIRPewtoMek0jNcYjSb4hM9 qqYaknBYDLjTYRQ4xowm8MabHDJRGJUitoLxf+FfJGdwf58HHHjgQh9+J9gkPdmassDc IpdPiRNPwMJV5CzBGhWpAPZmSEtg2W6oRU1KlYA83c+pivGbj/XCmNoe43DXRAlyfUvO EVTUefl+A2l5IfgOIk/nqwyCHQBpbiJ5KfizPBZrUjwE4Kv0KL+bcpCH+/T6MVLWdA2/ 4g== Received: from prod-mail-ppoint3 (a96-6-114-86.deploy.static.akamaitechnologies.com [96.6.114.86] (may be forged)) by mx0b-00190b01.pphosted.com with ESMTP id 2rbp6585ha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2019 13:52:51 +0000 Received: from pps.filterd (prod-mail-ppoint3.akamai.com [127.0.0.1]) by prod-mail-ppoint3.akamai.com (8.16.0.27/8.16.0.27) with SMTP id x2KDlQST021911; Wed, 20 Mar 2019 09:52:50 -0400 Received: from email.msg.corp.akamai.com ([172.27.25.31]) by prod-mail-ppoint3.akamai.com with ESMTP id 2r8vfyraa4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2019 09:52:49 -0400 Received: from USTX2EX-DAG1MB3.msg.corp.akamai.com (172.27.27.103) by ustx2ex-dag1mb6.msg.corp.akamai.com (172.27.27.107) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 20 Mar 2019 06:52:45 -0700 Received: from USTX2EX-DAG1MB3.msg.corp.akamai.com ([172.27.27.103]) by ustx2ex-dag1mb3.msg.corp.akamai.com ([172.27.27.103]) with mapi id 15.00.1473.003; Wed, 20 Mar 2019 08:52:45 -0500 From: "Sanford, Robert" To: Erik Gabriel Carrillo , "thomas@monjalon.net" , "dev@dpdk.org" CC: "nhorman@tuxdriver.com" Thread-Topic: [PATCH v4 1/2] timer: allow timer management in shared memory Thread-Index: AQHU1EDuw0hakajaDke+tnCFUAJA1aYUsKQA Date: Wed, 20 Mar 2019 13:52:45 +0000 Message-ID: <40792313-7864-470F-B188-9AA1A0F072B8@akamai.com> References: <1544739996-26011-1-git-send-email-erik.g.carrillo@intel.com> <1551892822-23967-1-git-send-email-erik.g.carrillo@intel.com> <1551892822-23967-2-git-send-email-erik.g.carrillo@intel.com> In-Reply-To: <1551892822-23967-2-git-send-email-erik.g.carrillo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/10.10.0.180812 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.19.132.235] Content-Type: text/plain; charset="UTF-8" Content-ID: <869F80FE2F276F44AD527AE91E8B03B0@akamai.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-20_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903200106 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-20_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903200107 Subject: Re: [dpdk-dev] [PATCH v4 1/2] timer: allow timer management in shared memory 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" Message-ID: <20190320135245._Zz7Q1qnhwI9Ubo1RMpjX-LRchSyMr00Ja5KKhRJXBc@z> SGkgRXJpaywNCg0KSSBoYXZlIGEgZmV3IHF1ZXN0aW9ucyBhbmQgY29tbWVudHMgb24gdGhpcyBw YXRjaCBzZXJpZXMuDQoNCjEuIERvbid0IHlvdSB0aGluayB3ZSBuZWVkIG5ldyB0ZXN0cyAoaW4g dGVzdC90ZXN0LykgdG8gdmVyaWZ5IHRoZSBzZWNvbmRhcnktcHJvY2VzcyBBUElzPw0KMi4gSSBz dWdnZXN0IHdlIGRlZmluZSBkZWZhdWx0X2RhdGFfaWQgYXMgY29uc3QsIGFuZCBleHBsaWNpdGx5 IHNldCBpdCB0byAwLg0KMy4gVGhlIG91dGVyIGZvci1sb29wIGluIHJ0ZV90aW1lcl9hbHRfbWFu YWdlKCkgdG91Y2hlcyBiZXlvbmQgdGhlIGVuZCBvZiBwb2xsX2xjb3Jlc1tdLiBJIHN1Z2dlc3Qg YSBjaGFuZ2UgbGlrZSB0aGlzOg0KDQotICAgICAgIGZvciAoaSA9IDAsIHBvbGxfbGNvcmUgPSBw b2xsX2xjb3Jlc1tpXTsgaSA8IG5iX3BvbGxfbGNvcmVzOw0KLSAgICAgICAgICAgIHBvbGxfbGNv cmUgPSBwb2xsX2xjb3Jlc1srK2ldKSB7DQorICAgICAgIGZvciAoaSA9IDA7IEkgPCBuYl9wb2xs X2xjb3JlczsgaSsrKSB7DQorICAgICAgICAgICAgcG9sbF9sY29yZSA9IHBvbGxfbGNvcmVzW2ld Ow0KDQo0LiBTYW1lIHByb2JsZW0gKGFzICMz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