Lines Matching refs:clip_vcc

76 static void link_vcc(struct clip_vcc *clip_vcc, struct atmarp_entry *entry)  in link_vcc()  argument
78 pr_debug("%p to entry %p (neigh %p)\n", clip_vcc, entry, entry->neigh); in link_vcc()
79 clip_vcc->entry = entry; in link_vcc()
80 clip_vcc->xoff = 0; /* @@@ may overrun buffer by one packet */ in link_vcc()
81 clip_vcc->next = entry->vccs; in link_vcc()
82 entry->vccs = clip_vcc; in link_vcc()
86 static void unlink_clip_vcc(struct clip_vcc *clip_vcc) in unlink_clip_vcc() argument
88 struct atmarp_entry *entry = clip_vcc->entry; in unlink_clip_vcc()
89 struct clip_vcc **walk; in unlink_clip_vcc()
92 pr_err("!clip_vcc->entry (clip_vcc %p)\n", clip_vcc); in unlink_clip_vcc()
98 if (*walk == clip_vcc) { in unlink_clip_vcc()
101 *walk = clip_vcc->next; /* atomic */ in unlink_clip_vcc()
102 clip_vcc->entry = NULL; in unlink_clip_vcc()
103 if (clip_vcc->xoff) in unlink_clip_vcc()
115 pr_err("ATMARP: failed (entry %p, vcc 0x%p)\n", entry, clip_vcc); in unlink_clip_vcc()
124 struct clip_vcc *cv; in neigh_check_cb()
192 struct clip_vcc *clip_vcc = CLIP_VCC(vcc); in clip_push() local
203 pr_debug("removing VCC %p\n", clip_vcc); in clip_push()
204 if (clip_vcc->entry) in clip_push()
205 unlink_clip_vcc(clip_vcc); in clip_push()
206 clip_vcc->old_push(vcc, NULL); /* pass on the bad news */ in clip_push()
207 kfree(clip_vcc); in clip_push()
211 skb->dev = clip_vcc->entry ? clip_vcc->entry->neigh->dev : clip_devs; in clip_push()
219 if (!clip_vcc->encap || in clip_push()
233 clip_vcc->last_use = jiffies; in clip_push()
247 struct clip_vcc *clip_vcc = CLIP_VCC(vcc); in clip_pop() local
253 clip_vcc->old_pop(vcc, skb); in clip_pop()
259 old = xchg(&clip_vcc->xoff, 0); in clip_pop()
417 struct clip_vcc *clip_vcc; in clip_mkip() local
421 clip_vcc = kmalloc(sizeof(struct clip_vcc), GFP_KERNEL); in clip_mkip()
422 if (!clip_vcc) in clip_mkip()
424 pr_debug("%p vcc %p\n", clip_vcc, vcc); in clip_mkip()
425 clip_vcc->vcc = vcc; in clip_mkip()
426 vcc->user_back = clip_vcc; in clip_mkip()
428 clip_vcc->entry = NULL; in clip_mkip()
429 clip_vcc->xoff = 0; in clip_mkip()
430 clip_vcc->encap = 1; in clip_mkip()
431 clip_vcc->last_use = jiffies; in clip_mkip()
432 clip_vcc->idle_timeout = timeout * HZ; in clip_mkip()
433 clip_vcc->old_push = vcc->push; in clip_mkip()
434 clip_vcc->old_pop = vcc->pop; in clip_mkip()
449 struct clip_vcc *clip_vcc; in clip_setentry() local
456 clip_vcc = CLIP_VCC(vcc); in clip_setentry()
458 if (!clip_vcc->entry) { in clip_setentry()
463 unlink_clip_vcc(clip_vcc); in clip_setentry()
474 if (entry != clip_vcc->entry) { in clip_setentry()
475 if (!clip_vcc->entry) in clip_setentry()
479 unlink_clip_vcc(clip_vcc); in clip_setentry()
481 link_vcc(clip_vcc, entry); in clip_setentry()
737 struct atmarp_entry *entry, struct clip_vcc *clip_vcc) in atmarp_info() argument
744 svc = ((clip_vcc == SEQ_NO_VCC_TOKEN) || in atmarp_info()
745 (sk_atm(clip_vcc->vcc)->sk_family == AF_ATMSVC)); in atmarp_info()
747 llc = ((clip_vcc == SEQ_NO_VCC_TOKEN) || clip_vcc->encap); in atmarp_info()
749 if (clip_vcc == SEQ_NO_VCC_TOKEN) in atmarp_info()
752 exp = clip_vcc->last_use; in atmarp_info()
765 if (clip_vcc == SEQ_NO_VCC_TOKEN) { in atmarp_info()
773 clip_vcc->vcc->dev->number, in atmarp_info()
774 clip_vcc->vcc->vpi, clip_vcc->vcc->vci); in atmarp_info()
776 svc_addr(seq, &clip_vcc->vcc->remote); in atmarp_info()
786 struct clip_vcc *vcc;
789 static struct clip_vcc *clip_seq_next_vcc(struct atmarp_entry *e, in clip_seq_next_vcc()
790 struct clip_vcc *curr) in clip_seq_next_vcc()
809 struct clip_vcc *vcc = state->vcc; in clip_seq_vcc_walk()
852 struct clip_vcc *vcc = state->vcc; in clip_seq_show()