From patchwork Fri Sep 21 11:05:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147231 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp671266ljw; Fri, 21 Sep 2018 04:08:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYOw+12U8prPXX3Ew86lCTJypWupjD6U1K+YOqWOrB1MKlRBj8AAqWp6zfvDJCFcI/uHVl2 X-Received: by 2002:a1c:7dc7:: with SMTP id y190-v6mr6400396wmc.62.1537528102328; Fri, 21 Sep 2018 04:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528102; cv=none; d=google.com; s=arc-20160816; b=k/hdpWBowHtyL9faGajvFpNyr6bhdM+0/fUU2vaN+7xYU9MecDimIiCKa7GPItxbgw 3YRv1aD98j2qOzc0HAEbOLXNqQ3h6WtfgG18kkFWRE2a8ZAha5vbSiOgBR2Z6pcTB6qq KkAQOdBGpreGYL7RDUYEpuRjWfh++BJvz2GFWyBdgIFKhrqRwZ3KzFUk/2PEF1Dh3wCy h9g9h2++sygf2a2/1fai1nlm4IGFOqTpgx9ovBv8F+6GO0d9IwS8oNe5uLvfik85eEdW ru9WessN09X2OlgeRVHXxAsYPzrYevKBezplk1F99HrJPzCLCx4mNhspZIg9XCUGO2/l 0KyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=Df0CssitX2BEBR0SZwWqlAcKLzSLow7nA0MgBOTg+b4=; b=Ea+DE0e5nR53Z6awtC+F/2c9Ib9vCOpghkYmROBcGPL5QMnOPcSs/zOtZYj6foGTQN eaD41iOsihfyqruhfLusZdbbvmUHEodXn+QpAKfmWlA1j3sAg9+nDHgmPTjmcy54h18T +bQdh2aIhhVcuYJ1T46smyK5h20u1f+Q96WAe0fVVAeWHcU4YbmHWKK4JYIsIUSBu3+u k8dllX98FO/G0VknsyFF+Fz1pDhFYs00sXGbYgGQuPYk1tyyAb7B9UM8fZOboc6qfQBG kgRY4QX6H4ywqfT8jD8R3oDt/aeE8Db59L3ZlwdEcHo4s4ndjd56D7dqN1NOc7cnTFJV LWJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id r8-v6si607445wrn.227.2018.09.21.04.08.22; Fri, 21 Sep 2018 04:08:22 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C36E65398; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 4A3F84CBD; Fri, 21 Sep 2018 13:08:08 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id DD188200256; Fri, 21 Sep 2018 13:08:07 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 98A3420004C; Fri, 21 Sep 2018 13:08:05 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D840E402E5; Fri, 21 Sep 2018 19:08:01 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: stable@dpdk.org Date: Fri, 21 Sep 2018 16:35:51 +0530 Message-Id: <1537527962-25757-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 02/13] net/dpaa: fix jumbo buffer config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Set the missing dev data mtu for the correct size. Set the max supported size in hw, if user is asking for more. Fixes: 9658ac3a4ef6 ("net/dpaa: set the correct frame size in device MTU") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index b9bd557..b9b4999 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -193,14 +193,24 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev) } if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { + uint32_t max_len; + + DPAA_PMD_DEBUG("enabling jumbo"); + if (dev->data->dev_conf.rxmode.max_rx_pkt_len <= - DPAA_MAX_RX_PKT_LEN) { - fman_if_set_maxfrm(dpaa_intf->fif, - dev->data->dev_conf.rxmode.max_rx_pkt_len); - return 0; - } else { - return -1; + DPAA_MAX_RX_PKT_LEN) + max_len = dev->data->dev_conf.rxmode.max_rx_pkt_len; + else { + DPAA_PMD_INFO("enabling jumbo override conf max len=%d " + "supported is %d", + dev->data->dev_conf.rxmode.max_rx_pkt_len, + DPAA_MAX_RX_PKT_LEN); + max_len = DPAA_MAX_RX_PKT_LEN; } + + fman_if_set_maxfrm(dpaa_intf->fif, max_len); + dev->data->mtu = max_len + - ETHER_HDR_LEN - ETHER_CRC_LEN - VLAN_TAG_SIZE; } return 0; }