DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Robin Jarry" <rjarry@redhat.com>
To: "Kevin Traynor" <ktraynor@redhat.com>
Cc: "Christophe Fontaine" <cfontain@redhat.com>,
	<dev@openvswitch.org>, "Ori Kam" <orika@nvidia.com>,
	<dev@dpdk.org>
Subject: Re: [PATCH v3] netdev-dpdk: add control plane protection support
Date: Mon, 14 Nov 2022 13:46:18 +0100	[thread overview]
Message-ID: <COC12F263206.3Q3N2UGG748J@paul> (raw)
In-Reply-To: <10a1224e-40f2-b9e1-b522-a271ec122cbe@redhat.com>

Hi Kevin,

Kevin Traynor, Nov 11, 2022 at 19:15:
> > +    reta_conf_size = (dev->reta_size / RTE_ETH_RETA_GROUP_SIZE)
> > +        * sizeof(struct rte_eth_rss_reta_entry64);
>
> In dpdk_eth_dev_init, we get reta_size from driver,
>
> mlx5_ethdev.c
>
> 333├>        info->reta_size = priv->reta_idx_n ?
> 334│                 priv->reta_idx_n : config->ind_table_max_size;
>
> (gdb) p priv->reta_idx_n
> $5 = 1
> (gdb) p config->ind_table_max_size
> $6 = 512
>
> and store:
> dev->reta_size = info.reta_size;
>
> Now we use it,
> dev->reta_size = 1 / RTE_ETH_RETA_GROUP_SIZE   (64)
> but it results in reta_conf_size = 0
>
> > +    reta_conf = xmalloc(reta_conf_size);
>
> xmalloc only allocates 1 byte (void *p = malloc(size ? size : 1);)

Hmm indeed this is bad :)

Since reworking the RSS fallback I may not have re-tested with CX-5,
only with Intel NICs.

I am quite surprised of this return value. Could it be an issue with the
mlx5 dpdk driver?

Thanks for testing!


      parent reply	other threads:[~2022-11-14 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221021145308.141933-1-rjarry@redhat.com>
2022-11-11 18:15 ` Kevin Traynor
2022-11-14  9:41   ` Kevin Traynor
2022-11-14 12:46   ` Robin Jarry [this message]

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=COC12F263206.3Q3N2UGG748J@paul \
    --to=rjarry@redhat.com \
    --cc=cfontain@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dev@openvswitch.org \
    --cc=ktraynor@redhat.com \
    --cc=orika@nvidia.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).