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.cor...@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