DPDK patches and discussions
 help / color / mirror / Atom feed
From: Slava Ovsiienko <viacheslavo@mellanox.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Yongseok Koh <yskoh@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v4 6/8] net/mlx5: introduce Tx burst routine template
Date: Mon, 22 Jul 2019 19:00:41 +0000	[thread overview]
Message-ID: <AM4PR05MB3265BD734738F4E7AEC3EBE7D2C40@AM4PR05MB3265.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <11bf6559-2128-81c8-23ee-5c88a82b9b51@intel.com>

> >> On 7/21/2019 3:24 PM, Viacheslav Ovsiienko wrote:
> >>> Mellanox NICs support the wide set of Tx offloads. The supported
> >>> offloads are reported by the mlx5 PMD in rte_eth_dev_info
> >>> tx_offload_capa field. An application may choose any combination of
> >>> supported offloads and configure the device appropriately. Some of
> >>> Tx offloads may be not requested by application, or ever all of them
> >>> may be
> >> omitted.
> >>> Most of the Tx offloads require some code branches in tx_burst
> >>> routine to support ones. If Tx offload is not requested the tx_burst
> >>> routine code may be significantly simplified and consume less CPU
> cycles.
> >>>
> >>> For example, if application does not engage TSO offload this code
> >>> can be omitted, if multi-segment packet is not supposed the tx_burst
> >>> may assume single mbuf packets only, etc.
> >>>
> >>> Currently, the mlx5 PMD implements multiple tx_burst subroutines for
> >>> most common combinations of requested Tx offloads, each branch has
> >>> its own dedicated implementation. It is not very easy to update,
> >>> support and develop such kind of code - multiple branches impose the
> >>> multiple points to process. Also many of frequently requested
> >>> offload combinations are not supported yet. That leads to selecting
> >>> of not completely matching tx_burst routine and harms the
> performance.
> >>>
> >>> This patch introduces the new approach for tx_burst code. It is
> >>> proposed to develop the unified template for tx_burst routine, which
> >>> supports all the Tx offloads and takes the compile time defined
> >>> parameter describing the supposed set of supported offloads. On the
> >>> base of this template, the compiler is able to generate multiple
> >>> tx_burst routines highly optimized for the statically specified set
> >>> of Tx
> >> offloads.
> >>> Next, in runtime, at Tx queue configuration the best matching
> >>> optimized implementation of tx_burst is chosen.
> >>>
> >>> This patch intentionally omits the template internal implementation,
> >>> but just introduces the template itself to emboss the approach of
> >>> the multiple specially tuned tx_burst routines.
> >>>
> >>> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> >>
> >> Getting following build error with icc, can you please check?
> >>
> >>
> >> .../dpdk/drivers/net/mlx5/mlx5_rxtx.c(4649): error #191: type
> >> qualifier is meaningless on cast type
> >>
> >>
> >>   MLX5_TXOFF_DECL(full_empw,
> >>
> > Sorry, I have no icc at my disposal now. What I can say (sorry again,
> > it is obvious)
> > - It definitely does not like the MLX5_TXOFF_DECL macro. Most likely -
> "restrict" qualifier, I think.
> >
> > With best regards, Slava
> >
> 
> Hi Slava,
> 
> I was hoping error log can give enough hint, but I tested by removing the
> 'restrict' keyword and it fixed the icc warning.
> 
> Can you please check if the 'icc' is right and 'restrict' is meaningless, if so can
> you please send a patch to remove it?
> else please let me know and I can make a patch to disable the specific icc
> warning.

Hi,
it is difficult to say whether qualifier is meaningless, at least I was unable to find the
proof in C99 std - neither in type cast nor in qualifiers chapters. From common sense
 the routine expects the qualified type, we should provide. Anyway, I've checked gcc/clang
compilation with dropped restrict qualifier  and it was OK. Optimization was not harmed as well.

With best regards, Slava





  parent reply	other threads:[~2019-07-22 19:00 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 16:29 [dpdk-dev] [PATCH 0/7] net/mlx5: consolidate Tx datapath Viacheslav Ovsiienko
2019-07-04 16:29 ` [dpdk-dev] [PATCH 1/7] net/mlx5: remove Tx datapath implementation Viacheslav Ovsiienko
2019-07-15 13:59   ` [dpdk-dev] [PATCH v2 0/7] net/mlx5: consolidate Tx datapath Viacheslav Ovsiienko
2019-07-15 13:59     ` [dpdk-dev] [PATCH v2 1/7] net/mlx5: remove Tx datapath implementation Viacheslav Ovsiienko
2019-07-15 13:59     ` [dpdk-dev] [PATCH v2 2/7] net/mlx5: add Tx datapath related devargs Viacheslav Ovsiienko
2019-07-15 13:59     ` [dpdk-dev] [PATCH v2 3/7] net/mlx5: update Tx datapath definitions Viacheslav Ovsiienko
2019-07-15 13:59     ` [dpdk-dev] [PATCH v2 4/7] net/mlx5: add Tx datapath configuration and setup Viacheslav Ovsiienko
2019-07-15 13:59     ` [dpdk-dev] [PATCH v2 5/7] net/mlx5: introduce Tx burst routine template Viacheslav Ovsiienko
2019-07-15 13:59     ` [dpdk-dev] [PATCH v2 6/7] net/mlx5: implement Tx burst template Viacheslav Ovsiienko
2019-07-15 13:59     ` [dpdk-dev] [PATCH v2 7/7] net/mlx5: add minimal required Tx data inline Viacheslav Ovsiienko
2019-07-17  6:53     ` [dpdk-dev] [PATCH v3 0/8] net/mlx5: consolidate Tx datapath Viacheslav Ovsiienko
2019-07-17  6:53       ` [dpdk-dev] [PATCH v3 1/8] net/mlx5: remove Tx datapath implementation Viacheslav Ovsiienko
2019-07-17  6:53       ` [dpdk-dev] [PATCH v3 2/8] net/mlx5: add Tx datapath related devargs Viacheslav Ovsiienko
2019-07-17  6:53       ` [dpdk-dev] [PATCH v3 3/8] net/mlx5: update Tx datapath definitions Viacheslav Ovsiienko
2019-07-17  6:53       ` [dpdk-dev] [PATCH v3 4/8] net/mlx5: add Tx datapath configuration and setup Viacheslav Ovsiienko
2019-07-17  6:53       ` [dpdk-dev] [PATCH v3 5/8] net/mlx5: introduce Tx burst routine template Viacheslav Ovsiienko
2019-07-17  6:53       ` [dpdk-dev] [PATCH v3 6/8] net/mlx5: implement Tx burst template Viacheslav Ovsiienko
2019-07-17  6:53       ` [dpdk-dev] [PATCH v3 7/8] net/mlx5: add minimal required Tx data inline Viacheslav Ovsiienko
2019-07-17  6:53       ` [dpdk-dev] [PATCH v3 8/8] net/mlx5: report supported max number of mbuf segments Viacheslav Ovsiienko
2019-07-21 14:24       ` [dpdk-dev] [PATCH v4 0/8] net/mlx5: consolidate Tx datapath Viacheslav Ovsiienko
2019-07-21 14:24         ` [dpdk-dev] [PATCH v4 1/8] net/mlx5: remove Tx datapath implementation Viacheslav Ovsiienko
2019-07-22  5:32           ` Yongseok Koh
2019-07-21 14:24         ` [dpdk-dev] [PATCH v4 2/8] net/mlx5: add Tx datapath related devargs Viacheslav Ovsiienko
2019-07-22  5:32           ` Yongseok Koh
2019-07-21 14:24         ` [dpdk-dev] [PATCH v4 3/8] net/mlx5: update Tx datapath definitions Viacheslav Ovsiienko
2019-07-22  5:33           ` Yongseok Koh
2019-07-21 14:24         ` [dpdk-dev] [PATCH v4 4/8] net/mlx5: extend NIC attributes query via DevX Viacheslav Ovsiienko
2019-07-22  5:33           ` Yongseok Koh
2019-07-21 14:24         ` [dpdk-dev] [PATCH v4 5/8] net/mlx5: add Tx datapath configuration and setup Viacheslav Ovsiienko
2019-07-22  5:33           ` Yongseok Koh
2019-07-21 14:24         ` [dpdk-dev] [PATCH v4 6/8] net/mlx5: introduce Tx burst routine template Viacheslav Ovsiienko
2019-07-22  5:34           ` Yongseok Koh
2019-07-22 11:53           ` Ferruh Yigit
2019-07-22 13:07             ` Slava Ovsiienko
2019-07-22 16:45               ` Ferruh Yigit
2019-07-22 16:49                 ` Yongseok Koh
2019-07-22 19:00                 ` Slava Ovsiienko [this message]
2019-07-22 18:26           ` [dpdk-dev] [PATCH] net/mlx5: fix icc compilation issue with type qualifier Viacheslav Ovsiienko
2019-07-22 19:07             ` Ferruh Yigit
2019-07-21 14:24         ` [dpdk-dev] [PATCH v4 7/8] net/mlx5: implement Tx burst template Viacheslav Ovsiienko
2019-07-22  5:34           ` Yongseok Koh
2019-07-21 14:25         ` [dpdk-dev] [PATCH v4 8/8] net/mlx5: report supported max number of mbuf segments Viacheslav Ovsiienko
2019-07-22  5:34           ` Yongseok Koh
2019-07-22  8:42         ` [dpdk-dev] [PATCH v4 0/8] net/mlx5: consolidate Tx datapath Raslan Darawsheh
2019-07-04 16:29 ` [dpdk-dev] [PATCH 2/7] net/mlx5: add Tx datapath related devargs Viacheslav Ovsiienko
2019-07-04 16:29 ` [dpdk-dev] [PATCH 3/7] net/mlx5: update Tx datapath definitions Viacheslav Ovsiienko
2019-07-04 16:29 ` [dpdk-dev] [PATCH 4/7] net/mlx5: add Tx datapath configuration and setup Viacheslav Ovsiienko
2019-07-04 16:29 ` [dpdk-dev] [PATCH 5/7] net/mlx5: introduce Tx burst routine template Viacheslav Ovsiienko
2019-07-04 16:29 ` [dpdk-dev] [PATCH 6/7] net/mlx5: implement Tx burst template Viacheslav Ovsiienko
2019-07-04 16:29 ` [dpdk-dev] [PATCH 7/7] net/mlx5: add minimal required Tx data inline Viacheslav Ovsiienko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM4PR05MB3265BD734738F4E7AEC3EBE7D2C40@AM4PR05MB3265.eurprd05.prod.outlook.com \
    --to=viacheslavo@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).