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 E27A14551D; Fri, 28 Jun 2024 07:50:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B37D142DD5; Fri, 28 Jun 2024 07:50:50 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id F0C3741133 for ; Fri, 28 Jun 2024 07:48:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719553724; x=1751089724; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Y+6H/YvDsu/WIWUbZ191o77EV/4fH1G5BRnHMXI0urA=; b=dFTh54w5aITj+TKscO/GgCPV5QWmNNMXZjmsUeS8367z+aFZiCkm4gQe I0bwbw9GU117IEp5MmC3nZpGHwIdrQ9Y2gE8yVXPYpqF5SfOXQDj4A7kB WtgyAA81XLr58PKM3++GCebCgeTdC4U1UJRHAkr6RrvvYS9m2OcrWh62M 4VxxK98+wdg7jSqEKxC7SYRh/T8991tWW4gJ0nasdU2m2GmPiqV97pRu9 j3Hhrbk3B4m0Uegiy8Ul1YFx61WX2XCcKUNT+eCmnc7woELxBQz/n/pYa IVhxcNiSB2MusR40dxkApdl7NGwJfg9eUklLcUs4TYDSZiZ6ht+OmIHtR w==; X-CSE-ConnectionGUID: Hpx5Jne6S1ei/PnO4cuAjw== X-CSE-MsgGUID: iXTi1dPzTDeDGHAtF0giDQ== X-IronPort-AV: E=McAfee;i="6700,10204,11116"; a="12294689" X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="12294689" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2024 22:48:43 -0700 X-CSE-ConnectionGUID: CjjkGJGrQ96GFapu52LVeg== X-CSE-MsgGUID: J2CPQWK6T6egeh0kJTPXGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="49806245" Received: from unknown (HELO localhost.localdomain) ([10.239.252.55]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2024 22:48:41 -0700 From: Wenwu Ma To: dev@dpdk.org, bruce.richardson@intel.com Cc: songx.jiale@intel.com, Wenwu Ma Subject: [PATCH] dma/idxd: fix failure to configure a device instance for DSA Date: Fri, 28 Jun 2024 13:34:58 +0800 Message-Id: <20240628053458.78337-1-wenwux.ma@intel.com> X-Mailer: git-send-email 2.25.1 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 --- 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..9ca4c4d76c 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(SysfsDir(os.path.join(wq_dir.path, f"driver_name")).path): + 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