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 9FE1941D9B for ; Tue, 28 Feb 2023 10:37:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9757241140; Tue, 28 Feb 2023 10:37:03 +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 4D64A40EE4 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-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-576-Chlg8uYeOguqbIJa5WPo7A-1; Tue, 28 Feb 2023 04:36:59 -0500 X-MC-Unique: Chlg8uYeOguqbIJa5WPo7A-1 Received: by mail-pf1-f200.google.com with SMTP id i11-20020a056a00224b00b005d44149eb06so4868539pfu.10 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=7RHGfEUGqX7KtxNjuu0GpausYd09a7xJXGHoFnYcmpKql5uDccj0U3er8qB/yPnaoL hcr3QHEfvti4fnmavOFrEXFkxtFoL6tPA3uKHPxLwGS/HktcOqVzF5YjasUVZyzWadcL Gob5j1UEedgrb9nW6mOdfNTFvPTNMlCyYrBT6FuLXJYLNBRENqal793RRYH9z779UrIj DKPQ8BAOpmCYy9ws01h28lHycCV39jqT1G37C+KVtmbowhTudGKX1e5MGV3IDhmcka6x 7OmRCxPWrkB9VO2vXmTPyicNO6LSJpzMn8Ls/2Oo0QddbXpYH0+scIgjggzfCQlNQhfU wWhw== X-Gm-Message-State: AO0yUKWx23JbvwxO6khG4EcBUnrTnrORd/GGiOOXOrAPvo3Td8Qiip2q 0oMUVgNX1z+1gy+S666+llGEovVy3IqtAgrFgcPx0ORY2o+zc1vfuRgDBL8dziwip7miA45PjuY BhaZTzPcldloPoFPB60Ge2Bg= X-Received: by 2002:a63:3d84:0:b0:503:7be2:19a7 with SMTP id k126-20020a633d84000000b005037be219a7mr262682pga.1.1677577018539; 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: 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 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