Lines Matching refs:ccid
88 slab = kmem_cache_create(slab_name_fmt, sizeof(struct ccid) + obj_size, 0, in ccid_kmem_cache_create()
140 struct ccid *ccid_new(const u8 id, struct sock *sk, bool rx) in ccid_new()
143 struct ccid *ccid = NULL; in ccid_new() local
148 ccid = kmem_cache_alloc(rx ? ccid_ops->ccid_hc_rx_slab : in ccid_new()
150 if (ccid == NULL) in ccid_new()
152 ccid->ccid_ops = ccid_ops; in ccid_new()
154 memset(ccid + 1, 0, ccid_ops->ccid_hc_rx_obj_size); in ccid_new()
155 if (ccid->ccid_ops->ccid_hc_rx_init != NULL && in ccid_new()
156 ccid->ccid_ops->ccid_hc_rx_init(ccid, sk) != 0) in ccid_new()
159 memset(ccid + 1, 0, ccid_ops->ccid_hc_tx_obj_size); in ccid_new()
160 if (ccid->ccid_ops->ccid_hc_tx_init != NULL && in ccid_new()
161 ccid->ccid_ops->ccid_hc_tx_init(ccid, sk) != 0) in ccid_new()
165 return ccid; in ccid_new()
168 ccid_ops->ccid_hc_tx_slab, ccid); in ccid_new()
169 ccid = NULL; in ccid_new()
173 void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk) in ccid_hc_rx_delete() argument
175 if (ccid != NULL) { in ccid_hc_rx_delete()
176 if (ccid->ccid_ops->ccid_hc_rx_exit != NULL) in ccid_hc_rx_delete()
177 ccid->ccid_ops->ccid_hc_rx_exit(sk); in ccid_hc_rx_delete()
178 kmem_cache_free(ccid->ccid_ops->ccid_hc_rx_slab, ccid); in ccid_hc_rx_delete()
182 void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk) in ccid_hc_tx_delete() argument
184 if (ccid != NULL) { in ccid_hc_tx_delete()
185 if (ccid->ccid_ops->ccid_hc_tx_exit != NULL) in ccid_hc_tx_delete()
186 ccid->ccid_ops->ccid_hc_tx_exit(sk); in ccid_hc_tx_delete()
187 kmem_cache_free(ccid->ccid_ops->ccid_hc_tx_slab, ccid); in ccid_hc_tx_delete()