From patchwork Tue Sep 18 13:31:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 146895 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5049992ljw; Tue, 18 Sep 2018 06:34:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbM/V+fLbZw/cUmrOD/kchKH8VofV1Q+OAppvZ2ROA51PcnZVyGfk5TRQi3oo8GpX0wymcU X-Received: by 2002:adf:ad34:: with SMTP id p49-v6mr24306964wrc.10.1537277646283; Tue, 18 Sep 2018 06:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277646; cv=none; d=google.com; s=arc-20160816; b=b9wH5k00OzcufvMz6yjspVMn7t91s08M97cYYd/dFbCcIjadRjGyE5wQ97f9J6ffhL eQl4/5E8FH1vD0jU0HOp8hdtqgyvfuXM7EcoT1e3WuaSoYxNGgzFVXEgTfN2sLTiDo4R wUK1jevYQHiNFy1d1c2FmrzhwUiNuTz2Uap+mC7RbPUTtUb9mLBqyKeLygWL8hlOI7/I ogLQH7EbkxZBxGVyIdTO+sDigejrbBwR2nQYNDgkImXVNpnBhpg4QkVW1o7NP7P+uzh8 JRrH/BDa6cCOxPkeYqFVfkxZjDnW06ggb5uv7GFFG0ldMPqdlDhx4dppPy3rmpal7SFC vZ2Q== 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=eoPkNc9GQEZICkKwDujgrkC3P/VpNWDrx3/QXEGrgJcstMfbmdYDqzM/q1KpM1tZhN BVYs92h0eBOHp/+wYaD174d3/wnHn4Uq0J3c7SimK+nlE/5tuwTkUBrA33OHr7r8ZaCp n1kX3V+v3IBjEi5coBPoVb4P1jEe45qElaqiy9iZLkomH7ITR8feaBcsIL2A/yFGj/43 YUUZzDImK5XsKhsiVJvc5A3mCg56F9Vlqy4EROOPqAW360PR09g3jQQzuZfUD+zGAKU+ YfkDfYnY4VkZpbgrGAJzYRWMUga/vXYXmXWPF7lljwWcTLjjGgZkhmhQzMjJi/DH3UU9 /Kbg== 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 t27-v6si3721956wrb.341.2018.09.18.06.34.06; Tue, 18 Sep 2018 06:34:06 -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 E114C378B; Tue, 18 Sep 2018 15:34:00 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 84E9AA49 for ; Tue, 18 Sep 2018 15:33:58 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 67CB61A0147; Tue, 18 Sep 2018 15:33:58 +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 4C4441A013C; Tue, 18 Sep 2018 15:33:56 +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 760D4402D9; Tue, 18 Sep 2018 21:33:52 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 18 Sep 2018 19:01:44 +0530 Message-Id: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 Tue Sep 18 13:31:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 146897 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5050414ljw; Tue, 18 Sep 2018 06:34:28 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda6j3HijE6c5zciWhSDNFdEUpVRyNmzfkkXiZWSwsOzqe2s7+40YtCAJeXVaLpMPTpBRvz4 X-Received: by 2002:a1c:b213:: with SMTP id b19-v6mr15348937wmf.141.1537277668775; Tue, 18 Sep 2018 06:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277668; cv=none; d=google.com; s=arc-20160816; b=OZCoK1t2U0vytPwtmPOdBmJQ3kgvxwmh0b+wGihVCHGwjoL7k+OnLzTIDekiXccm6k bAbOJAD/J0/+nlQLWDkDP1K2MFYRSTz0yEepP4nO7KGIuk3mO2uRumWEYPtgAGkU5GzE 1UTeoTyCzhG8YMr+5MJmFr51WG+NrTCKQphAGyflY15dBY0+RdBUEm47yZ5nYpoJax8d eHoH45wFDmSh5ZbZwWcXcMuwI/toMf271sZLPcyk+zIFpqVO0VpSlyToUYVSfP1ew5rA ynp/fbv0wPKA8YaU6mpRbLc2lIxveI/wyST6WOXGo46SopzScqEhzVQz98fIkB0AQ41X ziJg== 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=Jy9j6upkOYFeszEY8PPPnGgzBoWx4rpGZm/9bq6JWg0=; b=sF+UXmMO0hbiMAmMnvpib8MBfwn8bVIddeZSD4PiAHvZezpWjRZsSWd5n2FfZAb7UQ 5hh0O7GCeghgqkGjv3SnNkdSwjZKW8dvdFn69Ta+t1+LnPn7GNyEZUMSTwNQVdl8eTNf dp3zkBiISs+j2z2hXRarsNqIa3OnfAZjDyG7mArwsFU5xsXwNIzAwdVGThfBfcr+Do4n qfcLKE5cRDgwdRec1hUJpk91qAoSdmhzgPVevM/P8Tnqu5QD0muTJE02iHLbx5wo5b81 5sg0BsmDKTdx80QTNf3PzJbAyqJzY67RqkvoZEqOv1qmt12HSt1qLL970bQ/nxDOsDoE aCFQ== 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 o6-v6si585019wmb.167.2018.09.18.06.34.28; Tue, 18 Sep 2018 06:34:28 -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 0AC634D3A; Tue, 18 Sep 2018 15:34:05 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id B770034F3; Tue, 18 Sep 2018 15:34:00 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4EE8F200130; Tue, 18 Sep 2018 15:34:00 +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 B531720002E; Tue, 18 Sep 2018 15:33:57 +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 7BF7F402F7; Tue, 18 Sep 2018 21:33:53 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: stable@dpdk.org Date: Tue, 18 Sep 2018 19:01:45 +0530 Message-Id: <1537277516-8876-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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" Avoid return after the jumbo buffer config in dev config API 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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index b9bd557..db166f5 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -195,11 +195,17 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev) if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { if (dev->data->dev_conf.rxmode.max_rx_pkt_len <= DPAA_MAX_RX_PKT_LEN) { + DPAA_PMD_DEBUG("enabling jumbo"); fman_if_set_maxfrm(dpaa_intf->fif, dev->data->dev_conf.rxmode.max_rx_pkt_len); - return 0; + dev->data->mtu = + dev->data->dev_conf.rxmode.max_rx_pkt_len - + ETHER_HDR_LEN - ETHER_CRC_LEN - VLAN_TAG_SIZE; } else { - return -1; + DPAA_PMD_ERR("enabling jumbo err conf max len=%d " + "supported is %d", + dev->data->dev_conf.rxmode.max_rx_pkt_len, + DPAA_MAX_RX_PKT_LEN); } } return 0; From patchwork Tue Sep 18 13:31:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 146896 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5050195ljw; Tue, 18 Sep 2018 06:34:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbHNLmr7wh6AW8SsMUosg/8soeuionHnjqSOXAkyTbu9ZDoKAenY8hGC80OCm71BQvIKNcZ X-Received: by 2002:a1c:a507:: with SMTP id o7-v6mr16661727wme.45.1537277657738; Tue, 18 Sep 2018 06:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277657; cv=none; d=google.com; s=arc-20160816; b=YNCUt1v+29A5naii4yFNFm4dyCQYufi57CENFSOuKzLo4UHYauEEW38b7knqcGfO3J W52t9CtvvWQKvpPlsDbxmAQ8IxpU2xdcTlWqbjca2qgC96XnPgEfxYrUCLwG7IKzPu1m veNhYa8K8MKVOWUp2mJJrHiW63GUudBG7XMh9Wq/48kpD7pijyoka24pA0pWZWlcscDv 3NC11XtYDfJBYRG/HAlv0DtmxqrxpOM5dEZffQbovLb8487YeUcUXvjMYkau7RiS1ndb 0d45IbhfTwzknNUmEjhRIFf15C8wVrzkYL/v+vOCJg12XFC/kbz5Itcim4ZXGvvT9eJ2 lq9Q== 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=AwXgnBl6zUIrpgdric/nTy6zq8BVzlvreymIFJh3FJ0=; b=gE69zuxHyMxuxvtCKeZLRUD7F1rsj9tPF7hZYqBNIxQP4ORs3nvrc/BqPyXYSIGrZl ghthXzkxxs/XXpya9/QABponlVdTwhx4iuBVZKsHY6zYdbWdSMT1QSX0K8npt5kwSR+U KbYCPaSMpS2NNyKlfDdcKzZR2EfdFlM/dpCZh2BCFpkgWrIn+lbVP21jf1BvSAhti3jv X2BMTimRAbxrcJvfI9XSF4i8AcU3I5mF+1OyLWeQ4HFATSkc83osiej+CYJk2qcmsB7M OMH9niGnFbfOg71u5972hlnkk/3Ea/Hgj3PueCHukjOxBp3w9J5psWlu6OQBpneE2F1w LU2Q== 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 d136-v6si9364656wme.102.2018.09.18.06.34.17; Tue, 18 Sep 2018 06:34:17 -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 CEBDC4CA2; Tue, 18 Sep 2018 15:34:02 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 8ABC42C57 for ; Tue, 18 Sep 2018 15:34:00 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 511F71A0138; Tue, 18 Sep 2018 15:34:00 +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 EEEB71A0143; Tue, 18 Sep 2018 15:33:57 +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 5A7FA402F8; Tue, 18 Sep 2018 21:33:54 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 18 Sep 2018 19:01:46 +0530 Message-Id: <1537277516-8876-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 db166f5..9ea8510 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; @@ -208,6 +227,13 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev) DPAA_MAX_RX_PKT_LEN); } } + + 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; } @@ -305,7 +331,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; @@ -519,6 +544,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(); @@ -532,6 +558,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; @@ -562,6 +610,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++; @@ -1312,6 +1363,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: 146900 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5051051ljw; Tue, 18 Sep 2018 06:34:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZZNJszmatoyHvmr9yHIBP0wNyuh3ibSIlQU87ywB9AbKLbY/MKoL4pr7O9a8igRIqsflbV X-Received: by 2002:adf:8b98:: with SMTP id o24-v6mr23400304wra.110.1537277699908; Tue, 18 Sep 2018 06:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277699; cv=none; d=google.com; s=arc-20160816; b=GDsk848xgyqrbiF6+6YqpI3rm7ckOUC6BIkvUkeBlu4V51irSwk+ybxfzO8RVJp+UU kny9+HtoT+hOa3CHO5xD45eUgsRzP1+yyxXzTGzAc7OuUgiMfdN68QxNPNWLB9Kfwive cuALBPRN0t1sq/oNOK658n+hKna+dj38j1XFJzL4Me8BVxJy7dAUB302Cvxm3M1yo/5Y gNizKdFqJGhQGmSzhHR2GpBfCfAI8nW5GLXFXtFf9mmIsz8iDq6XKVQ/gv9TXXXd2fza 00QnxaLbLp0Mi7rMCzOJ06Sf9lw5vLbGuResp6my/Y+CZkZuKolRQvqUvJg8z5wr5Pqd nYnA== 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=KZWDWcLVbwY18hqbXBM1j6H/+LNKSn/x9HgdlRtokLs=; b=moCADk3+8MQmYwTsUX6CZW/us2cTaYIvOZ4Z42n8tuFMXmhhjdialqAmCp0vLbu2xb U1eFbS6uHMG3oi0agGIPmA9blapmkGd7U7DgF+kEwmpwMeuO7g30bbhLQ5VuTZk5ZMEf SAfS/bTWOv4DgMgIoaP45bY9aR8i3Ht2PVuUcT4Hsyof+zId640CJnoIkiACQTFrZQaT 4Qeh/1d16rUI2SNOBMyU+s08qZle4O5Lihnki5ILnUhoHWlp7Z4IUuw5v1FkEdr48QUC CBcM5TI6G3/b3TqSN2l63nmd1SVOYUb2o2DumvUQ2HtuAQMw6c3l4+CIw2BlsTRUh4Il tbbA== 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-v6si1677765wmr.140.2018.09.18.06.34.59; Tue, 18 Sep 2018 06:34: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 C6EC958CB; Tue, 18 Sep 2018 15:34:10 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 2AE234CA7; Tue, 18 Sep 2018 15:34:04 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 11C55200144; Tue, 18 Sep 2018 15:34:04 +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 8E76120002E; Tue, 18 Sep 2018 15:34:00 +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 118CA402FB; Tue, 18 Sep 2018 21:33:54 +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: Tue, 18 Sep 2018 19:01:47 +0530 Message-Id: <1537277516-8876-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 9ea8510..fa63afc 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -337,8 +337,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 Tue Sep 18 13:31:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 146898 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5050619ljw; Tue, 18 Sep 2018 06:34:38 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbbohmdtWPvohlP2fH/MzaRR9C+b9Gk8M8bBQKAs8996jH5uOZR8Vty8ph1uiQ9Wullf8hb X-Received: by 2002:a5d:608b:: with SMTP id w11-v6mr24633607wrt.193.1537277678578; Tue, 18 Sep 2018 06:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277678; cv=none; d=google.com; s=arc-20160816; b=ESblB/RxuYtnjOzRTvmoS20s/NBynwW/vt/tnroS3kZ6MdVitlONT9UNzjHCD4+lQZ 8n7OWU7h0WTKw1kpULY4YXJjPp2GlTpgrb3QPentxijABmnroUrBBmyu3UbWltC76nex 7QtqBBbl4I6wp07rytDf8pAuiDmZu2d7etl0EIKIfDNauxw20PYl9EQG+Rgy7mIMuHqq OLh0tj2w8IZISqKPGw3JlrOVC2O+n5Ksx9sONeAbH1eulqXXfQ/bR5CrvGanAPRyXJD5 a1k+Z6fhMGrNIpBKll4OPkbkM3SIVoj+wHvyheY7TW3CfYKV7And7fWYR46mjfhzSjQ6 yysg== 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=rtu/qjP3EduxzhMatwAaU9K4E+Xz3mUMyyLun9uin2s=; b=n6soeJEVz6CmWzQR6/2Bb8sGLC69MHeZilf7RxE2BViBNp/XlkP2DX4HzFUL98QAFm /lKav1JTW2zsHMv8FccnmzsnaMKVQ4vZZtRVO14krwcJr7/iecpQsKXE+HNYI+0cp0vn 57STkhkly8iz6DSuDtuS5uwgiaIw71Tkwz4HyOX846qbBApcQOTLjwTOs9+9P3HUxlFM zIr3N5OWAnQ6YKqKphVEj2CUPgYhsAnlyXphbn399/8JuaNUZZ2wM0RknK6OP/9PLlkl X5ryXA6lAX1UIUlyN6zBdT1gcf2fB1Et/zeiodxb65KajMbMTaOcJa+BXQU1a/rYhlrw ELvQ== 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 g18-v6si18556691wrc.41.2018.09.18.06.34.38; Tue, 18 Sep 2018 06:34:38 -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 233DB5592; Tue, 18 Sep 2018 15:34:07 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id CA1794CA1 for ; Tue, 18 Sep 2018 15:34:02 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AF7C320000D; Tue, 18 Sep 2018 15:34:02 +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 94B81200040; Tue, 18 Sep 2018 15:34:00 +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 0DC8B40302; Tue, 18 Sep 2018 21:33:55 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 18 Sep 2018 19:01:48 +0530 Message-Id: <1537277516-8876-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 fa63afc..c2d6f44 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -613,9 +613,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), @@ -693,7 +693,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 Tue Sep 18 13:31:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 146899 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5050835ljw; Tue, 18 Sep 2018 06:34:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaxksuCMgYyZvug0k+N6Xh+mq+qx7WTO3LL4e08BtjWmymoGrp45Ly2nn6aSOkc1/QQ0eLo X-Received: by 2002:a5d:6150:: with SMTP id y16-v6mr24368172wrt.141.1537277688450; Tue, 18 Sep 2018 06:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277688; cv=none; d=google.com; s=arc-20160816; b=Z4YJE5CamW6gHNlXoLYp6jtC0hxlWhv6cCW3ERrh6LwVUqWH6zOl5IhzpiWYPFCXUl L9mzd8GhKyBDVlJf7xGF+TN3BoafZ1Ttje9jD2K3nCPc8MxOoBf0T+DsJHQ4hLZPTdQQ CB7maKwqo6UJTCMW0Z//STpTyG3apX5FCeGmmPDvyrwQrt8rg2alKt2T4GoI+2Yfy4HG sH+8o9TMphwmxk/FnnFGOagJwTAI/xLI+bNiZtIZhknQj9uwbvxbxEJ/R4YFZkcDZPal B4Pr+NU9KYuhTJXuHeid1lGO2oR/wb7m3GqIESbtiBDcenVmNk1Kskr0u3ajWX1bb68Y Wesw== 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=WWnoFhboGZ2+imIpzJ1SZkuS0/eZyGCC1zi7g+xi8cMHjtcDEb4a3VwAWi/5ScnnHa QjhCxluOuklWq7bUr7SeuyeAdqWBbNP/TMu1EScaTaqUCZeiA7f1RT74DEaC2/IChMfV eoMtTl6Jpd1/ApmxiWdU3iTiBk27Vi3/BRDNvqEXK1aL4ngBQdZNez271nQTFcCnu7vs vAPympiiI19Fb2cKsIT0Av+PnPHMjksww3Fubbl6tgpBzgGlTtfY3/jsQ2sNzSkG2Or6 jilCFCzMzUBXjaM/19RBe3j44ZpGg+EKtDoHzH70TswsDmMQzK8WAN+c1poBpt732msC 4/cQ== 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-v6si10763194wmf.64.2018.09.18.06.34.48; Tue, 18 Sep 2018 06:34:48 -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 74B795398; Tue, 18 Sep 2018 15:34:09 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 474D74CA6 for ; Tue, 18 Sep 2018 15:34:03 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2C19D1A0152; Tue, 18 Sep 2018 15:34:03 +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 CD0541A013C; Tue, 18 Sep 2018 15:34:00 +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 C891640305; Tue, 18 Sep 2018 21:33:56 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 18 Sep 2018 19:01:49 +0530 Message-Id: <1537277516-8876-7-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 Tue Sep 18 13:31: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: 146901 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5051272ljw; Tue, 18 Sep 2018 06:35:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYUBZUCWdwC0U/WqUbYW5taOQ1ZcHqHPqIiy14ds4gdwjAfkpxZqOZNueFohGkJlGA0MK9k X-Received: by 2002:a1c:9616:: with SMTP id y22-v6mr15920674wmd.72.1537277711842; Tue, 18 Sep 2018 06:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277711; cv=none; d=google.com; s=arc-20160816; b=UE2DxEy9pc0rc1AmiUkHaWqYNpDWqsdIkpWC8inLaDB2DZUqLKFN/TN+KNaV+d613B jIq4FUYj1TLwQukIKXziOPMUhDZGvnolIaM5wsuKw79BusZDfKf/jal6dMLZzWKabYSZ O3EWmm7asoDh8AXhynGuWQgUmRKNfthLX1D5f17drd5wZjHKh78Sb1DSizyc7Hy7X1nv GotlI9VS76s4a19GA68wlPatSSkHkUTNm30hKO3h195EjcswT9rbx9jDTA5kbVkqwBvv Bw+IS6RYX1AfThk1xeqKoCRAaiyJUCViXN2OxOeYUvGsT2YgLQagbTrc7ErnstSkUL4J wYyw== 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=sbMg1L6WeD9zb32U6KNehiGMWPKONwNlHq2JQ4JuC2lYP+6nDIy+8kHuEqMtYc2Xn8 vyIMmKa/VKcPoIHdWCsb54G71tbUvEvPeWXMTFhIQupiQppvGXXw96c4lISqH9ba5Dm+ Rt5MmPIwmjGbskXskpzffU0Rv/ijjdw9DAz7RBi4R4zDd/jGPlXWCkAp1LoFLWAjNVpr ORbV6ehdkAUDsI4o5tQnXTLQCXZofUGajHIcMyEw5aT8DFA9j1MQuJbsKAT02MMMqsKm TAQpueBmNE7sn0ByrtXYdtVi8NsTZKAo7P+2N5b7Q0avnr3ghUQSeUUMNbyUWOcMotIJ y4MQ== 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 o199-v6si10400919wmd.170.2018.09.18.06.35.11; Tue, 18 Sep 2018 06:35:11 -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 3608B5A6A; Tue, 18 Sep 2018 15:34:12 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id BA79D4CA7 for ; Tue, 18 Sep 2018 15:34:04 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 9F3231A0143; Tue, 18 Sep 2018 15:34:04 +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 144BF1A0147; Tue, 18 Sep 2018 15:34:02 +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 AF07E402B1; Tue, 18 Sep 2018 21:33:57 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Tue, 18 Sep 2018 19:01:50 +0530 Message-Id: <1537277516-8876-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 Tue Sep 18 13:31: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: 146902 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5051544ljw; Tue, 18 Sep 2018 06:35:26 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbcc9ctQDTOM4as1P2aMUt1qilgCNhq5kMa45uN92xo6EB4XB5CYBJqFvzZGkZjH/B4zSSG X-Received: by 2002:a1c:4887:: with SMTP id v129-v6mr16690894wma.129.1537277726016; Tue, 18 Sep 2018 06:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277726; cv=none; d=google.com; s=arc-20160816; b=EutQfbgIrjSBf6QlLcGLK4ZVRyXs1MYGa4uBB0Fr6uOR8SnaaoDa4Uqe+gMYYXDg9r JPox2iwiMPFoRYRRRK/HRiOtrJSW6m5rLHojOFoObmdwIwhezrfLmeA5A4iY22Zl+2Ku ctOMd5v4CX7Xfk68daPVX95ooZ+dQ2SKhWs9HgeXrmPCE4PnS/LuNyr/DUlWH2CUXm5P 4Cqsb5NwFHV/s0PdjlNkvEHIIBQB7Z+XOQ4jO+QW6adxT4cy7CoaZGhtozuMBTroN7ZK UAnKntWsdojidtfyMB9z174rQ0qnYeLeamQIpH45ahRW+nR7wry/ljAT3zaTBiXiSUZR iGKA== 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=V9g7NzZfr9KhVuzzvTuz8HWtBU3r7q5VdgXnpd6rF13B87RMuvi8Xgy/7SfeiksNTT Rmb/2ZSqK9SbhWLD1RXX3020oYB8PtswKmjIl9tzmEDjz5tnm/v1yusHpDKl80auqC/h HXLJXWyyIsyHczKBn2bX59S24gAc4RH8vKWVs58p6fRT3FcLUvdoOQNKaog5HzqaPWLs eBDb6P8IoAF8dkXsZ9+zRVk6SAVwpvd3nRle28ciBRcUa4L88mWbWij+3An9SxEOJ1bM XYU3g5/Z3e5s663E3a2mxHXHQUnqmdTW45sImSKjIZIo+dir7WwA04s0tu53M6bVSXvJ YAIg== 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 40-v6si20095141wrc.289.2018.09.18.06.35.25; Tue, 18 Sep 2018 06:35: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 D06B35B2C; Tue, 18 Sep 2018 15:34:13 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 114F04F9B for ; Tue, 18 Sep 2018 15:34:06 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id EA60520013F; Tue, 18 Sep 2018 15:34:05 +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 5FF5F200124; Tue, 18 Sep 2018 15:34:03 +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 BE840402D9; Tue, 18 Sep 2018 21:33:58 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Tue, 18 Sep 2018 19:01:51 +0530 Message-Id: <1537277516-8876-9-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 Tue Sep 18 13:31: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: 146907 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5073758ljw; Tue, 18 Sep 2018 06:56:29 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdag2GZoQX16vfGhjaJsp+W2N7thQbtxudSvv/1w1LQGRCGY+f3tfdH+EUPvhcie1Ph3LVTe X-Received: by 2002:a1c:2283:: with SMTP id i125-v6mr16101866wmi.28.1537277734410; Tue, 18 Sep 2018 06:35:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277734; cv=none; d=google.com; s=arc-20160816; b=ZOMEVSy+ezqApK3DVyJIF5KsTaG+FYHPsgw1xoO9gxHnajsNZEYEcHzocTrt1SsW0g IFWeyrVYO0Ep1F898pEMePgho44rXYJkEed3rKhURbOSK/uhZ3vBmjmeymnChFyMlrSp m2dOYgwswjIrXC1xFu18OUdvB8IIXfXTKZWdtPBvWs9y8fhuxFkRxsuGebSNrALbq/z+ v2hn34ex4rECvd6n3+8XbtoNiPfanobjMWbDd5WNi9SNJoEjZRf2uFRL3fS33a5OXf2I fI8JtB9x3lej5soymMKPEVjoTLoDsPO+FVCJKnYL/PBAllqw+A2SUdHVQg/gmDQiRO6O 46OQ== 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=dwoZIm+GlzUR1JXt+dhV/sg9VHBxTFvHrNyIS6uIHVzcXiOjpPbhVcTrSlO7CPX1Lw zBl7RiwQMQZjPqr/TYiXWKrAcwF4w8AXqRa0+/AvZq1B8J2VlZeXunlbmhiMomqTmgQ7 DmgcodzetRPSsmqaTBnwoJNZ0oaW96m4T+M9psTO90KuemibJaOeL6TQoDSOYmWpTHA0 8CnViSV1MwLGwJ2urtbBZ947fnUtFiVHeq1v2ELZ+l8A4HVtqKFezJd8lkNc4HIXVweN 2p0vm0e0r+DewwGRlrE3slgc9Ne/hk0pqUvzc1tn+5m8ppPDjoqF3ZID+CiZCqiqHuez HrkA== 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 q13-v6si18231968wrv.47.2018.09.18.06.35.33; Tue, 18 Sep 2018 06:35:34 -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 B0E975B3A; Tue, 18 Sep 2018 15:34:15 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 01487532C for ; Tue, 18 Sep 2018 15:34:07 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DB6B21A0147; Tue, 18 Sep 2018 15:34: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 50CD41A013F; Tue, 18 Sep 2018 15:34: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 D452240314; Tue, 18 Sep 2018 21:33:59 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Sunil Kumar Kori Date: Tue, 18 Sep 2018 19:01:52 +0530 Message-Id: <1537277516-8876-10-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 Tue Sep 18 13:31:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 146903 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5051935ljw; Tue, 18 Sep 2018 06:35:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYrmSgUKw5cMtfVwNSEfkM2pkWIkiJGAEwddu6x+fWZc665pYJ03FvZfLZ15kVlCIViwPIi X-Received: by 2002:a5d:4849:: with SMTP id n9-v6mr5438568wrs.234.1537277747071; Tue, 18 Sep 2018 06:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277747; cv=none; d=google.com; s=arc-20160816; b=ekFUElzNR9XVHCNe/6IwgdnwWiiFo73dw1ShSxXvZspfr7MYXidy8ChVL1MTGIai7F ZLREhwDRKTzTy4zR/81FR4lsZXY7zd0DuxxsCPXheE/KWqg+wn4dCkq3FuOfoFousmHm P6EUXui/HYpMIj8v2jAVoSpr2i1u6u1XO6yhLIiN6BLDB8A30X4xEkFCbHmyL71ITJcV z4rejePi3RGdSI2lCZWuYVEiCana72yzSEgkfcUO3ztAbjpWNEqwSwSvw5ht32iAqyPA Fk9I5/mRNdyJbGSgPvJ8yezMiJBO3ksBAfkvN8kyGzwkJIRQRy8rszEQqSZPdzU8TayS 583w== 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=erA5os3C+vCf+1V3IMbrv1JhcvqXb0ipJ30fVZ2wpC4=; b=dY9+Tg83ahBxynSnppZLpdPpvwPn8p5+uaSDLH9VWAyp109WcvKWGtQCeG0pKn8RZm QqLUTWZgKDYAzHEV8XloM2MYn7RhKmOSX8f4iehLaREojC8doowDz0d8X+IEJQIHq0fD O3yFpJfieu5ghyJy4Hj/FbXmfQCD76LoaRSkxSrhqlS8fQJGsYDWvpWBK3e9d4qjH6O3 SRpDt+OiX61EsWWF5WqhSHu/h4GrPFk5dAHorSvFAcBxyRTb3T3BB63ahOfKGRvC/It6 2dgn5jqNE5Czd0E0g3vPSWNtOW2SyNl3Ny2WEJVTO+j6Poc5z32wWJLyO+W0WydVkrSQ zjNQ== 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 a13-v6si10183535wmj.31.2018.09.18.06.35.46; Tue, 18 Sep 2018 06:35:47 -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 14E845B40; Tue, 18 Sep 2018 15:34:18 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 6C67C532C for ; Tue, 18 Sep 2018 15:34:07 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4AA5E1A013F; Tue, 18 Sep 2018 15:34:07 +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 EBEFF1A0138; Tue, 18 Sep 2018 15:34: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 0D44C402F7; Tue, 18 Sep 2018 21:34:00 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 18 Sep 2018 19:01:53 +0530 Message-Id: <1537277516-8876-11-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 c2d6f44..c430cac 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -657,8 +657,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 Tue Sep 18 13:31: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: 146904 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5052151ljw; Tue, 18 Sep 2018 06:35:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdakrysFJCJhkfpMA3z9KIbdPaA9zn387MeFpPiB4+AeBhtZXg1ehFaahlI5+lnUo07EYWhU X-Received: by 2002:a50:9306:: with SMTP id m6-v6mr50336869eda.206.1537277758609; Tue, 18 Sep 2018 06:35:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277758; cv=none; d=google.com; s=arc-20160816; b=PEVjSFIjWt+0HO7z4tJXW7HYUSYx6NSFLx7Y9YlYtysT/7kns1Rr4grfQ0TpVwS5iU zG95e1IM87tqSH2W/EIh3Zg9E9msc0+G12NH7SbDIrfN0vUtvpXwD/fS18AFhbJwqYq0 c45TVUhpgNANcmBh7kOebwfWgd4OF96kQcJaPChNuakSkROEdS8GFRPphRksbA0mIKRu CwjA9rF4vo0+OmV2i6MYKW1ILOFA/Oz65C47ePYMxvDI8OW1QQQKUjfBhurxitLQ9/sv jd462fsZ9gJ5QoFIkCIu3njhgtMnouWT+Ip0Mj1G/83JJOAhZd6k7cIfTl9vmTmivnEP Z2cA== 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=AUusSb/HvphiQOVlPE9UqRnberVBiBYZYOLg5FDI65mErm/gW0hbkjGWjozDL4RD91 gmYAv/N71i/LBz/eZh70Jfk6y5HxEBmMzgLnZ2FII4BOALzB/O35e4ThczQTlj8o3nix /+iXdfn+aJ7NuYi6zGh2g8qa9gwRq59aSvnZun9Ubwv5L+2konT8FiFfON/m49u5atU7 bq32+Lzg3MZcGR3wegrJxxxpHpeRQgPs/AR1Wor6FWa48wtPWk3/izwtybycLLqwy24r yLU5ClX7C0qviGGtW590sfpFqYkvc+zF4rpOzErzo4ZAtFggf6azKwygXTTlV0JSJO5A 36QQ== 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 d30-v6si20877228edj.156.2018.09.18.06.35.56; Tue, 18 Sep 2018 06:35:58 -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 5C7685F13; Tue, 18 Sep 2018 15:34:19 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 9F01B559A for ; Tue, 18 Sep 2018 15:34:07 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 84BF9200037; Tue, 18 Sep 2018 15:34: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 6986320000D; Tue, 18 Sep 2018 15:34: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 250FF4031D; Tue, 18 Sep 2018 21:34:02 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 18 Sep 2018 19:01:54 +0530 Message-Id: <1537277516-8876-12-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 Tue Sep 18 13:31: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: 146905 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5052235ljw; Tue, 18 Sep 2018 06:36:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZB+6s/QK+iw+C7g34WpmzYzjOsmOyALjbuSZGdAf8p1+zfwfPt+ZKarKOFg+7d1lRGBOyn X-Received: by 2002:a1c:6486:: with SMTP id y128-v6mr15848448wmb.12.1537277763586; Tue, 18 Sep 2018 06:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277763; cv=none; d=google.com; s=arc-20160816; b=Jqs8Hlk5eWDuT9bfbbnQUlQNWULUdqdWtbo/2Whp0l2cMewK7YDIDEfXmhjDxengMC wOqR818eNOu+b8J05y7P0bo/O/BdaGWEYvw5EVbfyO3R/reirBq59oe3ZIeGOC1p311E /q5R1siTDiA1KFHUKyVNA61gqX/ZF4ObSsFK6dGabzgxQnHTzIPz71te+rG3JfvKPHr1 dTqNw41N35jSxEEfw1EXBRRsbnTZ18UwizZwNZqmFYphuGfd5hhn/WkKAtxasZW8Ns8v Ta2R6HmQK5m67p/vCVeBVnH1Amq6aOfOGNbUfvhIz4ydBihepxVUfj1joW1oKzCNWRWV e5dQ== 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=ScpFPJQGikzDDz3//omoVxjaK7D/8rj0nkT/jRy3RNsY6Dg3Zb8BhCfM1fBZuFF4wY 0xeZZT2FnOWXO9J5DOgGcD3Zcc2iQ2U+llbI2CxlFXZVnRMcCtYqNZbG6UjhhfjScf7+ FVerH9jpTYSpPOSvgW5i8MbjIVd853ACyqsxwsEjIuISF9Oe567BVOsOqQx+tvb4GS9z 0x52vTPdmI4PH4nwpIMlQeDQzLJe7G1aAJkHE0ROFji6Zblr7imRwF0dcfXBJmzp2kVi 5yVucLSf44+IOfOjtzm+B6dSzfdTdf7M43v20m1y7WMsElrMWcgDAsIDz4tQtatjLEXQ 5UjA== 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-v6si10766709wmf.34.2018.09.18.06.36.03; Tue, 18 Sep 2018 06:36: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 B05405F1A; Tue, 18 Sep 2018 15:34:20 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id A493634F3 for ; Tue, 18 Sep 2018 15:34:08 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 71E511A0148; Tue, 18 Sep 2018 15:34:08 +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 57B9C1A013C; Tue, 18 Sep 2018 15:34: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 086E240302; Tue, 18 Sep 2018 21:34:02 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 18 Sep 2018 19:01:55 +0530 Message-Id: <1537277516-8876-13-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 Tue Sep 18 13:31: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: 146906 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5052398ljw; Tue, 18 Sep 2018 06:36:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY8IJsC8bPnovTV8pOgRlcFWVu62GKpkpmkBoZkaS/XhK29Uk9ug2qldmkzLqHutvLM1bIx X-Received: by 2002:a50:a522:: with SMTP id y31-v6mr52450064edb.72.1537277772464; Tue, 18 Sep 2018 06:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537277772; cv=none; d=google.com; s=arc-20160816; b=hLw6vom1OtDO00FTWDujh/yETkBCN/DxkFkDVS8iZN5dGlD5ZhjU/TEMrzQszjfaDy VJDwIdLouWZKpR7rqpW2k/oMiNeIHcDIArFUDPVH0yt79vjOT3cQksHAGF3573zknGEc E40TXKOuom/Vfhx9PIY8O2/1lgJUFTkakjiW3lR7geDGeJmAOBbdxEgdkMpuKcIKnfVi A7Bo3p3/3hzo57Cc5bnfU9KNC0plAW4SnsIB0llDhEAeMilmM45wVLMJU2iN8dvxVN+6 IM9e8c+2wx+zc0blh8QIQw1odQ8Fk8VJon1fcpYlI+pMcdCpr8/6ku5ZyKWxPExmT2YN hceA== 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=ZX3XpQ6NAqur9/8oPVo+FPJ9Aw7tXRD/4dALQfzG+M4kvMXgv5fso8vL30XUckYnxq t/BCX2OsiS6Z0ejG1MzJ13cRWGlY2HpwWyJt1MlV5i3i9hHgq4qQxXWK3ylU5wYtyqeH ewg7JPGc0BdEmNWYes19Ni1birfcsodMeOGZOOGr0Qa2hRzMQNTe5xZK6NMNuVz6MVtK t4qC4ykPVspsM3/B03g12dyFT41M8RaKD8/uLYV/0lxtqO5Z2zHnBdevy6K//mkiKjCw zP9mwtLUxd+tpMvQ4nrYvsxCVGzb4F/W2hF16ud8JJJmt/IL8qh695VOVwbo5qlX2EbF xSqw== 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 y23-v6si12808694eds.303.2018.09.18.06.36.12; Tue, 18 Sep 2018 06:36:12 -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 017665F22; Tue, 18 Sep 2018 15:34:22 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id A9DFA568A for ; Tue, 18 Sep 2018 15:34:09 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8BC981A01A7; Tue, 18 Sep 2018 15:34:09 +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 70DA21A0138; Tue, 18 Sep 2018 15:34:07 +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 EEE0440305; Tue, 18 Sep 2018 21:34:03 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 18 Sep 2018 19:01:56 +0530 Message-Id: <1537277516-8876-14-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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);