diff options
author | Sony Chacko <sony.chacko@qlogic.com> | 2010-10-26 13:53:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-27 15:21:54 -0400 |
commit | 90d190055589b35986c2ff3f56e2f47613b9a67f (patch) | |
tree | ac6fb50686a870aa6d2aa6aa9e6d0ccb67781a2e /drivers/net/qlcnic/qlcnic_main.c | |
parent | e5edb7b19fd207f78adfdf4d9d5e1dd74a7eabd3 (diff) |
qlcnic: reduce rx ring size
If eswitch is enabled, rcv ring size can be reduce, as
physical port is partition-ed.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_main.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 5a3ce084c391..7a298cdf9ab3 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -656,13 +656,23 @@ qlcnic_check_options(struct qlcnic_adapter *adapter) | |||
656 | 656 | ||
657 | dev_info(&pdev->dev, "firmware v%d.%d.%d\n", | 657 | dev_info(&pdev->dev, "firmware v%d.%d.%d\n", |
658 | fw_major, fw_minor, fw_build); | 658 | fw_major, fw_minor, fw_build); |
659 | |||
660 | if (adapter->ahw.port_type == QLCNIC_XGBE) { | 659 | if (adapter->ahw.port_type == QLCNIC_XGBE) { |
661 | adapter->num_rxd = DEFAULT_RCV_DESCRIPTORS_10G; | 660 | if (adapter->flags & QLCNIC_ESWITCH_ENABLED) { |
661 | adapter->num_rxd = DEFAULT_RCV_DESCRIPTORS_VF; | ||
662 | adapter->max_rxd = MAX_RCV_DESCRIPTORS_VF; | ||
663 | } else { | ||
664 | adapter->num_rxd = DEFAULT_RCV_DESCRIPTORS_10G; | ||
665 | adapter->max_rxd = MAX_RCV_DESCRIPTORS_10G; | ||
666 | } | ||
667 | |||
662 | adapter->num_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_10G; | 668 | adapter->num_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_10G; |
669 | adapter->max_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_10G; | ||
670 | |||
663 | } else if (adapter->ahw.port_type == QLCNIC_GBE) { | 671 | } else if (adapter->ahw.port_type == QLCNIC_GBE) { |
664 | adapter->num_rxd = DEFAULT_RCV_DESCRIPTORS_1G; | 672 | adapter->num_rxd = DEFAULT_RCV_DESCRIPTORS_1G; |
665 | adapter->num_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_1G; | 673 | adapter->num_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_1G; |
674 | adapter->max_jumbo_rxd = MAX_JUMBO_RCV_DESCRIPTORS_1G; | ||
675 | adapter->max_rxd = MAX_RCV_DESCRIPTORS_1G; | ||
666 | } | 676 | } |
667 | 677 | ||
668 | adapter->msix_supported = !!use_msi_x; | 678 | adapter->msix_supported = !!use_msi_x; |