From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A1B2BA04B1; Thu, 24 Sep 2020 07:25:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DABBF1DD1B; Thu, 24 Sep 2020 07:25:35 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id F0B131DB40 for ; Thu, 24 Sep 2020 07:25:33 +0200 (CEST) IronPort-SDR: Ohrz8u2duJ/HnBrwxZOBHwWPiRB3y0Z5BnQy7L0RweVMmUQCmrkXFftzC8j0AYEOx+7U2kpzZm i2E0AcBwzhyA== X-IronPort-AV: E=McAfee;i="6000,8403,9753"; a="141119211" X-IronPort-AV: E=Sophos;i="5.77,296,1596524400"; d="scan'208";a="141119211" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 22:25:32 -0700 IronPort-SDR: C8dqcfPw1E3gEPol3z3gxXNeDphsuuKytW6JYnm9EMCYxHzQ7SJCKFxCHNn62G8D2BEJbSVj8W JA9PmhhOd9jg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,296,1596524400"; d="scan'208";a="349134082" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga007.jf.intel.com with ESMTP; 23 Sep 2020 22:25:32 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Sep 2020 22:25:32 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Sep 2020 22:25:31 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 23 Sep 2020 22:25:31 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 23 Sep 2020 22:25:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KO6YkobOxP1t5UNNE/hVCeJogn5Vns6qPQaaJSs5BvJWf+tOC4UYQSUVPluEq7UP7JzSj+S28nraPSXPQ9GiWZ3cAwcavuBiqxzJHjEyP0fe2UObFQFgHkMAFh9/EUY4/4167p8n0Lg8p0ZBggEsHhhr8/xdOali61YVuWu4cvGiEZW6Pk4b2yKAPindRPAfKhhcSrQndkeub3OqyTjIKD8hMzCafpw8SmIStbYEedOgpShnLA2Del8yBz76sBNcoDDvEi5+Fhtm3s6oUjdJx+u3yjXxLftsvABTz68mk6CLCnWgkEsi1Y9LVgavXLEp8RlIoGIHz1AG/FEgNnOY/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xy/66qn2DDKTtPrjtL/gn3HISPqwTo8K/YCZl50puuY=; b=Sf2mFjrXyiETN6pq2iUpIcIJ0aGK13uW8cbEGzMMD1ntDXBGPjOMB9zFe0NnDHgYPH0ulz/5AdnvUg3px7QwmNnV4aVwIWzBxiZOgqDL0VM4x89H+23ZvVqhiND6Abd90sXbbC56M6P7wM/fcliqJDhqV+qOsbzYSx5da79qLI3Nf3zz2lleS24pAeBP1FIEHPBHO+tX0VRxaXcIW/+/MRaFGRbs08Y9BUq1NqkSbaT1sTB0bly37MSWBdPK0FxV/cloVFpW+ZsVzNck2sY7MkdBZoGPSATj2prR4dedIGr7HH7uMUA0ZzuttN6eXse5dhVXpZMZuvGqDw6xggsULQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xy/66qn2DDKTtPrjtL/gn3HISPqwTo8K/YCZl50puuY=; b=iB8K/hzdaE6eHGMabpT+/IUiiXTnJYfdZXRlRPhWxznyIfOFi7o+AuUZuh7wh/RwpSTKTrz5TZgu0Ln0gapJ3jqnd8ZFVl1Hk2yIhIfLpAwupouYsEQ3vBYhooL67nFgUYVU0aYgfxhKXoBJn8xje/dUCisArRA3Hu/7vmO9ng0= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB3600.namprd11.prod.outlook.com (2603:10b6:208:fa::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14; Thu, 24 Sep 2020 05:25:17 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::b898:36f5:61cb:42ca]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::b898:36f5:61cb:42ca%7]) with mapi id 15.20.3391.027; Thu, 24 Sep 2020 05:25:16 +0000 From: "Xia, Chenbo" To: Maxime Coquelin , "dev@dpdk.org" , "Fu, Patrick" , "amorenoz@redhat.com" Thread-Topic: [dpdk-dev] [PATCH 1/7] bus/vdev: add DMA mapping ops Thread-Index: AQHWiE2K2YDANJkemUuk68q8XEhNvql3GZQA Date: Thu, 24 Sep 2020 05:25:16 +0000 Message-ID: References: <20200911150805.79901-1-maxime.coquelin@redhat.com> <20200911150805.79901-2-maxime.coquelin@redhat.com> In-Reply-To: <20200911150805.79901-2-maxime.coquelin@redhat.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ea5c41f2-39d6-46e7-109e-08d8604a38d0 x-ms-traffictypediagnostic: MN2PR11MB3600: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1824; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ve+i6AP7Y+OWC1p1W+4anzX0EJWGo0axtcNr4poO5Yrp7Mnd3Bxki/Kns4Uc3sTCB2w7YdsIq57vjZMjK9ZjM0l/FSqI9MFDqdL8aRvm49+i1Ek1N1x7HoiioORRQhTcmI/sgYXPF1pUL/ZEeC7+b3DwxOD+toC/bVRc/9SZgA+98TDlM8KTZkiXSKgy2K4dZLuAq3sjOKsdLEdU7atnkHMARlAaK5aFm5GMRC5Qvj07aMKNK7quXLWWVjYECZwkooSEeormPq6FXOQiWdpNkxUNSxUWPWCDoFlgfNB6InMo9SCu+VD4oC/KiWw0lwHbTR8UpU96jyyF6yO7kU/S6pFs4uz+8ABCtsCboUjrQnmxkNbNAfI+xqE+rk6mOgLJ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(376002)(346002)(396003)(39860400002)(71200400001)(64756008)(66446008)(478600001)(83380400001)(2906002)(186003)(86362001)(33656002)(26005)(66476007)(316002)(55016002)(9686003)(5660300002)(76116006)(66946007)(66556008)(7696005)(6506007)(110136005)(8676002)(53546011)(8936002)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: MfUkgfAMKvKE+SXqblRpd0kmMuScQQSwtWreHCjr3zi587Gs1GOq1pcqgCefN7fzjzLaojPQxtIPJo3hnllr0Xdpfvyu6X5AnxcUSctzciFVmHuR0B/ryaA5GLUQWXYnXMWBbKPNzHLtDQqpKmjjMwx/EJHTPFLlr1FigWzgJ9Ab7ex5h+uGbWmlJ9HIrCxDcY/gnA1yPj62tkIij0aiJ0eH6BSHHO7O/jY7pe57J53N8Q2NA2kG1pVJ47NHdLCCK+bRTd+BVbi/epizT6lKB1AQ6uUM40UYvEowZRjao27lGJNvTP2KEzSDpXMBnefSQ0nf/ICXyOjTeqtbvaYAchS1zgWEvynevpzNcscHcCaTFGlc4goDF7prRrEZL/SkIQVDYO4CQNYavzZB7jNsMdtNvwzelCLshqAH53GutrHxPXtTmH7ceQqFDbs9g5f1tbDcBvJuyJ4A5Xb+eR4B3upniVINSODtR6AnwYDGboO7wO2h0nbZQGkXRPt2vrEos3O7ruAH+VUcy1vU0+fPWjVhK0eNz2FYhwAmREW8nAW/t7jaHrfYWJq0GJCGIZsdF+4006BjotiPscS1slqBih4X95AzY9a5J0LxgCK28S/0fHPpQ6er5eFXDRSzlNNf1q0Xe7GmckynZZttscjd4A== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4063.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea5c41f2-39d6-46e7-109e-08d8604a38d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Sep 2020 05:25:16.8512 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1SSMpgSBQj1WYDjx9Dpk5kCMugNDyo6eiUWfDLv2HRcHej+KNkYP5ygtwWW6/oQoVYdEXeqYkOOVD7hbysPSSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3600 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/7] bus/vdev: add DMA mapping ops 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" SGkgTWF4aW1lLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IGRldiA8 ZGV2LWJvdW5jZXNAZHBkay5vcmc+IE9uIEJlaGFsZiBPZiBNYXhpbWUgQ29xdWVsaW4NCj4gU2Vu dDogRnJpZGF5LCBTZXB0ZW1iZXIgMTEsIDIwMjAgMTE6MDggUE0NCj4gVG86IGRldkBkcGRrLm9y ZzsgRnUsIFBhdHJpY2sgPHBhdHJpY2suZnVAaW50ZWwuY29tPjsgYW1vcmVub3pAcmVkaGF0LmNv bQ0KPiBDYzogTWF4aW1lIENvcXVlbGluIDxtYXhpbWUuY29xdWVsaW5AcmVkaGF0LmNvbT4NCj4g U3ViamVjdDogW2RwZGstZGV2XSBbUEFUQ0ggMS83XSBidXMvdmRldjogYWRkIERNQSBtYXBwaW5n IG9wcw0KPiANCj4gQWRkIERNQSBtYXAvdW5tYXAgb3BlcmF0aW9uIGNhbGxiYWNrcyB0byB0aGUg dmRldiBidXMsIHdoaWNoDQo+IGNvdWxkIGJlIHVzZWQgYnkgRE1BIGNhcGFibGUgdmRldiBkcml2 ZXJzLg0K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