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 86458423FE; Tue, 17 Jan 2023 17:51:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C64F942D54; Tue, 17 Jan 2023 17:50:32 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 8B89842D2D for ; Tue, 17 Jan 2023 17:50:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673974227; x=1705510227; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2nDS9VEK4C/Vca3wK1g46xCR7T/x2YtMpT77i1+zHBI=; b=DNmXAYwFyQFqE+QqaEbwzP7dk9N1zN21jCXL3wbAb0DvaFTrgz7O+LyY qpPLUtzg79lIjGs4R2qo4ML9ZgGlqbSCPie9ygUXcFvaAhHke6JJw2iAv 5S1tJRYz0hwavSJt9KiBR/lUmQyjoxjDpPysf9afS9BFaRaUrTEZdyPYJ s0l5vGoK/KXRCL9X3u7TdwICVZVRUQESpbkeExnJQdNlRtJpei2KrnEyo yMOM8C/jUyJdoSk4ft6rRgdmeOsYMyZp5tou+Y1PxakKkiWQeVDDt0d3Y RF+kt6qlV7k3c0o38zDtF6nDnEYYCh0+O6MfrEI1ncdU67ZMTeHym6iIb g==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="326022080" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="326022080" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2023 08:50:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="833235110" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="833235110" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orsmga005.jf.intel.com with ESMTP; 17 Jan 2023 08:50:26 -0800 From: Hernan Vargas To: dev@dpdk.org, maxime.coquelin@redhat.com, gakhil@marvell.com, trix@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v1 08/13] test/bbdev: extend support for large TB Date: Tue, 17 Jan 2023 08:50:18 -0800 Message-Id: <20230117165023.20567-9-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230117165023.20567-1-hernan.vargas@intel.com> References: <20230117165023.20567-1-hernan.vargas@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Add support for large TB when it cannot fit into a true mbuf. Signed-off-by: Hernan Vargas --- app/test-bbdev/test_bbdev_perf.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 69b86cdeb1..fdf7a28ba2 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -1072,8 +1072,6 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs, * Special case when DPDK mbuf cannot handle * the required input size */ - printf("Warning: Larger input size than DPDK mbuf %d\n", - seg->length); large_input = true; } bufs[i].data = m_head; @@ -2030,6 +2028,7 @@ validate_op_chain(struct rte_bbdev_op_data *op, struct rte_mbuf *m = op->data; uint8_t nb_dst_segments = orig_op->nb_segments; uint32_t total_data_size = 0; + bool ignore_mbuf = false; /* ignore mbuf limitations */ TEST_ASSERT(nb_dst_segments == m->nb_segs, "Number of segments differ in original (%u) and filled (%u) op", @@ -2042,21 +2041,25 @@ validate_op_chain(struct rte_bbdev_op_data *op, uint16_t data_len = rte_pktmbuf_data_len(m) - offset; total_data_size += orig_op->segments[i].length; - TEST_ASSERT(orig_op->segments[i].length == data_len, - "Length of segment differ in original (%u) and filled (%u) op", - orig_op->segments[i].length, data_len); + if (orig_op->segments[i].length > RTE_BBDEV_LDPC_E_MAX_MBUF) + ignore_mbuf = true; + if (!ignore_mbuf) + TEST_ASSERT(orig_op->segments[i].length == data_len, + "Length of segment differ in original (%u) and filled (%u) op", + orig_op->segments[i].length, data_len); TEST_ASSERT_BUFFERS_ARE_EQUAL(orig_op->segments[i].addr, rte_pktmbuf_mtod_offset(m, uint32_t *, offset), - data_len, + orig_op->segments[i].length, "Output buffers (CB=%u) are not equal", i); m = m->next; } /* Validate total mbuf pkt length */ uint32_t pkt_len = rte_pktmbuf_pkt_len(op->data) - op->offset; - TEST_ASSERT(total_data_size == pkt_len, - "Length of data differ in original (%u) and filled (%u) op", - total_data_size, pkt_len); + if (!ignore_mbuf) + TEST_ASSERT(total_data_size == pkt_len, + "Length of data differ in original (%u) and filled (%u) op", + total_data_size, pkt_len); return TEST_SUCCESS; } -- 2.37.1