242 RDSV3_FOR_EACH_LIST_NODE(conn, &map->m_conn_list, c_map_item) {
243 if (!test_and_set_bit(0, &conn->c_map_queued)) {
244 rdsv3_stats_inc(s_cong_update_queued);
245 (void) rdsv3_send_xmit(conn);
246 }
247 }
248
249 mutex_exit(&rdsv3_cong_lock);
250
251 RDSV3_DPRINTF4("rdsv3_cong_queue_updates", "Return(map: %p)", map);
252 }
253
254 void
255 rdsv3_cong_map_updated(struct rdsv3_cong_map *map, uint64_t portmask)
256 {
257 RDSV3_DPRINTF4("rdsv3_cong_map_updated",
258 "waking map %p for %u.%u.%u.%u",
259 map, NIPQUAD(map->m_addr));
260
261 rdsv3_stats_inc(s_cong_update_received);
262 atomic_add_32(&rdsv3_cong_generation, 1);
263 #if 0
264 XXX
265 if (waitqueue_active(&map->m_waitq))
266 #endif
267 rdsv3_wake_up(&map->m_waitq);
268
269 if (portmask && !list_is_empty(&rdsv3_cong_monitor)) {
270 struct rdsv3_sock *rs;
271
272 rw_enter(&rdsv3_cong_monitor_lock, RW_READER);
273 RDSV3_FOR_EACH_LIST_NODE(rs, &rdsv3_cong_monitor,
274 rs_cong_list) {
275 mutex_enter(&rs->rs_lock);
276 rs->rs_cong_notify |= (rs->rs_cong_mask & portmask);
277 rs->rs_cong_mask &= ~portmask;
278 mutex_exit(&rs->rs_lock);
279 if (rs->rs_cong_notify)
280 rdsv3_wake_sk_sleep(rs);
281 }
282 rw_exit(&rdsv3_cong_monitor_lock);
|
242 RDSV3_FOR_EACH_LIST_NODE(conn, &map->m_conn_list, c_map_item) {
243 if (!test_and_set_bit(0, &conn->c_map_queued)) {
244 rdsv3_stats_inc(s_cong_update_queued);
245 (void) rdsv3_send_xmit(conn);
246 }
247 }
248
249 mutex_exit(&rdsv3_cong_lock);
250
251 RDSV3_DPRINTF4("rdsv3_cong_queue_updates", "Return(map: %p)", map);
252 }
253
254 void
255 rdsv3_cong_map_updated(struct rdsv3_cong_map *map, uint64_t portmask)
256 {
257 RDSV3_DPRINTF4("rdsv3_cong_map_updated",
258 "waking map %p for %u.%u.%u.%u",
259 map, NIPQUAD(map->m_addr));
260
261 rdsv3_stats_inc(s_cong_update_received);
262 atomic_inc_32(&rdsv3_cong_generation);
263 #if 0
264 XXX
265 if (waitqueue_active(&map->m_waitq))
266 #endif
267 rdsv3_wake_up(&map->m_waitq);
268
269 if (portmask && !list_is_empty(&rdsv3_cong_monitor)) {
270 struct rdsv3_sock *rs;
271
272 rw_enter(&rdsv3_cong_monitor_lock, RW_READER);
273 RDSV3_FOR_EACH_LIST_NODE(rs, &rdsv3_cong_monitor,
274 rs_cong_list) {
275 mutex_enter(&rs->rs_lock);
276 rs->rs_cong_notify |= (rs->rs_cong_mask & portmask);
277 rs->rs_cong_mask &= ~portmask;
278 mutex_exit(&rs->rs_lock);
279 if (rs->rs_cong_notify)
280 rdsv3_wake_sk_sleep(rs);
281 }
282 rw_exit(&rdsv3_cong_monitor_lock);
|