Page MenuHomeFreeBSD

ofed: reduce usage of struct dma_attrs *dma_attrs
ClosedPublic

Authored by bz on Thu, Feb 19, 11:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Feb 25, 12:32 AM
Unknown Object (File)
Wed, Feb 25, 12:32 AM
Unknown Object (File)
Tue, Feb 24, 12:12 PM
Unknown Object (File)
Tue, Feb 24, 12:12 PM
Unknown Object (File)
Tue, Feb 24, 12:12 PM
Unknown Object (File)
Tue, Feb 24, 10:20 AM
Unknown Object (File)
Mon, Feb 23, 9:54 PM
Unknown Object (File)
Mon, Feb 23, 9:54 PM
Subscribers

Details

Summary

ib_verbs.h still uses struct dma_attrs *dma_attrs everywhere.
It is beyond my knowledge when that struct got deprecated upstream but
it is still supported by our LinuxKPI. The problem is that the
functions called with that argument (dma_map_single_attrs,
dma_unmap_single_attrs, dma_map_sg_attrs, dma_unmap_sg_attrs) so far
are #defines in LinuxKPI and drop the last argument (attrs) so it was
never a problem.

In preparation to pass the attrs to the actual implementation in LinuxKPI,
which has gained support for them, we now pass dma_sttrs->flags which
is the expected unsigned long bit field.

If anyone has serious interest in updating our ofed implementation they
could look into this some more and remove the usage of struct dma_attrs
entirely.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Test Plan

Who or what is actively using our in-tree ofed stack?

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 70808
Build 67691: arc lint + arc unit

Event Timeline

bz requested review of this revision.Thu, Feb 19, 11:38 PM

The would it be the time to also change the macros itself to not pass 0 but the last arg?
(I do not have objections to either this patch or updated patch).

In D55390#1267013, @kib wrote:

The would it be the time to also change the macros itself to not pass 0 but the last arg?
(I do not have objections to either this patch or updated patch).

The macro updates are in the stack in the next review (D55391)

This revision is now accepted and ready to land.Fri, Feb 20, 4:13 PM