sk_stream_wait_memory (9) Linux Manual Page
sk_stream_wait_memory – Wait for more memory for a socket Synopsis int sk_stream_wait_memory(struct sock *sk, long *timeo_p); Arguments sk socket to wait for memory timeo_p for how long Copyright
sk_stream_wait_memory – Wait for more memory for a socket Synopsis int sk_stream_wait_memory(struct sock *sk, long *timeo_p); Arguments sk socket to wait for memory timeo_p for how long Copyright
sk_stream_wait_connect – Wait for a socket to get into the connected state Synopsis int sk_stream_wait_connect(struct sock *sk, long *timeo_p); Arguments sk sock to wait on timeo_p for how long to wait Description Must be called with the socket locked. Copyright
sk_state_store – update sk->sk_state Synopsis void sk_state_store(struct sock *sk, int newstate); Arguments sk socket pointer newstate new state Description Paired with sk_state_load. Should be used in contexts where state change might impact lockless readers. Copyright
sk_state_load – read sk->sk_state for lockless contexts Synopsis int sk_state_load(const struct sock *sk); Arguments sk socket pointer Description Paired with sk_state_store. Used in places we do not hold socket lock : tcp_diag_get_info, tcp_get_info, tcp_poll, get_tcp4_sock … Copyright
sk_set_memalloc – sets SOCK_MEMALLOC Synopsis void sk_set_memalloc(struct sock *sk); Arguments sk socket to set it on Description Set SOCK_MEMALLOC on a socket for access to emergency reserves. It’s the responsibility of the admin to adjust min_free_kbytes to meet the requirements Copyright
sk_rmem_alloc_get – returns read allocations Synopsis int sk_rmem_alloc_get(const struct sock *sk); Arguments sk socket Description Returns sk_rmem_alloc Copyright
sk_page_frag – return an appropriate page_frag Synopsis struct page_frag *sk_page_frag(struct sock *sk); Arguments sk socket Description If socket allocation mode allows current thread to sleep, it means its safe to use the per task page_frag instead of the per socket one. Copyright
sk_ns_capable – General socket capability test Synopsis bool sk_ns_capable(const struct sock * sk, struct user_namespace * user_ns, int cap); Arguments sk Socket to use a capability on or through user_ns The user namespace of the capability to use cap The capability to use Description Test to see if the opener of the socket had when the socket was created and…
sk_net_capable – Network namespace socket capability test Synopsis bool sk_net_capable(const struct sock * sk, int cap); Arguments sk Socket to use a capability on or through cap The capability to use Description Test to see if the opener of the socket had when the socket was created and the current process has the capability cap over the network…
sk_has_allocations – check if allocations are outstanding Synopsis bool sk_has_allocations(const struct sock * sk); Arguments sk socket Description Returns true if socket has write or read allocations Copyright
sk_for_each_entry_offset_rcu – iterate over a list at a given struct offset Synopsis sk_for_each_entry_offset_rcu(tpos, pos, head, offset); Arguments tpos the type * to use as a loop cursor. pos the struct hlist_node to use as a loop cursor. head the head for your list. offset offset of hlist_node within the struct. Copyright
sk_filter_trim_cap – run a packet through a socket filter Synopsis int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap); Arguments sk sock associated with sk_buff skb buffer to filter cap limit on how short the eBPF program may trim the packet Description Run the eBPF program and then cut skb->data to correct size returned…
sk_eat_skb – Release a skb if it is no longer needed Synopsis void sk_eat_skb(struct sock *sk, struct sk_buff *skb); Arguments sk socket to eat this skb from skb socket buffer to eat Description This routine must be called with interrupts disabled or with the socket locked so that the sk_buff queue operation is ok. Copyright
sk_clone_lock – clone a socket, and lock its clone Synopsis struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority); Arguments sk the socket to clone priority for allocation (GFP_KERNEL, GFP_ATOMIC, etc) Description Caller must unlock socket even in error path (bh_unlock_sock(newsk)) Copyright
sk_capable – Socket global capability test Synopsis bool sk_capable(const struct sock * sk, int cap); Arguments sk Socket to use a capability on or through cap The global capability to use Description Test to see if the opener of the socket had when the socket was created and the current process has the capability cap in all user…
sk_attach_filter – attach a socket filter Synopsis int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); Arguments fprog the filter program sk the socket to use Description Attach the user’s filter code. We first run some sanity checks on it to make sure it does not explode on us later. If an error occurs or there is…
sk_alloc – All socket objects are allocated here Synopsis struct sock *sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot, int kern); Arguments net the applicable net namespace family protocol family priority for allocation (GFP_KERNEL, GFP_ATOMIC, etc) prot struct proto associated with this new sock instance kern is this to be a kernel socket?…
single_erase – [GENERIC] NAND standard block erase command function Synopsis int single_erase(struct mtd_info *mtd, int page); Arguments mtd MTD device structure page the page address of the block which will be erased Description Standard erase command for NAND chips. Returns NAND status. Author Thomas Gleixner <tglx [at] linutronix.de> Author. Copyright
simple_strtoull – convert a string to an unsigned long long Synopsis unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base); Arguments cp The start of the string endp A pointer to the end of the parsed string will be placed here base The number base to use Description This function is obsolete. Please…
simple_strtoul – convert a string to an unsigned long Synopsis unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base); Arguments cp The start of the string endp A pointer to the end of the parsed string will be placed here base The number base to use Description This function is obsolete. Please use kstrtoul…