DPDK patches and discussions
 help / color / mirror / Atom feed
From: Vamsi Krishna Attunuru <vattunuru@marvell.com>
To: fengchengwen <fengchengwen@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>
Subject: RE: [EXTERNAL] Re: [PATCH v0 1/1] dmadev: add domain_id field to access group join API
Date: Tue, 4 Nov 2025 04:02:15 +0000	[thread overview]
Message-ID: <SJ4PPFEA6F74CA2F6F2A54AB50CF7C80DCBA6C4A@SJ4PPFEA6F74CA2.namprd18.prod.outlook.com> (raw)
In-Reply-To: <90a817be-147c-47e1-a570-194c8c96fc53@huawei.com>



>ZjQcmQRYFpfptBannerEnd
>On 11/3/2025 6:29 PM, Vamsi Krishna wrote:
>> From: Vamsi Attunuru <vattunuru@marvell.com>
>>
>> Add domain_id field to access group join API, which is required to
>> retrieve handler information associated with the specified domain.
>> This enhancement ensures that domain-specific context is available
>> during group join operations, improving flexibility and traceability
>> in multi-domain environments.
>>
>> It also aligns the parameters of access group create and join APIs for
>> consistency and clarity.
>>
>> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
>> ---
>>  lib/dmadev/rte_dmadev.c       |  6 +++---
>>  lib/dmadev/rte_dmadev.h       | 10 ++++++----
>>  lib/dmadev/rte_dmadev_pmd.h   |  4 ++--
>>  lib/dmadev/rte_dmadev_trace.h |  6 ++++--
>>  4 files changed, 15 insertions(+), 11 deletions(-)
>>
>> diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c index
>> c008e829db..b75b4f9bd1 100644
>> --- a/lib/dmadev/rte_dmadev.c
>> +++ b/lib/dmadev/rte_dmadev.c
>> @@ -875,8 +875,8 @@ rte_dma_access_pair_group_destroy(int16_t
>dev_id,
>> int16_t group_id)
>>
>>  RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_dma_access_pair_group_join,
>25.11)
>> int -rte_dma_access_pair_group_join(int16_t dev_id, int16_t group_id,
>> rte_uuid_t token,
>> -			       rte_dma_access_pair_group_event_cb_t cb)
>> +rte_dma_access_pair_group_join(int16_t dev_id, rte_uuid_t domain_id,
>rte_uuid_t token,
>> +			       int16_t group_id,
>rte_dma_access_pair_group_event_cb_t cb)
>>  {
>>  	struct rte_dma_info dev_info;
>>  	struct rte_dma_dev *dev;
>> @@ -899,7 +899,7 @@ rte_dma_access_pair_group_join(int16_t dev_id,
>> int16_t group_id, rte_uuid_t toke
>>
>>  	if (*dev->dev_ops->access_pair_group_join == NULL)
>>  		return -ENOTSUP;
>> -	return (*dev->dev_ops->access_pair_group_join)(dev, group_id,
>token, cb);
>> +	return (*dev->dev_ops->access_pair_group_join)(dev, domain_id,
>> +token, group_id, cb);
>>  }
>>
>>
>RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_dma_access_pair_group_leave,
>> 25.11) diff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h
>> index 0f4f10ec12..5287b0f32d 100644
>> --- a/lib/dmadev/rte_dmadev.h
>> +++ b/lib/dmadev/rte_dmadev.h
>> @@ -912,10 +912,12 @@ int rte_dma_access_pair_group_destroy(int16_t
>dev_id, int16_t group_id);
>>   *
>>   * @param dev_id
>>   *   Identifier of the DMA device attempting to join the group.
>> - * @param group_id
>> - *   ID of the access group to join.
>> + * @param domain_id
>> + *   Unique identifier representing the process or OS domain.
>
>This domain_id should be local process or OS domain, so how bout: Unique
>identifier representing my process or OS domain.
>
>And please change the rte_dma_access_pair_group_create 's comment
>about the domain_id.
>
Ack, will update both the comments.

