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
This commit is contained in:
Saket Jha
2020-10-02 13:35:56 -07:00
committed by snandini
parent 650f0ffd7d
commit a64da56134
12 changed files with 92 additions and 7 deletions

View File

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

View File

@@ -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); 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 * hal_rx_msdu_flow_idx_timeout: API to get flow index timeout
* from rx_msdu_end TLV * from rx_msdu_end TLV

View File

@@ -1767,7 +1767,11 @@ struct hal_hw_txrx_ops qca5018_hal_hw_txrx_ops = {
hal_rx_mpdu_start_offset_get_generic, hal_rx_mpdu_start_offset_get_generic,
hal_rx_mpdu_end_offset_get_generic, hal_rx_mpdu_end_offset_get_generic,
hal_rx_flow_setup_fse_5018, 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[] = { struct hal_hw_srng_config hw_srng_table_5018[] = {

View File

@@ -1148,7 +1148,11 @@ struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
hal_rx_mpdu_start_offset_get_generic, hal_rx_mpdu_start_offset_get_generic,
hal_rx_mpdu_end_offset_get_generic, hal_rx_mpdu_end_offset_get_generic,
NULL, 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[] = { struct hal_hw_srng_config hw_srng_table_6290[] = {

View File

@@ -1201,7 +1201,11 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
hal_rx_mpdu_start_offset_get_generic, hal_rx_mpdu_start_offset_get_generic,
hal_rx_mpdu_end_offset_get_generic, hal_rx_mpdu_end_offset_get_generic,
NULL, 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[] = { struct hal_hw_srng_config hw_srng_table_6390[] = {

View File

@@ -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); 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 * hal_rx_msdu_flow_idx_invalid_6490: API to get flow index invalid
* from rx_msdu_end TLV * 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_start_offset_get_generic,
hal_rx_mpdu_end_offset_get_generic, hal_rx_mpdu_end_offset_get_generic,
hal_rx_flow_setup_fse_6490, 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[] = { struct hal_hw_srng_config hw_srng_table_6490[] = {

View File

@@ -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_MASK, \
RX_MSDU_END_12_FLOW_IDX_LSB)) 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) \ #define HAL_RX_MSDU_END_FLOW_IDX_INVALID_GET(_rx_msdu_end) \
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \ (_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \
RX_MSDU_END_10_FLOW_IDX_INVALID_OFFSET)), \ RX_MSDU_END_10_FLOW_IDX_INVALID_OFFSET)), \

View File

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

View File

@@ -1324,7 +1324,11 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
hal_rx_mpdu_start_offset_get_generic, hal_rx_mpdu_start_offset_get_generic,
hal_rx_mpdu_end_offset_get_generic, hal_rx_mpdu_end_offset_get_generic,
hal_rx_flow_setup_fse_8074v1, 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[] = { struct hal_hw_srng_config hw_srng_table_8074[] = {

View File

@@ -1327,7 +1327,11 @@ struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
hal_rx_mpdu_start_offset_get_generic, hal_rx_mpdu_start_offset_get_generic,
hal_rx_mpdu_end_offset_get_generic, hal_rx_mpdu_end_offset_get_generic,
hal_rx_flow_setup_fse_8074v2, 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[] = { struct hal_hw_srng_config hw_srng_table_8074v2[] = {

View File

@@ -1818,7 +1818,11 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
hal_rx_mpdu_start_offset_get_generic, hal_rx_mpdu_start_offset_get_generic,
hal_rx_mpdu_end_offset_get_generic, hal_rx_mpdu_end_offset_get_generic,
hal_rx_flow_setup_fse_9000, 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[] = { struct hal_hw_srng_config hw_srng_table_9000[] = {

View File

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