DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] i40e VMDQ behavior
@ 2018-08-06 19:46 Chas Williams
  0 siblings, 0 replies; only message in thread
From: Chas Williams @ 2018-08-06 19:46 UTC (permalink / raw)
  To: Beilei Xing, Qi Zhang, dev

How is VMDQ supposed to work?

The i40e .dev_infos_get doesn't seem to look for the VMDQ enabled flag and
just goes ahead and modifies the queue counts to include the VMDQ queues:

        if (pf->flags & I40E_FLAG_VMDQ) {
                dev_info->max_vmdq_pools = pf->max_nb_vmdq_vsi;
                dev_info->vmdq_queue_base = dev_info->max_rx_queues;
                dev_info->vmdq_queue_num = pf->vmdq_nb_qps *
                                                pf->max_nb_vmdq_vsi;
                dev_info->vmdq_pool_base = I40E_VMDQ_POOL_BASE;
                dev_info->max_rx_queues += dev_info->vmdq_queue_num;
                dev_info->max_tx_queues += dev_info->vmdq_queue_num;
        }

[Note that I40E_FLAG_VMDQ is whether or not the i40e supports VMDQ
apparently.]  This inflates the values of max_rx_queues and max_tx_queues.
But since I am not using VMDQ, I later an error from:

static struct i40e_vsi*
i40e_pf_get_vsi_by_qindex(struct i40e_pf *pf, uint16_t queue_idx)
{
        /* the queue in MAIN VSI range */
        if (queue_idx < pf->main_vsi->nb_qps)
                return pf->main_vsi;

        queue_idx -= pf->main_vsi->nb_qps;

        /* queue_idx is greater than VMDQ VSIs range */
        if (queue_idx > pf->nb_cfg_vmdq_vsi * pf->vmdq_nb_qps - 1) {
                PMD_INIT_LOG(ERR, "queue_idx out of range. VMDQ
configured?");
                return NULL;
        }

as I try to setup the VMDQ queues that the PMD told me I could use.

It's not clear what the right thing to do is.  Should I be
using dev_info->vmdq_queue_num as the PF queue count
if dev_info->vmdq_queue_num is set to anything other than 0?  Even when I
am not using VMDQ?

The examples imply:

examples/vmdq/main.c: num_pf_queues = dev_info.max_rx_queues -
dev_info.vmdq_queue_num;

But that doesn't make sense to me since I am not using VMDQ and in some
cases, like ixgbe, sets vmdq_queue_num to the number of PF queues:

        dev_info->vmdq_queue_num = dev_info->max_rx_queues;

So, in VMDQ mode I would have no PF queues (which sort of make sense) but
if I am not in VMDQ mode, then I still have no PF queues.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-06 19:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-06 19:46 [dpdk-dev] i40e VMDQ behavior Chas Williams

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).