diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2011-06-13 21:33:13 -0400 |
---|---|---|
committer | David S. Miller <davem@conan.davemloft.net> | 2011-06-15 10:56:14 -0400 |
commit | 30ae438b120bc63caa2328733c7c7119d5d29842 (patch) | |
tree | 0178332af51368236a8d923083c6a49ea935a676 /drivers/net/bnx2x | |
parent | ca92429f5f52a76eb6e161622d813b8224ce0565 (diff) |
bnx2x: disable fairness if ETS is enabled
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_dcb.h | 2 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_main.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/bnx2x/bnx2x_dcb.h b/drivers/net/bnx2x/bnx2x_dcb.h index bed369d67e02..5bedd85e94df 100644 --- a/drivers/net/bnx2x/bnx2x_dcb.h +++ b/drivers/net/bnx2x/bnx2x_dcb.h | |||
@@ -60,6 +60,8 @@ struct bnx2x_dcbx_port_params { | |||
60 | #define BNX2X_DCBX_OVERWRITE_SETTINGS_DISABLE 0 | 60 | #define BNX2X_DCBX_OVERWRITE_SETTINGS_DISABLE 0 |
61 | #define BNX2X_DCBX_OVERWRITE_SETTINGS_ENABLE 1 | 61 | #define BNX2X_DCBX_OVERWRITE_SETTINGS_ENABLE 1 |
62 | #define BNX2X_DCBX_OVERWRITE_SETTINGS_INVALID (BNX2X_DCBX_CONFIG_INV_VALUE) | 62 | #define BNX2X_DCBX_OVERWRITE_SETTINGS_INVALID (BNX2X_DCBX_CONFIG_INV_VALUE) |
63 | #define BNX2X_IS_ETS_ENABLED(bp) ((bp)->dcb_state == BNX2X_DCB_STATE_ON &&\ | ||
64 | (bp)->dcbx_port_params.ets.enabled) | ||
63 | 65 | ||
64 | struct bnx2x_config_lldp_params { | 66 | struct bnx2x_config_lldp_params { |
65 | u32 overwrite_settings; | 67 | u32 overwrite_settings; |
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 637ff5ac2445..bc516bbcd9fd 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c | |||
@@ -1892,8 +1892,12 @@ static void bnx2x_calc_vn_weight_sum(struct bnx2x *bp) | |||
1892 | bp->vn_weight_sum += vn_min_rate; | 1892 | bp->vn_weight_sum += vn_min_rate; |
1893 | } | 1893 | } |
1894 | 1894 | ||
1895 | /* ... only if all min rates are zeros - disable fairness */ | 1895 | /* if ETS or all min rates are zeros - disable fairness */ |
1896 | if (all_zero) { | 1896 | if (BNX2X_IS_ETS_ENABLED(bp)) { |
1897 | bp->cmng.flags.cmng_enables &= | ||
1898 | ~CMNG_FLAGS_PER_PORT_FAIRNESS_VN; | ||
1899 | DP(NETIF_MSG_IFUP, "Fairness will be disabled due to ETS\n"); | ||
1900 | } else if (all_zero) { | ||
1897 | bp->cmng.flags.cmng_enables &= | 1901 | bp->cmng.flags.cmng_enables &= |
1898 | ~CMNG_FLAGS_PER_PORT_FAIRNESS_VN; | 1902 | ~CMNG_FLAGS_PER_PORT_FAIRNESS_VN; |
1899 | DP(NETIF_MSG_IFUP, "All MIN values are zeroes" | 1903 | DP(NETIF_MSG_IFUP, "All MIN values are zeroes" |