From patchwork Fri Jul 10 16:21:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 235251 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp602698ilg; Fri, 10 Jul 2020 09:26:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyVgBH1l+fMco/k2ru4O2JI9fOG50hze2UTSSc3Jgq04QJenHy4fDAoTzIQeB3FBSCeaBZ X-Received: by 2002:a17:906:2b0e:: with SMTP id a14mr34843607ejg.459.1594398393822; Fri, 10 Jul 2020 09:26:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594398393; cv=none; d=google.com; s=arc-20160816; b=SyK9ekr4FKXW2+oZGh5rxoo/dgVP8u/tXV9RFr6i+Ab5fneHq7CNDsI487fYFtxBkL 4QPCOdN2j1mfi4HtTRDFMsfSVledrvfo4OFqp1JibF+DTdTl4AYWlR3ctXUb1dacv6lY 4NuulA4Bqjt0aSE4LeK2p2KJkAc6SJOcNTRU2oiXo5zoQMQy4Id/kQ+kdMGc++WYSCZu w7CCe7w+7JjOmxPd7FNk6kpAxkXNdOUog7djfnciGoPR/Bl2gFPKtNM2w5R9hp6jD9hv ShgcWxiMpBRdxXizJceAyFQA02GgT/MFHplIwNnkUFFp8eHoK3QWXm3C3PN8QOqhrXYh MoUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=aYOE7AgYak4gR28DOL87gk3Jrx/CMsjgw+2wDfvsg0o=; b=GpGTHpTdrArlL+880arts3t+6MjBxHEJy7QFDwbJsvHH3TrtJyqOEpFlOzYt44CeZ4 Ekm2nvqzNXqK+LBqZPd9ad5gL6UFPrDi0aShn9tj7cLB1CbSW8TLcB73y2exqcppampH Acdk+KmxRrCdzc4QBaXCGWExSG9yTESswzQ9ALJeRaSHwxaNo0CFtA1uhvbcowVuZhjN 5dpEWHZCbPhcDH/7U6epHXuYRgPGoJZypruhToMHWe2wQbNvDg2kFc2NeUBWmJlHaDy/ 8xsvqUFoV5qbHf1m9A8Z899RcafojD2lAcOWL3x2ZC/yaGQF/FRKdoLAASgJRh76ZJt5 4zRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id r11si4099441eja.618.2020.07.10.09.26.33; Fri, 10 Jul 2020 09:26:33 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 69E551DBBD; Fri, 10 Jul 2020 18:26:04 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 256D11D9E1 for ; Fri, 10 Jul 2020 18:25:59 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D77DA2003D1; Fri, 10 Jul 2020 18:25:58 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3618C20132D; Fri, 10 Jul 2020 18:25:57 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A1407402E3; Sat, 11 Jul 2020 00:25:54 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Hemant Agrawal Date: Fri, 10 Jul 2020 21:51:33 +0530 Message-Id: <20200710162137.22973-5-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200710162137.22973-1-hemant.agrawal@nxp.com> References: <20200710162137.22973-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 5/9] net/dpaa: report error on using deferred start 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch add support to report on error for rx and tx deferred start config Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 62ecb112f..ea178f4d4 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -723,7 +723,7 @@ static int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, uint16_t nb_desc, unsigned int socket_id __rte_unused, - const struct rte_eth_rxconf *rx_conf __rte_unused, + const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mp) { struct dpaa_if *dpaa_intf = dev->data->dev_private; @@ -743,6 +743,12 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, return -rte_errno; } + /* Rx deferred start is not supported */ + if (rx_conf->rx_deferred_start) { + DPAA_PMD_ERR("%p:Rx deferred start not supported", (void *)dev); + return -EINVAL; + } + DPAA_PMD_INFO("Rx queue setup for queue index: %d fq_id (0x%x)", queue_idx, rxq->fqid); @@ -1006,12 +1012,17 @@ static int dpaa_eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, uint16_t nb_desc __rte_unused, unsigned int socket_id __rte_unused, - const struct rte_eth_txconf *tx_conf __rte_unused) + const struct rte_eth_txconf *tx_conf) { struct dpaa_if *dpaa_intf = dev->data->dev_private; PMD_INIT_FUNC_TRACE(); + /* Tx deferred start is not supported */ + if (tx_conf->tx_deferred_start) { + DPAA_PMD_ERR("%p:Tx deferred start not supported", (void *)dev); + return -EINVAL; + } if (queue_idx >= dev->data->nb_tx_queues) { rte_errno = EOVERFLOW; DPAA_PMD_ERR("%p: queue index out of range (%u >= %u)",