patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 20.11] net/ixgbe: fix port initialization if MTU config fails
@ 2021-11-11  9:12 Tudor Cornea
  2021-11-27 14:29 ` Xueming(Steven) Li
  0 siblings, 1 reply; 2+ messages in thread
From: Tudor Cornea @ 2021-11-11  9:12 UTC (permalink / raw)
  To: stable; +Cc: xuemingl, Tudor Cornea

[ upstream commit 2108930be123ab83c837e7dd6eb3078ec3482ad4 ]

On a VMware ESXi 6.0 setup with an Intel 82599 NIC the ports don't
seem to initialize anymore, while running testpmd.

Configuring Port 0 (socket 0)
ixgbevf_dev_rx_init(): Set max packet length to 1518 failed.
ixgbevf_dev_start(): Unable to initialize RX hardware (-22)
Fail to start port 0: Invalid argument
Configuring Port 1 (socket 0)
ixgbevf_dev_rx_init(): Set max packet length to 1518 failed.
ixgbevf_dev_start(): Unable to initialize RX hardware (-22)
Fail to start port 1: Invalid argument
Please stop the ports first

If the call to ixgbevf_rlpml_set_vf fails and we return prematurely,
we will not be able to initialize the ports correctly.

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

We can make this particular use case work correctly if we don't
return an error, which seems to be consistent with the overall
kernel ixgbevf implementation.

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c?h=v5.14#n2015

Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index c0ab36a..6d27f67 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -5659,11 +5659,9 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
 	 * VF packets received can work in all cases.
 	 */
 	if (ixgbevf_rlpml_set_vf(hw,
-	    (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len)) {
+	    (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;
-	}
 
 	/*
 	 * Assume no header split and no VLAN strip support
-- 
2.7.4


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

* Re: [PATCH 20.11] net/ixgbe: fix port initialization if MTU config fails
  2021-11-11  9:12 [PATCH 20.11] net/ixgbe: fix port initialization if MTU config fails Tudor Cornea
@ 2021-11-27 14:29 ` Xueming(Steven) Li
  0 siblings, 0 replies; 2+ messages in thread
From: Xueming(Steven) Li @ 2021-11-27 14:29 UTC (permalink / raw)
  To: tudor.cornea, stable

On Thu, 2021-11-11 at 11:12 +0200, Tudor Cornea wrote:
> [ upstream commit 2108930be123ab83c837e7dd6eb3078ec3482ad4 ]
> 
> On a VMware ESXi 6.0 setup with an Intel 82599 NIC the ports don't
> seem to initialize anymore, while running testpmd.
> 
> Configuring Port 0 (socket 0)
> ixgbevf_dev_rx_init(): Set max packet length to 1518 failed.
> ixgbevf_dev_start(): Unable to initialize RX hardware (-22)
> Fail to start port 0: Invalid argument
> Configuring Port 1 (socket 0)
> ixgbevf_dev_rx_init(): Set max packet length to 1518 failed.
> ixgbevf_dev_start(): Unable to initialize RX hardware (-22)
> Fail to start port 1: Invalid argument
> Please stop the ports first
> 
> If the call to ixgbevf_rlpml_set_vf fails and we return prematurely,
> we will not be able to initialize the ports correctly.
> 
> Fixes: c77866a16904 ("net/ixgbe: detect failed VF MTU set")
> 
> We can make this particular use case work correctly if we don't
> return an error, which seems to be consistent with the overall
> kernel ixgbevf implementation.
> 
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/
> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c?h=v5.14#n2015
> 
> Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
> ---

Applied to 20.11.4 list, thanks!


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

end of thread, other threads:[~2021-11-27 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11  9:12 [PATCH 20.11] net/ixgbe: fix port initialization if MTU config fails Tudor Cornea
2021-11-27 14:29 ` Xueming(Steven) Li

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