From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 7C96C187 for ; Mon, 30 Apr 2018 16:08:12 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id a8so13407231wmg.5 for ; Mon, 30 Apr 2018 07:08:12 -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=q6VSf1qUgLeiiO3bco5FJLbY8JayEThhTqVJ4LKdiVU=; b=Kgp3X/CajfL8IXN9VH43qQSZSq2OUXZmr8WHeBn53zWAnuGyFOvlcJydpC4YmQv7SL 7z9gFp6MkwRxdkkmSji+rbiTgtR0Glz14At+tV5Nz06v3AIKchrDvShGU5KhPKJaJJ2B 2iG41ybcgpaeAn6B2fPNeYlOjT0BAao7ZdZ4GSvORo5vemP+vGEHRymmccPM3TLMXpZ0 lTQhMikneC2TiLGzCerH4UNXJlSRdcECfwxIN4Bmr7VHiBMh2FmBsCJy+mlovMNVV40+ 4Jdatfun3k36LT34Ietin1UpPFoGULT6k0zjmP7Tp6dXzzXbczbYmZrHipHyNMv/8xf1 H7YQ== 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=q6VSf1qUgLeiiO3bco5FJLbY8JayEThhTqVJ4LKdiVU=; b=BCZ7lb9EkIbIaYwhlL1If4hnKo66krC2CJmoRToUAOZb0XZA3aMW7HPAIoMTU+4ZI8 L3CIPHGJ3ARFrkD9gEvWJDPGaCE0d/vXpQbHa92PiVgAOg1p7WPYn5yeYFQKJCNlf2Bw udHS8M48d5gpnh+uPGwjefrplv7U5Lv7MiEzh6suu7Lzs/O87aqmYQEeftc3KbAb5avj Bg8WmMYo+GdQEEk5hTRNXCKTBYfeBV1g1mfROOXATAPHEp+tVSCAPzDCHEYDKrzzuIkl 0BZrKJBKk2YZ6kkKdGF/Rf7jWVyQA1IvDaOMANgwApZbT1g0FX+92TENqrJ1DT2tJpdE md5A== X-Gm-Message-State: ALQs6tAkurWe8KaY9XhW749Uprz5F/xjp0DmDnFZi0lK1Zesd4E3q3ID FjKMwBNjyVrhf1PXll4/uGNaY3c0qpw= X-Google-Smtp-Source: AB8JxZpgiO+ECogVvR7WmVDibRaUC/KrPzUttj6W5Q2M7UvCaHYmKzH6FZty0FZ59b5fmcXwvOl3Wg== X-Received: by 10.28.71.146 with SMTP id m18mr7129818wmi.144.1525097292244; Mon, 30 Apr 2018 07:08:12 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id s15-v6sm4617033wrg.70.2018.04.30.07.08.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:08:11 -0700 (PDT) From: luca.boccassi@gmail.com To: Qi Zhang Cc: Konstantin Ananyev , dpdk stable Date: Mon, 30 Apr 2018 15:03:46 +0100 Message-Id: <20180430140606.4615-68-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'ethdev: fix queue start' has been queued to stable release 18.02.2 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: Mon, 30 Apr 2018 14:08:12 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 908b87479520671337bc7d08d27b49148d9afefb Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Thu, 22 Mar 2018 20:59:01 +0800 Subject: [PATCH] ethdev: fix queue start [ upstream commit 239c9b435ad4abcac89b5d2480a0c21ce8b8288f ] Device must be started before start any queue. Fixes: 0748be2cf9a2 ("ethdev: queue start and stop") Signed-off-by: Qi Zhang Acked-by: Konstantin Ananyev --- lib/librte_ether/rte_ethdev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 3b885a62c..137428402 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -731,6 +731,12 @@ rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id) RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL); dev = &rte_eth_devices[port_id]; + if (!dev->data->dev_started) { + RTE_PMD_DEBUG_TRACE( + "port %d must be started before start any queue\n", port_id); + return -EINVAL; + } + if (rx_queue_id >= dev->data->nb_rx_queues) { RTE_PMD_DEBUG_TRACE("Invalid RX queue_id=%d\n", rx_queue_id); return -EINVAL; @@ -784,6 +790,12 @@ rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id) RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL); dev = &rte_eth_devices[port_id]; + if (!dev->data->dev_started) { + RTE_PMD_DEBUG_TRACE( + "port %d must be started before start any queue\n", port_id); + return -EINVAL; + } + if (tx_queue_id >= dev->data->nb_tx_queues) { RTE_PMD_DEBUG_TRACE("Invalid TX queue_id=%d\n", tx_queue_id); return -EINVAL; -- 2.14.2