[dpdk-stable] patch 'net/nfp: fix jumbo settings' has been queued to LTS release 17.11.1
Yuanhan Liu
yliu at fridaylinux.org
Wed Jan 24 16:31:40 CET 2018
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 <alejandro.lucero at netronome.com>
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 <alejandro.lucero at netronome.com>
---
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
More information about the stable
mailing list