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 B203AA0C4E; Fri, 15 Oct 2021 16:21:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F92A411CB; Fri, 15 Oct 2021 16:21:40 +0200 (CEST) Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) by mails.dpdk.org (Postfix) with ESMTP id 5AE5A410F1 for ; Fri, 15 Oct 2021 16:21:38 +0200 (CEST) Received: by mail-ed1-f51.google.com with SMTP id t16so38717876eds.9 for ; Fri, 15 Oct 2021 07:21:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TX703Iw2QQFknXfRQITNNdGaQ2xCj9OcAW+ChyumG3U=; b=GszjDtigmDAK8m7GrHYNAy+OgfiUh8BLS3fCdKA/iJFSEnCrik4EJ9Mk2DqVvSUIv/ iycaiHPcuTCNvWtAcWUJe3dhytBTJCJM8cgKmUqzjrEIeySiEyB2rYku5XrJ/hVBR88q KjbCs5bSO7exSra7EcQFEc6PYogZ3nriu44GUqaEpABCV2lW/XCUEJDxfwj88PAfGo4L WtxY/fm3ccCkClNGSGI4cM3kAz37KseDV+934L5SZmhkblsc1djHFVBUuLCP3GsJ/bbc 6xKHjr4i5neOj/4xlSYVVag+05eyMIGMQjz4+B/bbkRYL6jlRsUNkNlayKpvLrDX0vYJ SJGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TX703Iw2QQFknXfRQITNNdGaQ2xCj9OcAW+ChyumG3U=; b=XeCFd3UeQS0sfgkkuVavW3djIeEHU6S8rzAQ1U75vtQwAI3G4obnSDdCfqFI2AtJCo 8+w3Eo2dbVcpWwkoPAF57Er77Q5H80JFT+OjnWUSLcY1hEszbFa06C9m+aa/WkwDQnqW ajtekxaEma906nfvjl+owUgidxQru9UiWm3GqElFT4aHD1S2DaX6XZtNAZxc+hRW+fDr uQvef0ZqmwdlgoSOkYW36WVljVpUusOSBM1eQt/k62D6tmK/BHaN/sDwBLpBmwG0KkzV 1kIWxFaJu3WCIR0lp0r2yEoJt8+LtByAWqOiV0vIlVaeO1E6/6jrBxUqa7TVVmR31gC+ 8FVA== X-Gm-Message-State: AOAM531owtGdim+XjcdQsjycGQ01u21hGPkpJg3yyABy0qEQLfAXhKNG ka5GX8x6J2Y7LoXpTp3XUBcXNBdMHeJ/9tMSigEY3cAFiwCIyA== X-Google-Smtp-Source: ABdhPJzKEl9T41tQGusU0nc/6fWpZ8d7vHE3fgc3x0zwPKZxa9cpSdjFXwdiHaJtOFE19+PHNJ4QeHHFy0oOJrkE9OY= X-Received: by 2002:a17:906:d979:: with SMTP id rp25mr6875057ejb.355.1634307666957; Fri, 15 Oct 2021 07:21:06 -0700 (PDT) MIME-Version: 1.0 References: <1634306769-20123-1-git-send-email-tudor.cornea@gmail.com> In-Reply-To: <1634306769-20123-1-git-send-email-tudor.cornea@gmail.com> From: Tudor Cornea Date: Fri, 15 Oct 2021 17:20:56 +0300 Message-ID: To: qi.z.zhang@intel.com Cc: alvinx.zhang@intel.com, haiyue.wang@intel.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: initialize max_rx_pkt_len if rlpml_set_vf 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" Some of our customers use ESXi 6.0 or 6.5 servers, which could have older versions of the PF ixgbe driver. It seems that with a more recent version of the PMD driver, we are not able to initialize 82599EB ports correctly. This scenario seems to have worked with DPDK 19.11. Would it be possible to print a warning, while still allowing the driver to initialize the ports ? I was also thinking about the return code of ixgbevf_dev_set_mtu. Do you think it would be more appropriate to return ENOTSUP or ENOSYS instead of EINVAL ? As a user, calling 'rte_eth_dev_mtu_set', I would expect an error like EINVAL to suggest to me that the mtu value which I provided is incorrect [1]. The 82599 NIC, however has some particularities related to mtu, which could cause the operation to fail. I was thinking that EINVAL might not be most descriptive error. [1] https://doc.dpdk.org/api/rte__ethdev_8h.html Thanks, Tudor On Fri, 15 Oct 2021 at 17:06, Tudor Cornea wrote: > 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 > --- > 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 > >