lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3527faf1-3f3a-88d0-caa8-d94d75437d73@deltatee.com>
Date:   Thu, 1 Mar 2018 10:16:24 -0700
From:   Logan Gunthorpe <logang@...tatee.com>
To:     Sagi Grimberg <sagi@...mberg.me>, linux-kernel@...r.kernel.org,
        linux-pci@...r.kernel.org, linux-nvme@...ts.infradead.org,
        linux-rdma@...r.kernel.org, linux-nvdimm@...ts.01.org,
        linux-block@...r.kernel.org
Cc:     Stephen Bates <sbates@...thlin.com>,
        Christoph Hellwig <hch@....de>, Jens Axboe <axboe@...nel.dk>,
        Keith Busch <keith.busch@...el.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Jason Gunthorpe <jgg@...lanox.com>,
        Max Gurtovoy <maxg@...lanox.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Jérôme Glisse <jglisse@...hat.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Alex Williamson <alex.williamson@...hat.com>
Subject: Re: [PATCH v2 06/10] IB/core: Add optional PCI P2P flag to
 rdma_rw_ctx_[init|destroy]()

Hey Sagi,

Thanks for the review!


On 01/03/18 03:32 AM, Sagi Grimberg wrote:
>>   int rdma_rw_ctx_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u8 
>> port_num,
>>           struct scatterlist *sg, u32 sg_cnt, u32 sg_offset,
>> -        u64 remote_addr, u32 rkey, enum dma_data_direction dir)
>> +        u64 remote_addr, u32 rkey, enum dma_data_direction dir,
>> +        unsigned int flags)
>>   {
>>       struct ib_device *dev = qp->pd->device;
>>       int ret;
>> -    ret = ib_dma_map_sg(dev, sg, sg_cnt, dir);
>> +    if (flags & RDMA_RW_CTX_FLAG_PCI_P2PDMA)
>> +        ret = pci_p2pdma_map_sg(dev->dma_device, sg, sg_cnt, dir);
>> +    else
>> +        ret = ib_dma_map_sg(dev, sg, sg_cnt, dir);
>> +
> 
> Why not use is_pci_p2pdma_page(sg) instead of a flag? It would be so
> much cleaner...

Yes, that sounds like a good idea. We can make that change for v3.

Logan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