summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBogdan Hamciuc <bogdan.hamciuc@freescale.com>2013-01-26 00:00:30 (GMT)
committerFleming Andrew-AFLEMING <AFLEMING@freescale.com>2013-04-08 23:11:37 (GMT)
commite0c0bad623344ed8db69131fbf5a5c43039cf2f2 (patch)
tree2764ec0196df47ec28e029d864e169fb7cabbd13 /drivers
parentc59ac0e90877baf081ba4d9c5a4604a0481c9835 (diff)
downloadlinux-fsl-qoriq-e0c0bad623344ed8db69131fbf5a5c43039cf2f2.tar.xz
dpaa_eth: Put Tx Conf queues in the netdev's CGR
The Tx Confirmation queues can account for a significant amount of system memory, especially when the core is already loaded and is slow to dequeue from them. In particular, they add to the memory pressure put by the egress processing path. Add the Tx Conf FQs to their netdevice's associated CGR. Change-Id: Ie8d7028729e8168b82843285463be9b305336b97 Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> (cherry picked from commit 10c2f02860f03f991925209bacd343cf39bad321) Reviewed-on: http://git.am.freescale.net:8181/1040 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c
index d07dbdc..f6eab34 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c
@@ -613,8 +613,15 @@ _dpa_fq_alloc(struct list_head *list, struct dpa_fq *dpa_fq)
initfq.fqd.dest.channel = dpa_fq->channel;
initfq.fqd.dest.wq = dpa_fq->wq;
- /* Put all egress queues in a congestion group of their own */
- if (dpa_fq->fq_type == FQ_TYPE_TX) {
+ /*
+ * Put all egress queues in a congestion group of their own.
+ * Sensu stricto, the Tx confirmation queues are Rx FQs,
+ * rather than Tx - but they nonetheless account for the
+ * memory footprint on behalf of egress traffic. We therefore
+ * place them in the netdev's CGR, along with the Tx FQs.
+ */
+ if (dpa_fq->fq_type == FQ_TYPE_TX ||
+ dpa_fq->fq_type == FQ_TYPE_TX_CONFIRM) {
initfq.we_mask |= QM_INITFQ_WE_CGID;
initfq.fqd.fq_ctrl |= QM_FQCTRL_CGE;
initfq.fqd.cgid = priv->cgr_data.cgr.cgrid;
@@ -632,8 +639,13 @@ _dpa_fq_alloc(struct list_head *list, struct dpa_fq *dpa_fq)
initfq.fqd.oac_init.oac = QM_OAC_CG;
initfq.fqd.oac_init.oal = min(sizeof(struct sk_buff) +
DPA_BP_HEAD, (size_t)FSL_QMAN_MAX_OAL);
+ }
- /* Configure per-cpu Tx confirmation queue */
+ /*
+ * Configure the Tx confirmation queue, now that we know
+ * which Tx queue it pairs with.
+ */
+ if (dpa_fq->fq_type == FQ_TYPE_TX) {
confq = _dpa_get_tx_conf_queue(priv, &dpa_fq->fq_base);
if (confq) {
initfq.we_mask |= QM_INITFQ_WE_CONTEXTA |