From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id E8CB31B1B9 for ; Wed, 24 Jan 2018 16:37:14 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 903AF22418; Wed, 24 Jan 2018 10:37:14 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:37:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=WZAMcvCeg2ca0D4vR cBE33EBVAD87EfVMLua0k/Ivxw=; b=iv8yWEbXZkjltcBHZkAzS4gYLZPtIvZed KXdlfZgn3IooT1t8m/snOnsZOH+B7jlusgLSDjkgkaYpRygLLrc82RKbqajyDzVe AB741JtCiC9oagIA6JlK1SPONiEqm8NVAK5SlkSiBX+CbYoOaG/g2nmcTK5mT5rf SV5K5KvQOPt5HDIFjyXhfSroRfFzD4AOrxM5IFlZvOEH1CY/qtajr2bCE5if6efs kZ7SBuBN3Mj020aBlezDCL34mAsb7zVmJ3hFWD+muCeDy0FcvBYOKaNna1q0SRXJ Xq8IUzftplR8nS2o1ZErAYLQZ+j8l4eoN6ZrBVnBwqrykc3newDlQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=WZAMcvCeg2ca0D4vRcBE33EBVAD87EfVMLua0k/Ivxw=; b=ENlTOM8C UkwVO0AiZWEjtxOzhSJCLDy+hwoG2PFdz76BUBB9Y7apenjpFqZCHVCC+n3sjdKQ w0kB/o5WeSlfNM4XdRLzgJ8euldQvI9/5Oosu+Vh8GGp21JReBQJUrHJWDif//O1 wEe0+SliwWo6MmkatHAzf95M01ixiyhVcVpQI1JRJdRi5MxC5/jTaD30AFexGNN5 CFcqPgfUSqkjHFecLf9rAXzhKLiF2z/oe9PGsd2gODVP1FP/8iwymDMfD7GSyThe 4TNgr+ZuaNel342OMQd6tf+274CYK5aWtd37Q2/Nn7GQmiTRgyPbPAQLZ+Gszt0g H2Ii27WCOHBSeg== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id B94D27E1BE; Wed, 24 Jan 2018 10:37:12 -0500 (EST) From: Yuanhan Liu To: Alejandro Lucero Cc: dpdk stable Date: Wed, 24 Jan 2018 23:31:40 +0800 Message-Id: <1516808026-25523-32-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/nfp: fix jumbo settings' has been queued to LTS release 17.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 15:37:15 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 03e87d16d5c4a83265bb984e738448e67bac5b02 Mon Sep 17 00:00:00 2001 From: Alejandro Lucero Date: Fri, 24 Nov 2017 14:24:37 +0000 Subject: [PATCH] net/nfp: fix jumbo settings [ upstream commit c70ccbc79d8a0b7327f98f6072da75a530c4102a ] When jumbo frames is configured, the hardware mtu needs to be updated to the specified max_rx_pkt_len. Also, changing mtu should be avoided once the PMD port started. Fixes: defb9a5dd156 ("nfp: introduce driver initialization") Signed-off-by: Alejandro Lucero --- drivers/net/nfp/nfp_net.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 9a7b0b2..4aec94d 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -489,7 +489,7 @@ nfp_net_configure(struct rte_eth_dev *dev) } if (rxmode->jumbo_frame) - /* this is handled in rte_eth_dev_configure */ + hw->mtu = rxmode->max_rx_pkt_len; if (rxmode->hw_strip_crc) { PMD_INIT_LOG(INFO, "strip CRC not supported"); @@ -1469,6 +1469,13 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) if ((mtu < ETHER_MIN_MTU) || ((uint32_t)mtu > hw->max_mtu)) return -EINVAL; + /* mtu setting is forbidden if port is started */ + if (dev->data->dev_started) { + PMD_DRV_LOG(ERR, "port %d must be stopped before configuration", + dev->data->port_id); + return -EBUSY; + } + /* switch to jumbo mode if needed */ if ((uint32_t)mtu > ETHER_MAX_LEN) dev->data->dev_conf.rxmode.jumbo_frame = 1; -- 2.7.4