diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:09:25 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:09:25 -0400 |
commit | 4d43653263084bff55691ae9cbb3c53c9044f064 (patch) | |
tree | 72b6316671e4ae90c6441aa8c9e28da0e4ac4904 /drivers/infiniband/hw/nes | |
parent | 782203884eea5f610444bcf4ed1b4af0010911eb (diff) |
RDMA/nes: Remove session_id from nes_cm stuff
The session_id members of struct nes_cm_listener and struct
nes_cm_node are write-only, so remove them. This allows the
session_id member of struct nes_cm_core to be removed as well, since
it is only used to write those other session_id values.
This removes the use of current->tgid (which will be deprecated)
pointed out by Pavel Emelyanov <xemul@openvz.org>.
Acked-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.h | 3 |
2 files changed, 0 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index d40465c45906..24d266459d14 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -366,7 +366,6 @@ static void print_core(struct nes_cm_core *core) | |||
366 | if (!core) | 366 | if (!core) |
367 | return; | 367 | return; |
368 | nes_debug(NES_DBG_CM, "---------------------------------------------\n"); | 368 | nes_debug(NES_DBG_CM, "---------------------------------------------\n"); |
369 | nes_debug(NES_DBG_CM, "Session ID : %u \n", atomic_read(&core->session_id)); | ||
370 | 369 | ||
371 | nes_debug(NES_DBG_CM, "State : %u \n", core->state); | 370 | nes_debug(NES_DBG_CM, "State : %u \n", core->state); |
372 | 371 | ||
@@ -1101,8 +1100,6 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, | |||
1101 | cm_node->tcp_cntxt.rcv_nxt = 0; | 1100 | cm_node->tcp_cntxt.rcv_nxt = 0; |
1102 | /* get a unique session ID , add thread_id to an upcounter to handle race */ | 1101 | /* get a unique session ID , add thread_id to an upcounter to handle race */ |
1103 | atomic_inc(&cm_core->node_cnt); | 1102 | atomic_inc(&cm_core->node_cnt); |
1104 | atomic_inc(&cm_core->session_id); | ||
1105 | cm_node->session_id = (u32)(atomic_read(&cm_core->session_id) + current->tgid); | ||
1106 | cm_node->conn_type = cm_info->conn_type; | 1103 | cm_node->conn_type = cm_info->conn_type; |
1107 | cm_node->apbvt_set = 0; | 1104 | cm_node->apbvt_set = 0; |
1108 | cm_node->accept_pend = 0; | 1105 | cm_node->accept_pend = 0; |
@@ -1629,9 +1626,7 @@ static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *cm_core, | |||
1629 | listener->cm_core = cm_core; | 1626 | listener->cm_core = cm_core; |
1630 | listener->nesvnic = nesvnic; | 1627 | listener->nesvnic = nesvnic; |
1631 | atomic_inc(&cm_core->node_cnt); | 1628 | atomic_inc(&cm_core->node_cnt); |
1632 | atomic_inc(&cm_core->session_id); | ||
1633 | 1629 | ||
1634 | listener->session_id = (u32)(atomic_read(&cm_core->session_id) + current->tgid); | ||
1635 | listener->conn_type = cm_info->conn_type; | 1630 | listener->conn_type = cm_info->conn_type; |
1636 | listener->backlog = cm_info->backlog; | 1631 | listener->backlog = cm_info->backlog; |
1637 | listener->listener_state = NES_CM_LISTENER_ACTIVE_STATE; | 1632 | listener->listener_state = NES_CM_LISTENER_ACTIVE_STATE; |
@@ -1944,7 +1939,6 @@ static struct nes_cm_core *nes_cm_alloc_core(void) | |||
1944 | cm_core->state = NES_CM_STATE_INITED; | 1939 | cm_core->state = NES_CM_STATE_INITED; |
1945 | cm_core->free_tx_pkt_max = NES_CM_DEFAULT_FREE_PKTS; | 1940 | cm_core->free_tx_pkt_max = NES_CM_DEFAULT_FREE_PKTS; |
1946 | 1941 | ||
1947 | atomic_set(&cm_core->session_id, 0); | ||
1948 | atomic_set(&cm_core->events_posted, 0); | 1942 | atomic_set(&cm_core->events_posted, 0); |
1949 | 1943 | ||
1950 | /* init the packet lists */ | 1944 | /* init the packet lists */ |
diff --git a/drivers/infiniband/hw/nes/nes_cm.h b/drivers/infiniband/hw/nes/nes_cm.h index 980fb6718628..7717cb2ab500 100644 --- a/drivers/infiniband/hw/nes/nes_cm.h +++ b/drivers/infiniband/hw/nes/nes_cm.h | |||
@@ -225,7 +225,6 @@ enum nes_cm_listener_state { | |||
225 | 225 | ||
226 | struct nes_cm_listener { | 226 | struct nes_cm_listener { |
227 | struct list_head list; | 227 | struct list_head list; |
228 | u64 session_id; | ||
229 | struct nes_cm_core *cm_core; | 228 | struct nes_cm_core *cm_core; |
230 | u8 loc_mac[ETH_ALEN]; | 229 | u8 loc_mac[ETH_ALEN]; |
231 | nes_addr_t loc_addr; | 230 | nes_addr_t loc_addr; |
@@ -242,7 +241,6 @@ struct nes_cm_listener { | |||
242 | 241 | ||
243 | /* per connection node and node state information */ | 242 | /* per connection node and node state information */ |
244 | struct nes_cm_node { | 243 | struct nes_cm_node { |
245 | u64 session_id; | ||
246 | u32 hashkey; | 244 | u32 hashkey; |
247 | 245 | ||
248 | nes_addr_t loc_addr, rem_addr; | 246 | nes_addr_t loc_addr, rem_addr; |
@@ -327,7 +325,6 @@ struct nes_cm_event { | |||
327 | 325 | ||
328 | struct nes_cm_core { | 326 | struct nes_cm_core { |
329 | enum nes_cm_node_state state; | 327 | enum nes_cm_node_state state; |
330 | atomic_t session_id; | ||
331 | 328 | ||
332 | atomic_t listen_node_cnt; | 329 | atomic_t listen_node_cnt; |
333 | struct nes_cm_node listen_list; | 330 | struct nes_cm_node listen_list; |