Lines Matching refs:entry
87 static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry);
179 struct atm_mpoa_qos *entry; in atm_mpoa_add_qos() local
181 entry = atm_mpoa_search_qos(dst_ip); in atm_mpoa_add_qos()
182 if (entry != NULL) { in atm_mpoa_add_qos()
183 entry->qos = *qos; in atm_mpoa_add_qos()
184 return entry; in atm_mpoa_add_qos()
187 entry = kmalloc(sizeof(struct atm_mpoa_qos), GFP_KERNEL); in atm_mpoa_add_qos()
188 if (entry == NULL) { in atm_mpoa_add_qos()
190 return entry; in atm_mpoa_add_qos()
193 entry->ipaddr = dst_ip; in atm_mpoa_add_qos()
194 entry->qos = *qos; in atm_mpoa_add_qos()
196 entry->next = qos_head; in atm_mpoa_add_qos()
197 qos_head = entry; in atm_mpoa_add_qos()
199 return entry; in atm_mpoa_add_qos()
219 int atm_mpoa_delete_qos(struct atm_mpoa_qos *entry) in atm_mpoa_delete_qos() argument
223 if (entry == NULL) in atm_mpoa_delete_qos()
225 if (entry == qos_head) { in atm_mpoa_delete_qos()
227 kfree(entry); in atm_mpoa_delete_qos()
233 if (curr->next == entry) { in atm_mpoa_delete_qos()
234 curr->next = entry->next; in atm_mpoa_delete_qos()
235 kfree(entry); in atm_mpoa_delete_qos()
494 in_cache_entry *entry; in send_via_shortcut() local
514 entry = mpc->in_ops->get(ipaddr, mpc); in send_via_shortcut()
515 if (entry == NULL) { in send_via_shortcut()
516 entry = mpc->in_ops->add_entry(ipaddr, mpc); in send_via_shortcut()
517 if (entry != NULL) in send_via_shortcut()
518 mpc->in_ops->put(entry); in send_via_shortcut()
522 if (mpc->in_ops->cache_hit(entry, mpc) != OPEN) { in send_via_shortcut()
525 mpc->in_ops->put(entry); in send_via_shortcut()
535 mpc->in_ops->put(entry); in send_via_shortcut()
542 if (entry->ctrl_info.tag != 0) { in send_via_shortcut()
544 mpc->dev->name, entry->ctrl_info.tag); in send_via_shortcut()
545 tagged_llc_snap_hdr.tag = entry->ctrl_info.tag; in send_via_shortcut()
559 atm_account_tx(entry->shortcut, skb); in send_via_shortcut()
560 entry->shortcut->send(entry->shortcut, skb); in send_via_shortcut()
561 entry->packets_fwded++; in send_via_shortcut()
562 mpc->in_ops->put(entry); in send_via_shortcut()
1083 in_cache_entry *entry; in MPOA_trigger_rcvd() local
1085 entry = mpc->in_ops->get(dst_ip, mpc); in MPOA_trigger_rcvd()
1086 if (entry == NULL) { in MPOA_trigger_rcvd()
1087 entry = mpc->in_ops->add_entry(dst_ip, mpc); in MPOA_trigger_rcvd()
1088 entry->entry_state = INGRESS_RESOLVING; in MPOA_trigger_rcvd()
1090 msg->content.in_info = entry->ctrl_info; in MPOA_trigger_rcvd()
1092 entry->reply_wait = ktime_get_seconds(); in MPOA_trigger_rcvd()
1093 mpc->in_ops->put(entry); in MPOA_trigger_rcvd()
1097 if (entry->entry_state == INGRESS_INVALID) { in MPOA_trigger_rcvd()
1098 entry->entry_state = INGRESS_RESOLVING; in MPOA_trigger_rcvd()
1100 msg->content.in_info = entry->ctrl_info; in MPOA_trigger_rcvd()
1102 entry->reply_wait = ktime_get_seconds(); in MPOA_trigger_rcvd()
1103 mpc->in_ops->put(entry); in MPOA_trigger_rcvd()
1109 mpc->in_ops->put(entry); in MPOA_trigger_rcvd()
1118 in_cache_entry *entry) in check_qos_and_open_shortcut() argument
1129 entry->shortcut = eg_entry->shortcut; in check_qos_and_open_shortcut()
1131 entry->shortcut = eg_entry->shortcut; in check_qos_and_open_shortcut()
1133 if (entry->shortcut) { in check_qos_and_open_shortcut()
1158 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); in MPOA_res_reply_rcvd() local
1163 mpc->dev->name, entry); in MPOA_res_reply_rcvd()
1164 if (entry == NULL) { in MPOA_res_reply_rcvd()
1169 ddprintk_cont(" entry_state = %d ", entry->entry_state); in MPOA_res_reply_rcvd()
1171 if (entry->entry_state == INGRESS_RESOLVED) { in MPOA_res_reply_rcvd()
1173 mpc->in_ops->put(entry); in MPOA_res_reply_rcvd()
1177 entry->ctrl_info = msg->content.in_info; in MPOA_res_reply_rcvd()
1178 entry->time = ktime_get_seconds(); in MPOA_res_reply_rcvd()
1180 entry->reply_wait = ktime_get_seconds(); in MPOA_res_reply_rcvd()
1181 entry->refresh_time = 0; in MPOA_res_reply_rcvd()
1182 ddprintk_cont("entry->shortcut = %p\n", entry->shortcut); in MPOA_res_reply_rcvd()
1184 if (entry->entry_state == INGRESS_RESOLVING && in MPOA_res_reply_rcvd()
1185 entry->shortcut != NULL) { in MPOA_res_reply_rcvd()
1186 entry->entry_state = INGRESS_RESOLVED; in MPOA_res_reply_rcvd()
1187 mpc->in_ops->put(entry); in MPOA_res_reply_rcvd()
1191 if (entry->shortcut != NULL) { in MPOA_res_reply_rcvd()
1194 mpc->in_ops->put(entry); in MPOA_res_reply_rcvd()
1198 check_qos_and_open_shortcut(msg, mpc, entry); in MPOA_res_reply_rcvd()
1199 entry->entry_state = INGRESS_RESOLVED; in MPOA_res_reply_rcvd()
1200 mpc->in_ops->put(entry); in MPOA_res_reply_rcvd()
1210 in_cache_entry *entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask); in ingress_purge_rcvd() local
1212 if (entry == NULL) { in ingress_purge_rcvd()
1222 mpc->in_ops->remove_entry(entry, mpc); in ingress_purge_rcvd()
1224 mpc->in_ops->put(entry); in ingress_purge_rcvd()
1225 entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask); in ingress_purge_rcvd()
1226 } while (entry != NULL); in ingress_purge_rcvd()
1232 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(cache_id, mpc); in egress_purge_rcvd() local
1234 if (entry == NULL) { in egress_purge_rcvd()
1241 mpc->eg_ops->remove_entry(entry, mpc); in egress_purge_rcvd()
1244 mpc->eg_ops->put(entry); in egress_purge_rcvd()
1247 static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry) in purge_egress_shortcut() argument
1269 if (entry != NULL) in purge_egress_shortcut()
1270 purge_msg->content.eg_info = entry->ctrl_info; in purge_egress_shortcut()
1286 eg_cache_entry *entry; in mps_death() local
1297 entry = mpc->eg_cache; in mps_death()
1298 while (entry != NULL) { in mps_death()
1299 purge_egress_shortcut(entry->shortcut, entry); in mps_death()
1300 entry = entry->next; in mps_death()
1312 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(msg->content.eg_info.cache_id, mpc); in MPOA_cache_impos_rcvd() local
1316 mpc->dev->name, entry, holding_time); in MPOA_cache_impos_rcvd()
1317 if (entry == NULL && holding_time) { in MPOA_cache_impos_rcvd()
1318 entry = mpc->eg_ops->add_entry(msg, mpc); in MPOA_cache_impos_rcvd()
1319 mpc->eg_ops->put(entry); in MPOA_cache_impos_rcvd()
1323 mpc->eg_ops->update(entry, holding_time); in MPOA_cache_impos_rcvd()
1328 mpc->eg_ops->remove_entry(entry, mpc); in MPOA_cache_impos_rcvd()
1331 mpc->eg_ops->put(entry); in MPOA_cache_impos_rcvd()
1392 eg_cache_entry *entry; in clean_up() local
1398 entry = mpc->eg_cache; in clean_up()
1399 while (entry != NULL) { in clean_up()
1400 msg->content.eg_info = entry->ctrl_info; in clean_up()
1401 dprintk("cache_id %u\n", entry->ctrl_info.cache_id); in clean_up()
1403 entry = entry->next; in clean_up()