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;