* [dpdk-dev] [PATCH] net/nfp: fix jumbo settings
@ 2017-11-24 14:24 Alejandro Lucero
2017-12-04 23:29 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Lucero @ 2017-11-24 14:24 UTC (permalink / raw)
To: dev; +Cc: stable
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@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..e2cea06 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -489,7 +489,7 @@ enum nfp_qcp_ptr {
}
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 @@ enum nfp_qcp_ptr {
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;
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/nfp: fix jumbo settings
2017-11-24 14:24 [dpdk-dev] [PATCH] net/nfp: fix jumbo settings Alejandro Lucero
@ 2017-12-04 23:29 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2017-12-04 23:29 UTC (permalink / raw)
To: Alejandro Lucero, dev; +Cc: stable
On 11/24/2017 6:24 AM, Alejandro Lucero wrote:
> 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")
Cc: stable@dpdk.org
>
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-04 23:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-24 14:24 [dpdk-dev] [PATCH] net/nfp: fix jumbo settings Alejandro Lucero
2017-12-04 23:29 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
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).