DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Slava Ovsiienko <viacheslavo@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	 "NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
	"i.maximets@ovn.org" <i.maximets@ovn.org>,
	 Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>,
	 Matan Azrad <matan@nvidia.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	 Ferruh Yigit <ferruh.yigit@amd.com>, Ori Kam <orika@nvidia.com>
Subject: Re: [RFC PATCH] ethdev: advertise flow restore in mbuf
Date: Thu, 15 Jun 2023 10:00:41 +0200	[thread overview]
Message-ID: <CAJFAV8wWRHsMAyLGhkcM5oBDWwAHr5bKD3h2_FbqazT_+JGT+A@mail.gmail.com> (raw)
In-Reply-To: <DM6PR12MB37537088511D9CA123C240ACDF5AA@DM6PR12MB3753.namprd12.prod.outlook.com>

On Wed, Jun 14, 2023 at 6:46 PM Slava Ovsiienko <viacheslavo@nvidia.com> wrote:
>
> Hi, David
>
> It looks like a good application datapath optimization, as for me.
> But I see some concerns:
>
> 1. Are we sure the PMD should register the flag, not application?
> IIRC, usually application registers needed flags/fields and PMDs just follow.

I agree, this should come from the application.
Maybe this flag should be resolved when the application calls
rte_eth_rx_metadata_negotiate().
For an unknown reason, mlx5 does not implement this ops atm, but I
guess this would be a good place to check for the dv_xmeta_en stuff,
too.


>
> +       if (!sh->tunnel_hub && sh->config.dv_miss_info) {
> +               err = mlx5_flow_restore_info_register();
> +               if (err) {
> +                       DRV_LOG(ERR, "Could not register mbuf dynflag for rte_flow_get_restore_info");
> +                       goto error;
> +               }
>
> 2. This might have some general mlx5 Rx datapath performance impact (very minor though)
> It introduces extra memory access (instead of immed value). We should test thoroughly.
>  @@ -857,7 +857,7 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
>                 if (MLX5_FLOW_MARK_IS_VALID(mark)) {
>                         pkt->ol_flags |= RTE_MBUF_F_RX_FDIR;
>                         if (mark != RTE_BE32(MLX5_FLOW_MARK_DEFAULT)) {
> -                               pkt->ol_flags |= RTE_MBUF_F_RX_FDIR_ID;
> +                               pkt->ol_flags |= rxq->mark_flag;
>                                 pkt->hash.fdir.hi = mlx5_flow_mark_get(mark);
>                         }
>                 }

I am curious about the impact of such a change too.


>
> 3. RTE_MBUF_F_RX_FDIR_ID is also handled in vectorized rx_burst() routines.
> Please, see:
>  - mlx5_rxtx_vec_altivec.h
>  - mlx5_rxtx_vec_neon.h
>  - mlx5_rxtx_vec_sse.h
> This code must be updated, and it also might have some general (regardless of using tunnel offload
> - for all cases) performance impact.

Indeed, I forgot to squash some later changes I was experimenting with.
Well, numbers will tell us.

I'll send a RFC v2.


-- 
David Marchand


  reply	other threads:[~2023-06-15  8:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 10:31 David Marchand
2023-05-24 12:57 ` David Marchand
2023-05-24 16:00 ` Ori Kam
2023-05-24 18:44   ` David Marchand
2023-06-01  8:48     ` David Marchand
2023-06-01  9:31       ` Ori Kam
2023-06-01  9:43         ` David Marchand
2023-06-01 10:02           ` Ori Kam
2023-06-01 10:03             ` David Marchand
2023-06-14 16:46 ` Slava Ovsiienko
2023-06-15  8:00   ` David Marchand [this message]
2023-06-15 13:47 ` [RFC PATCH v2] " David Marchand
2023-06-19 12:20   ` Andrew Rybchenko
2023-06-19 13:57   ` Slava Ovsiienko
2023-06-20 10:04   ` Ali Alnubani
2023-06-20 11:10 ` [RFC PATCH v3] " David Marchand
2023-06-20 16:43   ` Slava Ovsiienko
2023-06-21  7:43     ` David Marchand
2023-06-21 12:53     ` Ori Kam
2023-06-21  7:47   ` Ali Alnubani
2023-06-21 14:43 ` [PATCH v4] " David Marchand
2023-06-21 18:52   ` Ferruh Yigit
2023-07-31 20:41   ` Ilya Maximets
2023-09-26  9:17     ` David Marchand
2023-09-26 19:49       ` Ilya Maximets

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=CAJFAV8wWRHsMAyLGhkcM5oBDWwAHr5bKD3h2_FbqazT_+JGT+A@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=i.maximets@ovn.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=yuying.zhang@intel.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).