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 3851CA09E4; Fri, 29 Jan 2021 10:34:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0187B240134; Fri, 29 Jan 2021 10:34:56 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 8A89C40694; Fri, 29 Jan 2021 10:34:54 +0100 (CET) IronPort-SDR: yZgsmKMVGzLCm1k+2sTHGoMug9IvNdT88XhriQ4kRyGjKFLwnXX4wKNf2xJe4xTjDtk7kYOTKJ whJq7mqG8QiQ== X-IronPort-AV: E=McAfee;i="6000,8403,9878"; a="179614252" X-IronPort-AV: E=Sophos;i="5.79,385,1602572400"; d="scan'208";a="179614252" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 01:34:53 -0800 IronPort-SDR: Sv06DrjRL9cmMK9cm2EAG/Yfzbhi9isfAHdtPbYAerJom0WQjsIYIFkwnSvWpnzt1DhTPxXJZ4 zOMBm0ZN5NUw== X-IronPort-AV: E=Sophos;i="5.79,385,1602572400"; d="scan'208";a="389231218" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.197.204]) ([10.213.197.204]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 01:34:50 -0800 To: Wenzhuo Lu , Xiaoyun Li , Bernard Iremonger , Steve Yang Cc: dev@dpdk.org, stable@dpdk.org, Lance Richardson , Wisam Jaddo , Bo Chen , oulijun@huawei.com, wisamm@mellanox.com, lihuisong@huawei.com References: <20210125181548.2713326-1-ferruh.yigit@intel.com> <20210128120708.533872-1-ferruh.yigit@intel.com> From: Ferruh Yigit Message-ID: <3496473d-13d1-a085-526e-dcefacf54811@intel.com> Date: Fri, 29 Jan 2021 09:34:45 +0000 MIME-Version: 1.0 In-Reply-To: <20210128120708.533872-1-ferruh.yigit@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6] app/testpmd: fix setting maximum packet length 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 1/28/2021 12:07 PM, Ferruh Yigit wrote: > From: Steve Yang > > "port config all max-pkt-len" command fails because it doesn't set the > 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag properly. > > Commit in the fixes line moved the 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload > flag update from 'cmd_config_max_pkt_len_parsed()' to 'init_config()'. > 'init_config()' function is only called during testpmd startup, but the > flag status needs to be calculated whenever 'max_rx_pkt_len' changes. > > The issue can be reproduced as [1], where the 'max-pkt-len' reduced and > 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag should be cleared but it > didn't. > > Adding the 'update_jumbo_frame_offload()' helper function to update > 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag and 'max_rx_pkt_len'. This > function is called both by 'init_config()' and > 'cmd_config_max_pkt_len_parsed()'. > > Default 'max-pkt-len' value set to zero, 'update_jumbo_frame_offload()' > updates it to "RTE_ETHER_MTU + PMD specific Ethernet overhead" when it > is zero. > If '--max-pkt-len=N' argument provided, it will be used instead. > And with each "port config all max-pkt-len" command, the > 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag, 'max-pkt-len' and MTU is > updated. > > [1] > -------------------------------------------------------------------------- > dpdk-testpmd -c 0xf -n 4 -- -i --max-pkt-len=9000 --tx-offloads=0x8000 > --rxq=4 --txq=4 --disable-rss > testpmd> set verbose 3 > testpmd> port stop all > testpmd> port config all max-pkt-len 1518 > testpmd> port start all > > // Got fail error info without this patch > Configuring Port 0 (socket 1) > Ethdev port_id=0 rx_queue_id=0, new added offloads 0x800 must be > within per-queue offload capabilities 0x0 in rte_eth_rx_queue_setup() > Fail to configure port 0 rx queues //<-- Fail error info; > -------------------------------------------------------------------------- > > Bugzilla ID: 625 > Fixes: 761c4d66900f ("app/testpmd: fix max Rx packet length for VLAN packets") > Cc: stable@dpdk.org > > Signed-off-by: Steve Yang > Signed-off-by: Ferruh Yigit > Acked-by: Lance Richardson > Acked-by: Wisam Jaddo > Acked-by: Xiaoyun Li > Tested-by: Bo Chen Applied to dpdk-next-net/main, thanks.