Lines Matching refs:mpc
132 static int cache_hit(in_cache_entry *entry, struct mpoa_client *mpc) in cache_hit() argument
142 if (entry->count > mpc->parameters.mpc_p1) { in cache_hit()
145 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN); in cache_hit()
149 msg_to_mpoad(&msg, mpc); in cache_hit()
161 if (entry->count > mpc->parameters.mpc_p1 && in cache_hit()
164 mpc->dev->name, &entry->ctrl_info.in_dst_ip); in cache_hit()
167 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN); in cache_hit()
172 msg_to_mpoad(&msg, mpc); in cache_hit()
325 static void in_destroy_cache(struct mpoa_client *mpc) in in_destroy_cache() argument
327 write_lock_irq(&mpc->ingress_lock); in in_destroy_cache()
328 while (mpc->in_cache != NULL) in in_destroy_cache()
329 mpc->in_ops->remove_entry(mpc->in_cache, mpc); in in_destroy_cache()
330 write_unlock_irq(&mpc->ingress_lock); in in_destroy_cache()
334 struct mpoa_client *mpc) in eg_cache_get_by_cache_id() argument
338 read_lock_irq(&mpc->egress_lock); in eg_cache_get_by_cache_id()
339 entry = mpc->eg_cache; in eg_cache_get_by_cache_id()
343 read_unlock_irq(&mpc->egress_lock); in eg_cache_get_by_cache_id()
348 read_unlock_irq(&mpc->egress_lock); in eg_cache_get_by_cache_id()
354 static eg_cache_entry *eg_cache_get_by_tag(__be32 tag, struct mpoa_client *mpc) in eg_cache_get_by_tag() argument
359 read_lock_irqsave(&mpc->egress_lock, flags); in eg_cache_get_by_tag()
360 entry = mpc->eg_cache; in eg_cache_get_by_tag()
364 read_unlock_irqrestore(&mpc->egress_lock, flags); in eg_cache_get_by_tag()
369 read_unlock_irqrestore(&mpc->egress_lock, flags); in eg_cache_get_by_tag()
376 struct mpoa_client *mpc) in eg_cache_get_by_vcc() argument
381 read_lock_irqsave(&mpc->egress_lock, flags); in eg_cache_get_by_vcc()
382 entry = mpc->eg_cache; in eg_cache_get_by_vcc()
386 read_unlock_irqrestore(&mpc->egress_lock, flags); in eg_cache_get_by_vcc()
391 read_unlock_irqrestore(&mpc->egress_lock, flags); in eg_cache_get_by_vcc()
397 struct mpoa_client *mpc) in eg_cache_get_by_src_ip() argument
401 read_lock_irq(&mpc->egress_lock); in eg_cache_get_by_src_ip()
402 entry = mpc->eg_cache; in eg_cache_get_by_src_ip()
406 read_unlock_irq(&mpc->egress_lock); in eg_cache_get_by_src_ip()
411 read_unlock_irq(&mpc->egress_lock); in eg_cache_get_by_src_ip()
528 static void eg_destroy_cache(struct mpoa_client *mpc) in eg_destroy_cache() argument
530 write_lock_irq(&mpc->egress_lock); in eg_destroy_cache()
531 while (mpc->eg_cache != NULL) in eg_destroy_cache()
532 mpc->eg_ops->remove_entry(mpc->eg_cache, mpc); in eg_destroy_cache()
533 write_unlock_irq(&mpc->egress_lock); in eg_destroy_cache()
565 void atm_mpoa_init_cache(struct mpoa_client *mpc) in atm_mpoa_init_cache() argument
567 mpc->in_ops = &ingress_ops; in atm_mpoa_init_cache()
568 mpc->eg_ops = &egress_ops; in atm_mpoa_init_cache()