From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40070.outbound.protection.outlook.com [40.107.4.70]) by dpdk.org (Postfix) with ESMTP id 97CF31B5C0; Sun, 5 Aug 2018 13:33:11 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=4kZpWoCBTH1hB/XLT5sUfcIougBRzofaJXlauYoIMGs=; b=gvbZoVnxC9oTceyhX8wSEuJfxuEFYyowqKQt9in1v4l+NrtFbHNCO9g85gXpp7Cbs7zxS8N4wi3NTUdomo3mqJv4tKfVVjRxq2FlQjfkU391jpKqw+2UmKvPHiq2eVKJ/RNC8wjQ1u3SQDsakAqPr99fMRo0YfzaEaXccntWrlY= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4876.eurprd05.prod.outlook.com (20.176.235.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Sun, 5 Aug 2018 11:33:09 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3%4]) with mapi id 15.20.1017.018; Sun, 5 Aug 2018 11:33:09 +0000 From: Shahaf Shuler To: Yongseok Koh CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix minimum number of Multi-Packet RQ buffers Thread-Index: AQHUKqPTrSoNM7WZ7U+i7hmooxlHa6SxCsGA Date: Sun, 5 Aug 2018 11:33:09 +0000 Message-ID: References: <20180802210007.10671-1-yskoh@mellanox.com> In-Reply-To: <20180802210007.10671-1-yskoh@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4876; 6:BAa3f5GbL4H1aWgZMGg+hXNeSr/NYl5kN7TifZmwxKfbzjmGyLY3LAFHIG2Dr4cpcxo0jy1ZdozTJ4h8xO5gM8Ws8dqCluAGMK8ebA5O17D3EGvphysGueiCDTL0yAP7ztNQvBVoeiLWmOFOWQpaXokbVOhUS+S0k8ZqNEdo6t/GeQQ41gin4ILHCjQ1BxsesKNYtti/JuEti65VnSHK7d1cUnSH2b4AeWko8KVCTeMDQkBv8CYQ8Lewb4iFp578d5HGWf8L7aMLwwiKE8ul8A0qVuStr2M8t97yz6HazNl9rBApoLBcGZNAKoygE60sysIyCVI9nDhBHarIBHkesj2qOUm9ppKgf4/0kBQbFuA05QKMvLucP8RZOOJk+5fqdXv07FQhnXknUIFnQKpQ098eS1gYXHXa+1J4qzHayMpqIwmOgPrSqt33tFYew0XTHxvN7IDeThuJpxDt/gnLHg==; 5:l2aPQ7O6LLP1AINYDlVIdxRKw5Pmo5S6UBsQGvnSC5awPRhhfVvyO38GbaE0uerclPQvrBI6D0aU17XMcpS/GN/4h3k9aM1sfenvjQ2Urcy+e3WaP35G1hn2zZ9F5N8M1iSCafk7sVb4njQyCqgieXKrwpoyAk0MvnFfUxdaUaA=; 7:nQo/JnXh67igWUskuQ9veNOJypXlWCGYYtkmdbSeV6xdcnORJZ51XVXH2rzM3FfA0HXUhn3pcXXsur2P5UPT6iGkYafMtVo5+UHIuX4ydl4ZFRslL/NfkVBnMMQNjfjZ8Jg4rjZZCL9UZRb2ui2w4HppQIsHkF4AmDGnTy9NBooHk9uDQXRZFsgL9m3NJlDG0eKhIhJT0PBd75UK3KbKKbDZfHLDKWEHLad2q+8kdVtHzskJq+TVNJaz85JOBVWh x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 58240b38-461d-4e9f-8ec4-08d5fac73882 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4876; x-ms-traffictypediagnostic: DB7PR05MB4876: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(131327999870524); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DB7PR05MB4876; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4876; x-forefront-prvs: 0755F54DD9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(346002)(39860400002)(396003)(366004)(376002)(189003)(199004)(478600001)(6116002)(3846002)(6862004)(4326008)(53936002)(229853002)(74316002)(8676002)(86362001)(81156014)(81166006)(2900100001)(54906003)(6436002)(6636002)(305945005)(316002)(14454004)(6246003)(25786009)(7736002)(99286004)(450100002)(55016002)(97736004)(446003)(14444005)(256004)(68736007)(106356001)(6506007)(26005)(5660300001)(7696005)(76176011)(476003)(486006)(9686003)(2906002)(66066001)(5250100002)(11346002)(8936002)(33656002)(102836004)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4876; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 6Lw2H/3Ru/Fx2WeGttIIjxH4PlqzpefrxJE9nDsehdmxZyXfd/AcmJz0d4nUuWK5fUxLD/v3xJzL0dbEU4BSqGJhSQxZ80urS8WAihWMPLJ1dWZvrt5Ec0E9IaBZWRkg/DqxHjeMB/Fd9o/brWKEwIeynIQoToZjaDvfKkGjK32h6pyi+oA1NC4JoOvUAhiz4eMIULZ5135YEpfy998PDmdbLGe+8ozMCnPMjNlgDweQLtQpevYSInXMl9xETW1snoEPLJ3npV9osUxe+qivHIIvhFuRMbLvQyrPpH3x0Bl6O5V6KhQB4kYhzGRHbpuxIKpu4w0whWfMcaVrejqmgYs1PgIJJ6x1AJRWcoW3HoQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58240b38-461d-4e9f-8ec4-08d5fac73882 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2018 11:33:09.5108 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4876 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix minimum number of Multi-Packet RQ buffers 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: Sun, 05 Aug 2018 11:33:11 -0000 Friday, August 3, 2018 12:00 AM, Yongseok Koh: > Subject: [PATCH] net/mlx5: fix minimum number of Multi-Packet RQ buffers >=20 > If MPRQ is enabled, a PMD-private mempool is allocated. For ConnectX-4 Lx= , > the minimum number of strides is 512 which ConnectX-5 supports 8. This > results in quite small number of elements for the MPRQ mempool. For > example, if the size of Rx ring is configured as 512, only one MPRQ buffe= r can > cover the whole ring. If there's only one Rx queue is configured. In the > following code in mlx5_mprq_alloc_mp(), desc is 1 and obj_num will be > 36 as a result. >=20 > desc *=3D 4; > obj_num =3D desc + MLX5_MPRQ_MP_CACHE_SZ * priv->rxqs_n; >=20 > However, rte_mempool_create_empty() has a sanity check to refuse large > per-lcore cache size compared to the number of elements. Cache flush > threshold should not exceed the number of elements of a mempool. For the > above example, the threshold is 32 * 1.5 =3D 48 which is larger than 36 a= nd it > fails to create the mempool. >=20 > Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yongseok Koh Applied to next-net-mlx, thanks.