[openib-general] NFS/RDMA client release for Linux 2.6.15
Roland Dreier
rdreier at cisco.com
Sun Feb 19 14:28:59 PST 2006
Christoph> - structures like rpcrdma_msg that are on the wire
Christoph> should use __be* for endianess annotations, and the
Christoph> cpu_to_be*/be*_to_cpu accessor functions instead of
Christoph> hton?/ntoh?. Please verify that these annotations are
Christoph> correct using sparse -D__CHECK_ENDIAN__=1
Thomas> Hmm, okay but existing RPC and NFS code don't do this. I'm
Thomas> reluctant to differ from the style of the governing
Thomas> subsystem. I'll check w/Trond.
I'm sure that's because the rest of the code was written before sparse
and the __beXX types. I agree with Christoph -- if you don't annotate
your code for endianness, then someone else is going to have to come
back and clean it up later. So please do it up front.
Christoph> - rdma_convert_physiov/rdma_convert_phys are completely
Christoph> broken. page_to_phys can't be used by driver/fs code.
Christoph> RDMA only deals with bus addresses, not physical
Christoph> addresses. You must use the dma mapping API
Christoph> instead. Also coalescing decisions are made by the dma
Christoph> layer, because they are platform dependent and much
Christoph> more complex then what the code in this patch does.
Thomas> Now that we are moving to OpenIB api's this is
Thomas> needed. There is some thought necessary w.r.t. our
Thomas> max-performance mode of preregistering memory in DMA
Thomas> mode. That's on our list of course.
Again let me echo Christoph's point. If you are passing physical
addresses into IB functions, then your code simply won't work on some
architectures. Making sure your code actually works on something like
a ppc64 box with an IOMMU would be a good test -- the low-end IBM
POWER machines are cheap enough that you could just buy one if you
don't have easy access.
- R.
More information about the general
mailing list