patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com
Cc: stable@dpdk.org
Subject: [dpdk-stable] [PATCH v2 02/13] net/dpaa: fix jumbo buffer config
Date: Tue, 18 Sep 2018 19:01:45 +0530	[thread overview]
Message-ID: <1537277516-8876-3-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com>

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 <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

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;
-- 
2.7.4

       reply	other threads:[~2018-09-18 13:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com>
     [not found] ` <1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com>
2018-09-18 13:31   ` Hemant Agrawal [this message]
2018-09-18 14:03     ` Thomas Monjalon
2018-09-18 16:22       ` [dpdk-stable] [dpdk-dev] " Hemant
2018-09-18 13:31   ` [dpdk-stable] [PATCH v2 04/13] net/dpaa: fix link speed based on MAC type Hemant Agrawal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537277516-8876-3-git-send-email-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).