From fdf24086f4752aee5dfb40143c736250df017820 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Wed, 13 Oct 2010 14:06:47 +0000 Subject: cnic: Defer iscsi connection cleanup The bnx2x devices require a 2 second quiet time before sending the last RAMROD command to destroy a connection. This sleep wait adds up to a long delay when iscsid is serially destroying maultiple connections. Create a workqueue to perform the final connection cleanup in the background to speed up the process. This significantly speeds up the process as the wait time can be done in parallel for multiple connections. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/cnic.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/cnic.h') diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index 9907cc2..47cd801 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h @@ -170,6 +170,7 @@ struct cnic_context { unsigned long timestamp; unsigned long ctx_flags; #define CTX_FL_OFFLD_START 0 +#define CTX_FL_DELETE_WAIT 1 u8 ulp_proto_id; union { struct cnic_iscsi *iscsi; @@ -287,6 +288,8 @@ struct cnic_local { int hq_size; int num_cqs; + struct delayed_work delete_task; + struct cnic_ctx *ctx_arr; int ctx_blks; int ctx_blk_size; -- cgit v1.1