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 C0D9541BAE; Thu, 2 Feb 2023 13:55:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A7F142D32; Thu, 2 Feb 2023 13:55:58 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id EA9384014F for ; Thu, 2 Feb 2023 13:55:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675342556; 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=n1pe55U3qVWS2J9Cn3qwfgXigCe/3J4Kjvdr6SJOVts=; b=JMBBZE+g2oB/Ulc/IYZrw5yJSHXNO5VXBLIupSATE7xcSgzo+s7BxDjGl4Pb60/A//3IUV UmnIWEEFP9MxuhLKP5W1U33FgKnB66ICdORHxJ7V2u9BbXmk/jTNbiqWFHsmErF+Krx5K8 c5K/fVpNz5hL25N9bIPEkw/4oPq7duA= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-561-B_64xdv3OJyct0EoEPNawg-1; Thu, 02 Feb 2023 07:55:55 -0500 X-MC-Unique: B_64xdv3OJyct0EoEPNawg-1 Received: by mail-pj1-f70.google.com with SMTP id y23-20020a17090aca9700b0022beb2b98a9so949070pjt.2 for ; Thu, 02 Feb 2023 04:55:54 -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=n1pe55U3qVWS2J9Cn3qwfgXigCe/3J4Kjvdr6SJOVts=; b=vVKm1o91Avx5ba/F8t6uvyVOpAaOsD33Z1X1oSo55qU24ptIKUOwBmS1yD225HNNpD RXiWCgUVhubqladtJD8M10NMvGBApl4ODiaJitkbdhZ249P1kMWs5na7DLWFTym4zHyg tmEOHKTHuWawGFlwjDQoLM2lLiNqtOcM8PHmpWW2R4H6eAdQN9p2MX3Mxuq0eEL+sxo6 x06fA9Uok5rB164V38pOjnMKIIug9O9f8LF9PZYzp4pntUL5An9qk8TbZn9nj2nvD87J Yn+sU8wdewxgR8gyTXkm9TOYRl+T+dZcO7ECTP06Ob2G5yzQjl/F8Ix2r3f8PIgYlVi9 PKdg== X-Gm-Message-State: AO0yUKWc+hSBBuiuyqs/KxZWFnkTWaWCjt3RT2tX5hD+CyO1+9+bC9eQ JKguePjyiijnrZp6oepQg7m7n0otFxXgib+F1a5BilJz71Xh5l7CQy7ERWB32XjrvxCuO0Vio9o joCFVRuGY1SNdpE61PHU= X-Received: by 2002:a05:6a00:1ca0:b0:592:6299:43d2 with SMTP id y32-20020a056a001ca000b00592629943d2mr1318061pfw.1.1675342553965; Thu, 02 Feb 2023 04:55:53 -0800 (PST) X-Google-Smtp-Source: AK7set+WBp46N69gkiHoBw9jDsda2ZAXygj6mN1PZltzGq0qNID4EOjdpAZx3PxJhXFqp/7APfUiSu8Zd3KwJHewTUU= X-Received: by 2002:a05:6a00:1ca0:b0:592:6299:43d2 with SMTP id y32-20020a056a001ca000b00592629943d2mr1318053pfw.1.1675342553710; Thu, 02 Feb 2023 04:55:53 -0800 (PST) MIME-Version: 1.0 References: <20230202123021.54416-1-simei.su@intel.com> <20230202123632.56730-1-simei.su@intel.com> In-Reply-To: <20230202123632.56730-1-simei.su@intel.com> From: David Marchand Date: Thu, 2 Feb 2023 13:55:42 +0100 Message-ID: Subject: Re: [PATCH v5] net/i40e: rework maximum frame size configuration To: Simei Su , qi.z.zhang@intel.com Cc: beilei.xing@intel.com, yuying.zhang@intel.com, dev@dpdk.org, qiming.yang@intel.com, stable@dpdk.org 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 On Thu, Feb 2, 2023 at 1:37 PM Simei Su wrote: > > This patch reverts mentioned changes below to remove unnecessary link > status check and only moves max frame size configuration to dev_start. > Also, it sets the parameter "wait to complete" true to wait for complete > right after setting link up. Why is the change on link status needed? Is it necessary? > > 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 > > Signed-off-by: Simei Su I would have preferred you reply to my original report. At least, I'd like you add some credit with my name in the commitlog. For the record, the differences with my v1 are: diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 5635dd03cf..5d57bb9a0e 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2327,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; @@ -2447,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) { @@ -2465,8 +2466,16 @@ i40e_dev_start(struct rte_eth_dev *dev) "please call hierarchy_commit() " "before starting the port"); - i40e_aq_set_mac_config(hw, dev->data->mtu + I40E_ETH_OVERHEAD, TRUE, - false, 0, NULL); + max_frame_size = dev->data->mtu ? + dev->data->mtu + I40E_ETH_OVERHEAD : + I40E_FRAME_SIZE_MAX; + + /* Set the max frame size to HW*/ + ret = i40e_aq_set_mac_config(hw, max_frame_size, TRUE, false, 0, NULL); + if (ret) { + PMD_DRV_LOG(ERR, "Fail to set mac config"); + return ret; + } return I40E_SUCCESS; Qi, don't apply this fix yet. I'll generate some binaries internally to have Red Hat QE run their tests. Thanks. -- David Marchand