>-----Original Message----- >From: Thomas Monjalon <[email protected]> >Sent: Sunday, October 19, 2025 2:30 PM >To: Vamsi Krishna Attunuru <[email protected]> >Cc: [email protected]; [email protected]; >[email protected]; [email protected]; >[email protected]; Jerin Jacob <[email protected]> >Subject: Re: [EXTERNAL] Re: [PATCH v4 1/1] lib/dma: add control-plane APIs >for inter-domain DMA transfers > >19/10/2025 10: 37, Vamsi Krishna Attunuru: > >I'm not sure about having >different API functions for leave and destroy. > >I think the last leaving >should >automatically call the destroy driver function. > > Thanks Thomas. The >ZjQcmQRYFpfptBannerStart Prioritize security for external emails: >Confirm sender and content safety before clicking links or opening >attachments <https://us-phishalarm- >ewt.proofpoint.com/EWT/v1/CRVmXkqW!s03ZFT5UghT6F8_WM_IWhawo- >0NYFJvmsVQvTa22RvWnmOc9sjgGsrPAVXpUWyxya37jLw$> >Report Suspicious > >ZjQcmQRYFpfptBannerEnd >19/10/2025 10:37, Vamsi Krishna Attunuru: >> >I'm not sure about having different API functions for leave and destroy. >> >I think the last leaving should automatically call the destroy driver >> >function. >> >> Thanks Thomas. The leave and destroy operations are invoked from >different contexts. >> Group joiners call leave to exit the group, whereas group creator >> calls destroy to terminate the group after all members have left. > >I understand that, but why having a different function? >You could destroy automatically when all have left. >
Yes, but I think the group creator & joiner's contexts and their lifecycles may not be tightly coupled here. If the creator intends to maintain the group for future joiners or delayed cleanup, it might lead to premature termination. With destroy API, group creator will have explicit control over group termination, and not inferred from usage.

