Page MenuHomeFreeBSD

LinuxKPI: pass attrs in more places in dma-mapping.h
ClosedPublic

Authored by bz on Thu, Feb 19, 11:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 3, 7:44 AM
Unknown Object (File)
Tue, Mar 3, 6:29 AM
Unknown Object (File)
Sun, Mar 1, 4:24 AM
Unknown Object (File)
Sun, Mar 1, 4:06 AM
Unknown Object (File)
Fri, Feb 27, 10:06 PM
Unknown Object (File)
Fri, Feb 27, 9:46 PM
Unknown Object (File)
Tue, Feb 24, 9:45 AM
Unknown Object (File)
Mon, Feb 23, 2:23 PM
Subscribers

Details

Summary

Various macros (dma_map_sg_attrs, dma_unmap_sg_attrs,
dma_map_single_attrs, and dma_unmap_single_attrs) currently supress
passing on the attrs argument. Their implementation (even though at
times still marked the argument __unused; we remove that) have long
gained support for handling the argument.
With ofed fixed, pass the argument through so that other drivers
using these functions may hopefully work just a bit better as well.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Thu, Feb 19, 11:38 PM
bz added a subscriber: kib.

@kib this is the follow-up change in LinuxKPI to the ofed change.

IB core does pass the DMA_ATTR_WRITE_BARRIER. What is the semantic for the flag?

In D55391#1269820, @kib wrote:

IB core does pass the DMA_ATTR_WRITE_BARRIER. What is the semantic for the flag?

The flag no longer exists upstream and as before when the attrs were not passed through, it does now not do anything in LinuxKPI as there are no checks for it.

In D55391#1270472, @bz wrote:
In D55391#1269820, @kib wrote:

IB core does pass the DMA_ATTR_WRITE_BARRIER. What is the semantic for the flag?

The flag no longer exists upstream and as before when the attrs were not passed through, it does now not do anything in LinuxKPI as there are no checks for it.

If it no longer exists, then probably the functionality that utilizes it in IB core is somehow changed?

This revision is now accepted and ready to land.Thu, Feb 26, 12:58 AM
In D55391#1270473, @kib wrote:
In D55391#1270472, @bz wrote:
In D55391#1269820, @kib wrote:

IB core does pass the DMA_ATTR_WRITE_BARRIER. What is the semantic for the flag?

The flag no longer exists upstream and as before when the attrs were not passed through, it does now not do anything in LinuxKPI as there are no checks for it.

If it no longer exists, then probably the functionality that utilizes it in IB core is somehow changed?

Could be. That's a thing for @jhb see https://lists.freebsd.org/archives/dev-commits-src-all/2026-February/069331.html

As-for the status-quo: before the attrib was never fully passed anywhere. Now it's passed in but there's nothing to check for it. So the behaviour shouldn't change.