[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150113.122733.1459000731112321026.davem@davemloft.net>
Date: Tue, 13 Jan 2015 12:27:33 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: David.Laight@...LAB.COM
Cc: john.fastabend@...il.com, dborkman@...hat.com,
hannes@...essinduktion.org, netdev@...r.kernel.org,
danny.zhou@...el.com, nhorman@...driver.com,
john.ronciak@...el.com, brouer@...hat.com
Subject: Re: [RFC PATCH v2 1/2] net: af_packet support for direct ring
access in user space
From: David Laight <David.Laight@...LAB.COM>
Date: Tue, 13 Jan 2015 17:15:30 +0000
> How about something like:
>
> struct tpacket_dma_mem_region {
> __u64 addr; /* userspace virtual address */
> __u64 phys_addr; /* physical address */
> __u64 iova; /* IO virtual address used for DMA */
> __u64 size; /* size of region */
> int direction; /* dma data direction */
> } aligned(8);
>
> So that it is independant of 32/64 bits.
> It is a shame that gcc has no way of defining a 64bit 'void *' on 32bit systems.
> You can use a union, but you still need to zero extend the value on LE (worse on BE).
We have an __aligned_u64, please use that.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists