mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 17:20:53 +07:00
mm: add a "struct page_frag" type containing a page, offset and length
A few network drivers currently use skb_frag_struct for this purpose but I have patches which add additional fields and semantics there which these other uses do not want. A structure for reference sub-page regions seems like a generally useful thing so do so instead of adding a network subsystem specific structure. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jens Axboe <jaxboe@fusionio.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
90278c9ffb
commit
30d3c128ea
@ -135,6 +135,17 @@ struct page {
|
||||
#endif
|
||||
;
|
||||
|
||||
struct page_frag {
|
||||
struct page *page;
|
||||
#if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536)
|
||||
__u32 offset;
|
||||
__u32 size;
|
||||
#else
|
||||
__u16 offset;
|
||||
__u16 size;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef unsigned long __nocast vm_flags_t;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user