Re: [PATCH v11 5/6] iommu/dma: Allow a single FQ in addition to per-CPU FQs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 2023-08-23 15:21, Niklas Schnelle wrote:
+struct dma_iommu_options {

Nit: if the intent is to add more flags then that will no longer make
sense, and if not then we may as well just have a bool ;)


My thinking was that the above two options are mutually exclusive with
per-CPU encoded as BIT(0) unset and single queue as set. Then other
options could still use the other bits. It's true though that the below
use of IOMMU_DMA_OPTS_PER_CPU_QUEUE is a nop so maybe just drop that?
Or we could use an enum even if I don't forsee more than these 2 queue

My point was that the value 0 can only mean "all flags not set", so while we can very much have the semantic of "single queue flag not set means percpu queue", we cannot infer "0 means percpu queue" unless "all flags" and "single queue flag" are the same thing. As soon as any additional flag is defined, 0 then has a different meaning which may well not even be a combination that's useful to put a specific name to.

I'd like to hope it's sufficiently obvious from the implementation that the opposite of a single queue is multiple queues, since contextually this is already all happening in distinct paths from the case of no queue.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux