Browse Source

qcacmn: Stop FISA if frame rings mismatch

If frames from the same FISA flow goes into different REO2SW rings, it
will result in an unexpected FISA behavior. This can happen if the
frames have been reinjected from FW offload module since FW will select
REO2SW1 ring. If the same flow frames hash to other REO2SW rings, then
the same flow UDP frames will do to different rings.
Reo_destination_indication of 6 indicates if the frame has been
reinjected from FW. If so, then continue to deliver the packet without
FISA.

Change-Id: I14a17a10d04909adfb30557d58beb1610e59bf70
CRs-Fixed: 2790292
Saket Jha 4 years ago
parent
commit
a64da56134

+ 2 - 0
hal/wifi3.0/hal_internal.h

@@ -620,6 +620,8 @@ struct hal_hw_txrx_ops {
 	void (*hal_rx_flow_get_cmem_fse)(struct hal_soc *soc,
 					 uint32_t fse_offset,
 					 uint32_t *fse, qdf_size_t len);
+	void (*hal_rx_msdu_get_reo_destination_indication)(uint8_t *buf,
+							   uint32_t *reo_destination_indication);
 };
 
 /**

+ 26 - 0
hal/wifi3.0/hal_rx.h

@@ -3370,6 +3370,32 @@ hal_rx_msdu_flow_idx_get(hal_soc_handle_t hal_soc_hdl,
 	return hal_soc->ops->hal_rx_msdu_flow_idx_get(buf);
 }
 
+/**
+ * hal_rx_msdu_get_reo_destination_indication: API to get reo
+ * destination index from rx_msdu_end TLV
+ * @buf: pointer to the start of RX PKT TLV headers
+ * @reo_destination_indication: pointer to return value of
+ * reo_destination_indication
+ *
+ * Return: reo_destination_indication value from MSDU END TLV
+ */
+static inline void
+hal_rx_msdu_get_reo_destination_indication(hal_soc_handle_t hal_soc_hdl,
+					   uint8_t *buf,
+					   uint32_t *reo_destination_indication)
+{
+	struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
+
+	if ((!hal_soc) || (!hal_soc->ops)) {
+		hal_err("hal handle is NULL");
+		QDF_BUG(0);
+		return;
+	}
+
+	hal_soc->ops->hal_rx_msdu_get_reo_destination_indication(buf,
+						reo_destination_indication);
+}
+
 /**
  * hal_rx_msdu_flow_idx_timeout: API to get flow index timeout
  * from rx_msdu_end TLV

+ 5 - 1
hal/wifi3.0/qca5018/hal_5018.c

@@ -1767,7 +1767,11 @@ struct hal_hw_txrx_ops qca5018_hal_hw_txrx_ops = {
 	hal_rx_mpdu_start_offset_get_generic,
 	hal_rx_mpdu_end_offset_get_generic,
 	hal_rx_flow_setup_fse_5018,
-	hal_compute_reo_remap_ix2_ix3_5018
+	hal_compute_reo_remap_ix2_ix3_5018,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 struct hal_hw_srng_config hw_srng_table_5018[] = {

+ 5 - 1
hal/wifi3.0/qca6290/hal_6290.c

@@ -1148,7 +1148,11 @@ struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
 	hal_rx_mpdu_start_offset_get_generic,
 	hal_rx_mpdu_end_offset_get_generic,
 	NULL,
-	hal_compute_reo_remap_ix2_ix3_6290
+	hal_compute_reo_remap_ix2_ix3_6290,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 struct hal_hw_srng_config hw_srng_table_6290[] = {

+ 5 - 1
hal/wifi3.0/qca6390/hal_6390.c

@@ -1201,7 +1201,11 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
 	hal_rx_mpdu_start_offset_get_generic,
 	hal_rx_mpdu_end_offset_get_generic,
 	NULL,
-	hal_compute_reo_remap_ix2_ix3_6390
+	hal_compute_reo_remap_ix2_ix3_6390,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 struct hal_hw_srng_config hw_srng_table_6390[] = {

+ 23 - 1
hal/wifi3.0/qca6490/hal_6490.c

@@ -1214,6 +1214,24 @@ static inline uint32_t hal_rx_msdu_flow_idx_get_6490(uint8_t *buf)
 	return HAL_RX_MSDU_END_FLOW_IDX_GET(msdu_end);
 }
 
+/**
+ * hal_rx_msdu_get_reo_destination_indication_6490: API to get
+ * reo_destination_indication from rx_msdu_end TLV
+ * @buf: pointer to the start of RX PKT TLV headers
+ * @reo_destination_indication: pointer to return value of reo_destination_indication
+ *
+ * Return: none
+ */
+static inline void
+hal_rx_msdu_get_reo_destination_indication_6490(uint8_t *buf,
+						uint32_t *reo_destination_indication)
+{
+	struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
+	struct rx_msdu_end *msdu_end = &pkt_tlvs->msdu_end_tlv.rx_msdu_end;
+
+	*reo_destination_indication = HAL_RX_MSDU_END_REO_DEST_IND_GET(msdu_end);
+}
+
 /**
  * hal_rx_msdu_flow_idx_invalid_6490: API to get flow index invalid
  * from rx_msdu_end TLV
@@ -1745,7 +1763,11 @@ struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = {
 	hal_rx_mpdu_start_offset_get_generic,
 	hal_rx_mpdu_end_offset_get_generic,
 	hal_rx_flow_setup_fse_6490,
-	hal_compute_reo_remap_ix2_ix3_6490
+	hal_compute_reo_remap_ix2_ix3_6490,
+	NULL,
+	NULL,
+	NULL,
+	hal_rx_msdu_get_reo_destination_indication_6490
 };
 
 struct hal_hw_srng_config hw_srng_table_6490[] = {

+ 6 - 0
hal/wifi3.0/qca6490/hal_6490_rx.h

@@ -325,6 +325,12 @@ RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_RESERVED_0A_OFFSET))
 		RX_MSDU_END_12_FLOW_IDX_MASK,    \
 		RX_MSDU_END_12_FLOW_IDX_LSB))
 
+#define HAL_RX_MSDU_END_REO_DEST_IND_GET(_rx_msdu_end)  \
+		(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end,  \
+		RX_MSDU_END_12_REO_DESTINATION_INDICATION_OFFSET)),  \
+		RX_MSDU_END_12_REO_DESTINATION_INDICATION_MASK,    \
+		RX_MSDU_END_12_REO_DESTINATION_INDICATION_LSB))
+
 #define HAL_RX_MSDU_END_FLOW_IDX_INVALID_GET(_rx_msdu_end)  \
 		(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end,  \
 		RX_MSDU_END_10_FLOW_IDX_INVALID_OFFSET)),  \

+ 1 - 0
hal/wifi3.0/qca6750/hal_6750.c

@@ -1909,6 +1909,7 @@ struct hal_hw_txrx_ops qca6750_hal_hw_txrx_ops = {
 	hal_rx_flow_setup_cmem_fse_6750,
 	hal_rx_flow_get_cmem_fse_ts_6750,
 	hal_rx_flow_get_cmem_fse_6750,
+	NULL
 };
 
 struct hal_hw_srng_config hw_srng_table_6750[] = {

+ 5 - 1
hal/wifi3.0/qca8074v1/hal_8074v1.c

@@ -1324,7 +1324,11 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
 	hal_rx_mpdu_start_offset_get_generic,
 	hal_rx_mpdu_end_offset_get_generic,
 	hal_rx_flow_setup_fse_8074v1,
-	hal_compute_reo_remap_ix2_ix3_8074v1
+	hal_compute_reo_remap_ix2_ix3_8074v1,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 struct hal_hw_srng_config hw_srng_table_8074[] = {

+ 5 - 1
hal/wifi3.0/qca8074v2/hal_8074v2.c

@@ -1327,7 +1327,11 @@ struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
 	hal_rx_mpdu_start_offset_get_generic,
 	hal_rx_mpdu_end_offset_get_generic,
 	hal_rx_flow_setup_fse_8074v2,
-	hal_compute_reo_remap_ix2_ix3_8074v2
+	hal_compute_reo_remap_ix2_ix3_8074v2,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 struct hal_hw_srng_config hw_srng_table_8074v2[] = {

+ 5 - 1
hal/wifi3.0/qcn9000/hal_9000.c

@@ -1818,7 +1818,11 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
 	hal_rx_mpdu_start_offset_get_generic,
 	hal_rx_mpdu_end_offset_get_generic,
 	hal_rx_flow_setup_fse_9000,
-	hal_compute_reo_remap_ix2_ix3_9000
+	hal_compute_reo_remap_ix2_ix3_9000,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 struct hal_hw_srng_config hw_srng_table_9000[] = {

+ 4 - 0
hal/wifi3.0/qcn9100/hal_qcn9100.c

@@ -1775,6 +1775,10 @@ struct hal_hw_txrx_ops qcn9100_hal_hw_txrx_ops = {
 	hal_rx_mpdu_end_offset_get_generic,
 	hal_rx_flow_setup_fse_9100,
 	hal_compute_reo_remap_ix2_ix3_9100,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 struct hal_hw_srng_config hw_srng_table_9100[] = {