Message ID | 1617631256-3018-1-git-send-email-michaelba@nvidia.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B1E5A0A02; Mon, 5 Apr 2021 16:01:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89969140E95; Mon, 5 Apr 2021 16:01:36 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 8F33F406A3 for <dev@dpdk.org>; Mon, 5 Apr 2021 16:01:35 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from michaelba@nvidia.com) with SMTP; 5 Apr 2021 17:01:32 +0300 Received: from nvidia.com (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 135E1VNW031476; Mon, 5 Apr 2021 17:01:31 +0300 From: Michael Baum <michaelba@nvidia.com> To: dev@dpdk.org Cc: Matan Azrad <matan@nvidia.com>, Raslan Darawsheh <rasland@nvidia.com>, Viacheslav Ovsiienko <viacheslavo@nvidia.com> Date: Mon, 5 Apr 2021 14:00:50 +0000 Message-Id: <1617631256-3018-1-git-send-email-michaelba@nvidia.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH 0/6] net/mlx5: reduce Tx datapath compile time X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
net/mlx5: reduce Tx datapath compile time
|
|
Message
Michael Baum
April 5, 2021, 2 p.m. UTC
The mlx5_rxtx.c file contains a lot of Tx burst functions, each of those is performance-optimized for the specific set of requested offloads. These ones are generated on the basis of the template function and it takes significant time to compile, just due to a large number of giant functions generated in the same file and this compilation is not being done in parallel with using multithreading. Therefore, in this series we split the mlx5_rxtx.c file into several separate files to allow different functions to be compiled simultaneously. Michael Baum (6): net/mlx5: separate Rx function declarations to another file net/mlx5: separate Rx function implementations to new file net/mlx5: separate Tx function declarations to another file net/mlx5: separate Tx burst template to header file net/mlx5: separate Tx function implementations to new file net/mlx5: separate Tx burst functions to different files drivers/net/mlx5/linux/mlx5_mp_os.c | 2 + drivers/net/mlx5/linux/mlx5_os.c | 2 + drivers/net/mlx5/linux/mlx5_verbs.c | 3 +- drivers/net/mlx5/meson.build | 6 + drivers/net/mlx5/mlx5.c | 2 + drivers/net/mlx5/mlx5_devx.c | 3 +- drivers/net/mlx5/mlx5_ethdev.c | 2 + drivers/net/mlx5/mlx5_flow.c | 3 +- drivers/net/mlx5/mlx5_flow_dv.c | 3 +- drivers/net/mlx5/mlx5_flow_verbs.c | 2 +- drivers/net/mlx5/mlx5_mr.c | 2 + drivers/net/mlx5/mlx5_rss.c | 1 + drivers/net/mlx5/mlx5_rx.c | 1203 ++++++++ drivers/net/mlx5/mlx5_rx.h | 598 ++++ drivers/net/mlx5/mlx5_rxmode.c | 1 - drivers/net/mlx5/mlx5_rxq.c | 3 +- drivers/net/mlx5/mlx5_rxtx.c | 5468 +---------------------------------- drivers/net/mlx5/mlx5_rxtx.h | 915 +----- drivers/net/mlx5/mlx5_rxtx_vec.c | 1 + drivers/net/mlx5/mlx5_stats.c | 3 +- drivers/net/mlx5/mlx5_trigger.c | 3 +- drivers/net/mlx5/mlx5_tx.c | 780 +++++ drivers/net/mlx5/mlx5_tx.h | 3734 ++++++++++++++++++++++++ drivers/net/mlx5/mlx5_tx_empw.c | 71 + drivers/net/mlx5/mlx5_tx_mpw.c | 34 + drivers/net/mlx5/mlx5_tx_nompw.c | 71 + drivers/net/mlx5/mlx5_tx_txpp.c | 45 + drivers/net/mlx5/mlx5_txpp.c | 3 +- drivers/net/mlx5/mlx5_txq.c | 3 +- drivers/net/mlx5/mlx5_vlan.c | 1 + drivers/net/mlx5/windows/mlx5_os.c | 2 + 31 files changed, 6581 insertions(+), 6389 deletions(-) create mode 100644 drivers/net/mlx5/mlx5_rx.c create mode 100644 drivers/net/mlx5/mlx5_rx.h create mode 100644 drivers/net/mlx5/mlx5_tx.c create mode 100644 drivers/net/mlx5/mlx5_tx.h create mode 100644 drivers/net/mlx5/mlx5_tx_empw.c create mode 100644 drivers/net/mlx5/mlx5_tx_mpw.c create mode 100644 drivers/net/mlx5/mlx5_tx_nompw.c create mode 100644 drivers/net/mlx5/mlx5_tx_txpp.c
Comments
On Mon, Apr 5, 2021 at 4:01 PM Michael Baum <michaelba@nvidia.com> wrote: > > The mlx5_rxtx.c file contains a lot of Tx burst functions, each of those is performance-optimized for the specific set of requested offloads. > These ones are generated on the basis of the template function and it takes significant time to compile, just due to a large number of giant functions generated in the same file and this compilation is not being done in parallel with using multithreading. > > Therefore, in this series we split the mlx5_rxtx.c file into several separate files to allow different functions to be compiled simultaneously. > > Michael Baum (6): > net/mlx5: separate Rx function declarations to another file > net/mlx5: separate Rx function implementations to new file > net/mlx5: separate Tx function declarations to another file > net/mlx5: separate Tx burst template to header file > net/mlx5: separate Tx function implementations to new file > net/mlx5: separate Tx burst functions to different files Please fix the indentation in meson.build updates. Out of curiosity, what is the gain in compilation time?
> -----Original Message----- > From: David Marchand <david.marchand@redhat.com> > Sent: Tuesday, April 6, 2021 12:34 > To: Michael Baum <michaelba@nvidia.com> > Cc: dev <dev@dpdk.org>; Matan Azrad <matan@nvidia.com>; Raslan > Darawsheh <rasland@nvidia.com>; Slava Ovsiienko > <viacheslavo@nvidia.com> > Subject: Re: [dpdk-dev] [PATCH 0/6] net/mlx5: reduce Tx datapath compile > time > > On Mon, Apr 5, 2021 at 4:01 PM Michael Baum <michaelba@nvidia.com> > wrote: > > > > The mlx5_rxtx.c file contains a lot of Tx burst functions, each of those is > performance-optimized for the specific set of requested offloads. > > These ones are generated on the basis of the template function and it > takes significant time to compile, just due to a large number of giant > functions generated in the same file and this compilation is not being done in > parallel with using multithreading. > > > > Therefore, in this series we split the mlx5_rxtx.c file into several separate > files to allow different functions to be compiled simultaneously. > > > > Michael Baum (6): > > net/mlx5: separate Rx function declarations to another file > > net/mlx5: separate Rx function implementations to new file > > net/mlx5: separate Tx function declarations to another file > > net/mlx5: separate Tx burst template to header file > > net/mlx5: separate Tx function implementations to new file > > net/mlx5: separate Tx burst functions to different files > > Please fix the indentation in meson.build updates. > Out of curiosity, what is the gain in compilation time? Om my development setup, with this patch the partial compilation (for example if we changed the mlx5.h header) takes just several seconds, before one (especially with full debug option) - up to 1 minute - all this this time was eaten by mlx5_rxtx.c. Also this patch is the preparation step for mlx5 Rx datapath consolidation, we aare thing about implementing the rx_burst template routine as we done for the tx_burst, so - it would be nice to resolve the compilation time issue at early stage. With best regards, Slava > > > -- > David Marchand