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 A0D2041D9B; Tue, 28 Feb 2023 10:37:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82E8F40EE4; Tue, 28 Feb 2023 10:37:02 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 411184021F for ; Tue, 28 Feb 2023 10:37:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677577020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=76OTiCFkJgKmkqa4pcuEa1wQLBHImbeIWailRtzR4cA=; b=JRfAtcCJ78IS7jrlvqK5LWIx7Tu1KtvriK5+JCjfSc3wjJBRlofXr5sHXWN8eLn13UJepU r2BI3U1hgZeM97H+Pe4xg5gM7QBMaXxSCo7KxMOfY+KQJ0SNl6p0LUuly46JOIq1dyWpdW bi/zLG6T8StUadjRgDS/7VN5RykjG8M= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-668-LcloUxdGPVuhuU2LvmussQ-1; Tue, 28 Feb 2023 04:36:59 -0500 X-MC-Unique: LcloUxdGPVuhuU2LvmussQ-1 Received: by mail-pl1-f199.google.com with SMTP id i6-20020a170902c94600b0019d16e4ac0bso2763162pla.5 for ; Tue, 28 Feb 2023 01:36:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=76OTiCFkJgKmkqa4pcuEa1wQLBHImbeIWailRtzR4cA=; b=AlFIXr6BI/4COIPdDp64ZRcwQqxHZmV+QphfUkMyuVtSn3v3YmehPwemRdxOWaT+7t CAjoKTQG6IYmk5HGVd1iQw9LQO1Am9++vwU/4sEeVaLh7aYfi2CZxGXIWgWp41v5/xzP 08gLjmlnj1/mfmhckHOeC1vzzhRm0XPbQo/Hzv7b1mUJOyPQpX4z++M8Ibsl7ItvrPOu 9anulc1ATS4n/l+DEXeNp8GCqtK/h8FzK8OxKtMdxkxoq+qw75bkiyGfxQB7jThDslWO FsARwg6grWrzbvuc23CUpqWMExrJETeUUtpEkvOdLf9j6qOmdniXzi/MdyLl53jbsS1U ++AA== X-Gm-Message-State: AO0yUKXncfTpgSEOm2Hl7y/qMKHozVX4BSPpjMVs5MIznaz8lYAl4bSq P7AvsV8ds3+6zQpKZqAL0vtsXhHpxjVVxySSXdz/vzUIqcajxqOYYWK/Q4qxl3WMav2Mp58eu5e LE/wQFd6g2Hv6Mfco/Hk= X-Received: by 2002:a63:3d84:0:b0:503:7be2:19a7 with SMTP id k126-20020a633d84000000b005037be219a7mr262680pga.1.1677577018538; Tue, 28 Feb 2023 01:36:58 -0800 (PST) X-Google-Smtp-Source: AK7set9rOV6Z4uA65A4WJtZOgvs77IexDA8hadX6Z2ftDJ50rutrLntfRxtRR3b79s9d510uR0oGRgv0q8+PY0AigxU= X-Received: by 2002:a63:3d84:0:b0:503:7be2:19a7 with SMTP id k126-20020a633d84000000b005037be219a7mr262673pga.1.1677577018241; Tue, 28 Feb 2023 01:36:58 -0800 (PST) MIME-Version: 1.0 References: <20230202123632.56730-1-simei.su@intel.com> <20230220075952.444153-1-simei.su@intel.com> In-Reply-To: From: David Marchand Date: Tue, 28 Feb 2023 10:36:47 +0100 Message-ID: Subject: Re: [PATCH v6] net/i40e: rework maximum frame size configuration To: "Zhang, Qi Z" Cc: "Su, Simei" , "Xing, Beilei" , "Zhang, Yuying" , "dev@dpdk.org" , "Yang, Qiming" , "stable@dpdk.org" , Kevin Traynor , Thomas Monjalon X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Qi, On Mon, Feb 27, 2023 at 1:35 AM Zhang, Qi Z wrote: > > One issue is reported by David Marchand that error occurs in OVS due to the > > fix patch in mentioned changes below. The detailed reproduce step and > > result are in https://patchwork.dpdk.org/project/dpdk/patch/ > > 20211207085946.121032-1-dapengx.yu@intel.com/. > > > > This patch removes unnecessary link status check and directly sets mac config > > in dev_start. Also, it sets the parameter "wait to complete" true to wait for > > more time to make sure adminq command execute completed. > > > > Fixes: a4ba77367923 ("net/i40e: enable maximum frame size at port level") > > Fixes: 2184f7cdeeaa ("net/i40e: fix max frame size config at port level") > > Fixes: 719469f13b11 ("net/i40e: fix jumbo frame Rx with X722") > > Cc: stable@dpdk.org > > > > Reported-by: David Marchand > > Signed-off-by: Simei Su > > Acked-by: Qi Zhang I was waiting for a ping... good thing I had a look at this thread. I suggest splitting this in two parts before it reaches the main repo: - put the reverts first (the reason is that 21.11 stable branch already have them): this would end up the same as merging https://patchwork.dpdk.org/project/dpdk/patch/20221213091837.87953-1-david.marchand@redhat.com/ that has been waiting since December, - have the move of i40e_aq_set_mac_config from eth_i40e_dev_init to i40e_dev_start + change in i40e_dev_link_update call in a second patch (i.e. the following diff), diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index a982e42264..371f42233e 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1710,11 +1710,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) */ i40e_add_tx_flow_control_drop_filter(pf); - /* Set the max frame size to 0x2600 by default, - * in case other drivers changed the default value. - */ - i40e_aq_set_mac_config(hw, I40E_FRAME_SIZE_MAX, TRUE, false, 0, NULL); - /* initialize RSS rule list */ TAILQ_INIT(&pf->rss_config_list); @@ -2332,6 +2327,7 @@ i40e_dev_start(struct rte_eth_dev *dev) uint32_t intr_vector = 0; struct i40e_vsi *vsi; uint16_t nb_rxq, nb_txq; + uint16_t max_frame_size; hw->adapter_stopped = 0; @@ -2452,7 +2448,7 @@ i40e_dev_start(struct rte_eth_dev *dev) PMD_DRV_LOG(WARNING, "Fail to set phy mask"); /* Call get_link_info aq command to enable/disable LSE */ - i40e_dev_link_update(dev, 0); + i40e_dev_link_update(dev, 1); } if (dev->data->dev_conf.intr_conf.rxq == 0) { @@ -2470,6 +2466,13 @@ i40e_dev_start(struct rte_eth_dev *dev) "please call hierarchy_commit() " "before starting the port"); + max_frame_size = dev->data->mtu ? + dev->data->mtu + I40E_ETH_OVERHEAD : + I40E_FRAME_SIZE_MAX; + + /* Set the max frame size to HW*/ + i40e_aq_set_mac_config(hw, max_frame_size, TRUE, false, 0, NULL); + return I40E_SUCCESS; tx_err: This way, the new fix is easier to read too. Thanks. -- David Marchand