Skip to contentSkip to conversation

BNX2I - Adjust sq_size module parametr to power of 2 only if a non-zero value is specified

PATCH In review Anil Veerabhadrappa 2 participants 2 messages Dec 7, 2009 – Dec 10, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/5 BNX2I - Adjust sq_size module parametr to power of 2 only if a non-zero value is specified

* This issue was discovered during 10G iscsi testing
* Default value of 'sq_size' module parameter is '0' which means driver should use predefined SQ queue size when setting up iscsi connection.
* roundup_pow_of_two(0) results in '1' and forces driver to setup connections with send queue size of '1' and results in lower performance as well

---
 drivers/scsi/bnx2i/bnx2i_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/bnx2i/bnx2i_init.c +1 -1
index 3c46458..dc6b56c 100644
@@ -367,7 +367,7 @@ static int __init bnx2i_mod_init(void)
 
 	printk(KERN_INFO "%s", version);
 
-	if (!is_power_of_2(sq_size))
+	if (sq_size && !is_power_of_2(sq_size))
 		sq_size = roundup_pow_of_two(sq_size);
 
 	mutex_init(&bnx2i_dev_lock);
Signature · 1 line
1.6.5.1
Reviewed-by on v1 2/5
#1 lore raw
Quoted 18 lines · Anil Veerabhadrappa

* This issue was discovered during 10G iscsi testing
* Default value of 'sq_size' module parameter is '0' which means driver should use predefined SQ queue size when setting up iscsi connection.
* roundup_pow_of_two(0) results in '1' and forces driver to setup connections with send queue size of '1' and results in lower performance as well

---
 drivers/scsi/bnx2i/bnx2i_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/bnx2i/bnx2i_init.c +0 -0
index 3c46458..dc6b56c 100644

drivers/scsi/bnx2i/bnx2i_init.c static int __init bnx2i_mod_init(void) · line 373

Quoted 8 lines
drivers/scsi/bnx2i/bnx2i_init.c +1 -1
@@ -367,7 +367,7 @@ static int __init bnx2i_mod_init(void)
 
 	printk(KERN_INFO "%s", version);
 
-	if (!is_power_of_2(sq_size))
+	if (sq_size && !is_power_of_2(sq_size))
 		sq_size = roundup_pow_of_two(sq_size);
 
 	mutex_init(&bnx2i_dev_lock);

Ok.