Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17b4d44e authored by Jinwei Chen's avatar Jinwei Chen Committed by Amit Mehta
Browse files

qcacmn: add rx nbuf ipa smmu map/unmap trace

Currently in_use and unmapped flag from rx_desc can not know is
the rx nbuf has done IPA smmu map/unmap accurately.
add rx nbuf IPA smmu map/unmap flag in qdf_nbuf_cb, and use
this flag to check if IPA smmu map/unmap need to be done or not.

Change-Id: I19bbc6cc69ba752ef7c58d41fbe26299ca96d29e
CRs-Fixed: 2731313
parent 6fb65e22
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -143,4 +143,28 @@ static inline uint8_t qdf_nbuf_get_rx_reo_dest_ind(qdf_nbuf_t buf)
{
	return QDF_NBUF_CB_RX_PACKET_REO_DEST_IND(buf);
}

/**
 * qdf_nbuf_set_rx_ipa_smmu_map() - set ipa smmu mapped flag
 * @buf: Network buffer
 * @value: 1 - ipa smmu mapped, 0 - ipa smmu unmapped
 *
 * Return: none
 */
static inline void qdf_nbuf_set_rx_ipa_smmu_map(qdf_nbuf_t buf,
						uint8_t value)
{
	QDF_NBUF_CB_RX_PACKET_IPA_SMMU_MAP(buf) = value;
}

/**
 * qdf_nbuf_is_rx_ipa_smmu_map() - check ipa smmu map flag
 * @buf: Network buffer
 *
 * Return 0 or 1
 */
static inline uint8_t qdf_nbuf_is_rx_ipa_smmu_map(qdf_nbuf_t buf)
{
	return QDF_NBUF_CB_RX_PACKET_IPA_SMMU_MAP(buf);
}
#endif /* _QDF_NBUF_M_H */
+23 −0
Original line number Diff line number Diff line
@@ -132,4 +132,27 @@ static inline void qdf_nbuf_set_rx_reo_dest_ind(qdf_nbuf_t buf,
						uint8_t value)
{
}

/**
* qdf_nbuf_set_rx_ipa_smmu_map() - set ipa smmu mapped flag
 * @buf: Network buffer
 * @value: 1 - ipa smmu mapped, 0 - ipa smmu unmapped
 *
 * Return: none
 */
static inline void qdf_nbuf_set_rx_ipa_smmu_map(qdf_nbuf_t buf,
						uint8_t value)
{
}

/**
 * qdf_nbuf_is_rx_ipa_smmu_map() - check ipa smmu map flag
 * @buf: Network buffer
 *
 * Return 0 or 1
 */
static inline uint8_t qdf_nbuf_is_rx_ipa_smmu_map(qdf_nbuf_t buf)
{
	return 0;
}
#endif /* _QDF_NBUF_W_H */
+3 −1
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ typedef union {
 * @rx.dev.priv_cb_m.l3_hdr_pad: L3 header padding offset
 * @rx.dev.priv_cb_m.exc_frm: exception frame
 * @rx.dev.priv_cb_m.reo_dest_ind: reo destination indication
 * @rx.dev.priv_cb_m.ipa_smmu_map: do IPA smmu map
 * @rx.dev.priv_cb_m.tcp_seq_num: TCP sequence number
 * @rx.dev.priv_cb_m.tcp_ack_num: TCP ACK number
 * @rx.dev.priv_cb_m.lro_ctx: LRO context
@@ -230,7 +231,8 @@ struct qdf_nbuf_cb {
						 /* exception frame flag */
						 exc_frm:1,
						 reo_dest_ind:5,
						 reserved1:10;
						 ipa_smmu_map:1,
						 reserved1:9;
					uint32_t tcp_seq_num;
					uint32_t tcp_ack_num;
					union {
+4 −0
Original line number Diff line number Diff line
@@ -81,6 +81,10 @@
	(((struct qdf_nbuf_cb *)((skb)->cb))->u.rx.dev.priv_cb_m. \
	reo_dest_ind)

#define  QDF_NBUF_CB_RX_PACKET_IPA_SMMU_MAP(skb) \
	 (((struct qdf_nbuf_cb *)((skb)->cb))->u.rx.dev.priv_cb_m. \
	 ipa_smmu_map)

#define __qdf_nbuf_ipa_owned_get(skb) \
	QDF_NBUF_CB_TX_IPA_OWNED(skb)