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 A38DEA0527 for ; Mon, 9 Nov 2020 19:45:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9B34C6883; Mon, 9 Nov 2020 19:45:42 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by dpdk.org (Postfix) with ESMTP id 67D526883 for ; Mon, 9 Nov 2020 19:45:41 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id p19so474393wmg.0 for ; Mon, 09 Nov 2020 10:45:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8wYSJh4vBDS31wNiOfhDalud8wH0jmXVNzUYznzbVQ4=; b=syqv1nUkUvC+ZKwjMNSviegY8CjvJn/yF4BWyBHgSZcLi5foXldYaBnm2mhBI91LNW R7/BNeqMDOL9lJt4gxAtlTUHsndLNMvKGq5CpMjJBFHeK8aJx+XDcBkH6Qyo03l/Xf/f 6N8ILBaJ9jNd1Tgwlw1tRUmvwsKB3p005EyuIjIecooDZOz3yP1SmFXLOAxXmwLwKgSX 2cqqhcuXfFC+0y5jS9q2nfI7XKXR5OOx9vj42Vjjt0XW1pYv/h8Imf0Wp1G4TZOHUEws YInyrRjOWk53dV1xAB/rgShxaGaOc1blwiEDQB+W4wgPtI4NXD7R/XwwHOaNlfmkWSYD 1HgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8wYSJh4vBDS31wNiOfhDalud8wH0jmXVNzUYznzbVQ4=; b=JhHFch1Tg+KfUf93GjTCM6Z++xNu6RuMT0LjSMn4un/JT+X/S0wCHW5nWXVLK5KPqC z4NWUx4fbVBJi74eyjyb5YECjwgczMNOmIikUsLudbDFTB3ntGXWv8outXGn3ur7r2zk 1reUMQTEu6y6YkEvywhY98+wMLy1inUMJWX+QEHuvhwpMx1+kFSSkyV7teslWcAbyJ0U WgfwrTIEHDmmK9VfR0dabCqTWK62WVBGkI/wbtWah9kB2vkViK0YsEWSvgxub3fpwQ1Q Pt+z2w9p4ex43dzSRNIxJ062TOocE3mSlYFRSVCHTJyyHoya3CzeTxgVwToCw7o/SbAO UT2g== X-Gm-Message-State: AOAM5330JBmW/jQoAEevCg6P+ZU0tamPMSLkBDB/NW4O0iu6kQXeuUxs lWTYrz/7Eu7PViQAWQWXgok= X-Google-Smtp-Source: ABdhPJyg+0v/VhibMsDE+FRcBLiff3u4zTf9enKyTlwSrAD4Yss0qXFGuuLSRKaHANeWhnxu59PzXg== X-Received: by 2002:a1c:a98c:: with SMTP id s134mr546668wme.159.1604947540197; Mon, 09 Nov 2020 10:45:40 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id f4sm14739669wrq.54.2020.11.09.10.45.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 10:45:39 -0800 (PST) From: luca.boccassi@gmail.com To: Steve Yang Cc: Ferruh Yigit , dpdk stable Date: Mon, 9 Nov 2020 18:41:04 +0000 Message-Id: <20201109184111.3463090-76-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201109184111.3463090-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-207-luca.boccassi@gmail.com> <20201109184111.3463090-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packet' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/11/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/28c5e8536cf640da738de6bcf388e4f4825eb53e Thanks. Luca Boccassi --- >From 28c5e8536cf640da738de6bcf388e4f4825eb53e Mon Sep 17 00:00:00 2001 From: Steve Yang Date: Mon, 2 Nov 2020 08:52:33 +0000 Subject: [PATCH] app/testpmd: fix max Rx packet length for VLAN packet [ upstream commit f6870a7ed6b3fde94fb936256515bfc53bdc5015 ] When the max Rx packet length is smaller than the sum of MTU size and ether overhead size, it should be enlarged, otherwise the VLAN packets will be dropped. Fixes: 35b2d13fd6fd ("net: add rte prefix to ether defines") Signed-off-by: Steve Yang Reviewed-by: Ferruh Yigit --- app/test-pmd/testpmd.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 7f59cb02d1..cb4c365cb1 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1301,6 +1301,7 @@ 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; @@ -1337,6 +1338,28 @@ 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.27.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-09 18:40:13.994081892 +0000 +++ 0076-app-testpmd-fix-max-Rx-packet-length-for-VLAN-packet.patch 2020-11-09 18:40:11.227312776 +0000 @@ -1 +1 @@ -From f6870a7ed6b3fde94fb936256515bfc53bdc5015 Mon Sep 17 00:00:00 2001 +From 28c5e8536cf640da738de6bcf388e4f4825eb53e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f6870a7ed6b3fde94fb936256515bfc53bdc5015 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 33fc0fddf5..c263121a9a 100644 +index 7f59cb02d1..cb4c365cb1 100644 @@ -23 +24 @@ -@@ -1421,6 +1421,7 @@ init_config(void) +@@ -1301,6 +1301,7 @@ init_config(void) @@ -31 +32 @@ -@@ -1457,6 +1458,28 @@ init_config(void) +@@ -1337,6 +1338,28 @@ init_config(void)