From patchwork Fri Sep 21 11:05: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: 147237 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672254ljw; Fri, 21 Sep 2018 04:09:18 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdad3dP76LucXZkFjdWHD2MjSTLkD20InLzp/vi/pmYM0xY9289w0JmN/wZoVHubfKuEwX5g X-Received: by 2002:a1c:1a49:: with SMTP id a70-v6mr6582402wma.91.1537528158302; Fri, 21 Sep 2018 04:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528158; cv=none; d=google.com; s=arc-20160816; b=vcpYOaLK7mZ5un+2k+mr+M1Z6UvxiOqzoeX3sdPiUrZNwN6s4CxOWTZrwOLWzlVGd5 x/75gVTqJszSCy/NZU7PIhiKGqBeCbCoyop4OZ4YK8mlsDm6W6m/TuI8blYY6XccyQmG lHroabSXn6SAUriv2ooyJ0seuBcJZp8o4q1xT/JM/2SfEtyV3B71+aG2ud2x1JEIqgCG bJ58Kx8g6X+mgGP9qsUCqJybHM9p9/NqVFLL/ZPLQmEEmPrRlhKW3H/V+lCWofybfNYX xVTLnjE6yZbXYxS1Bw5onLOnkvobDvVgbBcb4Gs5Cavs5yE/DhSJpN7k9nrGh6hkd1bb jkzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=xi0F/Wka9lDHE59ew4x7TVcZwB5D1r4iOCCvy28aAbU=; b=LSUAgQ4lUaJF2IHCXwX6BmOCzgFETGvjlT/D3WQHh1/QK+iPtGyEl2frDFjvDG4Zg8 uj6tck8P4Y0IHqqAQBnG/hGIyYrp3Sn7Qt2xscQ5HqKrdo7DE6kfQ48kF/maAQ/DJBxe z5+7uunEct9nDMBAFnkY9NIOaB3gZYIy7DbeaOlOcLPYXwsT7895OvrjxbQQyrV2hncJ 7GZS9+wzc8ZpvBE0t3hXkpL4aL90lNVRER2HKXyCLwDsGIhUJeuZsAhxq312N/ImlPpt plCmkdK16h1yCXeLyTyF9o8L1UD/uMmuHDb8sIelgy7OBtgoOz/tOLWy+2PIEofXaPJM YdDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id 66-v6si14165466wra.32.2018.09.21.04.09.18; Fri, 21 Sep 2018 04:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 447705B3A; Fri, 21 Sep 2018 13:08:27 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id C8BF4548B; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id ABA701A02B4; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 9786F1A02B6; Fri, 21 Sep 2018 13:08:09 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 57ABB402F8; Fri, 21 Sep 2018 19:08:03 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Sachin Saxena , shreyansh.jain@nxp.com, stable@dpdk.org Date: Fri, 21 Sep 2018 16:35:53 +0530 Message-Id: <1537527962-25757-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 04/13] net/dpaa: fix link speed based on MAC type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Sachin Saxena The link speed shall be on the basis of mac type. Fixes: 799db4568c76 ("net/dpaa: support device info and speed capability") Cc: shreyansh.jain@nxp.com Cc: stable@dpdk.org Signed-off-by: Sachin Saxena --- drivers/net/dpaa/dpaa_ethdev.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index fd45b24..53dc317 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -341,8 +341,15 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev, dev_info->max_vfs = 0; dev_info->max_vmdq_pools = ETH_16_POOLS; dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL; - dev_info->speed_capa = (ETH_LINK_SPEED_1G | - ETH_LINK_SPEED_10G); + + if (dpaa_intf->fif->mac_type == fman_mac_1g) + dev_info->speed_capa = ETH_LINK_SPEED_1G; + else if (dpaa_intf->fif->mac_type == fman_mac_10g) + dev_info->speed_capa = (ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G); + else + DPAA_PMD_ERR("invalid link_speed: %s, %d", + dpaa_intf->name, dpaa_intf->fif->mac_type); + dev_info->rx_offload_capa = dev_rx_offloads_sup | dev_rx_offloads_nodis; dev_info->tx_offload_capa = dev_tx_offloads_sup |