Lines Matching refs:entry
87 static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry);
175 * Overwrites the old entry or makes a new one.
179 struct atm_mpoa_qos *entry;
181 entry = atm_mpoa_search_qos(dst_ip);
182 if (entry != NULL) {
183 entry->qos = *qos;
184 return entry;
187 entry = kmalloc(sizeof(struct atm_mpoa_qos), GFP_KERNEL);
188 if (entry == NULL) {
190 return entry;
193 entry->ipaddr = dst_ip;
194 entry->qos = *qos;
196 entry->next = qos_head;
197 qos_head = entry;
199 return entry;
219 int atm_mpoa_delete_qos(struct atm_mpoa_qos *entry)
223 if (entry == NULL)
225 if (entry == qos_head) {
227 kfree(entry);
233 if (curr->next == entry) {
234 curr->next = entry->next;
235 kfree(entry);
494 in_cache_entry *entry;
514 entry = mpc->in_ops->get(ipaddr, mpc);
515 if (entry == NULL) {
516 entry = mpc->in_ops->add_entry(ipaddr, mpc);
517 if (entry != NULL)
518 mpc->in_ops->put(entry);
522 if (mpc->in_ops->cache_hit(entry, mpc) != OPEN) {
525 mpc->in_ops->put(entry);
535 mpc->in_ops->put(entry);
542 if (entry->ctrl_info.tag != 0) {
544 mpc->dev->name, entry->ctrl_info.tag);
545 tagged_llc_snap_hdr.tag = entry->ctrl_info.tag;
559 atm_account_tx(entry->shortcut, skb);
560 entry->shortcut->send(entry->shortcut, skb);
561 entry->packets_fwded++;
562 mpc->in_ops->put(entry);
631 pr_info("(%s) did not find RESOLVED entry from ingress cache\n",
637 pr_info("(%s) attaching ingress SVC, entry = %pI4\n",
743 pr_info("mpoa: (%s) Didn't find egress cache entry, tag = %u\n",
1083 in_cache_entry *entry;
1085 entry = mpc->in_ops->get(dst_ip, mpc);
1086 if (entry == NULL) {
1087 entry = mpc->in_ops->add_entry(dst_ip, mpc);
1088 entry->entry_state = INGRESS_RESOLVING;
1090 msg->content.in_info = entry->ctrl_info;
1092 entry->reply_wait = ktime_get_seconds();
1093 mpc->in_ops->put(entry);
1097 if (entry->entry_state == INGRESS_INVALID) {
1098 entry->entry_state = INGRESS_RESOLVING;
1100 msg->content.in_info = entry->ctrl_info;
1102 entry->reply_wait = ktime_get_seconds();
1103 mpc->in_ops->put(entry);
1107 pr_info("(%s) entry already in resolving state\n",
1109 mpc->in_ops->put(entry);
1118 in_cache_entry *entry)
1129 entry->shortcut = eg_entry->shortcut;
1131 entry->shortcut = eg_entry->shortcut;
1133 if (entry->shortcut) {
1158 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc);
1162 ddprintk("(%s) entry = %p",
1163 mpc->dev->name, entry);
1164 if (entry == NULL) {
1165 pr_info("(%s) ARGH, received res. reply for an entry that doesn't exist.\n",
1169 ddprintk_cont(" entry_state = %d ", entry->entry_state);
1171 if (entry->entry_state == INGRESS_RESOLVED) {
1172 pr_info("(%s) RESOLVED entry!\n", mpc->dev->name);
1173 mpc->in_ops->put(entry);
1177 entry->ctrl_info = msg->content.in_info;
1178 entry->time = ktime_get_seconds();
1180 entry->reply_wait = ktime_get_seconds();
1181 entry->refresh_time = 0;
1182 ddprintk_cont("entry->shortcut = %p\n", entry->shortcut);
1184 if (entry->entry_state == INGRESS_RESOLVING &&
1185 entry->shortcut != NULL) {
1186 entry->entry_state = INGRESS_RESOLVED;
1187 mpc->in_ops->put(entry);
1191 if (entry->shortcut != NULL) {
1192 pr_info("(%s) entry->shortcut != NULL, impossible!\n",
1194 mpc->in_ops->put(entry);
1198 check_qos_and_open_shortcut(msg, mpc, entry);
1199 entry->entry_state = INGRESS_RESOLVED;
1200 mpc->in_ops->put(entry);
1210 in_cache_entry *entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask);
1212 if (entry == NULL) {
1213 pr_info("(%s) purge for a non-existing entry, ip = %pI4\n",
1219 dprintk("(%s) removing an ingress entry, ip = %pI4\n",
1222 mpc->in_ops->remove_entry(entry, mpc);
1224 mpc->in_ops->put(entry);
1225 entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask);
1226 } while (entry != NULL);
1232 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(cache_id, mpc);
1234 if (entry == NULL) {
1235 dprintk("(%s) purge for a non-existing entry\n",
1241 mpc->eg_ops->remove_entry(entry, mpc);
1244 mpc->eg_ops->put(entry);
1247 static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry)
1269 if (entry != NULL)
1270 purge_msg->content.eg_info = entry->ctrl_info;
1286 eg_cache_entry *entry;
1297 entry = mpc->eg_cache;
1298 while (entry != NULL) {
1299 purge_egress_shortcut(entry->shortcut, entry);
1300 entry = entry->next;
1312 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(msg->content.eg_info.cache_id, mpc);
1315 dprintk("(%s) entry = %p, holding_time = %u\n",
1316 mpc->dev->name, entry, holding_time);
1317 if (entry == NULL && holding_time) {
1318 entry = mpc->eg_ops->add_entry(msg, mpc);
1319 mpc->eg_ops->put(entry);
1323 mpc->eg_ops->update(entry, holding_time);
1328 mpc->eg_ops->remove_entry(entry, mpc);
1331 mpc->eg_ops->put(entry);
1392 eg_cache_entry *entry;
1398 entry = mpc->eg_cache;
1399 while (entry != NULL) {
1400 msg->content.eg_info = entry->ctrl_info;
1401 dprintk("cache_id %u\n", entry->ctrl_info.cache_id);
1403 entry = entry->next;
1526 dprintk("freeing qos entry %p\n", qos);