From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1DA3AA04E7; Thu, 5 Nov 2020 18:51:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 273C02986; Thu, 5 Nov 2020 18:51:53 +0100 (CET) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id 4A8F61DBD; Thu, 5 Nov 2020 18:51:50 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id A393658013C; Thu, 5 Nov 2020 12:51:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 05 Nov 2020 12:51:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=gPNQGv3/dinpM M8xTnmfzsuteoYEzZtE8Ylz1KCH3jo=; b=vuBZKyFBaLwSLbOIns8MjWR9weP/3 ujHt9IS2RVL1jt7cszxy2iuxL6RpYHkcq1GToyYj3dnmkOpPzJaB8cGBRGMvWpps 00Sv8wyFSqja9xUktBdIuMfsMOMfQDHlhrMllmgmuouvwamcbc1MyF8HAeODsOeB JTY7SgQYpmzbRosIPEl47OiMgYf627u5b1BQ3V1S9NrXvbzmIpmGuWhxVGkUuO7J r+FZY+IM7JXjKyvkTlNCPP5dTvXnFvZJ/Pc7VFTErsBL8RpwpuF35LgFkkoUtmYo 3FHoR/jELHQXphPu9DDWgPylVatviVpAbOqwJMTFYRtKtWuNXQx9c7xBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=gPNQGv3/dinpMM8xTnmfzsuteoYEzZtE8Ylz1KCH3jo=; b=M4w9915S TyhRLIBNOtZlMRIvrEnqYoxWP76H6QuzFIXWKYPrw5BiGqu9MD/W31uBk4+weiv/ kNKV/c97Bx4ulz4K8fcb7kPHzTdAT39hH1255qK28RfbS8IDcttt6aK0zzEBpZSO AGEd/vHK5X9IZY7qehxtbKSbcU3yGuMWi3nwvM8Exn3w3VK2cX794vJl6RsLsxT8 87qdcXjoB/PgYSB7hqa7egfsHaWGeRnNLPI1f7JNc8r2CFEeeRTH4b43CZS4lxQI HojHc3hMVRP3XQEhJnbUFy1qff5vD8XCjaG8Uis1bS55jKlz/Nz805yHdGjN80yo OaOMM2l79vrr3w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtjedguddtiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedt gfeutdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 7DD49306005B; Thu, 5 Nov 2020 12:51:44 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: ferruh.yigit@intel.com, david.marchand@redhat.com, olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru, lance.richardson@broadcom.com, maxime.coquelin@redhat.com, stable@dpdk.org, Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Steve Yang Date: Thu, 5 Nov 2020 18:44:24 +0100 Message-Id: <20201105174424.4131345-1-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <4da07e46-cf17-57ac-c38d-aa82aacc895e@intel.com> References: <4da07e46-cf17-57ac-c38d-aa82aacc895e@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/1] app/testpmd: revert max Rx packet length adjustment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" The fix of max_rx_pkt_len for allowing VLAN packets in all cases was breaking configuration of some drivers. Example with virtio: Ethdev port_id=0 max_rx_pkt_len 11229 > max valid value 9728 Fail to configure port 0 Trying to fix the logic was revealing other issues in some drivers. That's why it is decided to revert. The workaround for the original issue would be to set the MTU explicitly from the application with rte_eth_dev_set_mtu(). Fixes: f6870a7ed6b3 ("app/testpmd: fix max Rx packet length for VLAN packet") Cc: stable@dpdk.org Reported-by: Andrew Rybchenko Signed-off-by: Thomas Monjalon --- app/test-pmd/testpmd.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index c263121a9a..33fc0fddf5 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1421,7 +1421,6 @@ init_config(void) struct rte_gro_param gro_param; uint32_t gso_types; uint16_t data_size; - uint16_t overhead_len; bool warning = 0; int k; int ret; @@ -1458,28 +1457,6 @@ init_config(void) rte_exit(EXIT_FAILURE, "rte_eth_dev_info_get() failed\n"); - /* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */ - if (port->dev_info.max_rx_pktlen && port->dev_info.max_mtu) - overhead_len = port->dev_info.max_rx_pktlen - - port->dev_info.max_mtu; - else - overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN; - - port->dev_conf.rxmode.max_rx_pkt_len = - RTE_ETHER_MTU + overhead_len; - - /* - * This is workaround to avoid resize max rx packet len. - * Ethdev assumes jumbo frame size must be greater than - * RTE_ETHER_MAX_LEN, and will resize 'max_rx_pkt_len' to - * default value when it is greater than RTE_ETHER_MAX_LEN - * for normal frame. - */ - if (port->dev_conf.rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN) { - port->dev_conf.rxmode.offloads |= - DEV_RX_OFFLOAD_JUMBO_FRAME; - } - if (!(port->dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)) port->dev_conf.txmode.offloads &= -- 2.28.0