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 39A50A0548; Wed, 16 Jun 2021 18:49:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28D4A40683; Wed, 16 Jun 2021 18:49:36 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130084.outbound.protection.outlook.com [40.107.13.84]) by mails.dpdk.org (Postfix) with ESMTP id 386A94067A for ; Wed, 16 Jun 2021 18:49:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pYmVgKXYAw34/VaOYLd8H59BsACDAzzbeu+AnbDcNtg=; b=hWMzTSHoqvMCQeo5cGczV2w84yBNS07FAKwDQhksPRnddxhhkBYHToAGcw6hFlpMuPqvc1WEjzUVFHHTZ0/JMdANDsdf1d64VuJxPqUFfivwkZOb2oDm0K+c2gLJfpwWHkU9kBwxwnej+VKeR+cy4Z355NHtErt52OBYZJWtuNs= Received: from AM6P191CA0030.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8b::43) by PAXPR08MB6986.eurprd08.prod.outlook.com (2603:10a6:102:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Wed, 16 Jun 2021 16:49:22 +0000 Received: from AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8b:cafe::b5) by AM6P191CA0030.outlook.office365.com (2603:10a6:209:8b::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Wed, 16 Jun 2021 16:49:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT053.mail.protection.outlook.com (10.152.16.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Wed, 16 Jun 2021 16:49:21 +0000 Received: ("Tessian outbound 9d3d496fabe8:v93"); Wed, 16 Jun 2021 16:49:21 +0000 X-CR-MTA-TID: 64aa7808 Received: from b1d12dd07581.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4A287F58-D51E-4516-8358-5D5338408205.1; Wed, 16 Jun 2021 16:49:11 +0000 Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b1d12dd07581.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 16 Jun 2021 16:49:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lrzXrCTIauLeIqkJosI+e2YyiWSvMusprItGje+HyG5n8zCelLVMPwHHfUYqM/IXc3+pANp1YBr+UjuzedPwbstrgbMWUt9fxvIg4A79TnUMAEODTkwFqwvcHifa4DZ2dbkMynfd39JLhj7Jk/Q+5G3Lts+NQleT0GJ9M2+sNOQK2ujBeRxxV0YC4Q5N1+ibyCkdaVG69Pf9F7TlsQdyTpdYgSYEIArU+Qsn3o8aANnKz3/VD80J4/f0FdBhh4ibM6d5DFmf0uqU5aF4FpOYbkgLxJDL6znM0gN4nWV8525SFAwNx6lG2fiJiCTKxJ6RogQ6xJ6tk7SddjTKTI0COg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pYmVgKXYAw34/VaOYLd8H59BsACDAzzbeu+AnbDcNtg=; b=SSLhZaTl+DaWtkeqk6MMPOng8NOL7hq42PO/h11D0Rb/6wqiUIFaENQq0Tv43KoFOt0HZXMi1kA/o+Lbh06bN+JNk2Qx56LoMMdBsBmd8Lh0TlwoDi3WJiLyxdLWU6/Z7xk2EB//1ha9AxVaESwd5RoWHKiv2ow0l3cyc88NKafqiiDewFV/aDCkZc1ZTRlzTfk98iHBnGmQ3tF3nJ5ihh2yHnT9JjJarrPa7z/XcosMVtpwfSSvIYx1uGC+3q/ycb6VL+IuBAizeMqVYHxOYOXD6EKs8xO5k7BveL3pTDDu4uPhPcmnZzgbzW90CD9BOo0GE9LMXb6M5Yr1/OtlBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pYmVgKXYAw34/VaOYLd8H59BsACDAzzbeu+AnbDcNtg=; b=hWMzTSHoqvMCQeo5cGczV2w84yBNS07FAKwDQhksPRnddxhhkBYHToAGcw6hFlpMuPqvc1WEjzUVFHHTZ0/JMdANDsdf1d64VuJxPqUFfivwkZOb2oDm0K+c2gLJfpwWHkU9kBwxwnej+VKeR+cy4Z355NHtErt52OBYZJWtuNs= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB8PR08MB4123.eurprd08.prod.outlook.com (2603:10a6:10:b2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Wed, 16 Jun 2021 16:48:59 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::f15f:821c:74c5:2482]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::f15f:821c:74c5:2482%2]) with mapi id 15.20.4242.019; Wed, 16 Jun 2021 16:48:59 +0000 From: Honnappa Nagarahalli To: Bruce Richardson , David Marchand CC: Chengwen Feng , "thomas@monjalon.net" , "Yigit, Ferruh" , dev , "Nipun.gupta@nxp.com" , "hemant.agrawal@nxp.com" , Maxime Coquelin , "jerinj@marvell.com" , Jerin Jacob , nd , Honnappa Nagarahalli , nd Thread-Topic: [RFC PATCH] dmadev: introduce DMA device library Thread-Index: AQHXYqk2uZg8UIwvgU6K9sUIarwvfqsWnPIAgAA8VmA= Date: Wed, 16 Jun 2021 16:48:59 +0000 Message-ID: References: <1623763327-30987-1-git-send-email-fengchengwen@huawei.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 7CAD5548460E804EB41840C6F654F17C.0 x-checkrecipientchecked: true Authentication-Results-Original: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [70.113.13.105] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: d780e62d-8711-4937-c656-08d930e6b0f2 x-ms-traffictypediagnostic: DB8PR08MB4123:|PAXPR08MB6986: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Dm2nGi0RQG4Y4mux30XS4DpMTZCH75SObjhVLCzt9dhynSOxQtHh0kh8dktnI4XqZNWOsUTKsXGxadP5YjVZPVyaFRNnDqWmoJxzE816lccPYJ16YToLs7FQ7ZzAEfc9D7F0qpuoYhS8o2yugljrmGKdGBy2BdjjxZgEASDv4bEEN8drFsQ8bdrHB08Meq+bZ7VN2nBbBz4biWE8NRWd4qeFam4ICW+Y25rIv86+bETgJOtljWyoUVgkRD3bBCtbHCfMhNIJsSQH9GI9c1um2q5ZCRcxdz6L4Vvj0C6N9BjWHoBVrnQxyAkA4pdVZchpF+qorlx6NkZJKwhi6vpVOI5HExtOpyNwELxT+kyd0kvTXafuZ6/AVke1ik46rFU8IRwQR3Z57Rd7aY94bj7qVPXdgs92SmTYvTPRMfU8J61LXt8xgOmQiul5e/vrK5qM1Aqtu/HS8FNPB9MXeJ9hVKPAJDq4XjNUWq26jqEK8yLjLKNootlZXjWaNyEoTazm8kvuQStdKH7zhwV7U+AD43frBaJd/JAMjwK3FwMlBZKUoUc80iIyVbsAHENmIHYdwJ2NCRtvQmIFczrBMLf7IynDkxU0tZZpCGxfcf1UIXo= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(366004)(396003)(39860400002)(376002)(71200400001)(7696005)(38100700002)(4326008)(2906002)(55016002)(9686003)(5660300002)(52536014)(8936002)(110136005)(478600001)(54906003)(316002)(86362001)(26005)(33656002)(122000001)(83380400001)(66946007)(66476007)(66556008)(7416002)(8676002)(6506007)(53546011)(186003)(64756008)(66446008)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TLwPOdEgkP3igGaORQ4hwSOCIJzDLYTOfNSkt5sxWxRHURRKGZl4L1UtJLU2?= =?us-ascii?Q?wsr/tcDk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UxUXxcqYqS59NGO2s?= =?us-ascii?Q?w28kHrYIfE3nnlMhYx4fzE/naApcRah98j4eCWr00Dd7kVYIeKF2vwfZNUNu?= =?us-ascii?Q?/4vfkK2j0tP9zzupPfnNJBp27psA1urOXAoDJWHuKObt8+DT8HMMWn0La+ny?= =?us-ascii?Q?/3BUeEmZ6F2we1TuFWILbdYNHBbnmWJ2/Beldu/mTS2bgKndaH3Iewi04pHn?= =?us-ascii?Q?HpzQHkRGsdCB3fR0Irp2SaD2uDmjsLIad9zRBZa8igdOe9B/+5Rc10APCsfG?= =?us-ascii?Q?tSBMQMiy2o7mp5QrA8m/Oabwv6LGf4nWc5sCwQHUBAnuXu7Hy04dTQt8fNJp?= =?us-ascii?Q?XO+wFjGSNvfwzuzdyj294KdWZCXRPSGLSzjThS0PH9aH/d9EHVi7KcEvTu5P?= =?us-ascii?Q?teSCk/z5VdTjbO1qhF8ySWiC?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4123 Original-Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 92df4782-36ba-4193-83a5-08d930e6a3be X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A/6sVTIjyw380vyeGeMvA47dJFWK85QThj31SDgzO5Sfe8et7jdAIdF+m0kf1Gg4iU1PMOwDMqgpGAKu34xYL5T1aLt7HSy/7QZS+IimjAFrQ2JUXyQDPNP1gteNfLoOhR0dpnf2XKfuUQbaqsiSLFN5UEjG8z1dIYPudETGO//lL8XKR72JqBWntCcpVrts6he729BXbkmAUrnp+TOn0pus5dohJHVHEMIorF5xx3nxNTMQUrzvKL0AthHxQ2o6kTXvQCOPm5Atjhlu4VnqvjlU47FMkt57OBWeuFAzlOOCZaO2f87aasXLNKWEVua6yzf57hZCVTet9HFRmevMEIwnIPtcf3LkvF8CPHAZfDQkLXmTrFrNIRfWWlYKeEWkf6kGM20APJfgiNs3wuAhsdcG/BK/NH7FPQ0M4/zCks1mcAXoVovi5BmlFkN1KUeahjRYfpPL3yzYcP1PTtHHV+w2Zz0f//yKb7oT9rQj6CeYHjh+8vwNfpbFCZ15Ack7obgzzCCB94IdNO8eOv9o46w4gnZJ5OTexDOmuxx59miBD5QUTkQbp4SgsSBKtM/c37FJ3wd/Lvh+iu5otC2V6MHoZXh7Ks9xtICd9NI/S7HyDtpv/WxsD0pLUO1etZa2rYar8+hNQ6XS2/urAM0DVA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(376002)(39860400002)(46966006)(36840700001)(55016002)(82310400003)(8936002)(336012)(8676002)(2906002)(83380400001)(5660300002)(36860700001)(316002)(33656002)(70586007)(478600001)(9686003)(52536014)(82740400003)(4326008)(47076005)(81166007)(110136005)(356005)(70206006)(6506007)(26005)(54906003)(186003)(86362001)(53546011)(7696005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2021 16:49:21.8397 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d780e62d-8711-4937-c656-08d930e6b0f2 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6986 Subject: Re: [dpdk-dev] [RFC PATCH] dmadev: introduce DMA device library 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 Sender: "dev" >=20 > On Wed, Jun 16, 2021 at 02:14:54PM +0200, David Marchand wrote: > > On Tue, Jun 15, 2021 at 3:25 PM Chengwen Feng > wrote: > > > + > > > +#define RTE_DMADEV_NAME_MAX_LEN (64) > > > +/**< @internal Max length of name of DMA PMD */ > > > + > > > +/** @internal > > > + * The data structure associated with each DMA device. > > > + */ > > > +struct rte_dmadev { > > > + /**< Device ID for this instance */ > > > + uint16_t dev_id; > > > + /**< Functions exported by PMD */ > > > + const struct rte_dmadev_ops *dev_ops; > > > + /**< Device info. supplied during device initialization */ > > > + struct rte_device *device; > > > + /**< Driver info. supplied by probing */ > > > + const char *driver_name; > > > + > > > + /**< Device name */ > > > + char name[RTE_DMADEV_NAME_MAX_LEN]; } __rte_cache_aligned; > > > + > > > > I see no queue/channel notion. > > How does a rte_dmadev object relate to a physical hw engine? > > > One queue, one device. > When looking to update the ioat driver for 20.11 release when I added the > idxd part, I considered adding a queue parameter to the API to look like = one > device with multiple queues. However, since each queue acts completely > independently of each other, there was no benefit to doing so. It's just = easier > to have a single id to identify a device queue. Does it mean, the queue is multi thread safe? Do we need queues per core to= avoid locking?