From patchwork Mon May 4 12:41:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186111 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp84153ill; Mon, 4 May 2020 05:44:03 -0700 (PDT) X-Google-Smtp-Source: APiQypLUxUoASzrL37ypdUivEcak2jg04nNAg4WJas2akl4l+dJhc4Kd/YF6yUev6vU4Kq/iCMZy X-Received: by 2002:aa7:df8d:: with SMTP id b13mr14696793edy.145.1588596242935; Mon, 04 May 2020 05:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596242; cv=none; d=google.com; s=arc-20160816; b=wcOD/sduP4ntqxqN3lf/Lw0yXVl1W1EqrR6xmXVDoOkN/Bow6V1gym1DAFI4MShMP4 K1G/1xOQOEloqfEpfZIX6etiYZdW5RaMgrtNPuHeEy24PiXkat7C1YyFAJial0Z+cuEe xgGR0vEQGgzLW4UsSqN44IHZTlFYJq34qOULCwz1RTtz+VWQ+3mL25lDpKczLUXz9usp vmeY2hKhBy3gmtyfzAUzE2UxUOeGrSI8arZDrb5oGEzg0P8P6Y22eMBkNdyJIA2R0xnO jpWuCl55kvPs5o2gaxHFOkMtEXn3ZQWrLDabTjbwK3eAaxD13OebfS1PUKMz4jnyqFb2 bqwA== 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=1sGZVxIVYUexAwoaG6jpHvvFflkKSdwiGq9TowCtbaw=; b=f5jhZCortM3HXxrPX4i2296RSyjlp3LRIV1oY5ahmKUP05wpAjgirLph3pTuUi75yT QeRIGKQsE6tKaWv6IK3AFbQ9wQ371Zi0BQRy/MYwqhWKLiXYw7WPXRDcsiQkNxAe5emT YUHsuqXU3gcEoDYlO5rPMnH0xu6Ntn1qpPgduz8Ra8fGP7CcUdwYisaV5paw3M/GUtA9 VAibEwP/fyTc5IUKcZlTjnE1aU4ZpRmLs4bCsOdkpK6iKDlerMpYvipN45HYWYPs5HvF bAO6rWiiiDCJq3cclcxzehOmYRf0+GCDANDDrztw8BO4U3CamO0w8YMkNh6YrR0lWFba HWrg== 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 f21si6938079edc.246.2020.05.04.05.44.02; Mon, 04 May 2020 05:44:02 -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 A09701D407; Mon, 4 May 2020 14:43:31 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 06F231D160 for ; Mon, 4 May 2020 14:43:27 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 943371A0387; Mon, 4 May 2020 14:43:26 +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 E80731A0349; Mon, 4 May 2020 14:43:24 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7080B40310; Mon, 4 May 2020 20:43:22 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Hemant Agrawal Date: Mon, 4 May 2020 18:11:14 +0530 Message-Id: <20200504124118.22877-5-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504124118.22877-1-hemant.agrawal@nxp.com> References: <20200306095742.18080-1-hemant.agrawal@nxp.com> <20200504124118.22877-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 4/8] net/dpaa2: add default Rx params in devinfo 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 adds default/preferred rx/tx params in dev info, specially the advertised burst size. Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 4 ++++ drivers/net/dpaa/dpaa_ethdev.h | 1 + drivers/net/dpaa2/dpaa2_ethdev.c | 16 ++++++++++++++++ drivers/net/dpaa2/dpaa2_ethdev.h | 2 ++ 4 files changed, 23 insertions(+) -- 2.17.1 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 5f81968d80..56eb5ec47c 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -363,6 +363,10 @@ static int dpaa_eth_dev_info(struct rte_eth_dev *dev, dev_tx_offloads_nodis; dev_info->default_rxportconf.burst_size = DPAA_DEF_RX_BURST_SIZE; dev_info->default_txportconf.burst_size = DPAA_DEF_TX_BURST_SIZE; + dev_info->default_rxportconf.nb_queues = 1; + dev_info->default_txportconf.nb_queues = 1; + dev_info->default_txportconf.ring_size = CGR_TX_CGR_THRESH; + dev_info->default_rxportconf.ring_size = CGR_RX_PERFQ_THRESH; return 0; } diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index da06f1faa1..af9fc2105d 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -42,6 +42,7 @@ /* RX queue tail drop threshold (CGR Based) in frame count */ #define CGR_RX_PERFQ_THRESH 256 +#define CGR_TX_CGR_THRESH 512 /*max mac filter for memac(8) including primary mac addr*/ #define DPAA_MAX_MAC_FILTER (MEMAC_NUM_OF_PADDRS + 1) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 4fc550a885..b70a2ac01c 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -275,6 +275,22 @@ dpaa2_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_vmdq_pools = ETH_16_POOLS; dev_info->flow_type_rss_offloads = DPAA2_RSS_OFFLOAD_ALL; + dev_info->default_rxportconf.burst_size = dpaa2_dqrr_size; + /* same is rx size for best perf */ + dev_info->default_txportconf.burst_size = dpaa2_dqrr_size; + + dev_info->default_rxportconf.nb_queues = 1; + dev_info->default_txportconf.nb_queues = 1; + dev_info->default_txportconf.ring_size = CONG_ENTER_TX_THRESHOLD; + dev_info->default_rxportconf.ring_size = DPAA2_RX_DEFAULT_NBDESC; + + if (dpaa2_svr_family == SVR_LX2160A) { + dev_info->speed_capa |= ETH_LINK_SPEED_25G | + ETH_LINK_SPEED_40G | + ETH_LINK_SPEED_50G | + ETH_LINK_SPEED_100G; + } + return 0; } diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h index 31dca8c7b6..2c49a7f01f 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.h +++ b/drivers/net/dpaa2/dpaa2_ethdev.h @@ -24,6 +24,8 @@ #define MAX_TX_QUEUES 16 #define MAX_DPNI 8 +#define DPAA2_RX_DEFAULT_NBDESC 512 + /*default tc to be used for ,congestion, distribution etc configuration. */ #define DPAA2_DEF_TC 0