>>   * @param token
>>   *   Authentication token used to validate group membership.
>> + * @param group_id
>> + *   ID of the access group to join.
>>   * @param cb
>>   *   Callback function to be invoked when the device leaves the group
>>   *   or when the group is destroyed due to some exception or failure.
>> @@ -925,8 +927,8 @@ int rte_dma_access_pair_group_destroy(int16_t
>dev_id, int16_t group_id);
>>   *   negative value on failure indicating the error code.
>>   */
>>  __rte_experimental
>> -int rte_dma_access_pair_group_join(int16_t dev_id, int16_t group_id,
>rte_uuid_t token,
>> -				   rte_dma_access_pair_group_event_cb_t
>cb);
>> +int rte_dma_access_pair_group_join(int16_t dev_id, rte_uuid_t
>domain_id, rte_uuid_t token,
>> +				   int16_t group_id,
>rte_dma_access_pair_group_event_cb_t cb);
>>
>>  /**
>>   * Leave an access group, removing the device's entry from the group
>> table diff --git a/lib/dmadev/rte_dmadev_pmd.h
>> b/lib/dmadev/rte_dmadev_pmd.h index 16fd625c2d..8a6b0a9c98 100644
>> --- a/lib/dmadev/rte_dmadev_pmd.h
>> +++ b/lib/dmadev/rte_dmadev_pmd.h
>> @@ -75,8 +75,8 @@ typedef int
>(*rte_dma_access_pair_group_destroy_t)(const struct rte_dma_dev *dev
>>  						   int16_t group_id);
>>
>>  /** @internal Used to join an access pair group for inter-process or
>> inter-OS DMA transfers. */ -typedef int
>(*rte_dma_access_pair_group_join_t)(const struct rte_dma_dev *dev,
>int16_t group_id,
>> -						rte_uuid_t token,
>> +typedef int (*rte_dma_access_pair_group_join_t)(const struct
>rte_dma_dev *dev, rte_uuid_t domain_id,
>> +						rte_uuid_t token, int16_t
>group_id,
>>
>	rte_dma_access_pair_group_event_cb_t cb);
>>
>>  /** @internal Used to leave an access pair group, removing the device
>> from the group. */ diff --git a/lib/dmadev/rte_dmadev_trace.h
>> b/lib/dmadev/rte_dmadev_trace.h index da80a8cb50..7ad00b5bfa 100644
>> --- a/lib/dmadev/rte_dmadev_trace.h
>> +++ b/lib/dmadev/rte_dmadev_trace.h
>> @@ -120,10 +120,12 @@ RTE_TRACE_POINT(
>>
>>  RTE_TRACE_POINT(
>>  	rte_dma_trace_access_pair_group_join,
>> -	RTE_TRACE_POINT_ARGS(int16_t dev_id, int16_t group_id,
>rte_uuid_t token),
>> +	RTE_TRACE_POINT_ARGS(int16_t dev_id, rte_uuid_t domain_id,
>rte_uuid_t token,
>> +			     int16_t group_id),
>>  	rte_trace_point_emit_i16(dev_id);
>> -	rte_trace_point_emit_i16(group_id);
>> +	rte_trace_point_emit_u8_ptr(&domain_id[0]);
>>  	rte_trace_point_emit_u8_ptr(&token[0]);
>> +	rte_trace_point_emit_i16(group_id);
>>  )
>
>There are one detail missing:
>1. every process could generate one unique domain_id 2. process A create
>the access group, and share it's domain_id, the access group token, group_id
>to process B 3. process B join the access group, which verify by token and
>group id obtained in step 2 4. both process use
>rte_dma_access_pair_group_handler_get() API to get each other's domain.
>   This is the detail missing: how process A know the process B's domain_id???
>---by extra communication channel???
>
>Please add such detail on dmadev.rst

ack, will add more details in v2.
>
>Thanks
>>
>>  RTE_TRACE_POINT(


  reply	other threads:[~2025-11-04  4:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03 10:29 Vamsi Krishna
2025-11-04  0:45 ` fengchengwen
2025-11-04  4:02   ` Vamsi Krishna Attunuru [this message]
2025-11-04  5:21 ` [PATCH v2 " Vamsi Krishna
2025-11-04  6:05   ` fengchengwen
2025-11-04 11:53     ` [EXTERNAL] " Vamsi Krishna Attunuru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ4PPFEA6F74CA2F6F2A54AB50CF7C80DCBA6C4A@SJ4PPFEA6F74CA2.namprd18.prod.outlook.com \
    --to=vattunuru@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).