DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: initialize max_rx_pkt_len if rlpml_set_vf fails
@ 2021-10-15 14:06 Tudor Cornea
  2021-10-15 14:20 ` Tudor Cornea
  2021-10-20 18:13 ` [dpdk-dev] [PATCH v2] net/ixgbe: initialize port even if mtu config fails Tudor Cornea
  0 siblings, 2 replies; 11+ messages in thread
From: Tudor Cornea @ 2021-10-15 14:06 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: alvinx.zhang, haiyue.wang, dev, Tudor Cornea

It seems that if the call to ixgbevf_rlpml_set_vf fails,
we will not initialize dev_conf.rxmode.max_rx_pkt_len correctly anymore.

This happens with a 82599EB NIC and a VMware ESXI 6.0 setup,
and is causing VF the ports to fail to initialize

We see the following error:
ixgbevf_dev_rx_init(): Set max packet length to 1518 failed.

Investigating over DPDK 19.11, it seems that the call still fails,
but it doesn't exit prematurely, and max_rx_pkt_len is initialized in
the respective case.

On the ESXi server, we seem to have the following driver
net-ixgbe: 3.7.13.7.14iov-20vmw.600.0.0.2494585

It seems that the behavior related to MTU setting has changed
since the following commit:

commit c77866a16904 ("net/ixgbe: detect failed VF MTU set")

We would like to still be able to support older setups if possible,
as we might have customers running ESXi 6.0 or 6.5, and these seem
to have an older version of the PF driver as default.

Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++--
 drivers/net/ixgbe/ixgbe_rxtx.c   | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 4dbe049..4301dfd 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -6369,6 +6369,9 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EINVAL;
 	}
 
+	/* update max frame size */
+	dev->data->dev_conf.rxmode.max_rx_pkt_len = max_frame;
+
 	/*
 	 * When supported by the underlying PF driver, use the IXGBE_VF_SET_MTU
 	 * request of the version 2.0 of the mailbox API.
@@ -6381,8 +6384,6 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 	if (ixgbevf_rlpml_set_vf(hw, max_frame))
 		return -EINVAL;
 
-	/* update max frame size */
-	dev->data->dev_conf.rxmode.max_rx_pkt_len = max_frame;
 	return 0;
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 0ac89cb..02d9809 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -5677,7 +5677,6 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
 	    (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len)) {
 		PMD_INIT_LOG(ERR, "Set max packet length to %d failed.",
 			     dev->data->dev_conf.rxmode.max_rx_pkt_len);
-		return -EINVAL;
 	}
 
 	/*
-- 
2.7.4


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-10-21 16:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 14:06 [dpdk-dev] [PATCH] net/ixgbe: initialize max_rx_pkt_len if rlpml_set_vf fails Tudor Cornea
2021-10-15 14:20 ` Tudor Cornea
2021-10-19 12:58   ` Ferruh Yigit
2021-10-20  3:08     ` Zhang, AlvinX
2021-10-20  7:13       ` Tudor Cornea
2021-10-20  7:29         ` Wang, Haiyue
2021-10-20 18:13 ` [dpdk-dev] [PATCH v2] net/ixgbe: initialize port even if mtu config fails Tudor Cornea
2021-10-21  1:14   ` Wang, Haiyue
2021-10-21  2:54     ` Zhang, Qi Z
2021-10-21 15:33   ` Ferruh Yigit
2021-10-21 16:40     ` Tudor Cornea

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).