From patchwork Mon Mar 2 14:58:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 184082 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp2192987ile; Mon, 2 Mar 2020 01:28:24 -0800 (PST) X-Google-Smtp-Source: ADFU+vsqruRfYv/GfASKdb9bq5WVwdAds2cCHTgJ0qyS5P+pPiwEkouKvibd8W/DbwDr7aCcWBLG X-Received: by 2002:aa7:c544:: with SMTP id s4mr3747964edr.268.1583141304411; Mon, 02 Mar 2020 01:28:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583141304; cv=none; d=google.com; s=arc-20160816; b=BoBiR8B8yb3a225HjwXEyFKt2PKwtlqtAOGfxe6vBs1AxnKlTbkEcjLZoeHxfC6dXQ WGV0ulg5FMVjrdP9Pc7PTZwxofrGA9m70DDf+9zBpT/g4cZQH+b0vygFQkFHEECf1RoK PUZpB5fjww+bgXxn3sDrsN2MCkaCvH6gXmOySZDHRmTXsafZoj8++NFfGejckWe5AJGn BF6BAkzO1RBZ2uMECmxGBnr6NTr9528p3NaEKD6h0KicBjwhjud3p6OcRYWLUTCvxDRC 8ELaKfwa+tXImUKkRlwYOMLuAsm76WY2eKYRep3Xnz9ISZZBh19TUzYxO3EnnL/2L026 iVYg== 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=MyLf8u5+ZTIehgCj5owSNnv8eRSEOf6syY4epk9D5PE=; b=YrdM7e5ZSyRawGYnX2Is8/95T5qoc1l3xn573JTH91UMwU+ZzUBCLaS8tkUzt6KCki Y5HzASL+N34JOe4n+CFXWKu0gOCLtAl/mubPMjZfvkeyvhwSDi3z4lSkxso1yTf4ceAt s45Komw9p4/ohhAqhjy/zMYmfdVtMqhGYLmZazeP2hZ+I7kvNy2AxcFOI8wRs9iwCbfQ pkPNFsHW2d57+VjAx/8UZbNfQbjpR5xpqK97dEXPH9Jc2+sbmnJ1qEhMaq1mKpt1TKgL Kt2Xmw4//FkTgPPDKtXUC1uNA1GzyvJ6RKL39ocgzBENj/yDr1TMc7JRcyXZNqg/JPHr D//w== 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 n16si1859893edb.51.2020.03.02.01.28.24; Mon, 02 Mar 2020 01:28:24 -0800 (PST) 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 575F01C0D1; Mon, 2 Mar 2020 10:26:50 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 702241C012 for ; Mon, 2 Mar 2020 10:26:42 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 522861A0FA6; Mon, 2 Mar 2020 10:26:42 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 405B81A0F8C; Mon, 2 Mar 2020 10:26:40 +0100 (CET) Received: from bf-netperf1.ap.com (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 0CD3E402D5; Mon, 2 Mar 2020 17:26:36 +0800 (SGT) From: Hemant Agrawal To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Nipun Gupta Date: Mon, 2 Mar 2020 20:28:23 +0530 Message-Id: <20200302145829.27808-11-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200302145829.27808-1-hemant.agrawal@nxp.com> References: <20200302145829.27808-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 10/16] net/dpaa: return error on multiple mp config 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" From: Nipun Gupta multiple buffer pools are not supported on a single device. Signed-off-by: Nipun Gupta --- drivers/mempool/dpaa/dpaa_mempool.c | 1 + drivers/net/dpaa/dpaa_ethdev.c | 6 ++++++ 2 files changed, 7 insertions(+) -- 2.17.1 diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c index 3a2528331..00db6f9bc 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.c +++ b/drivers/mempool/dpaa/dpaa_mempool.c @@ -132,6 +132,7 @@ dpaa_mbuf_free_pool(struct rte_mempool *mp) DPAA_MEMPOOL_INFO("BMAN pool freed for bpid =%d", bp_info->bpid); rte_free(mp->pool_data); + bp_info->bp = NULL; mp->pool_data = NULL; } } diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index fce9ce2fe..0384532d2 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -587,6 +587,12 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, DPAA_PMD_INFO("Rx queue setup for queue index: %d fq_id (0x%x)", queue_idx, rxq->fqid); + if (dpaa_intf->bp_info && dpaa_intf->bp_info->bp && + dpaa_intf->bp_info->mp != mp) { + DPAA_PMD_WARN("Multiple pools on same interface not supported"); + return -EINVAL; + } + /* Max packet can fit in single buffer */ if (dev->data->dev_conf.rxmode.max_rx_pkt_len <= buffsz) { ;