From patchwork Fri Mar 6 09:57:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 184246 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp7232890ile; Fri, 6 Mar 2020 02:01:27 -0800 (PST) X-Google-Smtp-Source: ADFU+vvxetX2aWr2kdhuFIQbqya0jQ8dYR5fCGNgDeG2N4zGW0ztpLBtb90NrUnpnfVY3IoFcpcy X-Received: by 2002:a05:6402:1d2d:: with SMTP id dh13mr2228910edb.276.1583488887304; Fri, 06 Mar 2020 02:01:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583488887; cv=none; d=google.com; s=arc-20160816; b=Ur3sJPCFkVlcHZTRbkW03ITX6ndValhyUw3bAqcIlP/UB8IFBLyBAveYpop6i+wqkQ HmoLOb4k5ir8QNDiZLJfdbur75Q38k74OX4jLIbaMrPYATszvvpspTYznvPdPJlzQRmx WSEBu8QtX78ZwjlKkfHODYREdg82os6tli6VbX+rIWWvekQW2KP+oCJup9Q9HSvyLadQ E5JUBWnRloZ6fCvUWkQ1BcpZVVkroklXiX2/O0KWB0aHEnnbQeIRSsh7BFNlQ8slbu9X TVUoaec1Ev5Cw6aMfhrroh4/GK8uBiDoM15DKVDlYzomCR+P+nc+HRj/51PLb7YEutqi PdPw== 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=0sPOhMEQLkIOq+HM914oQOGLSkbsDx1bgBj39ILy9MTfz5kxOiPWqW4rls7USEawhW nyJFWhYSuxmgJV6S98fb04TIssTem/IqGCjL6gNYtFzKsJEAWI7Sx7YAr2pdEuWnWdxr y+BGzqCNZCdMFe6Bx+JO1+ln8Ij1bIQBnlNHT9D4eCwK51eaZCCPYrguaZWezRU51CJ6 vf8d8Ti1E8d6gAFwRHDoxk+pTpGcm2wY/qQue1tEKWlEpUlfVYmq20D16GosQhMhcOU7 FH8sI8gpY6D8B++LBxaNUleMKhfRFi+jlrKjJtRDy1oA0daOKkR27iVi/5HLOK4iZ927 3CeQ== 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 f14si1172471edv.521.2020.03.06.02.01.27; Fri, 06 Mar 2020 02:01:27 -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 E06381C0AB; Fri, 6 Mar 2020 11:00:01 +0100 (CET) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 74CC81C021 for ; Fri, 6 Mar 2020 10:59:52 +0100 (CET) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 592A12008DC; Fri, 6 Mar 2020 10:59:52 +0100 (CET) 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 45321200ADA; Fri, 6 Mar 2020 10:59:50 +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 07A72402E5; Fri, 6 Mar 2020 17:59:46 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Nipun Gupta Date: Fri, 6 Mar 2020 15:27:36 +0530 Message-Id: <20200306095742.18080-11-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200306095742.18080-1-hemant.agrawal@nxp.com> References: <20200302145829.27808-1-hemant.agrawal@nxp.com> <20200306095742.18080-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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) { ;