Explorar el Código

qcacld-3.0: Add support to dynamically control fisa aggregation

Add support to dynamically control fisa aggregation in
the rx direction based on the dp_aggregation sysfs entry.

Change-Id: I677b8b5f05e6cd849671a058b5e6ef07fc14a969
CRs-Fixed: 2718132
Yeshwanth Sriram Guntuka hace 4 años
padre
commit
cec526afda
Se han modificado 3 ficheros con 28 adiciones y 0 borrados
  1. 12 0
      core/dp/txrx3.0/dp_fisa_rx.c
  2. 15 0
      core/dp/txrx3.0/dp_fisa_rx.h
  3. 1 0
      core/dp/txrx3.0/dp_rx_fst.c

+ 12 - 0
core/dp/txrx3.0/dp_fisa_rx.c

@@ -1035,6 +1035,7 @@ QDF_STATUS dp_fisa_rx(struct dp_soc *soc, struct dp_vdev *vdev,
 	qdf_nbuf_t next_nbuf;
 	struct dp_fisa_rx_sw_ft *fisa_flow;
 	int fisa_ret;
+	uint8_t rx_ctx_id = QDF_NBUF_CB_RX_CTX_ID(nbuf_list);
 
 	head_nbuf = nbuf_list;
 
@@ -1046,6 +1047,17 @@ QDF_STATUS dp_fisa_rx(struct dp_soc *soc, struct dp_vdev *vdev,
 		if (dp_is_nbuf_bypass_fisa(head_nbuf))
 			goto deliver_nbuf;
 
+		if (qdf_atomic_read(&soc->skip_fisa_param.skip_fisa)) {
+			if (!soc->skip_fisa_param.fisa_force_flush[rx_ctx_id]) {
+				dp_rx_fisa_flush_by_ctx_id(soc, rx_ctx_id);
+				soc->skip_fisa_param.
+						fisa_force_flush[rx_ctx_id] = 1;
+			}
+			goto deliver_nbuf;
+		} else if (soc->skip_fisa_param.fisa_force_flush[rx_ctx_id]) {
+			soc->skip_fisa_param.fisa_force_flush[rx_ctx_id] = 0;
+		}
+
 		qdf_nbuf_push_head(head_nbuf, RX_PKT_TLVS_LEN +
 				   QDF_NBUF_CB_RX_PACKET_L3_HDR_PAD(head_nbuf));
 

+ 15 - 0
core/dp/txrx3.0/dp_fisa_rx.h

@@ -63,6 +63,21 @@ QDF_STATUS dp_rx_fisa_flush_by_ctx_id(struct dp_soc *soc, int napi_id);
  * Return: Success on flushing the flows for the vdev
  */
 QDF_STATUS dp_rx_fisa_flush_by_vdev_id(struct dp_soc *soc, uint8_t vdev_id);
+
+/**
+ * dp_rx_skip_fisa() - Set flags to skip fisa aggregation
+ * @cdp_soc: core txrx main context
+ * @value: allow or skip fisa
+ *
+ * Return: None
+ */
+static inline
+void dp_rx_skip_fisa(struct cdp_soc_t *cdp_soc, uint32_t value)
+{
+	struct dp_soc *soc = (struct dp_soc *)cdp_soc;
+
+	qdf_atomic_set(&soc->skip_fisa_param.skip_fisa, !value);
+}
 #else
 static QDF_STATUS dp_rx_dump_fisa_stats(struct dp_soc *soc)
 {

+ 1 - 0
core/dp/txrx3.0/dp_rx_fst.c

@@ -110,6 +110,7 @@ QDF_STATUS dp_rx_fst_attach(struct dp_soc *soc, struct dp_pdev *pdev)
 	fst->soc_hdl = soc;
 	soc->rx_fst = fst;
 	soc->fisa_enable = true;
+	qdf_atomic_init(&soc->skip_fisa_param.skip_fisa);
 
 	QDF_TRACE(QDF_MODULE_ID_ANY, QDF_TRACE_LEVEL_ERROR,
 		  "Rx FST attach successful, #entries:%d\n",