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 82A58A00C2 for ; Thu, 3 Nov 2022 10:33:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D65B4069B; Thu, 3 Nov 2022 10:33:17 +0100 (CET) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id 01ACC40693 for ; Thu, 3 Nov 2022 10:33:16 +0100 (CET) Received: by mail-wr1-f41.google.com with SMTP id k8so1767193wrh.1 for ; Thu, 03 Nov 2022 02:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qhPVwQAShJ5pVeMt8poiSwcY+7UDLiYsAyowFtx6Gkc=; b=RegIrXq+xu5giAH8q0uEGpmhqJ9dvq1l8F/CAauOsUieBAIEm3WJCBx7uhM0/tOCjO 5+etb5Cq4B9YZYFyec2DjNkrH0YYM59ZTDu0KdaylBTTwRuEcEDYSpLtPogAhBlqch7Q rdohS7EiyqxG5y/309KvRvjo4j6qrl2cYuOUKVBzVVeJAOrHi8pzazvP062N4Syu5nFT jMKELY9rNeUQsOWN7Se3URvLUSY0kRA53opkVEA+2ku4YjbeWzvnyTvC9CDHr5Weyi3x hfyMyEZRB8EKsMl2ARVAgmMmq4Jt0vd+lErjYDcYOYNhhRljk/IWqI7Jkx7qdno1vrKP zPXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qhPVwQAShJ5pVeMt8poiSwcY+7UDLiYsAyowFtx6Gkc=; b=qpCh0Ry/6h2SMAz/0Hr5Uo2zFJGHYmfVOoCyY2QWph6qn7XKTIC80uttZlPB2wZ5vK HK4hxvjuX5AjVFmsqqkpjCtBSGDbNReIvFqVB/vTf9HCdVclxCC/FMswcGmDoE3I/LM+ 9zPdAlC2C5iQ7LCbk3svogZ2Wp+txh+iTTvDQJGnJzApjkvovwCFJs2gB1OUFbKPBQFV ICYvBSllipmBC+vXnpl79LJum0Jw2xghIM7rXcUa+srzy4ePUYi28G9hZ6TrlcWNy/IX o+50Enu6fIgIopR0aEZ2/g4kzFuebpdBuOjk2gQPRr/DwUyLl0VNqKyXDuQDccYdnJaE TUUQ== X-Gm-Message-State: ACrzQf2uG2C+JntD92E56eJEMTA//4daPSOJ492qq1G6khAnOTH7UuLH 7h+ymOlyJFi4jTm2ltPW7Hw= X-Google-Smtp-Source: AMsMyM4QZP8+PaJNebOQGZ8WUlBbsU0cW6x0HeeMEcWebl7d7aUuKImGT6fZxaqA5N88L+9oVY7KsA== X-Received: by 2002:a05:6000:1a41:b0:22e:3667:d306 with SMTP id t1-20020a0560001a4100b0022e3667d306mr17904161wry.21.1667467995553; Thu, 03 Nov 2022 02:33:15 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id e10-20020a05600c13ca00b003b4868eb71bsm4412398wmg.25.2022.11.03.02.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:33:15 -0700 (PDT) From: luca.boccassi@gmail.com To: Rohit Raj Cc: Hemant Agrawal , dpdk stable Subject: patch 'net/dpaa: fix jumbo packet Rx in case of VSP' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:51 +0000 Message-Id: <20221103092758.1099402-93-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 20.11.7 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/05/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/280f5ddc781f915bd48c1b78d88b3f6eab2625a0 Thanks. Luca Boccassi --- >From 280f5ddc781f915bd48c1b78d88b3f6eab2625a0 Mon Sep 17 00:00:00 2001 From: Rohit Raj Date: Fri, 7 Oct 2022 08:57:37 +0530 Subject: [PATCH] net/dpaa: fix jumbo packet Rx in case of VSP [ upstream commit 65afdda04b071dd8d7f8d4171a0c0578932adcd7 ] For packet length of size more than 2K bytes, segmented packets were being received in DPDK even if mbuf size was greater than packet length. This is due to the configuration in VSP. This patch fixes the issue by configuring the VSP according to the mbuf size configured during mempool configuration. Fixes: e4abd4ff183c ("net/dpaa: support virtual storage profile") Signed-off-by: Rohit Raj Acked-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 5 ++--- drivers/net/dpaa/dpaa_flow.c | 13 ++++++------- drivers/net/dpaa/dpaa_flow.h | 5 +++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index a792c55b85..f2dac65ccc 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -995,8 +995,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, DPAA_PMD_WARN("The requested maximum Rx packet size (%u) is" " larger than a single mbuf (%u) and scattered" " mode has not been requested", - dev->data->dev_conf.rxmode.max_rx_pkt_len, - buffsz - RTE_PKTMBUF_HEADROOM); + dev->data->dev_conf.rxmode.max_rx_pkt_len, buffsz); } dpaa_intf->bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp); @@ -1011,7 +1010,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, if (vsp_id >= 0) { ret = dpaa_port_vsp_update(dpaa_intf, fmc_q, vsp_id, DPAA_MEMPOOL_TO_POOL_INFO(mp)->bpid, - fif); + fif, buffsz + RTE_PKTMBUF_HEADROOM); if (ret) { DPAA_PMD_ERR("dpaa_port_vsp_update failed"); return ret; diff --git a/drivers/net/dpaa/dpaa_flow.c b/drivers/net/dpaa/dpaa_flow.c index c5b5ec8695..d14303cc20 100644 --- a/drivers/net/dpaa/dpaa_flow.c +++ b/drivers/net/dpaa/dpaa_flow.c @@ -939,7 +939,7 @@ int dpaa_fm_term(void) static int dpaa_port_vsp_configure(struct dpaa_if *dpaa_intf, uint8_t vsp_id, t_handle fman_handle, - struct fman_if *fif) + struct fman_if *fif, u32 mbuf_data_room_size) { t_fm_vsp_params vsp_params; t_fm_buffer_prefix_content buf_prefix_cont; @@ -976,10 +976,8 @@ static int dpaa_port_vsp_configure(struct dpaa_if *dpaa_intf, return -1; } vsp_params.ext_buf_pools.num_of_pools_used = 1; - vsp_params.ext_buf_pools.ext_buf_pool[0].id = - dpaa_intf->vsp_bpid[vsp_id]; - vsp_params.ext_buf_pools.ext_buf_pool[0].size = - RTE_MBUF_DEFAULT_BUF_SIZE; + vsp_params.ext_buf_pools.ext_buf_pool[0].id = dpaa_intf->vsp_bpid[vsp_id]; + vsp_params.ext_buf_pools.ext_buf_pool[0].size = mbuf_data_room_size; dpaa_intf->vsp_handle[vsp_id] = fm_vsp_config(&vsp_params); if (!dpaa_intf->vsp_handle[vsp_id]) { @@ -1023,7 +1021,7 @@ static int dpaa_port_vsp_configure(struct dpaa_if *dpaa_intf, int dpaa_port_vsp_update(struct dpaa_if *dpaa_intf, bool fmc_mode, uint8_t vsp_id, uint32_t bpid, - struct fman_if *fif) + struct fman_if *fif, u32 mbuf_data_room_size) { int ret = 0; t_handle fman_handle; @@ -1054,7 +1052,8 @@ int dpaa_port_vsp_update(struct dpaa_if *dpaa_intf, dpaa_intf->vsp_bpid[vsp_id] = bpid; - return dpaa_port_vsp_configure(dpaa_intf, vsp_id, fman_handle, fif); + return dpaa_port_vsp_configure(dpaa_intf, vsp_id, fman_handle, fif, + mbuf_data_room_size); } int dpaa_port_vsp_cleanup(struct dpaa_if *dpaa_intf, struct fman_if *fif) diff --git a/drivers/net/dpaa/dpaa_flow.h b/drivers/net/dpaa/dpaa_flow.h index f5e131acfa..4742b8dd0a 100644 --- a/drivers/net/dpaa/dpaa_flow.h +++ b/drivers/net/dpaa/dpaa_flow.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2017,2019 NXP + * Copyright 2017,2019,2022 NXP */ #ifndef __DPAA_FLOW_H__ @@ -11,7 +11,8 @@ int dpaa_fm_config(struct rte_eth_dev *dev, uint64_t req_dist_set); int dpaa_fm_deconfig(struct dpaa_if *dpaa_intf, struct fman_if *fif); void dpaa_write_fm_config_to_file(void); int dpaa_port_vsp_update(struct dpaa_if *dpaa_intf, - bool fmc_mode, uint8_t vsp_id, uint32_t bpid, struct fman_if *fif); + bool fmc_mode, uint8_t vsp_id, uint32_t bpid, struct fman_if *fif, + u32 mbuf_data_room_size); int dpaa_port_vsp_cleanup(struct dpaa_if *dpaa_intf, struct fman_if *fif); int dpaa_port_fmc_init(struct fman_if *fif, uint32_t *fqids, int8_t *vspids, int max_nb_rxq); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.192909688 +0000 +++ 0093-net-dpaa-fix-jumbo-packet-Rx-in-case-of-VSP.patch 2022-11-03 09:27:25.561426079 +0000 @@ -1 +1 @@ -From 65afdda04b071dd8d7f8d4171a0c0578932adcd7 Mon Sep 17 00:00:00 2001 +From 280f5ddc781f915bd48c1b78d88b3f6eab2625a0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 65afdda04b071dd8d7f8d4171a0c0578932adcd7 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index c4aac424b4..3b4d6575c9 100644 +index a792c55b85..f2dac65ccc 100644 @@ -28,2 +29 @@ -@@ -989,8 +989,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, - } else { +@@ -995,8 +995,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, @@ -32,3 +32,4 @@ -- " mode has not been requested", -- max_rx_pktlen, buffsz - RTE_PKTMBUF_HEADROOM); -+ " mode has not been requested", max_rx_pktlen, buffsz); + " mode has not been requested", +- dev->data->dev_conf.rxmode.max_rx_pkt_len, +- buffsz - RTE_PKTMBUF_HEADROOM); ++ dev->data->dev_conf.rxmode.max_rx_pkt_len, buffsz); @@ -38 +39 @@ -@@ -1005,7 +1004,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, +@@ -1011,7 +1010,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, @@ -48 +49 @@ -index 1ccd036027..690ba6bcb3 100644 +index c5b5ec8695..d14303cc20 100644