As far as I can tell from reading the Verbs spec the raison d'êtrefor protection domains is to allow associating MRs with different address spaces in userspace programs.
The PD number is enforced when accessing the associated MRs (via the associated QPs). So if someone is accessing a MR that is associated with a PD via a queue-pair that is not it will fail (its a security thing).
Is there any good reason to have each kernel driver create it's own PDs instead of simply creating one per device and sticking it into the ib_device structure?
There is a theoretical breach here. Say you're connected with a srp channel to a target, and you send out rkey X to your peer. In case there is a man-in-the-middle who sniffs it, he can theoretically read/write to your rkey by connecting to IPoIB in RC mode (which will connect to anyone). The fact that srp has it's own PD prevents this from happening. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html