Lines Matching refs:ccid
2 * net/dccp/ccid.c
16 #include "ccid.h"
90 slab = kmem_cache_create(slab_name_fmt, sizeof(struct ccid) + obj_size, 0,
108 "ccid%u_hc_rx_sock",
116 "ccid%u_hc_tx_sock",
143 struct ccid *ccid_new(const u8 id, struct sock *sk, bool rx)
146 struct ccid *ccid = NULL;
151 ccid = kmem_cache_alloc(rx ? ccid_ops->ccid_hc_rx_slab :
153 if (ccid == NULL)
155 ccid->ccid_ops = ccid_ops;
157 memset(ccid + 1, 0, ccid_ops->ccid_hc_rx_obj_size);
158 if (ccid->ccid_ops->ccid_hc_rx_init != NULL &&
159 ccid->ccid_ops->ccid_hc_rx_init(ccid, sk) != 0)
162 memset(ccid + 1, 0, ccid_ops->ccid_hc_tx_obj_size);
163 if (ccid->ccid_ops->ccid_hc_tx_init != NULL &&
164 ccid->ccid_ops->ccid_hc_tx_init(ccid, sk) != 0)
168 return ccid;
171 ccid_ops->ccid_hc_tx_slab, ccid);
172 ccid = NULL;
176 void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk)
178 if (ccid != NULL) {
179 if (ccid->ccid_ops->ccid_hc_rx_exit != NULL)
180 ccid->ccid_ops->ccid_hc_rx_exit(sk);
181 kmem_cache_free(ccid->ccid_ops->ccid_hc_rx_slab, ccid);
185 void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk)
187 if (ccid != NULL) {
188 if (ccid->ccid_ops->ccid_hc_tx_exit != NULL)
189 ccid->ccid_ops->ccid_hc_tx_exit(sk);
190 kmem_cache_free(ccid->ccid_ops->ccid_hc_tx_slab, ccid);