On Tue, 2013-02-05 at 09:46 -0600, Steve Wise wrote:On 2/5/2013 4:15 AM, Paul Bolle wrote:That's something new for me. Is that a custom for infiniband drivers orAnd why is 'cookie' __u64? Is struct cpl_fw6_msg_ofld_connection_wr_rplIn general, these fields are __ types to highlight the fact that they
used in userspace code? Can't 'cookie' be of type "struct sk_buff *"? Is
there a requirement for it to be 64 bits wide on both 32 bit and 64 bit?
define an interface between the host driver and adapter firmware.
is it used throughout the tree?
TheseThat's is exactly what I came up with to silence these warnings. But I
"cookie" fields are opaque to the firmware. They are passed to firmware
in a work request and then reflected back to the host in the reply to
the work request. Given this, I think there are two issues:
1) no swapping is really needed. The values are opaque to firmware, and
thus can stay in host byte order.
2) to remove the warning, we need something like:
req->cookie = (unsigned long)skb;
and
rpl_skb = (struct sk_buff *)(unsigned long)req->cookie;
didn't dare to submit it because I was too puzzled with the current
code. Anyhow, should I submit the (trivial) patch to fix this?