Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5e67305 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

skbuff: Move definition of NETDEV_FRAG_PAGE_MAX_SIZE



In order to address the fact that some devices cannot support the full 32K
frag size we need to have the value accessible somewhere so that we can use it
to do comparisons against what the device can support.  As such I am moving
the values out of skbuff.c and into skbuff.h.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bfb235d7
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1832,6 +1832,10 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
		kfree_skb(skb);
		kfree_skb(skb);
}
}


#define NETDEV_FRAG_PAGE_MAX_ORDER get_order(32768)
#define NETDEV_FRAG_PAGE_MAX_SIZE  (PAGE_SIZE << NETDEV_FRAG_PAGE_MAX_ORDER)
#define NETDEV_PAGECNT_MAX_BIAS	   NETDEV_FRAG_PAGE_MAX_SIZE

extern void *netdev_alloc_frag(unsigned int fragsz);
extern void *netdev_alloc_frag(unsigned int fragsz);


extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
+0 −4
Original line number Original line Diff line number Diff line
@@ -351,10 +351,6 @@ struct netdev_alloc_cache {
};
};
static DEFINE_PER_CPU(struct netdev_alloc_cache, netdev_alloc_cache);
static DEFINE_PER_CPU(struct netdev_alloc_cache, netdev_alloc_cache);


#define NETDEV_FRAG_PAGE_MAX_ORDER get_order(32768)
#define NETDEV_FRAG_PAGE_MAX_SIZE  (PAGE_SIZE << NETDEV_FRAG_PAGE_MAX_ORDER)
#define NETDEV_PAGECNT_MAX_BIAS	   NETDEV_FRAG_PAGE_MAX_SIZE

static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
{
{
	struct netdev_alloc_cache *nc;
	struct netdev_alloc_cache *nc;