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 319D7A0487 for ; Mon, 29 Jul 2019 14:37:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 381541BF2B; Mon, 29 Jul 2019 14:37:10 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 500C71BF11 for ; Mon, 29 Jul 2019 14:37:08 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE2 (envelope-from matan@mellanox.com) with ESMTPS (AES256-SHA encrypted); 29 Jul 2019 15:37:07 +0300 Received: from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x6TCb7Vk009212; Mon, 29 Jul 2019 15:37:07 +0300 From: Matan Azrad To: Wenzhuo Lu , Jingjing Wu Cc: dev@dpdk.org, stable@dpdk.org Date: Mon, 29 Jul 2019 12:36:56 +0000 Message-Id: <1564403817-13438-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH 1/2] app/testpmd: fix scatter offload configuration 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" When the mbuf data size cannot contain the maximum Rx packet length with the mbuf headroom, a packet should be scattered in more than one mbuf. The application did not configure scatter offload in the above case. Enable the Rx scatter offload in the above case. Fixes: 33f9630fc23d ("app/testpmd: create mbuf based on max supported segments") Cc: stable@dpdk.org Signed-off-by: Matan Azrad --- app/test-pmd/testpmd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 518865a..4ae70ef 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1191,6 +1191,17 @@ struct extmem_param { warning = 1; } } + if (rx_mode.max_rx_pkt_len + RTE_PKTMBUF_HEADROOM > + mbuf_data_size) { + if (port->dev_info.rx_queue_offload_capa & + DEV_RX_OFFLOAD_SCATTER) + port->dev_conf.rxmode.offloads |= + DEV_RX_OFFLOAD_SCATTER; + else + TESTPMD_LOG(WARNING, "Configure scatter is" + " needed and cannot be configured" + " in the port %u\n", pid); + } } if (warning) -- 1.8.3.1