Lines Matching refs:ccid
3 * net/dccp/ccid.c
13 #include "ccid.h"
88 slab = kmem_cache_create(slab_name_fmt, sizeof(struct ccid) + obj_size, 0,
105 "ccid%u_hc_rx_sock",
113 "ccid%u_hc_tx_sock",
140 struct ccid *ccid_new(const u8 id, struct sock *sk, bool rx)
143 struct ccid *ccid = NULL;
148 ccid = kmem_cache_alloc(rx ? ccid_ops->ccid_hc_rx_slab :
150 if (ccid == NULL)
152 ccid->ccid_ops = ccid_ops;
154 memset(ccid + 1, 0, ccid_ops->ccid_hc_rx_obj_size);
155 if (ccid->ccid_ops->ccid_hc_rx_init != NULL &&
156 ccid->ccid_ops->ccid_hc_rx_init(ccid, sk) != 0)
159 memset(ccid + 1, 0, ccid_ops->ccid_hc_tx_obj_size);
160 if (ccid->ccid_ops->ccid_hc_tx_init != NULL &&
161 ccid->ccid_ops->ccid_hc_tx_init(ccid, sk) != 0)
165 return ccid;
168 ccid_ops->ccid_hc_tx_slab, ccid);
169 ccid = NULL;
173 void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk)
175 if (ccid != NULL) {
176 if (ccid->ccid_ops->ccid_hc_rx_exit != NULL)
177 ccid->ccid_ops->ccid_hc_rx_exit(sk);
178 kmem_cache_free(ccid->ccid_ops->ccid_hc_rx_slab, ccid);
182 void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk)
184 if (ccid != NULL) {
185 if (ccid->ccid_ops->ccid_hc_tx_exit != NULL)
186 ccid->ccid_ops->ccid_hc_tx_exit(sk);
187 kmem_cache_free(ccid->ccid_ops->ccid_hc_tx_slab, ccid);