On Wed, Jan 5, 2011 at 9:35 PM, David Dillow <[email protected]> wrote: > From: Bart Van Assche <[email protected]> > > Only one CPU at a time will own an RX IU, so using the address of the IU > as the work request cookie allows us to avoid taking a lock. We can > similarly prepare the TX path for lockless posting by moving the free TX > IUs to a list. This also removes the requirement that the queue sizes be > a power of 2. > > [ ... ] > @@ -601,9 +601,9 @@ static int srp_reconnect_target(struct srp_target_port > *target) > srp_reset_req(target, req); > spin_unlock_irq(target->scsi_host->host_lock); > > - target->rx_head = 0; > - target->tx_head = 0; > - target->tx_tail = 0; > + list_del_init(&target->free_tx); > + for (i = 0; i < SRP_SQ_SIZE; ++i) > + list_move(&target->tx_ring[i]->list, &target->free_tx); > > target->qp_in_error = 0; > ret = srp_connect_target(target);
Hello Dave, Sorry that I hadn't noticed this before: invoking list_del_init() on &target->free_tx seems strange to me since &target->free_tx is a list head and not a list element. While list_del_init() will probably work fine here, using INIT_LIST_HEAD() here seems more appropriate to me. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
