summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/freescale/sdk_dpaa/Kconfig23
-rw-r--r--drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c4
2 files changed, 25 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig b/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig
index 92118b7..b21d236 100644
--- a/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig
@@ -20,6 +20,29 @@ config FSL_DPAA_CEETM
help
Enable QoS offloading support through the CEETM hardware block.
+config FSL_DPAA_CEETM_CCS_THRESHOLD_1G
+ hex "CEETM egress congestion threshold on 1G ports"
+ depends on FSL_DPAA_CEETM
+ range 0x1000 0x10000000
+ default "0x000a0000"
+ help
+ The size in bytes of the CEETM egress Class Congestion State threshold on 1G ports.
+ The threshold needs to be configured keeping in mind the following factors:
+ - A threshold too large will buffer frames for a long time in the TX queues,
+ when a small shaping rate is configured. This will cause buffer pool depletion
+ or out of memory errors. This in turn will cause frame loss on RX;
+ - A threshold too small will cause unnecessary frame loss by entering
+ congestion too often.
+
+config FSL_DPAA_CEETM_CCS_THRESHOLD_10G
+ hex "CEETM egress congestion threshold on 10G ports"
+ depends on FSL_DPAA_CEETM
+ range 0x1000 0x20000000
+ default "0x00640000"
+ help
+ The size in bytes of the CEETM egress Class Congestion State threshold on 10G ports.
+ See FSL_DPAA_CEETM_CCS_THRESHOLD_1G for details.
+
config FSL_DPAA_OFFLINE_PORTS
bool "Offline Ports support"
depends on FSL_SDK_DPAA_ETH
diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c
index cac613b..bf635b9 100644
--- a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c
@@ -185,9 +185,9 @@ static int ceetm_config_ccg(struct qm_ceetm_ccg **ccg,
/* Set the congestion state thresholds according to the link speed */
if (dpa_priv->mac_dev->if_support & SUPPORTED_10000baseT_Full)
- cs_th = CONFIG_FSL_DPAA_CS_THRESHOLD_10G;
+ cs_th = CONFIG_FSL_DPAA_CEETM_CCS_THRESHOLD_10G;
else
- cs_th = CONFIG_FSL_DPAA_CS_THRESHOLD_1G;
+ cs_th = CONFIG_FSL_DPAA_CEETM_CCS_THRESHOLD_1G;
qm_cgr_cs_thres_set64(&ccg_params.cs_thres_in, cs_th, 1);
qm_cgr_cs_thres_set64(&ccg_params.cs_thres_out,