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 CAE8945522; Fri, 28 Jun 2024 12:07:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67FBE42E61; Fri, 28 Jun 2024 12:07:57 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id C65284029E for ; Fri, 28 Jun 2024 12:07:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719569261; x=1751105261; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x13f3Sfhd+gnWH9dPHoSIJlefrgBdMWSHPkkUJExhDE=; b=D1CnHGriFIyHya7PmlVO26qzQZxAWo/aeSOTXknG+jkJWJT9a7rT+00R 1RdSuxRGRFgep8HYS0WFRmJOaBy5TPSgGgPJDRv8kjSIgfn2StUV993kT kN3rh8meA10oTCzpZWpox33p3gDGjhpkShogDvRBTnurxodURvH89ixNc 0r4+WZJHuYZrN8MY1DuYkanNyiG90/ErBfuBXTBb0WEIIHzWtwEY3bqlx 9Qi9kk41J7wNjei4510YQ4bsnZUzn+tfD1uK2P8zC+kDHMQCt+xcYvQkD xP54hfUO0Yws4R5+xIzpOU9sjbq4Gfr+QpyjrBaHq1RdAvFX1xbhLkONr Q==; X-CSE-ConnectionGUID: RUTET+ZOTTae+Y80xjxTnw== X-CSE-MsgGUID: ZBR6nQfwRJ6JZ/y1Pq2VEw== X-IronPort-AV: E=McAfee;i="6700,10204,11116"; a="34189871" X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="34189871" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2024 03:07:40 -0700 X-CSE-ConnectionGUID: GgueRNmqTJit5tbnrWF/3w== X-CSE-MsgGUID: TdMtDsUOTcix/RBHUaoHLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="44531526" Received: from unknown (HELO localhost.localdomain) ([10.239.252.55]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2024 03:07:38 -0700 From: Wenwu Ma To: dev@dpdk.org, bruce.richardson@intel.com Cc: songx.jiale@intel.com, Wenwu Ma Subject: [PATCH v2] dma/idxd: fix failure to configure a device instance for DSA Date: Fri, 28 Jun 2024 17:54:00 +0800 Message-Id: <20240628095400.126083-1-wenwux.ma@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240628053458.78337-1-wenwux.ma@intel.com> References: <20240628053458.78337-1-wenwux.ma@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 In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs, DPDK needs to write a correct value to this file when configuring a device instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be configured, this patch fixes the issue. Signed-off-by: Wenwu Ma --- v2: - refine the code --- drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py index c0c833ade9..5c9572b49d 100755 --- a/drivers/dma/idxd/dpdk_idxd_cfg.py +++ b/drivers/dma/idxd/dpdk_idxd_cfg.py @@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args): "priority": 1, "max_batch_size": 1024, "size": int(max_work_queues_size / nb_queues)} - wqcfg.update(parse_wq_opts(args.wq_option)) wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}")) + if os.path.exists(os.path.join(wq_dir.path, f"driver_name")): + wqcfg.update({"driver_name": "user"}) + wqcfg.update(parse_wq_opts(args.wq_option)) wq_dir.write_values(wqcfg) # enable device and then queues -- 2.25.1