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 D549A43BE5; Mon, 26 Feb 2024 09:30:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C1FE1402BF; Mon, 26 Feb 2024 09:30:26 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mails.dpdk.org (Postfix) with ESMTP id 9D5F440144 for ; Mon, 26 Feb 2024 09:30:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708936226; x=1740472226; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5CGHz8GSZQCpmhQGSAs9XGY4+RxcoC+WJswuMH9KDJE=; b=XKLYejpsfAhP9auv6rMnjxXXPQ8Xm8l1tb6Wh+qRFfEfRJ8eW+nS4hms oU+OFipLQc8ZJr+8sMZY78nKjM4xgywpLGDD7ogFrEHgvFxLhh/VPJ0zP oGcYdZ6rkPIRc9zwvkhp6RBYlyeTSgsg8C4IqrcGGOs618OTglGCUmU9Z 1Gnw+RLMFmlYg3bW+b3f70NIHcfBEMkRf9fyx341b6vl1ek21pomXfAjn qDLnnzPILlAGQVqam32DCRCLPFMfH45XPNC0giDEvTVw8fy6TDyUVW6Yu iqtY9+Xohn6NVik2IH7HYkOey7j+cfhBYLOZjJblp7FhEY3HbubU9fXrt Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="3352874" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="3352874" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 00:30:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="6586572" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orviesa010.jf.intel.com with ESMTP; 26 Feb 2024 00:30:13 -0800 From: Ganapati Kundapura To: dev@dpdk.org, jerinj@marvell.com, jay.jayatheerthan@intel.com Cc: s.v.naga.harish.k@intel.com, abhinandan.gujjar@intel.com Subject: [PATCH v1] app/test: fix segfault in Tx adapter autotest Date: Mon, 26 Feb 2024 02:30:03 -0600 Message-Id: <20240226083003.317553-1-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 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 Uninitialized mbufs are enqueued to eventdev which causes segfault on freeing the mbuf in tx adapter. Fixed by initializing mbufs before enqueuing to eventdev. Fixes: 46cf97e4bbfa ("eventdev: add test for eth Tx adapter") Signed-off-by: Ganapati Kundapura diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c index dbd22f6..482b8e6 100644 --- a/app/test/test_event_eth_tx_adapter.c +++ b/app/test/test_event_eth_tx_adapter.c @@ -484,6 +484,10 @@ tx_adapter_service(void) int internal_port; uint32_t cap; + /* Initialize mbufs */ + for (i = 0; i < RING_SIZE; i++) + rte_pktmbuf_reset(&bufs[i]); + memset(&dev_conf, 0, sizeof(dev_conf)); err = rte_event_eth_tx_adapter_caps_get(TEST_DEV_ID, TEST_ETHDEV_ID, &cap); -- 2.6.4