qcacmn: Extend add timestamp logic for Beryllium
Extend add timestamp logic for Beryllium Change-Id: I69604b83ce5fe7f112316148213d73fefc88ba9b CRs-Fixed: 3245806
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f79e9cc3dc
commit
a87c585e12
@@ -213,6 +213,7 @@ uint32_t dp_rx_process_be(struct dp_intr *int_ctx,
|
|||||||
int max_reap_limit, ring_near_full;
|
int max_reap_limit, ring_near_full;
|
||||||
struct dp_soc *replenish_soc;
|
struct dp_soc *replenish_soc;
|
||||||
uint8_t chip_id;
|
uint8_t chip_id;
|
||||||
|
uint64_t current_time = 0;
|
||||||
|
|
||||||
DP_HIST_INIT();
|
DP_HIST_INIT();
|
||||||
|
|
||||||
@@ -245,6 +246,8 @@ more_data:
|
|||||||
qdf_mem_zero(head, sizeof(head));
|
qdf_mem_zero(head, sizeof(head));
|
||||||
qdf_mem_zero(tail, sizeof(tail));
|
qdf_mem_zero(tail, sizeof(tail));
|
||||||
|
|
||||||
|
dp_pkt_get_timestamp(¤t_time);
|
||||||
|
|
||||||
ring_near_full = _dp_srng_test_and_update_nf_params(soc, rx_ring,
|
ring_near_full = _dp_srng_test_and_update_nf_params(soc, rx_ring,
|
||||||
&max_reap_limit);
|
&max_reap_limit);
|
||||||
|
|
||||||
@@ -817,6 +820,10 @@ done:
|
|||||||
nbuf);
|
nbuf);
|
||||||
|
|
||||||
dp_rx_update_stats(soc, nbuf);
|
dp_rx_update_stats(soc, nbuf);
|
||||||
|
|
||||||
|
dp_pkt_add_timestamp(txrx_peer->vdev, QDF_PKT_RX_DRIVER_ENTRY,
|
||||||
|
current_time, nbuf);
|
||||||
|
|
||||||
DP_RX_LIST_APPEND(deliver_list_head,
|
DP_RX_LIST_APPEND(deliver_list_head,
|
||||||
deliver_list_tail,
|
deliver_list_tail,
|
||||||
nbuf);
|
nbuf);
|
||||||
|
@@ -909,7 +909,8 @@ dp_tx_hw_enqueue_be(struct dp_soc *soc, struct dp_vdev *vdev,
|
|||||||
|
|
||||||
ring_access_fail:
|
ring_access_fail:
|
||||||
dp_tx_ring_access_end_wrapper(soc, hal_ring_hdl, coalesce);
|
dp_tx_ring_access_end_wrapper(soc, hal_ring_hdl, coalesce);
|
||||||
|
dp_pkt_add_timestamp(vdev, QDF_PKT_TX_DRIVER_EXIT,
|
||||||
|
qdf_get_log_timestamp(), tx_desc->nbuf);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5927,3 +5927,25 @@ QDF_STATUS dp_tso_soc_detach(struct cdp_soc_t *txrx_soc)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_DP_PKT_ADD_TIMESTAMP
|
||||||
|
void dp_pkt_add_timestamp(struct dp_vdev *vdev,
|
||||||
|
enum qdf_pkt_timestamp_index index, uint64_t time,
|
||||||
|
qdf_nbuf_t nbuf)
|
||||||
|
{
|
||||||
|
if (qdf_unlikely(qdf_is_dp_pkt_timestamp_enabled())) {
|
||||||
|
uint64_t tsf_time;
|
||||||
|
|
||||||
|
if (vdev->get_tsf_time) {
|
||||||
|
vdev->get_tsf_time(vdev->osif_vdev, time, &tsf_time);
|
||||||
|
qdf_add_dp_pkt_timestamp(nbuf, index, tsf_time);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void dp_pkt_get_timestamp(uint64_t *time)
|
||||||
|
{
|
||||||
|
if (qdf_unlikely(qdf_is_dp_pkt_timestamp_enabled()))
|
||||||
|
*time = qdf_get_log_timestamp();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#ifdef CONFIG_SAWF
|
#ifdef CONFIG_SAWF
|
||||||
#include "dp_sawf.h"
|
#include "dp_sawf.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include <qdf_pkt_add_timestamp.h>
|
||||||
|
|
||||||
#define DP_INVALID_VDEV_ID 0xFF
|
#define DP_INVALID_VDEV_ID 0xFF
|
||||||
|
|
||||||
@@ -1060,4 +1061,35 @@ bool dp_tx_desc_set_ktimestamp(struct dp_vdev *vdev,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DP_PKT_ADD_TIMESTAMP
|
||||||
|
/**
|
||||||
|
* dp_pkt_add_timestamp() - add timestamp in data payload
|
||||||
|
*
|
||||||
|
* @vdev: dp vdev
|
||||||
|
* @index: index to decide offset in payload
|
||||||
|
* @time: timestamp to add in data payload
|
||||||
|
* @nbuf: network buffer
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void dp_pkt_add_timestamp(struct dp_vdev *vdev,
|
||||||
|
enum qdf_pkt_timestamp_index index, uint64_t time,
|
||||||
|
qdf_nbuf_t nbuf);
|
||||||
|
/**
|
||||||
|
* dp_pkt_get_timestamp() - get current system time
|
||||||
|
*
|
||||||
|
* @time: return current system time
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void dp_pkt_get_timestamp(uint64_t *time);
|
||||||
|
#else
|
||||||
|
#define dp_pkt_add_timestamp(vdev, index, time, nbuf)
|
||||||
|
|
||||||
|
static inline
|
||||||
|
void dp_pkt_get_timestamp(uint64_t *time)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -632,25 +632,3 @@ void dp_tx_comp_get_prefetched_params_from_hal_desc(
|
|||||||
qdf_prefetch((uint8_t *)*r_tx_desc);
|
qdf_prefetch((uint8_t *)*r_tx_desc);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DP_PKT_ADD_TIMESTAMP
|
|
||||||
void dp_pkt_add_timestamp(struct dp_vdev *vdev,
|
|
||||||
enum qdf_pkt_timestamp_index index, uint64_t time,
|
|
||||||
qdf_nbuf_t nbuf)
|
|
||||||
{
|
|
||||||
if (qdf_unlikely(qdf_is_dp_pkt_timestamp_enabled())) {
|
|
||||||
uint64_t tsf_time;
|
|
||||||
|
|
||||||
if (vdev->get_tsf_time) {
|
|
||||||
vdev->get_tsf_time(vdev->osif_vdev, time, &tsf_time);
|
|
||||||
qdf_add_dp_pkt_timestamp(nbuf, index, tsf_time);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void dp_pkt_get_timestamp(uint64_t *time)
|
|
||||||
{
|
|
||||||
if (qdf_unlikely(qdf_is_dp_pkt_timestamp_enabled()))
|
|
||||||
*time = qdf_get_log_timestamp();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
#include <dp_mon.h>
|
#include <dp_mon.h>
|
||||||
#include <hal_li_tx.h>
|
#include <hal_li_tx.h>
|
||||||
#include <hal_li_rx.h>
|
#include <hal_li_rx.h>
|
||||||
#include <qdf_pkt_add_timestamp.h>
|
|
||||||
|
|
||||||
/* WBM2SW ring id for rx release */
|
/* WBM2SW ring id for rx release */
|
||||||
#define WBM2SW_REL_ERR_RING_NUM 3
|
#define WBM2SW_REL_ERR_RING_NUM 3
|
||||||
@@ -108,35 +107,4 @@ qdf_size_t dp_get_context_size_li(enum dp_context_type context_type);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
qdf_size_t dp_mon_get_context_size_li(enum dp_context_type context_type);
|
qdf_size_t dp_mon_get_context_size_li(enum dp_context_type context_type);
|
||||||
|
|
||||||
#ifdef CONFIG_DP_PKT_ADD_TIMESTAMP
|
|
||||||
/**
|
|
||||||
* dp_pkt_add_timestamp() - add timestamp in data payload
|
|
||||||
*
|
|
||||||
* @vdev: dp vdev
|
|
||||||
* @index: index to decide offset in payload
|
|
||||||
* @time: timestamp to add in data payload
|
|
||||||
* @nbuf: network buffer
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
void dp_pkt_add_timestamp(struct dp_vdev *vdev,
|
|
||||||
enum qdf_pkt_timestamp_index index, uint64_t time,
|
|
||||||
qdf_nbuf_t nbuf);
|
|
||||||
/**
|
|
||||||
* dp_pkt_get_timestamp() - get current system time
|
|
||||||
*
|
|
||||||
* @time: return current system time
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
void dp_pkt_get_timestamp(uint64_t *time);
|
|
||||||
#else
|
|
||||||
#define dp_pkt_add_timestamp(vdev, index, time, nbuf)
|
|
||||||
|
|
||||||
static inline
|
|
||||||
void dp_pkt_get_timestamp(uint64_t *time)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include "hal_hw_headers.h"
|
#include "hal_hw_headers.h"
|
||||||
#include "dp_types.h"
|
#include "dp_types.h"
|
||||||
#include "dp_rx.h"
|
#include "dp_rx.h"
|
||||||
|
#include "dp_tx.h"
|
||||||
#include "dp_li_rx.h"
|
#include "dp_li_rx.h"
|
||||||
#include "dp_peer.h"
|
#include "dp_peer.h"
|
||||||
#include "hal_rx.h"
|
#include "hal_rx.h"
|
||||||
|
Reference in New Issue
Block a user