Lines Matching refs:rce

58     struct replay_cache_entry *rce);
114 struct replay_cache_entry *rce; in replay_alloc() local
119 rce = malloc(sizeof(*rce), M_RPC, M_NOWAIT|M_ZERO); in replay_alloc()
120 if (!rce) in replay_alloc()
122 rce->rce_hash = h; in replay_alloc()
123 rce->rce_msg = *msg; in replay_alloc()
124 bcopy(addr, &rce->rce_addr, addr->sa_len); in replay_alloc()
126 TAILQ_INSERT_HEAD(&rc->rc_cache[h], rce, rce_link); in replay_alloc()
127 TAILQ_INSERT_HEAD(&rc->rc_all, rce, rce_alllink); in replay_alloc()
129 return (rce); in replay_alloc()
133 replay_free(struct replay_cache *rc, struct replay_cache_entry *rce) in replay_free() argument
139 TAILQ_REMOVE(&rc->rc_cache[rce->rce_hash], rce, rce_link); in replay_free()
140 TAILQ_REMOVE(&rc->rc_all, rce, rce_alllink); in replay_free()
141 if (rce->rce_repbody) { in replay_free()
142 rc->rc_size -= m_length(rce->rce_repbody, NULL); in replay_free()
143 m_freem(rce->rce_repbody); in replay_free()
145 free(rce, M_RPC); in replay_free()
151 struct replay_cache_entry *rce; in replay_prune() local
162 TAILQ_FOREACH_REVERSE(rce, &rc->rc_all, replay_cache_list, in replay_prune()
164 if (rce->rce_repmsg.rm_xid) in replay_prune()
167 if (rce) in replay_prune()
168 replay_free(rc, rce); in replay_prune()
169 } while (rce && (rc->rc_count >= REPLAY_MAX in replay_prune()
178 struct replay_cache_entry *rce; in replay_find() local
181 TAILQ_FOREACH(rce, &rc->rc_cache[h], rce_link) { in replay_find()
182 if (rce->rce_msg.rm_xid == msg->rm_xid in replay_find()
183 && rce->rce_msg.rm_call.cb_prog == msg->rm_call.cb_prog in replay_find()
184 && rce->rce_msg.rm_call.cb_vers == msg->rm_call.cb_vers in replay_find()
185 && rce->rce_msg.rm_call.cb_proc == msg->rm_call.cb_proc in replay_find()
186 && rce->rce_addr.ss_len == addr->sa_len in replay_find()
187 && bcmp(&rce->rce_addr, addr, addr->sa_len) == 0) { in replay_find()
188 if (rce->rce_repmsg.rm_xid) { in replay_find()
194 TAILQ_REMOVE(&rc->rc_all, rce, rce_alllink); in replay_find()
195 TAILQ_INSERT_HEAD(&rc->rc_all, rce, in replay_find()
197 *repmsg = rce->rce_repmsg; in replay_find()
198 if (rce->rce_repbody) { in replay_find()
199 *mp = m_copym(rce->rce_repbody, in replay_find()
217 rce = replay_alloc(rc, msg, addr, h); in replay_find()
221 if (!rce) in replay_find()
232 struct replay_cache_entry *rce; in replay_setreply() local
241 TAILQ_FOREACH(rce, &rc->rc_cache[h], rce_link) { in replay_setreply()
242 if (rce->rce_msg.rm_xid == repmsg->rm_xid in replay_setreply()
243 && rce->rce_addr.ss_len == addr->sa_len in replay_setreply()
244 && bcmp(&rce->rce_addr, addr, addr->sa_len) == 0) { in replay_setreply()
248 if (rce) { in replay_setreply()
249 rce->rce_repmsg = *repmsg; in replay_setreply()
250 rce->rce_repbody = m; in replay_setreply()