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 B2D62A00BE; Fri, 12 Jun 2020 01:36:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BED18DE3; Fri, 12 Jun 2020 01:36:00 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2080.outbound.protection.outlook.com [40.107.22.80]) by dpdk.org (Postfix) with ESMTP id 2CC80DE0 for ; Fri, 12 Jun 2020 01:35:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I9377NbulV5dyUWiu2mNsiQiEkGE+4kuD5FMwSegBAVETRLItjGns0j3tGaN6P38n8ebLJwt44AqJyd0uqrHPIze/nRh1cMLsu/+IMKBi9optblE11TDZT2C+fdGKGyqosTUoTHBNaZQJrb5YzGT/z3dFWHPVkQRGQJnO6stNkVzeINVPl5FUPgGDhEmvqCuJpiFN7WIcuYJX0hFyXl2+6H3fi5YaG99YgkySROO6Is3bly5Seb/XMIRT54Iz7nG5ifASatdOOxc0o4LWIgA+pFMabCgmFFUdV8O9FK7esmbuIEaOX0vI6u1LF8hTNEGZFOyL43+TLDa3U+As1Iz+Q== 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=euKZwyYhMMwVnSb9A8mO4WZnKT3Sj1K45Dy++ikjkJg=; b=Cd6C8VXc2XtWccWji++ou1OfP20Z4Qg3kDTcleXnw4TQq+0JGya88qOhj753naks0eTAYd8kEswVKgRCtl6/J0d14L+YKRd+Nwjb0LhF1ZnJcEwNIseHSrzeF2GZ09mCB4w+TyIGbFcKna0TvacHInDmXS9rdWP2xuV5nScbAlwYtHXoxkWEp8Bciifcia5g2mkRo0iuEATB/5fkm4O7i+QljGoVwwjIPrfWabP6ZyQex78B+bCKEdvWM5AujArTjdf2Rs4wc1ndvxpd6y4ESd7Sc2LDUnf7sgWx7Kl2wEq0kbrXdW0W1zuTyRAo388k8awo6oIZQJBwxvy+8Nlh+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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=euKZwyYhMMwVnSb9A8mO4WZnKT3Sj1K45Dy++ikjkJg=; b=AvXY7STHuaKQDmOJPBwOwNbOXe0M2n+ujTsYxoyJFfnHGruWtgVbTn6/E70hWSDoWzx1zLNqfslRcZ+pbqyp1rT37QbM3fLn+8WMHUh5Evd9XjneIH4G0IhWnO5ZP3jh2LvoKLyqu+lQh8A12Q296Nl5rLV57f596Sy2JRcsaRc= Received: from AM0PR05MB4561.eurprd05.prod.outlook.com (2603:10a6:208:ad::20) by AM0PR05MB4643.eurprd05.prod.outlook.com (2603:10a6:208:b4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18; Thu, 11 Jun 2020 23:35:58 +0000 Received: from AM0PR05MB4561.eurprd05.prod.outlook.com ([fe80::c4de:576a:33dd:554a]) by AM0PR05MB4561.eurprd05.prod.outlook.com ([fe80::c4de:576a:33dd:554a%5]) with mapi id 15.20.3066.023; Thu, 11 Jun 2020 23:35:58 +0000 From: Alexander Kozyrev To: "dev@dpdk.org" Thread-Topic: [RFC] net/mlx5: add vectorized mprq Thread-Index: AdZASKa9w6G69yXFTzqTz+RumyAKXw== Date: Thu, 11 Jun 2020 23:35:58 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [2607:fea8:e380:d8e0:c43f:9b51:c42b:70c1] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d4fcd40d-e3ea-4b40-f26f-08d80e60318c x-ms-traffictypediagnostic: AM0PR05MB4643: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0431F981D8 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /tS0nX+FamqE6ZPsYGHM8iYfYyBXzBFoXMyMVZvFIrKPYevJOJv07rW9iCT0TUFfheuiFZUs3SLuGuQ/lmLPEubW1hd/BFmkIvAQHUxwdp7GDt5Vf86D20uODGf2fMCZC4Z64Vsy7qEDeV68Pl0Wrum0uJwfAJ6go8CUlusMaS5syw0RhmBB1CxcdMC+BoAtlae8LUoiEZra6YR0Ua6/+AfL5NRNDF2hApSyE5eHAGyW774vhGYywapAh7jcBjFfuH2VMG3nqR9uz6HhH72Qx5LI+SpOYSQ6a4C3KWxXc56oScA3+TDdAaluiU591bB8 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB4561.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(136003)(396003)(376002)(366004)(39860400002)(186003)(6916009)(76116006)(478600001)(66556008)(64756008)(33656002)(71200400001)(66446008)(2906002)(6506007)(66476007)(66946007)(8676002)(5660300002)(316002)(7696005)(9686003)(86362001)(83380400001)(8936002)(55016002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: ytxefVcOGnxa2JhKdjY2qSOsZQj3YLV428e4r1X8S5RxTKzG5kZAXrCVZKeRUMTeawPkNSjz7oz1gt1G/FL+euyuX87SGL96zyzoPBaKWa2OBFlXfmyXqUVZaWCWmcSgVXLFaFooc3n4PKgEPU/zNIhygRvaCwaDReVKgjU3+FLo5YMTaFKUoAbkRXhlwIV4RsyW3vGDM2VL3IVG/SojPkvtnzAxTBUwJjqpcaiVQQNZLmV1+l6cjWmdrqIM2Q3W3kluNJESAyBoUk9KhznOnCqnP8I60PnINntT5dzUS3WtE5X99MRQDP0pnteP3k0LpT95tsDklqPkB2esvXXt6Hfni8q+SCFz1mmJtWoB5d/d4uNMkR7B9gIVH6J/BgRr+DfYR+fh02v2BGRM7AKTZQ2oeccPttcAraDSkRi7HgXZrkF/fDpeVI4CV6oxZ0z/qgFP9/mMu/hnjqG+S/qu0juzMwJ6vLamfCF7PzPvW/q/ZSJbX9EBIDLnVdeGy1jC7XzkAHGj0QGUz339LK3Uew9Zncx/YKf7xbkRyVpDA7KCjGl19lNENjNvDrsXFR/A x-ms-exchange-transport-forked: True 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: d4fcd40d-e3ea-4b40-f26f-08d80e60318c X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jun 2020 23:35:58.2695 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Fe++QKujyfOt8CesXdFiyCj7htd1NU2WeebOg8w3fL8jyOt2xvx1Dfv8HUusNAWlLONN1cvxOJ2pB9vQz0fKrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4643 Subject: [dpdk-dev] [RFC] net/mlx5: add vectorized mprq 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" The vectorized Rx burst function helps to accelerate the Rx=20 processing by using SIMD (single instruction, multiple data)=20 extensions for the multi-buffer packet processing. Pre-allocating multiple mbufs and filling them in batches of four greatly improves the throughput of the Rx burst routine. MPRQ (Multi-Packet Rx Queue) lacks the vectorized version currently. It works by posting a single large buffer (consisted of multiple fixed-size strides) in order to receive multiple packets at once on this buffer. A Rx packet is then copied to a user-provided mbuf or PMD attaches the Rx packet to the mbuf by the pointer to an external buffer. It is proposed to add a vectorized MPRQ Rx routine to speed up=20 the MPRQ buffer handling as well. It would require pre-allocation of multiple mbufs every time we exhaust all the strides from the current MPRQ buffer and switch to a new one. The new mlx5_rx_burst_mprq_vec() routine will take care of this as well as of decision on whether should we copy or attach an external buffer for a packet. The batch processing logic won't be different from the simple vectorized Rx routine. The new vectorized MPRQ burst function is going to be selected automatically whenever the mprq_en devarg is specified. If SIMD=20 is not available on the platform we fall back to the simple MPRQ Rx burst function. LRO is not supported by the vectorized MPRQ version and fall back to the regular MPRQ will be performed. Signed-off-by: Alexander Kozyrev