From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0067.outbound.protection.outlook.com [104.47.0.67]) by dpdk.org (Postfix) with ESMTP id 9F4D17CEF for ; Tue, 23 Jan 2018 15:16:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=auJ3KaHByY/4ngepr4qtoiz3rTgAkf8XeGH3cw8QI1o=; b=GkptU4K6+9bXJ5NeF6LpZFK2h9sNjIOnQ1WTPcjs2deTtFTxQvl1pGeCjqSL3YLJWN/b8khiSPObSUvIdX/DAL/qY3lrIUSP1+oT2vLAKPIH8k16rMywUiSZdsJlTMWK03pfxu52Q2JG7hp7og19cL0xhS3/igdBEgrd103YEu0= Received: from VI1PR05MB1678.eurprd05.prod.outlook.com (10.165.235.152) by VI1PR05MB3279.eurprd05.prod.outlook.com (10.170.238.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Tue, 23 Jan 2018 14:16:09 +0000 Received: from VI1PR05MB1678.eurprd05.prod.outlook.com ([fe80::34c1:e91f:7ec2:161]) by VI1PR05MB1678.eurprd05.prod.outlook.com ([fe80::34c1:e91f:7ec2:161%14]) with mapi id 15.20.0428.023; Tue, 23 Jan 2018 14:16:09 +0000 From: "Xueming(Steven) Li" To: =?utf-8?B?TsOpbGlvIExhcmFuamVpcm8=?= CC: Shahaf Shuler , "dev@dpdk.org" Thread-Topic: [PATCH] net/mlx5: remmap UAR address for multiple process Thread-Index: AQHTkTeZ8R59QK90P0Kjlx/RCDq2uaN//w6AgAE270CAAERtAIAABsfA Date: Tue, 23 Jan 2018 14:16:08 +0000 Message-ID: References: <20180119150854.89828-1-xuemingl@mellanox.com> <20180122145321.jpyepyvjjlktillp@laranjeiro-vm.dev.6wind.com> <20180123133108.b2uhpfjaaalfhsqq@laranjeiro-vm.dev.6wind.com> In-Reply-To: <20180123133108.b2uhpfjaaalfhsqq@laranjeiro-vm.dev.6wind.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [114.83.161.171] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB3279; 7:HAxYec0p7VOn/KPWUXJOLUbyxzsZ+CAqy6QlU5XaXFKzuPgRQUBMqkCRlQ/qCInekakucNVSc1rQ+7GkqGXwwK088aNw4mXYR8xQkEH6Y8H8vJyfzF1aAnOFAJpws3TwtrFLMeoxDbmZowOjipbydtXQOYCNrc7M7XkrIg5oVw76WXL9sTypFdXvlhwew+b3aJ9+4WgLrpyHh4n1lLIjLmR5MDmhl7f41zmSy+jGPkuQymtKcS8+HRGHK1Rn7dlf x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 532726a1-acf6-42df-4cfb-08d5626bd96e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060)(7193020); SRVR:VI1PR05MB3279; x-ms-traffictypediagnostic: VI1PR05MB3279: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(17755550239193); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231023)(2400081)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:VI1PR05MB3279; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR05MB3279; x-forefront-prvs: 05610E64EE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(39380400002)(376002)(396003)(346002)(13464003)(199004)(189003)(6346003)(575784001)(86362001)(68736007)(53936002)(2906002)(2900100001)(59450400001)(2950100002)(81156014)(81166006)(8676002)(76176011)(5660300001)(8936002)(93886005)(316002)(6916009)(9686003)(229853002)(6436002)(7696005)(478600001)(105586002)(54906003)(4326008)(25786009)(97736004)(33656002)(6246003)(6116002)(3846002)(55016002)(7736002)(305945005)(74316002)(102836004)(26005)(99286004)(66066001)(3660700001)(3280700002)(106356001)(53546011)(14454004)(5250100002)(6506007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3279; H:VI1PR05MB1678.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=xuemingl@mellanox.com; x-microsoft-antispam-message-info: 3oug2s/cCGXiDh3vCW8cMVx/NXphLxxtKevY7WsKm5h7vJH/Tq52lofsAiEhpRsCOyWwui9gHTafJoJuWd6S+A== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 532726a1-acf6-42df-4cfb-08d5626bd96e X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2018 14:16:09.0606 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3279 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: remmap UAR address for multiple process 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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