Home
last modified time | relevance | path

Searched refs:mem (Results 1 – 8 of 8) sorted by relevance

/net/core/
Dxdp.c39 BUILD_BUG_ON(FIELD_SIZEOF(struct xdp_mem_allocator, mem.id) in xdp_mem_id_hashfn()
52 return xa->mem.id != mem_id; in xdp_mem_id_cmp()
58 .key_offset = offsetof(struct xdp_mem_allocator, mem.id),
59 .key_len = FIELD_SIZEOF(struct xdp_mem_allocator, mem.id),
74 ida_simple_remove(&mem_id_pool, xa->mem.id); in __xdp_mem_allocator_rcu_free()
77 xa->mem.id = 0xFFFF; in __xdp_mem_allocator_rcu_free()
78 xa->mem.type = 0xF0F0; in __xdp_mem_allocator_rcu_free()
140 int id = xdp_rxq->mem.id; in xdp_rxq_info_unreg_mem_model()
150 if (xdp_rxq->mem.type == MEM_TYPE_ZERO_COPY) in xdp_rxq_info_unreg_mem_model()
153 if (xdp_rxq->mem.type == MEM_TYPE_PAGE_POOL) { in xdp_rxq_info_unreg_mem_model()
[all …]
Dsock_diag.c62 u32 mem[SK_MEMINFO_VARS]; in sock_diag_put_meminfo() local
64 sk_get_meminfo(sk, mem); in sock_diag_put_meminfo()
66 return nla_put(skb, attrtype, sizeof(mem), &mem); in sock_diag_put_meminfo()
Dsock.c2172 void *mem; in sock_kmalloc() local
2177 mem = kmalloc(size, priority); in sock_kmalloc()
2178 if (mem) in sock_kmalloc()
2179 return mem; in sock_kmalloc()
2190 static inline void __sock_kfree_s(struct sock *sk, void *mem, int size, in __sock_kfree_s() argument
2193 if (WARN_ON_ONCE(!mem)) in __sock_kfree_s()
2196 kzfree(mem); in __sock_kfree_s()
2198 kfree(mem); in __sock_kfree_s()
2202 void sock_kfree_s(struct sock *sk, void *mem, int size) in sock_kfree_s() argument
2204 __sock_kfree_s(sk, mem, size, false); in sock_kfree_s()
[all …]
/net/sctp/
Ddiag.c157 u32 mem[SK_MEMINFO_VARS]; in inet_sctp_diag_fill() local
164 mem[SK_MEMINFO_WMEM_ALLOC] = amt; in inet_sctp_diag_fill()
169 mem[SK_MEMINFO_RMEM_ALLOC] = amt; in inet_sctp_diag_fill()
170 mem[SK_MEMINFO_RCVBUF] = sk->sk_rcvbuf; in inet_sctp_diag_fill()
171 mem[SK_MEMINFO_SNDBUF] = sk->sk_sndbuf; in inet_sctp_diag_fill()
172 mem[SK_MEMINFO_FWD_ALLOC] = sk->sk_forward_alloc; in inet_sctp_diag_fill()
173 mem[SK_MEMINFO_WMEM_QUEUED] = sk->sk_wmem_queued; in inet_sctp_diag_fill()
174 mem[SK_MEMINFO_OPTMEM] = atomic_read(&sk->sk_omem_alloc); in inet_sctp_diag_fill()
175 mem[SK_MEMINFO_BACKLOG] = READ_ONCE(sk->sk_backlog.len); in inet_sctp_diag_fill()
176 mem[SK_MEMINFO_DROPS] = atomic_read(&sk->sk_drops); in inet_sctp_diag_fill()
[all …]
/net/netfilter/
Dx_tables.c699 size_t mem; in xt_compat_init_offsets() local
709 mem = sizeof(struct compat_delta) * number; in xt_compat_init_offsets()
710 if (mem > XT_MAX_TABLE_SIZE) in xt_compat_init_offsets()
713 xt[af].compat_tab = vmalloc(mem); in xt_compat_init_offsets()
1053 void *mem; in xt_copy_counters_from_user() local
1091 mem = vmalloc(len); in xt_copy_counters_from_user()
1092 if (!mem) in xt_copy_counters_from_user()
1095 if (copy_from_user(mem, user, len) == 0) in xt_copy_counters_from_user()
1096 return mem; in xt_copy_counters_from_user()
1098 vfree(mem); in xt_copy_counters_from_user()
[all …]
/net/sched/
Dsch_fq_codel.c146 unsigned int mem = 0; in fq_codel_drop() local
171 mem += get_codel_cb(skb)->mem_usage; in fq_codel_drop()
178 q->memory_usage -= mem; in fq_codel_drop()
/net/tls/
Dtls_sw.c1424 u8 *aad, *iv, *mem = NULL; in decrypt_internal() local
1461 mem = kmalloc(mem_size, sk->sk_allocation); in decrypt_internal()
1462 if (!mem) in decrypt_internal()
1466 aead_req = (struct aead_request *)mem; in decrypt_internal()
1467 sgin = (struct scatterlist *)(mem + aead_size); in decrypt_internal()
1483 kfree(mem); in decrypt_internal()
1507 kfree(mem); in decrypt_internal()
1545 kfree(mem); in decrypt_internal()
/net/xdp/
Dxsk.c212 return (xdp->rxq->mem.type == MEM_TYPE_ZERO_COPY) ? in xsk_rcv()