Lines Matching refs:entry

40 	struct net_pmtu_entry *entry = NULL;  in get_pmtu_entry()  local
52 entry = &pmtu_entries[i]; in get_pmtu_entry()
62 entry = &pmtu_entries[i]; in get_pmtu_entry()
75 return entry; in get_pmtu_entry()
80 struct net_pmtu_entry *entry = NULL; in get_free_pmtu_entry() local
91 entry = &pmtu_entries[i]; in get_free_pmtu_entry()
97 entry = &pmtu_entries[i]; in get_free_pmtu_entry()
104 return entry; in get_free_pmtu_entry()
107 static void update_pmtu_entry(struct net_pmtu_entry *entry, uint16_t mtu) in update_pmtu_entry() argument
111 if (entry->mtu != mtu) { in update_pmtu_entry()
113 entry->mtu = mtu; in update_pmtu_entry()
116 entry->last_update = k_uptime_get_32(); in update_pmtu_entry()
121 if (IS_ENABLED(CONFIG_NET_IPV4_PMTU) && entry->dst.family == AF_INET) { in update_pmtu_entry()
124 net_ipaddr_copy(&info.dst, &entry->dst.in_addr); in update_pmtu_entry()
134 } else if (IS_ENABLED(CONFIG_NET_IPV6_PMTU) && entry->dst.family == AF_INET6) { in update_pmtu_entry()
137 net_ipaddr_copy(&info.dst, &entry->dst.in6_addr); in update_pmtu_entry()
152 struct net_pmtu_entry *entry; in net_pmtu_get_entry() local
154 entry = get_pmtu_entry(dst); in net_pmtu_get_entry()
156 return entry; in net_pmtu_get_entry()
161 struct net_pmtu_entry *entry; in net_pmtu_get_mtu() local
163 entry = get_pmtu_entry(dst); in net_pmtu_get_mtu()
164 if (entry == NULL) { in net_pmtu_get_mtu()
168 return entry->mtu; in net_pmtu_get_mtu()
173 struct net_pmtu_entry *entry; in add_entry() local
175 entry = get_pmtu_entry(dst); in add_entry()
176 if (entry != NULL) { in add_entry()
178 return entry; in add_entry()
181 entry = get_free_pmtu_entry(); in add_entry()
182 if (entry == NULL) { in add_entry()
191 entry->dst.family = AF_INET; in add_entry()
192 net_ipaddr_copy(&entry->dst.in_addr, &net_sin(dst)->sin_addr); in add_entry()
194 entry->in_use = false; in add_entry()
201 entry->dst.family = AF_INET6; in add_entry()
202 net_ipaddr_copy(&entry->dst.in6_addr, &net_sin6(dst)->sin6_addr); in add_entry()
204 entry->in_use = false; in add_entry()
210 entry->in_use = false; in add_entry()
215 return entry; in add_entry()
226 struct net_pmtu_entry *entry; in net_pmtu_update_mtu() local
230 entry = add_entry(dst, &updated); in net_pmtu_update_mtu()
231 if (entry == NULL) { in net_pmtu_update_mtu()
236 old_mtu = entry->mtu; in net_pmtu_update_mtu()
239 update_pmtu_entry(entry, mtu); in net_pmtu_update_mtu()
244 int net_pmtu_update_entry(struct net_pmtu_entry *entry, uint16_t mtu) in net_pmtu_update_entry() argument
248 if (entry == NULL) { in net_pmtu_update_entry()
252 if (entry->mtu == mtu) { in net_pmtu_update_entry()
256 old_mtu = entry->mtu; in net_pmtu_update_entry()
258 update_pmtu_entry(entry, mtu); in net_pmtu_update_entry()