Lines Matching refs:mpc
133 static int cache_hit(in_cache_entry *entry, struct mpoa_client *mpc) in cache_hit() argument
143 if (entry->count > mpc->parameters.mpc_p1) { in cache_hit()
146 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN); in cache_hit()
150 msg_to_mpoad(&msg, mpc); in cache_hit()
162 if (entry->count > mpc->parameters.mpc_p1 && in cache_hit()
165 mpc->dev->name, &entry->ctrl_info.in_dst_ip); in cache_hit()
168 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN); in cache_hit()
173 msg_to_mpoad(&msg, mpc); in cache_hit()
324 static void in_destroy_cache(struct mpoa_client *mpc) in in_destroy_cache() argument
326 write_lock_irq(&mpc->ingress_lock); in in_destroy_cache()
327 while (mpc->in_cache != NULL) in in_destroy_cache()
328 mpc->in_ops->remove_entry(mpc->in_cache, mpc); in in_destroy_cache()
329 write_unlock_irq(&mpc->ingress_lock); in in_destroy_cache()
333 struct mpoa_client *mpc) in eg_cache_get_by_cache_id() argument
337 read_lock_irq(&mpc->egress_lock); in eg_cache_get_by_cache_id()
338 entry = mpc->eg_cache; in eg_cache_get_by_cache_id()
342 read_unlock_irq(&mpc->egress_lock); in eg_cache_get_by_cache_id()
347 read_unlock_irq(&mpc->egress_lock); in eg_cache_get_by_cache_id()
353 static eg_cache_entry *eg_cache_get_by_tag(__be32 tag, struct mpoa_client *mpc) in eg_cache_get_by_tag() argument
358 read_lock_irqsave(&mpc->egress_lock, flags); in eg_cache_get_by_tag()
359 entry = mpc->eg_cache; in eg_cache_get_by_tag()
363 read_unlock_irqrestore(&mpc->egress_lock, flags); in eg_cache_get_by_tag()
368 read_unlock_irqrestore(&mpc->egress_lock, flags); in eg_cache_get_by_tag()
375 struct mpoa_client *mpc) in eg_cache_get_by_vcc() argument
380 read_lock_irqsave(&mpc->egress_lock, flags); in eg_cache_get_by_vcc()
381 entry = mpc->eg_cache; in eg_cache_get_by_vcc()
385 read_unlock_irqrestore(&mpc->egress_lock, flags); in eg_cache_get_by_vcc()
390 read_unlock_irqrestore(&mpc->egress_lock, flags); in eg_cache_get_by_vcc()
396 struct mpoa_client *mpc) in eg_cache_get_by_src_ip() argument
400 read_lock_irq(&mpc->egress_lock); in eg_cache_get_by_src_ip()
401 entry = mpc->eg_cache; in eg_cache_get_by_src_ip()
405 read_unlock_irq(&mpc->egress_lock); in eg_cache_get_by_src_ip()
410 read_unlock_irq(&mpc->egress_lock); in eg_cache_get_by_src_ip()
525 static void eg_destroy_cache(struct mpoa_client *mpc) in eg_destroy_cache() argument
527 write_lock_irq(&mpc->egress_lock); in eg_destroy_cache()
528 while (mpc->eg_cache != NULL) in eg_destroy_cache()
529 mpc->eg_ops->remove_entry(mpc->eg_cache, mpc); in eg_destroy_cache()
530 write_unlock_irq(&mpc->egress_lock); in eg_destroy_cache()
561 void atm_mpoa_init_cache(struct mpoa_client *mpc) in atm_mpoa_init_cache() argument
563 mpc->in_ops = &ingress_ops; in atm_mpoa_init_cache()
564 mpc->eg_ops = &egress_ops; in atm_mpoa_init_cache()