From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BA568A0546; Sun, 14 Feb 2021 11:42:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EFD2406A3; Sun, 14 Feb 2021 11:42:11 +0100 (CET) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mails.dpdk.org (Postfix) with ESMTP id E3B99406A2; Sun, 14 Feb 2021 11:42:07 +0100 (CET) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 14 Feb 2021 02:42:06 -0800 Received: from HQMAIL105.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 14 Feb 2021 02:42:06 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 14 Feb 2021 02:42:06 -0800 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 14 Feb 2021 10:42:06 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 14 Feb 2021 10:42:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HIjXFhQDqy/xnyOc98sU3ltbkz3M0hKz3+Z8sq3gc1+JZZ5GfyDysLmeSi9sLUzzP9HidXAd/NHae0UPsyEqd9GuP21KMTczkfD4i4iKcFoGav1l4CFZTFaBwen2CdXU6Y9Mjn1rsXwBzjbVlb0QAJ3U0g4gPdfJCorYGVo1g9KXVA09OZ4mLPIvV9YwQfpAucweV1QP+cwKfdutto5dkG28StsQ4ApMr7pcl/x56A/zNkA2msCVC+4+oC81M1u8UIgUW3vbyAwLG/KDBb8pxs7v3U7Td7gLqk99uVoyW8tmVlvxz6qMhZOsMSmoRaPCKM+65WHI72EhRZ3uew2Udw== 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=iNi9iZ8GgJzDPVwcSNELIV8GAEN9Wk4aTibH8rN8s3U=; b=bLMiIwvAWSfqNtEzn3zMbr7pHWu0NArILOOzgmhe5s04bwiDGZQDT/fZWDtlVyNU2cy7Y5WERcgm0M3qohPAVOmPqB0KtFTuP2Rkb+416AKW1/aSvCM48rByNtipX8Uc7zPrcmswI4mDZWtKPXHyLnNXKFoCRQB/wqeahkpD0pizP5YLyY5yc9uW2Sni+P48kQPzMdaeM4LTAutN5kfnLfPNVNirsS56v2Hcc7FOpRyHh5t4s52tY77V8qdP91f7kel+xt91ZRVeydEaBZEh5yA04vz/NgYKGvtXW2btH6w8YBDXFv+PUaBufg0rtDhpmdKuPO5aRUdDkrH4RTp0gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MW2PR12MB2492.namprd12.prod.outlook.com (2603:10b6:907:8::19) by MWHPR12MB1901.namprd12.prod.outlook.com (2603:10b6:300:113::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.38; Sun, 14 Feb 2021 10:42:04 +0000 Received: from MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::680b:7b85:ef35:433b]) by MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::680b:7b85:ef35:433b%6]) with mapi id 15.20.3825.030; Sun, 14 Feb 2021 10:42:04 +0000 From: Matan Azrad To: Slava Ovsiienko , "dev@dpdk.org" CC: Raslan Darawsheh , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix external buffer pool registration for Rx queue Thread-Index: AQHXAS9Qbov+aBs/g0q6JVTp/2WxZKpXeWyA Date: Sun, 14 Feb 2021 10:42:04 +0000 Message-ID: References: <20210212110630.2605-1-viacheslavo@nvidia.com> In-Reply-To: <20210212110630.2605-1-viacheslavo@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [79.177.32.239] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cbcc03f7-ce54-48fe-1145-08d8d0d52b3c x-ms-traffictypediagnostic: MWHPR12MB1901: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ai3Dd5tiu7FwCXIkn2jBg16qhJf2Qwy49MIWpU1x/YTMQrhwidgU/A+ZU4RYf7StJGugEwiCs9IFyJAkViS37d4bQU8BpBAHUGIvrmJG8AP7oFeV2nvqFFWRF1vHtSsyW59fyC4iCeWsMcuUeLKBRnqActwv9FVoTlVqEytLJZKXGS9e90/V4qG2W5X4OKQwDJeam9olWU5DFmlKSTnBZIk+lehHK31twC6pUWQpTx/ynaHdDXB0VNJdiWXZmK5fm10hEj4UZWQSAe2Xi6EWbaSh+wXwMcH3B3HE3hFvlc2IdocJ52m4oA9iOIFmdTKoJJJF7yHGbtJSZNy2HQC8P8b5pk6Npez/zBIjTNbVZ0ubj7PukK91XB1vIc90Z4CSujQHREnrFgs0Nwh/Il35KSwXjJPj8oh1V6eGgK+mcccLkI3X4E+rrA0AYwS/7z8OIHKeTkqbeFzMZzdM4krcdl4TBaoCQiZep8BJYXdpUH9J1MKIl4lXZ42hcBLf+8YG2+11NVJM4JqayUV9qhwchQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB2492.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(396003)(376002)(366004)(39860400002)(136003)(2906002)(26005)(64756008)(66556008)(110136005)(54906003)(5660300002)(316002)(86362001)(8676002)(7696005)(8936002)(71200400001)(6506007)(450100002)(9686003)(55016002)(66946007)(66476007)(33656002)(76116006)(66446008)(52536014)(186003)(4326008)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?W05SP5LryrjhVh0teY7AM8hXUZHooJfnxB3kh6bdFfYyVKZFLWJdWXUwLndb?= =?us-ascii?Q?htZc/8p7rfUOsI0NexCviMb1OfOjf5eq3mBBgqFwqSWTtrmLOWXQz3iNeB94?= =?us-ascii?Q?Ev36cXq4Lem3d1V3o/L4ZwkdaBW5+z1qm6/uzMDf3tU5c441ZTYSNxXPiJQh?= =?us-ascii?Q?OHp7vuF5l0SW0oACknSkOCSLjXomWnYDWcTiRYa2mpoVEvndGn8D2G37kmKW?= =?us-ascii?Q?yRtE07Kt3RmtHmEu2g4lG791spFNUZ0CzXNqTvjer5H/cA+LWiTKiEtDUVAf?= =?us-ascii?Q?XkjOJOgcLNqi9yJYTrOQEGn0jiUHw+xS/ndEXnIJ8MjbqZsZ0Uf7fCq4JOxp?= =?us-ascii?Q?v3pYNBEA+yA+LNLv/6UGBm1h9UCnZoMtrRd94i09xDeyQXa7ggtu6zAmCbWd?= =?us-ascii?Q?881lI/MuLWcFRgzKxjv+w17WEZpnb3Ksknt2gS9nrxvmbgdEz/bxfW7ARsQk?= =?us-ascii?Q?W81Ww6qJTJEcRy54/sbBnJyq0dzWaAeS6uSK6p8iqOxwvWnh5FTz2z3FhdK+?= =?us-ascii?Q?bBL/j3/zS4gf7Sf/HGC7oE6FdqBGsDKERSFgUabpl5McQGUb+bZnSmVxrHKk?= =?us-ascii?Q?T/dQGBjU3gPZf+44aTqQeKUQHyUKiuLShD+mcC07scH0FeUmMZxZ7vrAx4R3?= =?us-ascii?Q?Id5Zls5NOtfuoXHOOhXtGP48lIaR245KrSvT3yt3kER04tslg9MHRFPDiMP3?= =?us-ascii?Q?EcvBY2nyhPjKrbnSdYfoQl28BCJsY5K0b1h9kd8vou7ymSGHvIWDmATowcvB?= =?us-ascii?Q?8Afm8i63IGeVx78sgf8rQsi1bxIsxmB1x8QU6m6i9S5wh3BUAg5swgL4VmA3?= =?us-ascii?Q?SS1wjJTLW9kb6n6PZ35pq6zzqZMGQzrRHMQ6GEcmuS6rIf3s0zusRHJewXFc?= =?us-ascii?Q?v5C5yRxfwX2wdgk++SzPPcZuma30FsFU14mHW3fBKaWR5EyxjfSnR4zTx8Sd?= =?us-ascii?Q?DBXF0zGYATLcFqNxy+kMRmh7pGCwz2KNU2I53L0iIgWvc1Q1ov84PoFoQr54?= =?us-ascii?Q?mH8s9nhEfDeCbs+MhJnBNtWNETrWk4EAZrhneXCZZ9B+ys21E7vjTVyHbLmW?= =?us-ascii?Q?6etAZ5D0GN4zipyczwJIXrGGixClLRSq9AgwDfRqCs5tYyDx34Uhh8u5ZZcT?= =?us-ascii?Q?DNwoj3BGMMH8kUTkHoceeue3ixR/DIlcO6ewPW6TSJFnSG0CeeikhuRLYw36?= =?us-ascii?Q?ihe0mV8Pb4QIdnbraDiZ8ICDkMDQVy5n1dSPBh3513pwP2pDtgnnmGzOdBPw?= =?us-ascii?Q?mX2o9fxRv/Yz9T3MXbS514wmvlthu/39igFG8W8TL3+k7EAmjZKxW3n5fg13?= =?us-ascii?Q?dK+vZ+GcSOLu89NDjCvItWjs?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR12MB2492.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbcc03f7-ce54-48fe-1145-08d8d0d52b3c X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2021 10:42:04.3354 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9axnygLTpA9FwYK0Rw5OAzUrGzPc2z9tmTZCMXBaWZlcQ6EpP2lKBB0rcwUWcu8kRV56qes23pkjuDlfgDb5Rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1901 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1613299326; bh=iNi9iZ8GgJzDPVwcSNELIV8GAEN9Wk4aTibH8rN8s3U=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ms-exchange-transport-forked: x-microsoft-antispam-prvs:x-header:x-ms-oob-tlc-oobclassifiers: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:Content-Type: Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=OuSwo7wO1t4Ugsy12y+8ok7okVt3dl+VkNPbIgHSe1CDzvQPMGmzjtSlcCokgeBd4 UytOcbbBiXEKwDCxwdZs70AnYUGIrdclAfxo0KowTMHDZcnX3CcpaVlkeZ4VC4nP5M FS5PrFm3OZhkON3wQuTCDMcU/LrxxsfsSybhOVHuo/Z2Vf15LmmR5HvVbty2PFaU2w HTudFM7NmBo9vNLk6F/8+DYQD1opOeHIaVF/VIovQKlRLPL4jiiuF+YrRrXJQOL4f5 GknrEsJctdAxzkwc0NX+hl5Eq2M0nTvfHk57N40gNR/5na2HAr3+5C6DrlDC5nnAG8 WStcta6UMdzXQ== Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix external buffer pool registration for Rx queue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" From: Viacheslav Ovsiienko > On Rx queue creation the mlx5 PMD registers the data buffers of the speci= fied > pools for DMA operations. It scans the mem_list of the pools and creates = the > MRs (DMA related NIC objects) for the chunks found. > If the pool is created with rte_pktmbuf_pool_create_extbuf() and refers t= o the > external attached buffers (whose are in the area of application responsib= ility > and it should explicitly register the data buffer memory for DMA with > rte_dev_dma_map() call) the chunks contain the mbuf structures only, w/o = any > built-in data buffers. > Hence, DMA with mlx5 NIC never happens to this area and there is no need = to > create MRs for these ones. >=20 > The extra not needed MRs were created for the pools with external buffers > causing MR cache load and performance was slightly affected. > The patch checks the mbuf pool type and skips MR creation for the pools w= ith > external buffers. >=20 > Fixes: bdb8e5b1ea7b ("net/mlx5: allow allocated mbuf with external buffer= ") > Cc: stable@dpdk.org >=20 > Signed-off-by: Viacheslav Ovsiienko Acked-by: Matan Azrad Good catch! > --- > drivers/net/mlx5/mlx5_mr.c | 11 +++++++++++ > 1 file changed, 11 insertions(+)