Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

__alloc_skb(9) [centos man page]

__ALLOC_SKB(9)							 Linux Networking						    __ALLOC_SKB(9)

NAME
__alloc_skb - allocate a network buffer SYNOPSIS
struct sk_buff * __alloc_skb(unsigned int size, gfp_t gfp_mask, int flags, int node); ARGUMENTS
size size to allocate gfp_mask allocation mask flags If SKB_ALLOC_FCLONE is set, allocate from fclone cache instead of head cache and allocate a cloned (child) skb. If SKB_ALLOC_RX is set, __GFP_MEMALLOC will be used for allocations in case the data is required for writeback node numa node to allocate memory on DESCRIPTION
Allocate a new sk_buff. The returned buffer has no headroom and a tail room of at least size bytes. The object has a reference count of one. The return is the buffer. On a failure the return is NULL. Buffers may only be allocated from interrupts using a gfp_mask of GFP_ATOMIC. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 __ALLOC_SKB(9)

Check Out this Related Man Page

BLK_MAKE_REQUEST(9)						   Block Devices					       BLK_MAKE_REQUEST(9)

NAME
blk_make_request - given a bio, allocate a corresponding struct request. SYNOPSIS
struct request * blk_make_request(struct request_queue * q, struct bio * bio, gfp_t gfp_mask); ARGUMENTS
q target request queue bio The bio describing the memory mappings that will be submitted for IO. It may be a chained-bio properly constructed by block/bio layer. gfp_mask gfp flags to be used for memory allocation DESCRIPTION
blk_make_request is the parallel of generic_make_request for BLOCK_PC type commands. Where the struct request needs to be farther initialized by the caller. It is passed a struct bio, which describes the memory info of the I/O transfer. The caller of blk_make_request must make sure that bi_io_vec are set to describe the memory buffers. That bio_data_dir will return the needed direction of the request. (And all bio's in the passed bio-chain are properly set accordingly) If called under none-sleepable conditions, mapped bio buffers must not need bouncing, by calling the appropriate masked or flagged allocator, suitable for the target device. Otherwise the call to blk_queue_bounce will BUG. WARNING
When allocating/cloning a bio-chain, careful consideration should be given to how you allocate bios. In particular, you cannot use __GFP_WAIT for anything but the first bio in the chain. Otherwise you risk waiting for IO completion of a bio that hasn't been submitted yet, thus resulting in a deadlock. Alternatively bios should be allocated using bio_kmalloc instead of bio_alloc, as that avoids the mempool deadlock. If possible a big IO should be split into smaller parts when allocation fails. Partial allocation should not be an error, or you risk a live-lock. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 BLK_MAKE_REQUEST(9)
Man Page