Lines Matching refs:frag
2348 cmn_err(CE_WARN, "ICMP frag needed\n");
6171 ipsec_fragcache_init(ipsec_fragcache_t *frag)
6176 mutex_init(&frag->itpf_lock, NULL, MUTEX_DEFAULT, NULL);
6177 frag->itpf_ptr = (ipsec_fragcache_entry_t **)
6180 if (frag->itpf_ptr == NULL)
6187 kmem_free(frag->itpf_ptr, sizeof (ipsec_fragcache_entry_t *) *
6192 frag->itpf_freelist = NULL;
6195 ftemp->itpfe_next = frag->itpf_freelist;
6196 frag->itpf_freelist = ftemp;
6200 frag->itpf_expire_hint = 0;
6206 ipsec_fragcache_uninit(ipsec_fragcache_t *frag, ipsec_stack_t *ipss)
6211 mutex_enter(&frag->itpf_lock);
6212 if (frag->itpf_ptr) {
6215 fep = (frag->itpf_ptr)[i];
6218 fep = fragcache_delentry(i, fep, frag, ipss);
6226 while (frag->itpf_freelist->itpfe_next != NULL)
6227 frag->itpf_freelist = frag->itpf_freelist->itpfe_next;
6234 kmem_free(frag->itpf_freelist,
6238 kmem_free(frag->itpf_ptr,
6242 mutex_exit(&frag->itpf_lock);
6243 mutex_destroy(&frag->itpf_lock);
6254 ipsec_fragcache_add(ipsec_fragcache_t *frag, mblk_t *iramp, mblk_t *mp,
6296 mutex_enter(&frag->itpf_lock);
6313 mutex_exit(&frag->itpf_lock);
6332 mutex_exit(&frag->itpf_lock);
6355 if (itpf_time >= frag->itpf_expire_hint)
6356 ipsec_fragcache_clean(frag, ipss);
6365 for (fep = (frag->itpf_ptr)[i]; fep; fep = fep->itpfe_next) {
6411 (void) fragcache_delentry(i, fep, frag, ipss);
6412 mutex_exit(&frag->itpf_lock);
6423 if (frag->itpf_freelist == NULL) {
6425 ipsec_fragcache_clean(frag, ipss);
6426 if (frag->itpf_freelist == NULL) {
6427 mutex_exit(&frag->itpf_lock);
6437 fep = frag->itpf_freelist;
6438 frag->itpf_freelist = fep->itpfe_next;
6464 fep->itpfe_next = (frag->itpf_ptr)[i];
6465 (frag->itpf_ptr)[i] = fep;
6467 if (frag->itpf_expire_hint > fep->itpfe_exp)
6468 frag->itpf_expire_hint = fep->itpfe_exp;
6472 /* Insert it in the frag list */
6529 mutex_exit(&frag->itpf_lock);
6572 (void) fragcache_delentry(i, fep, frag, ipss);
6573 mutex_exit(&frag->itpf_lock);
6592 mutex_exit(&frag->itpf_lock);
6635 (void) fragcache_delentry(i, fep, frag,
6637 mutex_exit(&frag->itpf_lock);
6678 (void) fragcache_delentry(i, fep, frag, ipss);
6679 mutex_exit(&frag->itpf_lock);
6692 mutex_exit(&frag->itpf_lock);
6735 mutex_exit(&frag->itpf_lock);
6757 mutex_exit(&frag->itpf_lock);
6760 * Note, this can happen when the last frag
6787 (void) fragcache_delentry(i, fep, frag, ipss);
6788 mutex_exit(&frag->itpf_lock);
6819 mutex_exit(&frag->itpf_lock);
6826 ipsec_fragcache_clean(ipsec_fragcache_t *frag, ipsec_stack_t *ipss)
6835 ASSERT(MUTEX_HELD(&frag->itpf_lock));
6841 fep = (frag->itpf_ptr)[i];
6845 fep = fragcache_delentry(i, fep, frag, ipss);
6857 frag->itpf_expire_hint = earlyexp;
6860 if (frag->itpf_freelist == NULL)
6861 (void) fragcache_delentry(earlyi, earlyfep, frag, ipss);
6866 ipsec_fragcache_t *frag, ipsec_stack_t *ipss)
6871 ASSERT(MUTEX_HELD(&frag->itpf_lock));
6882 targp = (frag->itpf_ptr)[slot];
6887 (frag->itpf_ptr)[slot] = nextp;
6889 fep->itpfe_next = frag->itpf_freelist;
6890 frag->itpf_freelist = fep;
6901 fep->itpfe_next = frag->itpf_freelist;
6902 frag->itpf_freelist = fep;