From 8a68343fc81b5c50ec18c058f7d174c3a899b6e8 Mon Sep 17 00:00:00 2001 From: Rakesh Pillai Date: Mon, 4 Jan 2021 00:35:24 -0800 Subject: [PATCH] qcacld-3.0: Add rx ring history to pre-alloc memory Add entries to pre-allocate memory region for recording datapath rx ring history. Change-Id: Iffac199c48a9638c94d8568bbc7567bf214ffcc2 CRs-Fixed: 2847548 --- core/dp/txrx3.0/dp_txrx.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/core/dp/txrx3.0/dp_txrx.c b/core/dp/txrx3.0/dp_txrx.c index 3d5501604934..1120899f6fa9 100644 --- a/core/dp/txrx3.0/dp_txrx.c +++ b/core/dp/txrx3.0/dp_txrx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -226,7 +226,22 @@ struct dp_prealloc_context { }; static struct dp_prealloc_context g_dp_context_allocs[] = { - {DP_PDEV_TYPE, (sizeof(struct dp_pdev)), false, NULL} + {DP_PDEV_TYPE, (sizeof(struct dp_pdev)), false, NULL}, +#ifdef WLAN_FEATURE_DP_RX_RING_HISTORY + /* 4 Rx ring history */ + {DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, NULL}, + {DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, NULL}, + {DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, NULL}, + {DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, NULL}, + /* 1 Rx error ring history */ + {DP_RX_ERR_RING_HIST_TYPE, sizeof(struct dp_rx_err_history), + false, NULL}, +#ifndef RX_DEFRAG_DO_NOT_REINJECT + /* 1 Rx reinject ring history */ + {DP_RX_REINJECT_RING_HIST_TYPE, sizeof(struct dp_rx_reinject_history), + false, NULL}, +#endif /* RX_DEFRAG_DO_NOT_REINJECT */ +#endif /* WLAN_FEATURE_DP_RX_RING_HISTORY */ }; static struct dp_consistent_prealloc g_dp_consistent_allocs[] = {