From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 7066A1B3B8 for ; Thu, 2 Nov 2017 13:03:34 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id r68so10860355wmr.3 for ; Thu, 02 Nov 2017 05:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DKvpnFjMlF8RCEWLKaWfuHgQkXpuTkGhHP7diMVMLi0=; b=a+JHypPdgG3UIVgzWAX1afeqwmpybxGKVis4uECfZRrnH8/u1YAGvG5bVdtnlNx0XZ cVYQU7wtv+VYeEHjO+Gse1vCk1mZiPirLchu7J3l44WuwWlu0mHYmZRZVYAsQ8TeHipN UjDiXEaMKlFZA5Y2Q0ug3LHncaQ9L7tUUGD0B/1p6POjg+wvzvxILJXYtMCAwuo9UUhO VbLKPB0qLc95eeCfxQ+d8WJ2C1uJsApbqYEw9ucWcBlvbxuOzW+uUxehRpLa9mYwfHfa qivykow6jQGwlQu7BVMHNHuWzrqVbxMRTH93tvb05hC8QEuH8sIxkMiKcA6XNb9NNdfB mzUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DKvpnFjMlF8RCEWLKaWfuHgQkXpuTkGhHP7diMVMLi0=; b=lZwheKv/AYPQP6+XZZz8RRp7z79pTKFnmW8R8uDhsmO+csO2c8CZSnSvI7R60hlbQm JOF0NpFLLyrh/0Mc2nRLZhfBUEN7+WcxyX+IkWnHStTMPFF8tdtUGDOowTOoFfIL395j ARa6pzqWBq89Dy4fU/lc7vhRr2a5utA6qrO4tiwHTzkD/18iySsXSbaC1iWWM4+Xzr14 DJ29YoeqyLlVKYMzcPV2bqdGGjXYL6KSJCsALHyZOj6jjQTvqcSHXQBYZupSCXYGMUHo Mhtz7zZL6t03Sz7IhPM5yrVB2ZbCXNADgOc2/yFHKKeJzrJvdF9Mslj8jxaAZ5F1VDHy HgKg== X-Gm-Message-State: AMCzsaVRT6bXoishUUR54E6Wf4RbNHesUmCqbEOCJmTw71ucj0YWSgwD +sWOXi8LInMRkM75/rBnEr0= X-Google-Smtp-Source: ABhQp+QD+sjJ4mj8zJCroes4KOxo30NPkMJ2OW2HI4sLi2QH3H6OmMWHzBS9jgCdrIHmJFQxfqezsw== X-Received: by 10.28.23.129 with SMTP id 123mr1405537wmx.54.1509624214175; Thu, 02 Nov 2017 05:03:34 -0700 (PDT) Received: from localhost ([2a00:23c5:bef3:400:4a51:b7ff:fe0b:4749]) by smtp.gmail.com with ESMTPSA id n2sm7560134wmd.39.2017.11.02.05.03.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Nov 2017 05:03:33 -0700 (PDT) From: luca.boccassi@gmail.com To: Wei Dai Cc: Jingjing Wu , dpdk stable Date: Thu, 2 Nov 2017 12:02:39 +0000 Message-Id: <20171102120247.10565-10-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171102120247.10565-1-luca.boccassi@gmail.com> References: <20171030153511.13322-1-luca.boccassi@gmail.com> <20171102120247.10565-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/ixgbe: fix PF DCB info' has been queued to LTS release 16.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2017 12:03:34 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/04/17. So please shout if anyone has objections. Thanks. Kind regards, Luca Boccassi --- >>From 7d06b691289fc377135ae6970f1749a5abe21914 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Mon, 23 Oct 2017 14:43:57 +0800 Subject: [PATCH] net/ixgbe: fix PF DCB info [ upstream commit 9be9050134aaf09089f0cfb7723159eecc4a15e5 ] When SRIOV is active, the function ixgbe_dev_get_dcb_info( ) should return the DCB traffic class info of its own queues, not including any DCB info of the queues of any its VF. When VMDQ is active, all queues are belonged to the PF, the function ixgbe_dev_get_dcb_info can return DCB info of all queues. Fixes: 89d6728c7837 ("ethdev: get DCB information") Signed-off-by: Wei Dai Reviewed-by: Jingjing Wu --- drivers/net/ixgbe/ixgbe_ethdev.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index d997304cb..73996bbec 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -6788,6 +6788,8 @@ ixgbe_dev_get_dcb_info(struct rte_eth_dev *dev, struct ixgbe_dcb_config *dcb_config = IXGBE_DEV_PRIVATE_TO_DCB_CFG(dev->data->dev_private); struct ixgbe_dcb_tc_config *tc; + struct rte_eth_dcb_tc_queue_mapping *tc_queue; + uint8_t nb_tcs; uint8_t i, j; if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_DCB_FLAG) @@ -6795,19 +6797,31 @@ ixgbe_dev_get_dcb_info(struct rte_eth_dev *dev, else dcb_info->nb_tcs = 1; + tc_queue = &dcb_info->tc_queue; + nb_tcs = dcb_info->nb_tcs; + if (dcb_config->vt_mode) { /* vt is enabled*/ struct rte_eth_vmdq_dcb_conf *vmdq_rx_conf = &dev->data->dev_conf.rx_adv_conf.vmdq_dcb_conf; for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) dcb_info->prio_tc[i] = vmdq_rx_conf->dcb_tc[i]; - for (i = 0; i < vmdq_rx_conf->nb_queue_pools; i++) { - for (j = 0; j < dcb_info->nb_tcs; j++) { - dcb_info->tc_queue.tc_rxq[i][j].base = - i * dcb_info->nb_tcs + j; - dcb_info->tc_queue.tc_rxq[i][j].nb_queue = 1; - dcb_info->tc_queue.tc_txq[i][j].base = - i * dcb_info->nb_tcs + j; - dcb_info->tc_queue.tc_txq[i][j].nb_queue = 1; + if (RTE_ETH_DEV_SRIOV(dev).active > 0) { + for (j = 0; j < nb_tcs; j++) { + tc_queue->tc_rxq[0][j].base = j; + tc_queue->tc_rxq[0][j].nb_queue = 1; + tc_queue->tc_txq[0][j].base = j; + tc_queue->tc_txq[0][j].nb_queue = 1; + } + } else { + for (i = 0; i < vmdq_rx_conf->nb_queue_pools; i++) { + for (j = 0; j < nb_tcs; j++) { + tc_queue->tc_rxq[i][j].base = + i * nb_tcs + j; + tc_queue->tc_rxq[i][j].nb_queue = 1; + tc_queue->tc_txq[i][j].base = + i * nb_tcs + j; + tc_queue->tc_txq[i][j].nb_queue = 1; + } } } } else { /* vt is disabled*/ -- 2.11.0