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 051F9A0C43; Wed, 20 Oct 2021 20:13:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81A2E40142; Wed, 20 Oct 2021 20:13:59 +0200 (CEST) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mails.dpdk.org (Postfix) with ESMTP id A10204003E for ; Wed, 20 Oct 2021 20:13:58 +0200 (CEST) Received: by mail-wr1-f42.google.com with SMTP id o20so48761397wro.3 for ; Wed, 20 Oct 2021 11:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yI2Jgx77EyewNYg/hAOKZJe+ksOt7vDLIO5n/ZRLJRw=; b=QR3R9MYroNmsZ255ThICI2hXN9bmI+EVMUHSDBF/8nggWC1Gyg1ZNABEgNe+3bqnLo 4Zr3VFMidK5hX1w+vjZbGyDeth7Rf51LA2rl3y+Ms9XPjpfKISD2H15PzTiqAZf9Sm6w g9MFGAFg3Hw1M0n/63JLlorSZryBdEmkZZVXCDaOsySHoLq8SJX79AZw2DQvgfRBOK1X 5soMsKoEM/uBr7Wdpi6BlNprVk9YnfWVkVqlj8IgqcpwS1EGshOd6reIkIXgVfPS4JzX ig0OBx/NhsXEUoO1N2RbsSoA2RMnj30WZjO9ci3qgO2/6y/hw3HZ5tyxrUcp/vQAQIJe KhPg== 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:in-reply-to :references; bh=yI2Jgx77EyewNYg/hAOKZJe+ksOt7vDLIO5n/ZRLJRw=; b=uQRs8wtMYPf+w8I0YMU+iYj9RPsCN0rh9K2V8qCHOh68Rf7ub+qldeOQdBMfWW2nqK Wnv2SdVeMVBM6NTfvy63GvsGl55iL9nHcD83EZ/c1RI8jD4VSsK2oioZwIMZSTke2Acp VwRZ5khKj9q9lUk1EDb1Me8EH49g1sIQC3FJuykHmAJeF2FOBy31frwfntLjxoe7Byuf rMfOAHh12w0kHbewW1mshN1MvL2if8kAYDMJ6x6wkjNrf1QGvdtyqpjenpWRCZfuvodk ee/LD8yDDF7Gs075jobf7DbXaq+pG8cImA0apVmZSBAP6djssK7MFP1h8hFrEGIpYBAt StCQ== X-Gm-Message-State: AOAM533M6P1nea/F2fudA9/KXSrpgI+m8Vx12cpZDTRmYdCAJd2X+jaa vqc0b38UPZRvKEplw0XpB5XfLIoVRycIFg== X-Google-Smtp-Source: ABdhPJxbMw5Spc/0ObuMNx4USOgBuF/4zAzPvwUyStAYCD9QHG5E3UX7WJGhI/hR+lnh5fY6QeRslQ== X-Received: by 2002:adf:a454:: with SMTP id e20mr970154wra.310.1634753638253; Wed, 20 Oct 2021 11:13:58 -0700 (PDT) Received: from tucornea-dev-machine.localdomain ([193.226.172.42]) by smtp.gmail.com with ESMTPSA id i13sm3059081wmq.41.2021.10.20.11.13.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Oct 2021 11:13:57 -0700 (PDT) From: Tudor Cornea To: qi.z.zhang@intel.com Cc: haiyue.wang@intel.com, alvinx.zhang@intel.com, ferruh.yigit@intel.com, dev@dpdk.org, Tudor Cornea Date: Wed, 20 Oct 2021 21:13:46 +0300 Message-Id: <1634753626-84056-1-git-send-email-tudor.cornea@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1634306769-20123-1-git-send-email-tudor.cornea@gmail.com> References: <1634306769-20123-1-git-send-email-tudor.cornea@gmail.com> Subject: [dpdk-dev] [PATCH v2] net/ixgbe: initialize port even if mtu config fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. The behavior seems to have changed since the following commit: commit 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#n2015 Signed-off-by: Tudor Cornea --- v2: * Change title * Remove max_rx_pkt_len fix in ixgbe_ethdev.c It's already fixed as part of Ferruh's changes in next-net branch, so this part should be redundant, now --- 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 b263dfe..a51450f 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -5673,11 +5673,9 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev) * ixgbevf_rlpml_set_vf even if jumbo frames are not used. This way, * VF packets received can work in all cases. */ - if (ixgbevf_rlpml_set_vf(hw, frame_size) != 0) { + if (ixgbevf_rlpml_set_vf(hw, frame_size) != 0) PMD_INIT_LOG(ERR, "Set max packet length to %d failed.", frame_size); - return -EINVAL; - } /* * Assume no header split and no VLAN strip support -- 2.7.4