From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-io0-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) by dpdk.org (Postfix) with ESMTP id BE2A91B39F for ; Mon, 6 Aug 2018 21:46:11 +0200 (CEST) Received: by mail-io0-f179.google.com with SMTP id z19-v6so12052989ioh.4 for ; Mon, 06 Aug 2018 12:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=p+3RiADYl8BroTqeF49XhxlML5NjQa9x/7tNbmvRzf4=; b=ga1qZE1TDVqOZfQxK3s2lvZ3xJq+nswAO6rinFhGpa3jaeze0quoONj2Hd9AXZqvXN au013IAH7nYWirx1x+AfUdmmytI+R9KrdcNkYXK3oUPZ6G2rGQ3n6qobOgUHw2nBk72U /aF+6qKMYLzJwnBTtEBlnYBbCYrvmW8wI3QKIAA2alWYezCBVvzhLtqBynv5GU/nY32O hCPGVp+ci9Z8dxZaW5d8vjQ4fQlQYedaa1C9elP6nYNIcgomSCJTONMMD+EnIn8ihtbf sfBK6DIzttfhHlf0uGpgIG2oo2Oxnp7hvtWS1PK9qz08ZD/Apjt2W+aPXgGePs6+GMp7 v/0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=p+3RiADYl8BroTqeF49XhxlML5NjQa9x/7tNbmvRzf4=; b=bJ2xSfES6X2gcOvwxabMebBtMf8WgrcMlJwCIIgwdsbrwbs+PlyRghadiEW12rGgN7 /nVtTqNj5gzybBYim4em+frkIGM4RoflxMFMehwTYQHwYxpCRPPQIiP0ajvgqXTbiqut SikOCf3nvH2/u3LK0dfM9rEW9K0tNAqd9m9L4bCl2yRvWrx5zvGshbPz8EQogPrXL6BM 870Lgh7bSIMteSRs+Fo3LFmwO1z/Vo1CMNGhAw+LiEB41khdC8vZoi+mF3AaNKOZZ5JT AeiShpd3cRNwydUYEPRN5z2Vrn16QD9/LMZofIRuRQEOgs+vBv+8ZG5B4ffdSLqqfyG3 nxKQ== X-Gm-Message-State: AOUpUlGUZiEmtr6m6434v6OQqhIX6BAasSEoJEj6830fTMC2Cm86yPv3 0SGfX9Z/MJAOVpvxX5PggiH6uQQ5wj208ifO/RY= X-Google-Smtp-Source: AA+uWPy3sNhEucymBLpn5QQ2a/r97CD1nqLOQGngZEIA6M2PB9+8CohZaIRYL8QL7td44D5o9+XPQp/5J4XJQcBeO44= X-Received: by 2002:a5e:c00d:: with SMTP id u13-v6mr2286763iol.155.1533584771141; Mon, 06 Aug 2018 12:46:11 -0700 (PDT) MIME-Version: 1.0 From: Chas Williams <3chas3@gmail.com> Date: Mon, 6 Aug 2018 15:46:00 -0400 Message-ID: To: Beilei Xing , Qi Zhang , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] i40e VMDQ behavior X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 19:46:12 -0000 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.