From patchwork Fri Jul 10 16:21:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 235252 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp602789ilg; Fri, 10 Jul 2020 09:26:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye0uD5K9aJcUARvc5Bak4s8fZvhiv+AZyueqA3SwMYLoTz6gm4pZEl+G/l2JJsc0TiD/+a X-Received: by 2002:a05:6402:203c:: with SMTP id ay28mr69731416edb.271.1594398402106; Fri, 10 Jul 2020 09:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594398402; cv=none; d=google.com; s=arc-20160816; b=gGBecG8ITu0hpVNttoCSUGd1kq625GdMbVB1wG6+IenAsSVZbdV4auJUAMZL0L0IC2 +Wq59ykM867JfEvCnSXMz7mzmcViYHKfNOuBTeHhbECZrHHwnEMc3NYfid7KW5L/g7Qe mCJstiDvut71unSQc+ds7xlurA9SDVEDIf66bNa1zxH4oKiOMlq5u5SYZExWpOvJQNfk /Hbhm9WLEMH2YvZSvdfMN1D1WLCaKMYWFBjfI259nquRZejQlufOjQF/xNaLnP9hbMCm J68h4LwDXoBlXVMDRuRnDsUolSiOtIECZwCV79VJ7eXtfDNU4ZWLUCmuFhz3n3Rvpzje qShw== 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=wHEGOwmwNK+vn4k3C8lrXVubkYhUSd3YcqRxLci1IAI=; b=KyOX5YbztQv+MH4Gqb1Qbf3h/6iABFEn6UdqKee6ahOj3O1/nJfmLW+YtOUOVJPpmy qMLQR9UV3TJuHsYcjvYOsTmL/Xt+Zf2Pdgky4KLqAeSAtGhyD5sxzN3sIt4cd64ZCAak /fMC2l+40MeMPqROZ4Tmgp3idSQrB0jcLHTrH0yfobTB6M6fFWpm/dVcXHxHPUD3EbD8 SyU01KcY6J5SUBj167bTYiioXw1SopbkEe+lgSd6ViLq5CbFHINZMvAo4+deAKGNdoNb qiTrK70juOjQusZmcebZhQF5Nr6FmNNdp/tcgcPK5tdeGXHyf0oB8F9/hDbMMTJ19wnJ nsrQ== 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 dt5si5598503ejc.335.2020.07.10.09.26.41; Fri, 10 Jul 2020 09:26:42 -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 BFEDD1DC43; Fri, 10 Jul 2020 18:26:05 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id A42191D9EA 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 8B9632017EF; Fri, 10 Jul 2020 18:25:59 +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 DE245201329; 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 5577F402F0; Sat, 11 Jul 2020 00:25:55 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Hemant Agrawal Date: Fri, 10 Jul 2020 21:51:34 +0530 Message-Id: <20200710162137.22973-6-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 6/9] net/dpaa2: report error on queue 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 reports errors on configuring deferred start for rx or tx queues. Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index a7195f6c1..701a6ca68 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -649,7 +649,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint16_t nb_rx_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 *mb_pool) { struct dpaa2_dev_priv *priv = dev->data->dev_private; @@ -666,6 +666,13 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, DPAA2_PMD_DEBUG("dev =%p, queue =%d, pool = %p, conf =%p", dev, rx_queue_id, mb_pool, rx_conf); + /* Rx deferred start is not supported */ + if (rx_conf->rx_deferred_start) { + DPAA2_PMD_ERR("%p:Rx deferred start not supported", + (void *)dev); + return -EINVAL; + } + if (!priv->bp_list || priv->bp_list->mp != mb_pool) { bpid = mempool_to_bpid(mb_pool); ret = dpaa2_attach_bp_list(priv, @@ -794,7 +801,7 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id, uint16_t nb_tx_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 dpaa2_dev_priv *priv = dev->data->dev_private; struct dpaa2_queue *dpaa2_q = (struct dpaa2_queue *) @@ -811,6 +818,13 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev, PMD_INIT_FUNC_TRACE(); + /* Tx deferred start is not supported */ + if (tx_conf->tx_deferred_start) { + DPAA2_PMD_ERR("%p:Tx deferred start not supported", + (void *)dev); + return -EINVAL; + } + /* Return if queue already configured */ if (dpaa2_q->flow_id != 0xffff) { dev->data->tx_queues[tx_queue_id] = dpaa2_q;