From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2BDD5A0C4C for ; Wed, 1 Dec 2021 12:10:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19CAA40140; Wed, 1 Dec 2021 12:10:16 +0100 (CET) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id ED46640140 for ; Wed, 1 Dec 2021 12:10:14 +0100 (CET) Received: by mail-wr1-f41.google.com with SMTP id q3so28494405wru.5 for ; Wed, 01 Dec 2021 03:10:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=p/h9AEVB88+ihY4Ftwr541D3Zv4M5jENcjdMpd+nXs0=; b=H3C4eHjiJcjs13mYTPajSqeegRHfwHeXtJBZM3r8hJjcwRTLCnAZGwXedUi5/m7oR2 f/Mo1hu7jcfQE41UvUFDqCn10aew3/e/8h2ZyzuL0TTBFZHjsmHq/aJkz/iXG76Fy5IY 39NQM3Rv8u0YDhDs0nWhJer1uU/qjDqBjDgDdrvaiKmaR7BuVXwYycCa+y4oK1zMgpcr nPPxIrhaXo8xzsAwomiG8c/9fm5AmSLLjkbXlU+CCFvsx8WW6lGleVd2fJbEP/EY0xQn mGcwQrHWHEO1r+CSRZg0wXTNAy3R1oyY6dEPUk7ac60kLPdQh9gxQHCA44jSr6W9DLAC vD1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=p/h9AEVB88+ihY4Ftwr541D3Zv4M5jENcjdMpd+nXs0=; b=HiCCppAoFYMwTaN3g5T9BXIEcCcW5esr46N+UGuAFHzj0KHTQaZVSn4/R82DkVr5vL fRbUzU8DGyh5B3zNJlAe3F6fxVSF/Hea9CeUjTvzvXWM/joCqrIVuUB7nxsy5BLXqjq8 OtDIQMovwNHw9kJ09XuDaRafMwaSQPhotSUFtBLOdRA2pvp7PhNJEvUY0kGs+nRHsgAZ kLLEMsiSqqyrnaKodomwfIuZIfof+e4s9o+252/+rCzpYWiYQ0zotwTVyCV3iJKRT9pY uhj8v80hTlZ9LaDRztWL3wDDbsLvjmgy9zA9+W13o8bFZiecqu2+c8eQBDev0TVI3RMM ENjA== X-Gm-Message-State: AOAM532mutOGqtgnCmL4Kd8Xflz8kmoFX8eM9dSMqn9lvU3drmBsVO8m GtYyPlRsuKQfGA9KoNP3nA05Mgb2alM= X-Google-Smtp-Source: ABdhPJw3aG/kZLFVTIWBigLNUVAg9awEabyiSgfPLsvn5Thz0BUitDl8BGaZadoLUj973KkUW1VFJQ== X-Received: by 2002:a5d:6d86:: with SMTP id l6mr5791351wrs.304.1638357014524; Wed, 01 Dec 2021 03:10:14 -0800 (PST) Received: from tucornea-dev-machine.localdomain ([193.226.172.44]) by smtp.gmail.com with ESMTPSA id g16sm1084503wmq.20.2021.12.01.03.10.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Dec 2021 03:10:14 -0800 (PST) From: Tudor Cornea To: stable@dpdk.org Cc: christian.ehrhardt@canonical.com, Tudor Cornea Subject: [PATCH 19.11] net/ixgbe: fix port initialization if MTU config fails Date: Wed, 1 Dec 2021 12:39:53 +0200 Message-Id: <1638355193-117871-1-git-send-email-tudor.cornea@gmail.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org [ 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 --- 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 ed36a33..26b49a2 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -5545,11 +5545,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