From patchwork Fri Sep 21 11:05:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147230 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp671114ljw; Fri, 21 Sep 2018 04:08:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbHPK9DNUGLk670eXs5rHI72Me0dRLcdvVJvtFkwOxnVkP64taAxku1SF9YgYf62Upn+1ID X-Received: by 2002:a1c:c14:: with SMTP id 20-v6mr7013578wmm.117.1537528093589; Fri, 21 Sep 2018 04:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528093; cv=none; d=google.com; s=arc-20160816; b=X0d/U/omZQTIeMPAI6r1UnrGvOv4YZbGwsvcR7xqo2EjE+RwEpVlAQomnrjlc2uIz7 8cq+GI/0PiTv3KQGejKnE2hAInUTPfDOTsyPIG7CcB7RyftLTqr54Qd65tZUBvd1D1Io foRnoa7CXbBZsrd2X0eA+iOWRyC20brUBmi2OtWQze4ZJDSnYhETENnBQ4JOFEiJA4Ty 5GH8m76v34WNu97vetwp1gb1ftWImpuFkAu9FXe37vWBtUG/sSA+nN/2bKOW3VeXZKsy I4W+xzWiCP2VY+HqhNqufKXBFsIETbgx0l48cqzlieChRqRBCGnWhdUHsVZ0W8ypS9Hw d9AA== 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:to:from; bh=23A8U2bevsambgQCtE2cfAU5Mp7K2MzF12/ZbOoOHB8=; b=mXH4IcFpljqjQNBB4EGHRsOwjPKQoca6jSP7WoSjhADPzJ0KXlg7Diu7iPdueAqRHH 87bK0ULPJr8yu7O/7iW6iXufPsUHoiHaZFwGOqf89cu3vSCWlevcQV1OwEVCsUxT4HFh HTOC2YR/q1NjskV8JvPz7/wnLrBN7beQjPSz4SSSMp0VxH6DVECoxzspuqz7U8mC9dSN wx4eRhPpZnOpAntSflzdb0nloVO68QBoWsn1s+dgbAVe3BqUOzl1Y/DXMZoW0SjWzXCe JSpI43KLkpZG5uEYCWoFbQCRibUqGxZOdcLtP5N9ikQz9xTqpas9ul7JqLVgjpz05/Kl rFIg== 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 j7-v6si1627664wmd.131.2018.09.21.04.08.13; Fri, 21 Sep 2018 04:08:13 -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 482B14CC5; Fri, 21 Sep 2018 13:08:10 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 8B1604C9F for ; Fri, 21 Sep 2018 13:08:06 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4AFA01A02B4; Fri, 21 Sep 2018 13:08:06 +0200 (CEST) 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 6AED91A0039; Fri, 21 Sep 2018 13:08:04 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 2F23C402DD; Fri, 21 Sep 2018 19:08:01 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Fri, 21 Sep 2018 16:35:50 +0530 Message-Id: <1537527962-25757-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 01/13] net/dpaa: configure frame queue on MAC ID basis 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" The current code has the hardcoded seq for fq allocation. It require multiple changes, when some of the interfaces are assigned to kernel stack. Changing it on the mac id basis provide the flexibility to assign any interface to kernel. Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 25 ++++++++++++++----------- drivers/net/dpaa/dpaa_ethdev.h | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 30eff65..b9bd557 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1011,7 +1011,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, { struct qm_mcc_initfq opts = {0}; int ret; - u32 flags = 0; + u32 flags = QMAN_FQ_FLAG_NO_ENQUEUE; struct qm_mcc_initcgr cgr_opts = { .we_mask = QM_CGR_WE_CS_THRES | QM_CGR_WE_CSTD_EN | @@ -1024,15 +1024,18 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, PMD_INIT_FUNC_TRACE(); - ret = qman_reserve_fqid(fqid); - if (ret) { - DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d", - fqid, ret); - return -EINVAL; + if (fqid) { + ret = qman_reserve_fqid(fqid); + if (ret) { + DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d", + fqid, ret); + return -EINVAL; + } + } else { + flags |= QMAN_FQ_FLAG_DYNAMIC_FQID; } - DPAA_PMD_DEBUG("creating rx fq %p, fqid 0x%x", fq, fqid); - ret = qman_create_fq(fqid, QMAN_FQ_FLAG_NO_ENQUEUE, fq); + ret = qman_create_fq(fqid, flags, fq); if (ret) { DPAA_PMD_ERR("create rx fqid 0x%x failed with ret: %d", fqid, ret); @@ -1051,7 +1054,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, if (ret) { DPAA_PMD_WARN( "rx taildrop init fail on rx fqid 0x%x(ret=%d)", - fqid, ret); + fq->fqid, ret); goto without_cgr; } opts.we_mask |= QM_INITFQ_WE_CGID; @@ -1059,7 +1062,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, opts.fqd.fq_ctrl |= QM_FQCTRL_CGE; } without_cgr: - ret = qman_init_fq(fq, flags, &opts); + ret = qman_init_fq(fq, 0, &opts); if (ret) DPAA_PMD_ERR("init rx fqid 0x%x failed with ret:%d", fqid, ret); return ret; @@ -1212,7 +1215,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) if (default_q) fqid = cfg->rx_def; else - fqid = DPAA_PCD_FQID_START + dpaa_intf->ifid * + fqid = DPAA_PCD_FQID_START + dpaa_intf->fif->mac_idx * DPAA_PCD_FQID_MULTIPLIER + loop; if (dpaa_intf->cgr_rx) diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index c79b9f8..2c38c34 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -63,7 +63,7 @@ #define DPAA_PCD_FQID_START 0x400 #define DPAA_PCD_FQID_MULTIPLIER 0x100 #define DPAA_DEFAULT_NUM_PCD_QUEUES 1 -#define DPAA_MAX_NUM_PCD_QUEUES 32 +#define DPAA_MAX_NUM_PCD_QUEUES 4 #define DPAA_IF_TX_PRIORITY 3 #define DPAA_IF_RX_PRIORITY 0 From patchwork Fri Sep 21 11:05:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147231 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp671266ljw; Fri, 21 Sep 2018 04:08:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYOw+12U8prPXX3Ew86lCTJypWupjD6U1K+YOqWOrB1MKlRBj8AAqWp6zfvDJCFcI/uHVl2 X-Received: by 2002:a1c:7dc7:: with SMTP id y190-v6mr6400396wmc.62.1537528102328; Fri, 21 Sep 2018 04:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528102; cv=none; d=google.com; s=arc-20160816; b=k/hdpWBowHtyL9faGajvFpNyr6bhdM+0/fUU2vaN+7xYU9MecDimIiCKa7GPItxbgw 3YRv1aD98j2qOzc0HAEbOLXNqQ3h6WtfgG18kkFWRE2a8ZAha5vbSiOgBR2Z6pcTB6qq KkAQOdBGpreGYL7RDUYEpuRjWfh++BJvz2GFWyBdgIFKhrqRwZ3KzFUk/2PEF1Dh3wCy h9g9h2++sygf2a2/1fai1nlm4IGFOqTpgx9ovBv8F+6GO0d9IwS8oNe5uLvfik85eEdW ru9WessN09X2OlgeRVHXxAsYPzrYevKBezplk1F99HrJPzCLCx4mNhspZIg9XCUGO2/l 0KyA== 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=Df0CssitX2BEBR0SZwWqlAcKLzSLow7nA0MgBOTg+b4=; b=Ea+DE0e5nR53Z6awtC+F/2c9Ib9vCOpghkYmROBcGPL5QMnOPcSs/zOtZYj6foGTQN eaD41iOsihfyqruhfLusZdbbvmUHEodXn+QpAKfmWlA1j3sAg9+nDHgmPTjmcy54h18T +bQdh2aIhhVcuYJ1T46smyK5h20u1f+Q96WAe0fVVAeWHcU4YbmHWKK4JYIsIUSBu3+u k8dllX98FO/G0VknsyFF+Fz1pDhFYs00sXGbYgGQuPYk1tyyAb7B9UM8fZOboc6qfQBG kgRY4QX6H4ywqfT8jD8R3oDt/aeE8Db59L3ZlwdEcHo4s4ndjd56D7dqN1NOc7cnTFJV LWJQ== 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 r8-v6si607445wrn.227.2018.09.21.04.08.22; Fri, 21 Sep 2018 04:08:22 -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 C36E65398; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 4A3F84CBD; Fri, 21 Sep 2018 13:08:08 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id DD188200256; Fri, 21 Sep 2018 13:08:07 +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 98A3420004C; Fri, 21 Sep 2018 13:08:05 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D840E402E5; Fri, 21 Sep 2018 19:08:01 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: stable@dpdk.org Date: Fri, 21 Sep 2018 16:35:51 +0530 Message-Id: <1537527962-25757-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 02/13] net/dpaa: fix jumbo buffer 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" Set the missing dev data mtu for the correct size. Set the max supported size in hw, if user is asking for more. Fixes: 9658ac3a4ef6 ("net/dpaa: set the correct frame size in device MTU") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index b9bd557..b9b4999 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -193,14 +193,24 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev) } if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { + uint32_t max_len; + + DPAA_PMD_DEBUG("enabling jumbo"); + if (dev->data->dev_conf.rxmode.max_rx_pkt_len <= - DPAA_MAX_RX_PKT_LEN) { - fman_if_set_maxfrm(dpaa_intf->fif, - dev->data->dev_conf.rxmode.max_rx_pkt_len); - return 0; - } else { - return -1; + DPAA_MAX_RX_PKT_LEN) + max_len = dev->data->dev_conf.rxmode.max_rx_pkt_len; + else { + DPAA_PMD_INFO("enabling jumbo override conf max len=%d " + "supported is %d", + dev->data->dev_conf.rxmode.max_rx_pkt_len, + DPAA_MAX_RX_PKT_LEN); + max_len = DPAA_MAX_RX_PKT_LEN; } + + fman_if_set_maxfrm(dpaa_intf->fif, max_len); + dev->data->mtu = max_len + - ETHER_HDR_LEN - ETHER_CRC_LEN - VLAN_TAG_SIZE; } return 0; } From patchwork Fri Sep 21 11:05:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147232 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp671412ljw; Fri, 21 Sep 2018 04:08:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV60gJ9WWnpBwnjwmzVTS2iPrmcZC+f2G2a+SNHsKQcH+4VTxQtxUEa5yjGT9zWN6CbnnvPxE X-Received: by 2002:adf:efce:: with SMTP id i14-v6mr7299430wrp.195.1537528111443; Fri, 21 Sep 2018 04:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528111; cv=none; d=google.com; s=arc-20160816; b=iuFwAIJ1lo3QfFk3fSlwInH7fb89B/uUadj2hy0vlBvcb5EMi5rgSu01/0/l+iqwX6 jgY+DHCi1RsqDMAEtZiEO3kAVxlTEIplmh+7F67v+vRmduE+DRWnsngZZ4QB7acU8u/Z hfTUSkxczWSe0bObypCftkffFn9WpQdLH+Kb8Cw9OtPe0gASYjlQtOkAqgx7RDzU4pZi D6JBSnYt6Iv/LwZV5ytgdfTh+C7PLtOOyFcQCrJ3KdZ4HtoWVzBF3GTLCOn12gnDtqrc xZtl3cV0eCcndRA7znkccbrtBdm4HbqCa6tfCvJsgDV/ePuuc+HdagJGxEeYBObze5oz GGBA== 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:to:from; bh=W1db/KlfDzguLHpj+r+XdDmQ9DtIjyLt9cUhtgcZHEU=; b=hCOWTg0yd8uFhDIIrHjk3UEqYMmgCw806epLB/qZASGsXMemadYbPCSmBLvt22DhFb GEvSkmxrKaRWbb4eCU1/SmQjEa8Rg52ycK21r9XEnaxaGxDo8bvC+QNZa6CX8QfGCeVH ogG7B/UAq6vtLFJEQK5hPiz/N2KfCNp9E2l/1Gi8wmt1wVqQ8IJGPhcpofAcfNaSMpy6 vV8MjErfrxJ8iY2wpklX6DD+N4TFDDKeZQgkejfbZDL6jf+OgJw3cq7nw7FpX+4MZqMZ NHAbhjnZoO4Mk8T2YKIIi8hhWy9BPUa1Gv8qJ3kGWQRIdkI87jaKNXT7VFVxmpA6ASLa BQKQ== 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 q7-v6si1236374wre.288.2018.09.21.04.08.31; Fri, 21 Sep 2018 04:08:31 -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 C3A9F5681; Fri, 21 Sep 2018 13:08:15 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 772A84CC3 for ; Fri, 21 Sep 2018 13:08:08 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2F4E720004C; Fri, 21 Sep 2018 13:08:08 +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 1CDA6200015; Fri, 21 Sep 2018 13:08:06 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A14C3402E6; Fri, 21 Sep 2018 19:08:02 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Fri, 21 Sep 2018 16:35:52 +0530 Message-Id: <1537527962-25757-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 03/13] net/dpaa: implement scatter offload support 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 implement the sg support, which can be enabled/disabled w.r.t configuration. Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 62 +++++++++++++++++++++++++++++++++++++++--- drivers/net/dpaa/dpaa_ethdev.h | 3 +- drivers/net/dpaa/dpaa_rxtx.c | 8 +++--- drivers/net/dpaa/dpaa_rxtx.h | 2 -- 4 files changed, 64 insertions(+), 11 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index b9b4999..fd45b24 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -47,15 +47,15 @@ /* Supported Rx offloads */ static uint64_t dev_rx_offloads_sup = - DEV_RX_OFFLOAD_JUMBO_FRAME; + DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_SCATTER; /* Rx offloads which cannot be disabled */ static uint64_t dev_rx_offloads_nodis = DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM | - DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | - DEV_RX_OFFLOAD_SCATTER; + DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM; /* Supported Tx offloads */ static uint64_t dev_tx_offloads_sup; @@ -147,11 +147,30 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) struct dpaa_if *dpaa_intf = dev->data->dev_private; uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + VLAN_TAG_SIZE; + uint32_t buffsz = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM; PMD_INIT_FUNC_TRACE(); if (mtu < ETHER_MIN_MTU || frame_size > DPAA_MAX_RX_PKT_LEN) return -EINVAL; + /* + * Refuse mtu that requires the support of scattered packets + * when this feature has not been enabled before. + */ + if (dev->data->min_rx_buf_size && + !dev->data->scattered_rx && frame_size > buffsz) { + DPAA_PMD_ERR("SG not enabled, will not fit in one buffer"); + return -EINVAL; + } + + /* check * >= max_frame */ + if (dev->data->min_rx_buf_size && dev->data->scattered_rx && + (frame_size > buffsz * DPAA_SGT_MAX_ENTRIES)) { + DPAA_PMD_ERR("Too big to fit for Max SG list %d", + buffsz * DPAA_SGT_MAX_ENTRIES); + return -EINVAL; + } + if (frame_size > ETHER_MAX_LEN) dev->data->dev_conf.rxmode.offloads &= DEV_RX_OFFLOAD_JUMBO_FRAME; @@ -212,6 +231,13 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev) dev->data->mtu = max_len - ETHER_HDR_LEN - ETHER_CRC_LEN - VLAN_TAG_SIZE; } + + if (rx_offloads & DEV_RX_OFFLOAD_SCATTER) { + DPAA_PMD_DEBUG("enabling scatter mode"); + fman_if_set_sg(dpaa_intf->fif, 1); + dev->data->scattered_rx = 1; + } + return 0; } @@ -309,7 +335,6 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev, dev_info->max_rx_queues = dpaa_intf->nb_rx_queues; dev_info->max_tx_queues = dpaa_intf->nb_tx_queues; - dev_info->min_rx_bufsize = DPAA_MIN_RX_BUF_SIZE; dev_info->max_rx_pktlen = DPAA_MAX_RX_PKT_LEN; dev_info->max_mac_addrs = DPAA_MAX_MAC_FILTER; dev_info->max_hash_mac_addrs = 0; @@ -523,6 +548,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, struct qm_mcc_initfq opts = {0}; u32 flags = 0; int ret; + u32 buffsz = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM; PMD_INIT_FUNC_TRACE(); @@ -536,6 +562,28 @@ 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); + /* Max packet can fit in single buffer */ + if (dev->data->dev_conf.rxmode.max_rx_pkt_len <= buffsz) { + ; + } else if (dev->data->dev_conf.rxmode.offloads & + DEV_RX_OFFLOAD_SCATTER) { + if (dev->data->dev_conf.rxmode.max_rx_pkt_len > + buffsz * DPAA_SGT_MAX_ENTRIES) { + DPAA_PMD_ERR("max RxPkt size %d too big to fit " + "MaxSGlist %d", + dev->data->dev_conf.rxmode.max_rx_pkt_len, + buffsz * DPAA_SGT_MAX_ENTRIES); + rte_errno = EOVERFLOW; + return -rte_errno; + } + } else { + DPAA_PMD_WARN("The requested maximum Rx packet size (%u) is" + " larger than a single mbuf (%u) and scattered" + " mode has not been requested", + dev->data->dev_conf.rxmode.max_rx_pkt_len, + buffsz - RTE_PKTMBUF_HEADROOM); + } + if (!dpaa_intf->bp_info || dpaa_intf->bp_info->mp != mp) { struct fman_if_ic_params icp; uint32_t fd_offset; @@ -566,6 +614,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, dpaa_intf->name, fd_offset, fman_if_get_fdoff(dpaa_intf->fif)); } + DPAA_PMD_DEBUG("if:%s sg_on = %d, max_frm =%d", dpaa_intf->name, + fman_if_get_sg_enable(dpaa_intf->fif), + dev->data->dev_conf.rxmode.max_rx_pkt_len); /* checking if push mode only, no error check for now */ if (dpaa_push_mode_max_queue > dpaa_push_queue_idx) { dpaa_push_queue_idx++; @@ -1316,6 +1367,9 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) fman_if_reset_mcast_filter_table(fman_intf); /* Reset interface statistics */ fman_if_stats_reset(fman_intf); + /* Disable SG by default */ + fman_if_set_sg(fman_intf, 0); + fman_if_set_maxfrm(fman_intf, ETHER_MAX_LEN + VLAN_TAG_SIZE); return 0; diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index 2c38c34..2fc7231 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -39,9 +39,10 @@ /* Alignment to use for cpu-local structs to avoid coherency problems. */ #define MAX_CACHELINE 64 -#define DPAA_MIN_RX_BUF_SIZE 512 #define DPAA_MAX_RX_PKT_LEN 10240 +#define DPAA_SGT_MAX_ENTRIES 16 /* maximum number of entries in SG Table */ + /* RX queue tail drop threshold (CGR Based) in frame count */ #define CGR_RX_PERFQ_THRESH 256 diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 168b77e..3a3a048 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -306,8 +306,6 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid) int i = 0; uint8_t fd_offset = fd->offset; - DPAA_DP_LOG(DEBUG, "Received an SG frame"); - vaddr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd)); if (!vaddr) { DPAA_PMD_ERR("unable to convert physical address"); @@ -349,6 +347,8 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid) } prev_seg = cur_seg; } + DPAA_DP_LOG(DEBUG, "Received an SG frame len =%d, num_sg =%d", + first_seg->pkt_len, first_seg->nb_segs); dpaa_eth_packet_info(first_seg, vaddr); rte_pktmbuf_free_seg(temp); @@ -367,8 +367,6 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid) uint16_t offset; uint32_t length; - DPAA_DP_LOG(DEBUG, " FD--->MBUF"); - if (unlikely(format == qm_fd_sg)) return dpaa_eth_sg_to_mbuf(fd, ifid); @@ -379,6 +377,8 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid) offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >> DPAA_FD_OFFSET_SHIFT; length = fd->opaque & DPAA_FD_LENGTH_MASK; + DPAA_DP_LOG(DEBUG, " FD--->MBUF off %d len = %d", offset, length); + /* Ignoring case when format != qm_fd_contig */ dpaa_display_frame(fd); diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h index d3e6351..6de70a7 100644 --- a/drivers/net/dpaa/dpaa_rxtx.h +++ b/drivers/net/dpaa/dpaa_rxtx.h @@ -32,8 +32,6 @@ /* L4 Type field: TCP */ #define DPAA_L4_PARSE_RESULT_TCP 0x20 -#define DPAA_SGT_MAX_ENTRIES 16 /* maximum number of entries in SG Table */ - #define DPAA_MAX_DEQUEUE_NUM_FRAMES 63 /** X-Patchwork-Id: 147237 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672254ljw; Fri, 21 Sep 2018 04:09:18 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdad3dP76LucXZkFjdWHD2MjSTLkD20InLzp/vi/pmYM0xY9289w0JmN/wZoVHubfKuEwX5g X-Received: by 2002:a1c:1a49:: with SMTP id a70-v6mr6582402wma.91.1537528158302; Fri, 21 Sep 2018 04:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528158; cv=none; d=google.com; s=arc-20160816; b=vcpYOaLK7mZ5un+2k+mr+M1Z6UvxiOqzoeX3sdPiUrZNwN6s4CxOWTZrwOLWzlVGd5 x/75gVTqJszSCy/NZU7PIhiKGqBeCbCoyop4OZ4YK8mlsDm6W6m/TuI8blYY6XccyQmG lHroabSXn6SAUriv2ooyJ0seuBcJZp8o4q1xT/JM/2SfEtyV3B71+aG2ud2x1JEIqgCG bJ58Kx8g6X+mgGP9qsUCqJybHM9p9/NqVFLL/ZPLQmEEmPrRlhKW3H/V+lCWofybfNYX xVTLnjE6yZbXYxS1Bw5onLOnkvobDvVgbBcb4Gs5Cavs5yE/DhSJpN7k9nrGh6hkd1bb jkzg== 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=xi0F/Wka9lDHE59ew4x7TVcZwB5D1r4iOCCvy28aAbU=; b=LSUAgQ4lUaJF2IHCXwX6BmOCzgFETGvjlT/D3WQHh1/QK+iPtGyEl2frDFjvDG4Zg8 uj6tck8P4Y0IHqqAQBnG/hGIyYrp3Sn7Qt2xscQ5HqKrdo7DE6kfQ48kF/maAQ/DJBxe z5+7uunEct9nDMBAFnkY9NIOaB3gZYIy7DbeaOlOcLPYXwsT7895OvrjxbQQyrV2hncJ 7GZS9+wzc8ZpvBE0t3hXkpL4aL90lNVRER2HKXyCLwDsGIhUJeuZsAhxq312N/ImlPpt plCmkdK16h1yCXeLyTyF9o8L1UD/uMmuHDb8sIelgy7OBtgoOz/tOLWy+2PIEofXaPJM YdDw== 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 66-v6si14165466wra.32.2018.09.21.04.09.18; Fri, 21 Sep 2018 04:09:18 -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 447705B3A; Fri, 21 Sep 2018 13:08:27 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id C8BF4548B; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id ABA701A02B4; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) 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 9786F1A02B6; Fri, 21 Sep 2018 13:08:09 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 57ABB402F8; Fri, 21 Sep 2018 19:08:03 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Sachin Saxena , shreyansh.jain@nxp.com, stable@dpdk.org Date: Fri, 21 Sep 2018 16:35:53 +0530 Message-Id: <1537527962-25757-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 04/13] net/dpaa: fix link speed based on MAC type 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: Sachin Saxena The link speed shall be on the basis of mac type. Fixes: 799db4568c76 ("net/dpaa: support device info and speed capability") Cc: shreyansh.jain@nxp.com Cc: stable@dpdk.org Signed-off-by: Sachin Saxena --- drivers/net/dpaa/dpaa_ethdev.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index fd45b24..53dc317 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -341,8 +341,15 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev, dev_info->max_vfs = 0; dev_info->max_vmdq_pools = ETH_16_POOLS; dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL; - dev_info->speed_capa = (ETH_LINK_SPEED_1G | - ETH_LINK_SPEED_10G); + + if (dpaa_intf->fif->mac_type == fman_mac_1g) + dev_info->speed_capa = ETH_LINK_SPEED_1G; + else if (dpaa_intf->fif->mac_type == fman_mac_10g) + dev_info->speed_capa = (ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G); + else + DPAA_PMD_ERR("invalid link_speed: %s, %d", + dpaa_intf->name, dpaa_intf->fif->mac_type); + dev_info->rx_offload_capa = dev_rx_offloads_sup | dev_rx_offloads_nodis; dev_info->tx_offload_capa = dev_tx_offloads_sup | From patchwork Fri Sep 21 11:05:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147233 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp671570ljw; Fri, 21 Sep 2018 04:08:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaHXQii186cbPrfvhFvzCQnOXE+QhNdv7pzBF2+qjLZ/NbJk1OmwD5FjB2zJmFSMOcw/+Xp X-Received: by 2002:a1c:f703:: with SMTP id v3-v6mr6399811wmh.48.1537528120996; Fri, 21 Sep 2018 04:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528120; cv=none; d=google.com; s=arc-20160816; b=fLMD6ZnT2P5XgHSfbh5D/Cb+TOssjRR88sn6mxkayFgvFrQpP3MO3KIOJtbfwqqRft UX1ve7Hv3a84sWOw+oeq3FBycwN8/xfY3YuGhm3g40yoiBCG+YddXsL1+hVEiYbSTeRv qDAjfOYqPIBc2W6tmDbV/liZZlVdW8gql5AoasFXny+wuw0wZIlmhSI/2clhb/85bOoS ETb5nEQQEhCO0IuA0QqpkPkivIz7llUwmXj4MQjUj6LIWXiWS5QaIghzSjEebvjKTOqc zVixxcVnlmtS8icDO3u9dIlJMTc+U5toGxyWdBZ40N03Xl/H2OBFioW4/5B+Dv+/FzCX dCOg== 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:to:from; bh=L04NWI0zqJVZSXDw1R/t3O5RvsfmVZBVRExzP4RuMkI=; b=drV01hOtdIG4oYbnR1S+5MhOjHeLpDxglq4d1R2B0lsynCkGFCoNTY0SPYQdaQf9ov sP87f4wsSnnPjcwWSpfXqdxSw4tIOstmhHb+8udRYsEm/j/MZn2eviN7O0UHIxtfHYbP M+Oe4N1FNL65GZxm5xGDKaZKaOxOB6r+2zXOX46xsE9GUqeana2IVbUGo6dECqUtqg3Y Cf3roOHz3YnFrjFC4ZyfGduIGDZkoyGjvY1ZHOlUHTpGDCGA4f9rfzQ75tPoRaZ7A3yP oVL0vXAYJkEphUsJNC526cPusqIlF0GWB1Mgyms9oLnCdiQtb+P/TSVzJMmrW4x9INpj LxSw== 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 e12si526542wrx.359.2018.09.21.04.08.40; Fri, 21 Sep 2018 04:08:40 -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 7F5CB4CC3; Fri, 21 Sep 2018 13:08:17 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id B57044F94 for ; Fri, 21 Sep 2018 13:08:10 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 76960200262; Fri, 21 Sep 2018 13:08:10 +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 95FA5200015; Fri, 21 Sep 2018 13:08:08 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 542274030E; Fri, 21 Sep 2018 19:08:04 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Fri, 21 Sep 2018 16:35:54 +0530 Message-Id: <1537527962-25757-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 05/13] net/dpaa: minor debug log enhancements 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" Improving the debug message for event mode and reducing the log level for less important log Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 53dc317..fc536a6 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -617,9 +617,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, fman_if_set_bp(dpaa_intf->fif, mp->size, dpaa_intf->bp_info->bpid, bp_size); dpaa_intf->valid = 1; - DPAA_PMD_INFO("if =%s - fd_offset = %d offset = %d", - dpaa_intf->name, fd_offset, - fman_if_get_fdoff(dpaa_intf->fif)); + DPAA_PMD_DEBUG("if:%s fd_offset = %d offset = %d", + dpaa_intf->name, fd_offset, + fman_if_get_fdoff(dpaa_intf->fif)); } DPAA_PMD_DEBUG("if:%s sg_on = %d, max_frm =%d", dpaa_intf->name, fman_if_get_sg_enable(dpaa_intf->fif), @@ -697,7 +697,8 @@ dpaa_eth_eventq_attach(const struct rte_eth_dev *dev, struct qm_mcc_initfq opts = {0}; if (dpaa_push_mode_max_queue) - DPAA_PMD_WARN("PUSH mode already enabled for first %d queues.\n" + DPAA_PMD_WARN("PUSH mode q and EVENTDEV are not compatible\n" + "PUSH mode already enabled for first %d queues.\n" "To disable set DPAA_PUSH_QUEUES_NUMBER to 0\n", dpaa_push_mode_max_queue); From patchwork Fri Sep 21 11:05:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147234 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp671770ljw; Fri, 21 Sep 2018 04:08:50 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda3tKqZQVMylmSnKlSDf5WkOWgrjlbvk27yxhtTXwRYTvGNxNkqj56Lur0OPwrSAaxDlV+1 X-Received: by 2002:adf:b357:: with SMTP id k23-v6mr37818503wrd.207.1537528130342; Fri, 21 Sep 2018 04:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528130; cv=none; d=google.com; s=arc-20160816; b=a1Wm/ZU5/zTqjIB6UGY9VirnOQhlyqjKhdtx+yJ68wjptptx+pzfEIVlwV0BBuXtu9 i/jJEF3pirdEl3egcamGBxACZMlmPPj8Zu4kmvNskr0k0izPKo6VYzhf8yhGFPUsUo3z 2qKrBqZItefQrZR9aWmHa6RWjNmCSuUwvrUchi7JwezM+j63WPlI26tWgp9zSvgK7oSp FQgEm4H+wneOY2HcnIqFnEPqoEQMbtJi7OigAZ7v+x5I+LMVzhmqR5OZtteUhIOHbEOH a1O84pRIkULOyEiS9vuMzTgeF9OkRqvt2tQCfqafJaMiAMIMcxivyAIncy+Rfe3Af1Mp TREw== 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:to:from; bh=cJ3WcJwENSvzqOTrMKRemGdgsB8g4fIx5z50EKCclVo=; b=qVwyJpiDKOD97ktXnRGcrbGXvFb5NKm263ePA/MdV5ddtQz1rWaI8CyUWFTQ56gk8G WosPS6xO5+5gy8APM9mv+udRZkEnlSBKSnOwk48lj9qcZuymhW9Awla3XJsHuq6yEgvY Ffc3mo1zrsrnKNvoC6oGAbR+tQgPToI1UF/9b80rGR81SoKioXw/WUCsPLcFTFSUEEC4 pQLhWjpu2LDCDwECA8x8yyBVtUv9da4yHNIVTa2KObBoKAAPb+ICLtGSB1Qgn3MjjdQN aunnljBGbhZ4V3V99Apcw07tdIhOYXh7T73RO8+plYabGH3v0q+rloFN/gXjq+B7f5Wn CF2Q== 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 w130-v6si876518wmf.34.2018.09.21.04.08.50; Fri, 21 Sep 2018 04:08:50 -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 4345158FA; Fri, 21 Sep 2018 13:08:20 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 70C8B20BD for ; Fri, 21 Sep 2018 13:08:11 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 298C21A02BE; Fri, 21 Sep 2018 13:08:11 +0200 (CEST) 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 172361A0039; Fri, 21 Sep 2018 13:08:09 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 0963940314; Fri, 21 Sep 2018 19:08:04 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Fri, 21 Sep 2018 16:35:55 +0530 Message-Id: <1537527962-25757-7-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 06/13] bus/dpaa: add interrupt based portal fd support 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 supports in bus driver for qbman to support and configure portal based FDs, which can be used for interrupt based processing. Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/qbman/bman_driver.c | 17 ++++++---- drivers/bus/dpaa/base/qbman/qman.c | 52 +++++++++++++++++++++++++++++++ drivers/bus/dpaa/base/qbman/qman_driver.c | 7 ++++- drivers/bus/dpaa/include/fsl_qman.h | 20 ++++++++++++ drivers/bus/dpaa/include/fsl_usd.h | 6 ++++ drivers/bus/dpaa/rte_bus_dpaa_version.map | 16 +++++++++- 6 files changed, 110 insertions(+), 8 deletions(-) -- 2.7.4 diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c index b14b590..750b756 100644 --- a/drivers/bus/dpaa/base/qbman/bman_driver.c +++ b/drivers/bus/dpaa/base/qbman/bman_driver.c @@ -23,7 +23,7 @@ static void *bman_ccsr_map; /* Portal driver */ /*****************/ -static __thread int fd = -1; +static __thread int bmfd = -1; static __thread struct bm_portal_config pcfg; static __thread struct dpaa_ioctl_portal_map map = { .type = dpaa_portal_bman @@ -70,14 +70,14 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared) pcfg.index = map.index; bman_depletion_fill(&pcfg.mask); - fd = open(BMAN_PORTAL_IRQ_PATH, O_RDONLY); - if (fd == -1) { + bmfd = open(BMAN_PORTAL_IRQ_PATH, O_RDONLY); + if (bmfd == -1) { pr_err("BMan irq init failed"); process_portal_unmap(&map.addr); return -EBUSY; } /* Use the IRQ FD as a unique IRQ number */ - pcfg.irq = fd; + pcfg.irq = bmfd; portal = bman_create_affine_portal(&pcfg); if (!portal) { @@ -90,7 +90,7 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared) /* Set the IRQ number */ irq_map.type = dpaa_portal_bman; irq_map.portal_cinh = map.addr.cinh; - process_portal_irq_map(fd, &irq_map); + process_portal_irq_map(bmfd, &irq_map); return 0; } @@ -99,7 +99,7 @@ static int fsl_bman_portal_finish(void) __maybe_unused const struct bm_portal_config *cfg; int ret; - process_portal_irq_unmap(fd); + process_portal_irq_unmap(bmfd); cfg = bman_destroy_affine_portal(); DPAA_BUG_ON(cfg != &pcfg); @@ -109,6 +109,11 @@ static int fsl_bman_portal_finish(void) return ret; } +int bman_thread_fd(void) +{ + return bmfd; +} + int bman_thread_init(void) { /* Convert from contiguous/virtual cpu numbering to real cpu when diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 7c17027..8730550 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -1040,6 +1040,50 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p, return limit; } +int qman_irqsource_add(u32 bits) +{ + struct qman_portal *p = get_affine_portal(); + + bits = bits & QM_PIRQ_VISIBLE; + + /* Clear any previously remaining interrupt conditions in + * QCSP_ISR. This prevents raising a false interrupt when + * interrupt conditions are enabled in QCSP_IER. + */ + qm_isr_status_clear(&p->p, bits); + dpaa_set_bits(bits, &p->irq_sources); + qm_isr_enable_write(&p->p, p->irq_sources); + + + return 0; +} + +int qman_irqsource_remove(u32 bits) +{ + struct qman_portal *p = get_affine_portal(); + u32 ier; + + /* Our interrupt handler only processes+clears status register bits that + * are in p->irq_sources. As we're trimming that mask, if one of them + * were to assert in the status register just before we remove it from + * the enable register, there would be an interrupt-storm when we + * release the IRQ lock. So we wait for the enable register update to + * take effect in h/w (by reading it back) and then clear all other bits + * in the status register. Ie. we clear them from ISR once it's certain + * IER won't allow them to reassert. + */ + + bits &= QM_PIRQ_VISIBLE; + dpaa_clear_bits(bits, &p->irq_sources); + qm_isr_enable_write(&p->p, p->irq_sources); + ier = qm_isr_enable_read(&p->p); + /* Using "~ier" (rather than "bits" or "~p->irq_sources") creates a + * data-dependency, ie. to protect against re-ordering. + */ + qm_isr_status_clear(&p->p, ~ier); + return 0; +} + u16 qman_affine_channel(int cpu) { if (cpu < 0) { @@ -1114,6 +1158,14 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, return rx_number; } +void qman_clear_irq(void) +{ + struct qman_portal *p = get_affine_portal(); + u32 clear = QM_DQAVAIL_MASK | (p->irq_sources & + ~(QM_PIRQ_CSCI | QM_PIRQ_CCSCI)); + qm_isr_status_clear(&p->p, clear); +} + u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit, void **bufs) { diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c index f6ecd6b..ba15339 100644 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c @@ -113,6 +113,11 @@ static int fsl_qman_portal_finish(void) return ret; } +int qman_thread_fd(void) +{ + return qmfd; +} + int qman_thread_init(void) { /* Convert from contiguous/virtual cpu numbering to real cpu when @@ -135,7 +140,7 @@ void qman_thread_irq(void) * rather than breaking that encapsulation I am simply hard-coding the * offset to the inhibit register here. */ - out_be32(qpcfg.addr_virt[DPAA_PORTAL_CI] + 0xe0c, 0); + out_be32(qpcfg.addr_virt[DPAA_PORTAL_CI] + 0x36C0, 0); } struct qman_portal *fsl_qman_portal_create(void) diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h index b18cf03..e438414 100644 --- a/drivers/bus/dpaa/include/fsl_qman.h +++ b/drivers/bus/dpaa/include/fsl_qman.h @@ -1316,6 +1316,26 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit, void **bufs); /** + * qman_irqsource_add - add processing sources to be interrupt-driven + * @bits: bitmask of QM_PIRQ_**I processing sources + * + * Adds processing sources that should be interrupt-driven (rather than + * processed via qman_poll_***() functions). Returns zero for success, or + * -EINVAL if the current CPU is sharing a portal hosted on another CPU. + */ +int qman_irqsource_add(u32 bits); + +/** + * qman_irqsource_remove - remove processing sources from being interrupt-driven + * @bits: bitmask of QM_PIRQ_**I processing sources + * + * Removes processing sources from being interrupt-driven, so that they will + * instead be processed via qman_poll_***() functions. Returns zero for success, + * or -EINVAL if the current CPU is sharing a portal hosted on another CPU. + */ +int qman_irqsource_remove(u32 bits); + +/** * qman_affine_channel - return the channel ID of an portal * @cpu: the cpu whose affine portal is the subject of the query * diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h index e183617..ec1ab7c 100644 --- a/drivers/bus/dpaa/include/fsl_usd.h +++ b/drivers/bus/dpaa/include/fsl_usd.h @@ -55,6 +55,10 @@ int qman_free_raw_portal(struct dpaa_raw_portal *portal); int bman_allocate_raw_portal(struct dpaa_raw_portal *portal); int bman_free_raw_portal(struct dpaa_raw_portal *portal); +/* Obtain thread-local UIO file-descriptors */ +int qman_thread_fd(void); +int bman_thread_fd(void); + /* Post-process interrupts. NB, the kernel IRQ handler disables the interrupt * line before notifying us, and this post-processing re-enables it once * processing is complete. As such, it is essential to call this before going @@ -63,6 +67,8 @@ int bman_free_raw_portal(struct dpaa_raw_portal *portal); void qman_thread_irq(void); void bman_thread_irq(void); +void qman_clear_irq(void); + /* Global setup */ int qman_global_init(void); int bman_global_init(void); diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map index 7d6d624..70076c7 100644 --- a/drivers/bus/dpaa/rte_bus_dpaa_version.map +++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map @@ -95,10 +95,24 @@ DPDK_18.02 { DPDK_18.08 { global: - fman_if_get_sg_enable; fman_if_set_sg; of_get_mac_address; local: *; } DPDK_18.02; + +DPDK_18.11 { + global: + bman_thread_irq; + fman_if_get_sg_enable; + fman_if_set_sg; + qman_clear_irq; + + qman_irqsource_add; + qman_irqsource_remove; + qman_thread_fd; + qman_thread_irq; + + local: *; +} DPDK_18.08; From patchwork Fri Sep 21 11:05:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147235 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp671957ljw; Fri, 21 Sep 2018 04:08:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZOnKKRynIflIAE5Y5I3DIGH3+6zRBRb5VgrHlf10QIEgmrHlXlGDMWW7n4BN5uHs8qnEZL X-Received: by 2002:a1c:780c:: with SMTP id t12-v6mr6393713wmc.133.1537528139932; Fri, 21 Sep 2018 04:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528139; cv=none; d=google.com; s=arc-20160816; b=E3uXGmTVbW42GIWYS0xoAn1zkF83z2cGOjGdXog3zkWPvgfuescJQRk7EIGWiinkkj CW8aimc75N7/YPI8FxNIjGhXbtyxDMSTpB1uwNbIsFIkQI0nY+h/efgzonZ7BVk9kcLr gk5f8MlJjTcW4Oz79waRFTFB7rCHIr7Ogncem8IJOi7YvA+VgRBQB6so8VGW5/3h7SzF HUBWfYDLxGYfQO71jwqoElaL4Ew7TARxMYEIwFC75IIKBzECz5N2PF/kGz5HLVSsw47N V3FT6XAf/JsMhEX/g4kseiU2pPYve6WLoE7jvwe4lnU7XG7Ln6+i97AIdYk83Uhg6yvV 1j3Q== 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=JVbc/B2bYnppd+PXzaUi5O5+T6gITQQ2doWElaZWnV0=; b=Z1LVwCQbeWzpZEwRTJf5ipKehoMqK+iz6HDRGP1TcBgpi8rgAQBZJ4Wx71hyBVq9iZ +EGe5D80qQ59yFeIbD7L/uI0EeYJeZ4MWxP08xBAI6AZ4fnnS5qtuTqNiVumK/31ASnK tUM020xYYWQ+t/FEyuws9ITvYz6TvCUIpPORL+/+Vsy4awc48hDFKFdFdpN+YQNmSm7o fDPXIwg5JQ0f+PDYeMm7GYlj41iHA4hIsBvjtM/Pko3jWsexvr/CJj8K+JHU69kgbdac GSy8b9dQpJKYKz8TN/AhO9RnKDoiNyv8ajBVlm8yNmM2DGPm+5++5MhwPfBiJI1JY0Po iTqA== 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 z126-v6si5391522wme.9.2018.09.21.04.08.59; Fri, 21 Sep 2018 04:08:59 -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 BCB845A6A; Fri, 21 Sep 2018 13:08:22 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 1B2A54CA1 for ; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id F3D7220004C; Fri, 21 Sep 2018 13:08:11 +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 B0735200041; Fri, 21 Sep 2018 13:08:09 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id B4B7C402A9; Fri, 21 Sep 2018 19:08:05 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Fri, 21 Sep 2018 16:35:56 +0530 Message-Id: <1537527962-25757-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 07/13] bus/dpaa: avoid tag Set for eqcr in Tx path 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 Minor optimization for TX path. Signed-off-by: Nipun Gupta --- drivers/bus/dpaa/base/qbman/qman.c | 5 ----- 1 file changed, 5 deletions(-) -- 2.7.4 diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 8730550..71da275 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -2238,11 +2238,6 @@ int qman_enqueue_multi(struct qman_fq *fq, /* try to send as many frames as possible */ while (eqcr->available && frames_to_send--) { eq->fqid = fq->fqid_le; -#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - eq->tag = cpu_to_be32(fq->key); -#else - eq->tag = cpu_to_be32((u32)(uintptr_t)fq); -#endif eq->fd.opaque_addr = fd->opaque_addr; eq->fd.addr = cpu_to_be40(fd->addr); eq->fd.status = cpu_to_be32(fd->status); From patchwork Fri Sep 21 11:05:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147236 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672098ljw; Fri, 21 Sep 2018 04:09:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV61cxOOFSKOA1P3SdYjIuKkBPd3z7slpR7gAeiTT+eKhIcxGbfSEQaYitPWoREZIdiKp+xkt X-Received: by 2002:a1c:9b95:: with SMTP id d143-v6mr2306286wme.95.1537528148387; Fri, 21 Sep 2018 04:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528148; cv=none; d=google.com; s=arc-20160816; b=By0+DS19J20NeNvGJj01M6Xt4igWxhlBydvPSwO2x/1Qm3FCdpGMIB9sy4//jVAOho cqL6DRSHcBZPk1Bb1RwEjIFEaEk0cWZc9vrjm6Jsknn4LrEtmq6VjrvRszdIbDcvsIRD sB2doQVSI3TXchOLn30MEjpupqd7yUo+bt+x71wD7grIk8lkxppz5zwp5Wr3QC5dZZpK w5WwJ+wSnkfvzbtJN+gK435YGsPub07jtvFkzttJ9MPtwZhRJtvCYMirkDtN4jK+WgrN 0O7NOUolrofoCDVBVVykjkX4YsCywHF8dCtuNELheK0j1qxhhQCC42q+a4awOIZZqwfs v/YQ== 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=7R7SWZykjj7IzNAnmaecbbGOQ2kTdi17n4k8L1c8LbA=; b=e3hQ49hYxTAvpMAxFmaI0zkhQj30v3IjsH1zqQNkjqOeu1GQimylUhZ/fwtksd4Hs+ xqvpJqshHqP5vsPWueKhMHC72Wdb8q8W2TJYtgTfNlxSiHffIEevd8nSt9lw3xKV/p1l EvLruCG9+WzQMZVx0fVAPQNZAl5IAU83LqGMak0l6gNexvKMglqhtiqrydrLSix1i8zm EBMWUKJPU4Y3Iwlhf83m6xmzfn9ST+PliH+RFnJt2GdM+N3PWiL/3mTblp00pw/wPI4t wyR/eMm+pKUm7r0TmcGnbQILU9KrcEk7e6A/v54nUq+xh7P9+67IDror2iWLeRJw3Lro vNjQ== 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 190-v6si47174wmr.140.2018.09.21.04.09.08; Fri, 21 Sep 2018 04:09:08 -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 04F5A5B30; Fri, 21 Sep 2018 13:08:25 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id A70524F9B for ; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8BD4B1A02B3; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) 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 462091A02B4; Fri, 21 Sep 2018 13:08:10 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8848E402DD; Fri, 21 Sep 2018 19:08:06 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Fri, 21 Sep 2018 16:35:57 +0530 Message-Id: <1537527962-25757-9-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 08/13] bus/dpaa: avoid using be conversions for contextb 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 minor optimization in packet handling path Signed-off-by: Nipun Gupta --- drivers/bus/dpaa/base/qbman/qman.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) -- 2.7.4 diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 71da275..dc64d08 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -852,11 +852,9 @@ static u32 __poll_portal_slow(struct qman_portal *p, u32 is) case QM_MR_VERB_FQPN: /* Parked */ #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - fq = get_fq_table_entry( - be32_to_cpu(msg->fq.contextB)); + fq = get_fq_table_entry(msg->fq.contextB); #else - fq = (void *)(uintptr_t) - be32_to_cpu(msg->fq.contextB); + fq = (void *)(uintptr_t)msg->fq.contextB; #endif fq_state_change(p, fq, msg, verb); if (fq->cb.fqs) @@ -967,7 +965,6 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p, *shadow = *dq; dq = shadow; shadow->fqid = be32_to_cpu(shadow->fqid); - shadow->contextB = be32_to_cpu(shadow->contextB); shadow->seqnum = be16_to_cpu(shadow->seqnum); hw_fd_to_cpu(&shadow->fd); #endif @@ -1136,9 +1133,9 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, /* SDQCR: context_b points to the FQ */ #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - fq = qman_fq_lookup_table[be32_to_cpu(dq[rx_number]->contextB)]; + fq = qman_fq_lookup_table[dq[rx_number]->contextB]; #else - fq = (void *)be32_to_cpu(dq[rx_number]->contextB); + fq = (void *)dq[rx_number]->contextB; #endif if (fq->cb.dqrr_prepare) fq->cb.dqrr_prepare(shadow[rx_number], @@ -1195,7 +1192,6 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit, *shadow = *dq; dq = shadow; shadow->fqid = be32_to_cpu(shadow->fqid); - shadow->contextB = be32_to_cpu(shadow->contextB); shadow->seqnum = be16_to_cpu(shadow->seqnum); hw_fd_to_cpu(&shadow->fd); #endif @@ -1260,7 +1256,6 @@ struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq) *shadow = *dq; dq = shadow; shadow->fqid = be32_to_cpu(shadow->fqid); - shadow->contextB = be32_to_cpu(shadow->contextB); shadow->seqnum = be16_to_cpu(shadow->seqnum); hw_fd_to_cpu(&shadow->fd); #endif @@ -1556,7 +1551,7 @@ int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts) mcc->initfq.we_mask |= QM_INITFQ_WE_CONTEXTB; #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - mcc->initfq.fqd.context_b = fq->key; + mcc->initfq.fqd.context_b = cpu_to_be32(fq->key); #else mcc->initfq.fqd.context_b = (u32)(uintptr_t)fq; #endif From patchwork Fri Sep 21 11:05:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147238 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672432ljw; Fri, 21 Sep 2018 04:09:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV63YRSUZ2zSy2hNlHCpGNIyhzldEclYpEj2oS2FN4kikNUWW9jvw6DSHOb0UzYuOfbGNXFk+ X-Received: by 2002:a1c:5e08:: with SMTP id s8-v6mr6852073wmb.88.1537528166874; Fri, 21 Sep 2018 04:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528166; cv=none; d=google.com; s=arc-20160816; b=pPH3KR0LIu/szV7wlcLdSHGzo3Q9oYeW9wwcHfO5NDOxvlXPJACH21X3BKmfQHsiUE Kgyg9EmJCA1mrWcy5Ya2Xq/ME0STotPhFX/bGQVYPldio0J80l8YDFQ4hZ3EQ2LFgjt6 Hgf1Cv3h4X9XLkHxnb0nm67URiVVY6RbfCLYhLzL3cZq8egwCuNWMIJJfRbdANebWPut mYs5xtpu8XaSLJ+sfcw5aE95luQWuBgcLiUI4cDQcWOxyPyLzJkMv9L08H5X1QRryjpV +02BFR7CAx+YOiX8YsoOM6qfluq5F66Yu/avqqNuJ11YZR64qyjfUVt3IrXGzjk8Bf2L gVbw== 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=gmE/O4lGPeeW+z239619XonovgPdUD2qx3aYChzt9YQ=; b=YRx99KGn6mgUyzIDnKS0ZDWMiClgh79wmVWA/9tRMoy0x92cGcUVoa2fyrXcObEdT7 e6d+PmdYmnM18YN7Or6o0LOmRIzeMRQJhjnb/PEV4GOTiJLRydUaV0li2msi4A0MD8xd KLeEnRP8hvc12XT0chU/d11mugT+0+oyJYcuLlurSLXr4e0sqJdX3IY9fVvEzwHCBq/s tiIkkU8P13BHhHnimS62V35UKePgecOOYUJwj7bzrjxfpvd8hJyc0sV87D5eFj29oJXT R0PSdU3c5vBA7MK0E7RCUhk/MAyk8MasALNwAMiyNofOlIAJOm4gHtHpZAINccJqgk5C tLDg== 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 a11-v6si5384018wmc.186.2018.09.21.04.09.26; Fri, 21 Sep 2018 04:09:26 -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 A77045F12; Fri, 21 Sep 2018 13:08:29 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 77C515592 for ; Fri, 21 Sep 2018 13:08:13 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 5B5221A02C0; Fri, 21 Sep 2018 13:08:13 +0200 (CEST) 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 185621A02BD; Fri, 21 Sep 2018 13:08:11 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4FC6B40302; Fri, 21 Sep 2018 19:08:07 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Sunil Kumar Kori Date: Fri, 21 Sep 2018 16:35:58 +0530 Message-Id: <1537527962-25757-10-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 09/13] net/dpaa: rearranging of atomic queue support code 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: Sunil Kumar Kori This is to align the code with dpaa2 to ease out maintaince of both driver code bases. Signed-off-by: Sunil Kumar Kori --- drivers/net/dpaa/dpaa_rxtx.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 3a3a048..6698c97 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -870,6 +870,19 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) DPAA_TX_BURST_SIZE : nb_bufs; for (loop = 0; loop < frames_to_send; loop++) { mbuf = *(bufs++); + seqn = mbuf->seqn; + if (seqn != DPAA_INVALID_MBUF_SEQN) { + index = seqn - 1; + if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) { + flags[loop] = + ((index & QM_EQCR_DCA_IDXMASK) << 8); + flags[loop] |= QMAN_ENQUEUE_FLAG_DCA; + DPAA_PER_LCORE_DQRR_SIZE--; + DPAA_PER_LCORE_DQRR_HELD &= + ~(1 << index); + } + } + if (likely(RTE_MBUF_DIRECT(mbuf))) { mp = mbuf->pool; bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp); @@ -916,18 +929,6 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) goto send_pkts; } } - seqn = mbuf->seqn; - if (seqn != DPAA_INVALID_MBUF_SEQN) { - index = seqn - 1; - if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) { - flags[loop] = - ((index & QM_EQCR_DCA_IDXMASK) << 8); - flags[loop] |= QMAN_ENQUEUE_FLAG_DCA; - DPAA_PER_LCORE_DQRR_SIZE--; - DPAA_PER_LCORE_DQRR_HELD &= - ~(1 << index); - } - } } send_pkts: From patchwork Fri Sep 21 11:05:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147239 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672592ljw; Fri, 21 Sep 2018 04:09:35 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbu48Bpg+WxMoolPDadDN1fc2GOxQ+qYyEJafOFbfcqpZbO/6K84PMTMzmHymOQPFNRp7vT X-Received: by 2002:a1c:1f87:: with SMTP id f129-v6mr7080382wmf.153.1537528175547; Fri, 21 Sep 2018 04:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528175; cv=none; d=google.com; s=arc-20160816; b=xTAb7jVbVPgd4JjaTzMmq9qUXFw2Lf2vAr8FmN3aq5bJMgeLDNIlJPM9y3+9D6FWpI 8syhtiY9Bd7ffOsyMKxc+Krq7GhCId0dMbl1oZ//lu5+yaUR0aZLHm/OP1qu23gV2XDn a5FRu41A9XP34NC47R4SA8XpZD86k8cL5ZN+EqFjwcVJm8og1zUQnY5esGTMaHv+QQpu w646TelPGvD91Uzin+MiMpsjuJHG9DvGHsYAA0Baln9ngSCAJAlWs7z5s4n3+M58lkay m0ptHNvjClZXahatFe+Fn3+Stp9crwUJ+JrOn2Lf/FlUpOfn38nOmTM22t4Sz9dfft6V +U5Q== 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:to:from; bh=v6ZcKDP28G/pHuweWg2mz5/0Id6staheMKh4B5VG25U=; b=D6R53f4BUQWULzSw/ABPPT04Yzh9RZgj4pp9P0/hXmVDo8usq2JHBtUFJ0YdB/Uf1m srp4wk9gCKUSM6aa3mbYAgrRGGEwebg7kUdOsA1eLcdzstRL92iZDXVh13joEH/In5N2 LQ+T8PXpkV05R924xOCbDDlnwripU3a4wd5JMaxelGe77lUfpWPYzxpfq/T1Hzg9GJxQ DDdp2xDDZN1qWAVE6OyFdhBAQp0FdLR103DpkSOck7ccZ18SiKR8I8RZW7DBsNkKCr66 28mxj5kg+3lvX3/awVrzCc3+EkRB6jL8onQCczAqEdszpEXuwtJOAbXXYj6Xx6ND3e4v GJFw== 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 l12-v6si665311wro.140.2018.09.21.04.09.35; Fri, 21 Sep 2018 04:09:35 -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 E05135B2E; Fri, 21 Sep 2018 13:08:32 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id B60BF4CC3 for ; Fri, 21 Sep 2018 13:08:13 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 991EE1A02BD; Fri, 21 Sep 2018 13:08:13 +0200 (CEST) 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 87C4F1A0039; Fri, 21 Sep 2018 13:08:11 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 19CC9402E5; Fri, 21 Sep 2018 19:08:08 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Fri, 21 Sep 2018 16:35:59 +0530 Message-Id: <1537527962-25757-11-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 10/13] net/dpaa: separate Rx function for LS1046 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 is to avoid the checks in datapath and help in performance. LS1046 has different data stash settings. Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 9 +++++-- drivers/net/dpaa/dpaa_rxtx.c | 60 +++++++++++++++++++++++++++++++++--------- drivers/net/dpaa/dpaa_rxtx.h | 3 +++ 3 files changed, 58 insertions(+), 14 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index fc536a6..1f2cc57 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -661,8 +661,13 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, "ret:%d(%s)", rxq->fqid, ret, strerror(ret)); return ret; } - rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb; - rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare; + if (dpaa_svr_family == SVR_LS1043A_FAMILY) { + rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb_no_prefetch; + } else { + rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb; + rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare; + } + rxq->is_static = true; } dev->data->rx_queues[queue_idx] = rxq; diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 6698c97..2c57741 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -398,8 +398,9 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid) return mbuf; } +/* Specific for LS1043 */ void -dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr, +dpaa_rx_cb_no_prefetch(struct qman_fq **fq, struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs) { struct rte_mbuf *mbuf; @@ -411,17 +412,13 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr, uint32_t length; uint8_t format; - if (dpaa_svr_family != SVR_LS1046A_FAMILY) { - bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid); - ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd)); - rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF)); - bufs[0] = (struct rte_mbuf *)((char *)ptr - - bp_info->meta_data_size); - } + bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid); + ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd)); + rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF)); + bufs[0] = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size); for (i = 0; i < num_bufs; i++) { - if (dpaa_svr_family != SVR_LS1046A_FAMILY && - i < num_bufs - 1) { + if (i < num_bufs - 1) { bp_info = DPAA_BPID_TO_POOL_INFO(dqrr[i + 1]->fd.bpid); ptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[i + 1]->fd)); rte_prefetch0((void *)((uint8_t *)ptr + @@ -458,6 +455,46 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr, } } +void +dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr, + void **bufs, int num_bufs) +{ + struct rte_mbuf *mbuf; + const struct qm_fd *fd; + struct dpaa_if *dpaa_intf; + uint16_t offset, i; + uint32_t length; + uint8_t format; + + for (i = 0; i < num_bufs; i++) { + fd = &dqrr[i]->fd; + dpaa_intf = fq[0]->dpaa_intf; + + format = (fd->opaque & DPAA_FD_FORMAT_MASK) >> + DPAA_FD_FORMAT_SHIFT; + if (unlikely(format == qm_fd_sg)) { + bufs[i] = dpaa_eth_sg_to_mbuf(fd, dpaa_intf->ifid); + continue; + } + + offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >> + DPAA_FD_OFFSET_SHIFT; + length = fd->opaque & DPAA_FD_LENGTH_MASK; + + mbuf = bufs[i]; + mbuf->data_off = offset; + mbuf->data_len = length; + mbuf->pkt_len = length; + mbuf->port = dpaa_intf->ifid; + + mbuf->nb_segs = 1; + mbuf->ol_flags = 0; + mbuf->next = NULL; + rte_mbuf_refcnt_set(mbuf, 1); + dpaa_eth_packet_info(mbuf, mbuf->buf_addr); + } +} + void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs) { struct dpaa_bp_info *bp_info = DPAA_BPID_TO_POOL_INFO(dq->fd.bpid); @@ -468,8 +505,7 @@ void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs) * So we prefetch the annoation beforehand, so that it is available * in cache when accessed. */ - if (dpaa_svr_family == SVR_LS1046A_FAMILY) - rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF)); + rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF)); *bufs = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size); } diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h index 6de70a7..75b093c 100644 --- a/drivers/net/dpaa/dpaa_rxtx.h +++ b/drivers/net/dpaa/dpaa_rxtx.h @@ -270,4 +270,7 @@ void dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs); void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs); + +void dpaa_rx_cb_no_prefetch(struct qman_fq **fq, + struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs); #endif From patchwork Fri Sep 21 11:06:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147240 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672744ljw; Fri, 21 Sep 2018 04:09:44 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYXvogJ5LV3UT/vl7aTfcF1XVXA8r+bMnJeolcKgJj2Z6A12Z82PdZHZYTlTyG8p/0hY0Td X-Received: by 2002:a5d:6b8d:: with SMTP id n13-v6mr37731190wrx.149.1537528184907; Fri, 21 Sep 2018 04:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528184; cv=none; d=google.com; s=arc-20160816; b=fkqPSG5OEQwQs20JP8vHC34TOogqVKQ0Bp122+kPSqJPhkozRYPNX6gjyWA93BojTg y86Qq17LdK3zDPOfES5Z9GtqSsn5eX9floyJ7lnHEfUxicTMswJWvCSrYU+27lcwVPnY 1BpZ35O2vpUgYyLNQlMNYADqv5dD5e/g1i/61Rn26yMzqenoe68NAqbpjAU9LdpxkzrD KIK/PiD6dLkCkxiMWrfr7RjvwSsYub/rpvcgdyAj2bPEk9nk7Ypa5hWd3vZMFDMjtwqE zIvYipMdctBrLnhd+0q64IBHDDcD4APvwfaiRs9jCw389QzeobtkuP1HEeqPcpGUrcqe 3vWw== 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:to:from; bh=5vYV4cIWWi0nSTqW7LUx08mvqFkPKgjQlRU8jwpB2cU=; b=OpzqK0owZ1YtMq21csLsxkQhp3UKeUsvCiUJZeXT1sw0LWrqutnqaAsK0RqO1Vm9zs zq0m7+/htTP3SOhgzBysBJyOeCQpkyvmGrY1pFY+CtHCIwVKGmjTUCkjRVKgmo7chqAy qBIN8t346kHFD+wherhJpNlslp/C1WHEJg/fGUnaY6oOMgKkthX1UuRUSC8pziXyUvYM YW5rsGMk9uldHCr38qq5husvcV55NwF+3d8UJgGSlp9xkC7o7TXM2hf8tdoN2puklpo7 1dqu5UHp7q08j0RyrSLASJH1FQSavGPI4PLVm7jZY8FMQzyFUM54K2iPOg2iUztL4a+p ylJg== 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 y6si5111665wrw.327.2018.09.21.04.09.44; Fri, 21 Sep 2018 04:09:44 -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 9352B5F1D; Fri, 21 Sep 2018 13:08:35 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 0EEE95592 for ; Fri, 21 Sep 2018 13:08:14 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E94E21A02BE; Fri, 21 Sep 2018 13:08:13 +0200 (CEST) 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 15B611A02C2; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C1B9A402E6; Fri, 21 Sep 2018 19:08:08 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Fri, 21 Sep 2018 16:36:00 +0530 Message-Id: <1537527962-25757-12-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 11/13] net/dpaa: tune prefetch in Rx path 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" As part of performance optimization excercise, tuning the prefetch placement. Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_rxtx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 2c57741..c4471c2 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -370,10 +370,6 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid) if (unlikely(format == qm_fd_sg)) return dpaa_eth_sg_to_mbuf(fd, ifid); - ptr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd)); - - rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF)); - offset = (fd->opaque & DPAA_FD_OFFSET_MASK) >> DPAA_FD_OFFSET_SHIFT; length = fd->opaque & DPAA_FD_LENGTH_MASK; @@ -381,8 +377,11 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid) /* Ignoring case when format != qm_fd_contig */ dpaa_display_frame(fd); + ptr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd)); mbuf = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size); + /* Prefetch the Parse results and packet data to L1 */ + rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF)); mbuf->data_off = offset; mbuf->data_len = length; From patchwork Fri Sep 21 11:06:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147241 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672904ljw; Fri, 21 Sep 2018 04:09:54 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdar/QuHpnB1qffeQ77bV+Mda6jfdmET0ZArMVChqJpQLLvxUILtliNX/XSFSYDyiGyqyUhY X-Received: by 2002:adf:e792:: with SMTP id n18-v6mr36791390wrm.136.1537528193863; Fri, 21 Sep 2018 04:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528193; cv=none; d=google.com; s=arc-20160816; b=VSSUusGFpsDSTKiJw44XB3c5ZZOnBmegm6CdV4GejY4kNvnm9pBKnXj98mzloBVIfn 9+RRzaAFYkqUJUVQjQdd3VDzWziSmTzKwOXCYhdy5Bl9w3MXsX1eUHC3kkNlojRTZAqE j8a4v5hGemRcPTq2f/EmUjIexo5/q2c7ZvIWmh7fcXjznQD8PdLM/4xR0k/70mbF4FPl 0ByLgYBeM64VGoXpGyxHhXuJfsTwGHz4mSkX4DiXTqq7uUBuuCR7BlAE/PMTXTUdx/VU TS+wNiyQgFAzBOUINtoIi6CuyHcX/6LQISJ6Mj7HbEANVefy7rQv7exPMPPkkNIDFXep I7lA== 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:to:from; bh=ce+FZCsHkf0CJamKhb5d4Qd/9/++YzGbhLytFN7wisI=; b=x8h2zWSp3nGY04U47sYsWrxSJDXMrqEsiZ3pNIBAruJznFueoSufqmHQh2uE09V24x tJd5uA9ZvjezeIxxzy7bZaWo1WGKcaLthNvFD7uyZCn/3n+vqvG22w/D9FmtNERapQxU HvRew+xyB61o097BlYEBUnK9nItmHM+aBfC7wFfgpuR6ElzRdO/oS+XWdqdWx8UVhOcU fWsYBUI9ZEl6q109Dr7ha+yQaFuS3Y4K2liyom+Zd0iTDcOy+LnLprwxlnE2wW3EBUo3 8oFR3piLloumflgzGE0AIy9pyeuQvlfuGihLuppXftFMbQqTSKENKVu4jFWtbyyB45Uu 6blQ== 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 a4si6812032wrx.344.2018.09.21.04.09.53; Fri, 21 Sep 2018 04:09:53 -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 A99335F24; Fri, 21 Sep 2018 13:08:37 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id EF0945681 for ; Fri, 21 Sep 2018 13:08:14 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D35161A0039; Fri, 21 Sep 2018 13:08:14 +0200 (CEST) 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 F3D841A02B6; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 819F640324; Fri, 21 Sep 2018 19:08:09 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Fri, 21 Sep 2018 16:36:01 +0530 Message-Id: <1537527962-25757-13-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 12/13] bus/dpaa: add check for re-definition in compat 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" Few fields in compat are giving re-defination error with new drivers such as caam_jr. Checks have been added. Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/include/compat.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/bus/dpaa/include/compat.h b/drivers/bus/dpaa/include/compat.h index 92241d2..4122657 100644 --- a/drivers/bus/dpaa/include/compat.h +++ b/drivers/bus/dpaa/include/compat.h @@ -57,8 +57,9 @@ #ifndef __packed #define __packed __rte_packed #endif +#ifndef noinline #define noinline __attribute__((noinline)) - +#endif #define L1_CACHE_BYTES 64 #define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES))) #define __stringify_1(x) #x @@ -75,20 +76,25 @@ printf(fmt, ##args); \ fflush(stdout); \ } while (0) - +#ifndef pr_crit #define pr_crit(fmt, args...) prflush("CRIT:" fmt, ##args) +#endif +#ifndef pr_err #define pr_err(fmt, args...) prflush("ERR:" fmt, ##args) +#endif +#ifndef pr_warn #define pr_warn(fmt, args...) prflush("WARN:" fmt, ##args) +#endif +#ifndef pr_info #define pr_info(fmt, args...) prflush(fmt, ##args) - -#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS -#ifdef pr_debug -#undef pr_debug #endif +#ifndef pr_debug +#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS #define pr_debug(fmt, args...) printf(fmt, ##args) #else #define pr_debug(fmt, args...) {} #endif +#endif #define DPAA_BUG_ON(x) RTE_ASSERT(x) @@ -256,7 +262,9 @@ __bswap_24(uint32_t x) #define be16_to_cpu(x) rte_be_to_cpu_16(x) #define cpu_to_be64(x) rte_cpu_to_be_64(x) +#if !defined(cpu_to_be32) #define cpu_to_be32(x) rte_cpu_to_be_32(x) +#endif #define cpu_to_be16(x) rte_cpu_to_be_16(x) #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN From patchwork Fri Sep 21 11:06:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147242 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp673066ljw; Fri, 21 Sep 2018 04:10:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV61jNu8aPHL1HGw8PkobODPLMqgKfiUtxTu6r5Hk2wJYWHFuJvq+C9abAO91zAhKrrvkDzlD X-Received: by 2002:adf:8447:: with SMTP id 65-v6mr2852514wrf.251.1537528203574; Fri, 21 Sep 2018 04:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528203; cv=none; d=google.com; s=arc-20160816; b=AudxAP4Kp7hgSgJySCUrAGB0LHsSlQ5smUrBTe57bAst44b89LIJXADb0h6G5lCtDy Yq8OZq6brxq2S1RmbIcu8KDTRKEXuz6v6Ao1s9Nr9RvwdPPPeUuWJ2+bqiY8URFSsMGt XpQho/XMK2hM7LP6E222DpCmjmo+RlFFEjxw+8036P5buVsFeC9XILbaEF6a21oUkUSS S55EVNQXPedvetBVCNLq+znjyibIpvpfpxyUblVgOtJSgDmPFqYhIZjfMqaV0RwZqR80 kHoruB5xU6doVCIutlg7L/eGxf68S+VDq0S03v08V2EQ6JobTDIFZ/w0Sb3Xsf8eE0/N BoCA== 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:to:from; bh=x3kVLhkLNr3zdq5qdXE0zmRBfnl8zDp/4gcKLeeUpwQ=; b=Hx+6L9ZoKdwu0EPR/Ts0SwfL1J6po5ckut8hkijyzN6yhtSVHCfn7u5KQzMTPHr6X7 MjOPBo3QUWNN5rUeTlsITXa2tr6Imct/K9sdhjbv0eZXS+Wfjmm7VkkvXm0fvup0IA4/ CwdiW7FwLuamcwf6xv8rfMQiFiunTYhzLEaGdq7BD+kA7MiCa4/IEPv4CrFfI72JDTRK 57xoNd/8OC9F3zOjx7SdaGo9txcbOI9/+UJvyaasxaMVlCgCzhSHt82JXS7OaUlrtdy/ a8iFmdNPWXdNIhkW6yd3LpqjNO9kGJ0Nc42ogAFuSq+yRMe869gtpSiIQA7KUEA5Zl2B DI5g== 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 u2-v6si13634352wrp.39.2018.09.21.04.10.03; Fri, 21 Sep 2018 04:10:03 -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 4B7905F2B; Fri, 21 Sep 2018 13:08:39 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 1F7635688 for ; Fri, 21 Sep 2018 13:08:15 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id F3D3C200041; Fri, 21 Sep 2018 13:08:14 +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 20073200015; Fri, 21 Sep 2018 13:08:13 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 38E9740326; Fri, 21 Sep 2018 19:08:10 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Fri, 21 Sep 2018 16:36:02 +0530 Message-Id: <1537527962-25757-14-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 13/13] mempool/dpaa: change the debug log level to DP 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" When the system goes out of buffers temporarily, the logs further slow down the system. There is no need for this continuos logs. Signed-off-by: Hemant Agrawal --- drivers/mempool/dpaa/dpaa_mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c index 10c536b..1c12122 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.c +++ b/drivers/mempool/dpaa/dpaa_mempool.c @@ -122,7 +122,7 @@ dpaa_buf_free(struct dpaa_bp_info *bp_info, uint64_t addr) struct bm_buffer buf; int ret; - DPAA_MEMPOOL_DEBUG("Free 0x%" PRIx64 " to bpid: %d", + DPAA_MEMPOOL_DPDEBUG("Free 0x%" PRIx64 " to bpid: %d", addr, bp_info->bpid); bm_buffer_set64(&buf, addr);