qcacmn: Fetch the reo qdesc from the peer
When compact rx tlv feature is enabled fetch the reo qdesc from the peer instead of rx pkt tlvs. Change-Id: Idc9eec559b71ebb2dc39ea1d648a384ea0eb9559 CRs-Fixed: 3311270
This commit is contained in:

committed by
Madan Koyyalamudi

parent
391d920327
commit
63d8ecaa0f
@@ -2157,6 +2157,7 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
dp_init_near_full_arch_ops_be(arch_ops);
|
dp_init_near_full_arch_ops_be(arch_ops);
|
||||||
|
arch_ops->get_reo_qdesc_addr = dp_rx_get_reo_qdesc_addr_be;
|
||||||
arch_ops->get_rx_hash_key = dp_get_rx_hash_key_be;
|
arch_ops->get_rx_hash_key = dp_get_rx_hash_key_be;
|
||||||
arch_ops->print_mlo_ast_stats = dp_print_mlo_ast_stats_be;
|
arch_ops->print_mlo_ast_stats = dp_print_mlo_ast_stats_be;
|
||||||
arch_ops->peer_get_reo_hash = dp_peer_get_reo_hash_be;
|
arch_ops->peer_get_reo_hash = dp_peer_get_reo_hash_be;
|
||||||
|
@@ -488,4 +488,52 @@ dp_rx_prefetch_hw_sw_nbuf_32_byte_desc(struct dp_soc *soc,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_WORD_BASED_TLV
|
||||||
|
/**
|
||||||
|
* dp_rx_get_reo_qdesc_addr_be(): API to get qdesc address of reo
|
||||||
|
* entrance ring desc
|
||||||
|
*
|
||||||
|
* @hal_soc: Handle to HAL Soc structure
|
||||||
|
* @dst_ring_desc: reo dest ring descriptor (used for Lithium DP)
|
||||||
|
* @buf: pointer to the start of RX PKT TLV headers
|
||||||
|
* @txrx_peer: pointer to txrx_peer
|
||||||
|
* @tid: tid value
|
||||||
|
*
|
||||||
|
* Return: qdesc adrress in reo destination ring buffer
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
uint64_t dp_rx_get_reo_qdesc_addr_be(hal_soc_handle_t hal_soc,
|
||||||
|
uint8_t *dst_ring_desc,
|
||||||
|
uint8_t *buf,
|
||||||
|
struct dp_txrx_peer *txrx_peer,
|
||||||
|
unsigned int tid)
|
||||||
|
{
|
||||||
|
struct dp_peer *peer = NULL;
|
||||||
|
uint64_t qdesc_addr = 0;
|
||||||
|
|
||||||
|
if (hal_reo_shared_qaddr_is_enable(hal_soc)) {
|
||||||
|
qdesc_addr = (uint64_t)txrx_peer->peer_id;
|
||||||
|
} else {
|
||||||
|
peer = dp_peer_get_ref_by_id(txrx_peer->vdev->pdev->soc,
|
||||||
|
txrx_peer->peer_id,
|
||||||
|
DP_MOD_ID_CONFIG);
|
||||||
|
if (!peer)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
qdesc_addr = (uint64_t)peer->rx_tid[tid].hw_qdesc_paddr;
|
||||||
|
dp_peer_unref_delete(peer, DP_MOD_ID_CONFIG);
|
||||||
|
}
|
||||||
|
return qdesc_addr;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
uint64_t dp_rx_get_reo_qdesc_addr_be(hal_soc_handle_t hal_soc,
|
||||||
|
uint8_t *dst_ring_desc,
|
||||||
|
uint8_t *buf,
|
||||||
|
struct dp_txrx_peer *txrx_peer,
|
||||||
|
unsigned int tid)
|
||||||
|
{
|
||||||
|
return hal_rx_get_qdesc_addr(hal_soc, dst_ring_desc, buf);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1398,9 +1398,11 @@ static QDF_STATUS dp_rx_defrag_reo_reinject(struct dp_txrx_peer *txrx_peer,
|
|||||||
ent_qdesc_addr = hal_get_reo_ent_desc_qdesc_addr(soc->hal_soc,
|
ent_qdesc_addr = hal_get_reo_ent_desc_qdesc_addr(soc->hal_soc,
|
||||||
(uint8_t *)ent_ring_desc);
|
(uint8_t *)ent_ring_desc);
|
||||||
|
|
||||||
dst_qdesc_addr = hal_rx_get_qdesc_addr(soc->hal_soc,
|
dst_qdesc_addr = soc->arch_ops.get_reo_qdesc_addr(
|
||||||
(uint8_t *)dst_ring_desc,
|
soc->hal_soc,
|
||||||
qdf_nbuf_data(head));
|
(uint8_t *)dst_ring_desc,
|
||||||
|
qdf_nbuf_data(head),
|
||||||
|
txrx_peer, tid);
|
||||||
|
|
||||||
qdf_mem_copy(ent_qdesc_addr, &dst_qdesc_addr, 5);
|
qdf_mem_copy(ent_qdesc_addr, &dst_qdesc_addr, 5);
|
||||||
|
|
||||||
|
@@ -1962,6 +1962,11 @@ struct dp_arch_ops {
|
|||||||
enum dp_mod_id mod_id,
|
enum dp_mod_id mod_id,
|
||||||
uint8_t vdev_id);
|
uint8_t vdev_id);
|
||||||
#endif
|
#endif
|
||||||
|
uint64_t (*get_reo_qdesc_addr)(hal_soc_handle_t hal_soc_hdl,
|
||||||
|
uint8_t *dst_ring_desc,
|
||||||
|
uint8_t *buf,
|
||||||
|
struct dp_txrx_peer *peer,
|
||||||
|
unsigned int tid);
|
||||||
void (*get_rx_hash_key)(struct dp_soc *soc,
|
void (*get_rx_hash_key)(struct dp_soc *soc,
|
||||||
struct cdp_lro_hash_config *lro_hash);
|
struct cdp_lro_hash_config *lro_hash);
|
||||||
void (*txrx_print_peer_stats)(struct cdp_peer_stats *peer_stats,
|
void (*txrx_print_peer_stats)(struct cdp_peer_stats *peer_stats,
|
||||||
|
@@ -632,6 +632,7 @@ void dp_initialize_arch_ops_li(struct dp_arch_ops *arch_ops)
|
|||||||
arch_ops->dp_txrx_ppeds_rings_status = NULL;
|
arch_ops->dp_txrx_ppeds_rings_status = NULL;
|
||||||
arch_ops->txrx_soc_ppeds_start = NULL;
|
arch_ops->txrx_soc_ppeds_start = NULL;
|
||||||
arch_ops->txrx_soc_ppeds_stop = NULL;
|
arch_ops->txrx_soc_ppeds_stop = NULL;
|
||||||
|
arch_ops->get_reo_qdesc_addr = dp_rx_get_reo_qdesc_addr_li;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef QCA_DP_TX_HW_SW_NBUF_DESC_PREFETCH
|
#ifdef QCA_DP_TX_HW_SW_NBUF_DESC_PREFETCH
|
||||||
|
@@ -79,6 +79,27 @@ QDF_STATUS dp_wbm_get_rx_desc_from_hal_desc_li(
|
|||||||
struct dp_soc *soc,
|
struct dp_soc *soc,
|
||||||
void *ring_desc,
|
void *ring_desc,
|
||||||
struct dp_rx_desc **r_rx_desc);
|
struct dp_rx_desc **r_rx_desc);
|
||||||
|
/**
|
||||||
|
* dp_rx_get_reo_qdesc_addr_li(): API to get qdesc address of reo
|
||||||
|
* entrance ring desc
|
||||||
|
*
|
||||||
|
* @hal_soc: Handle to HAL Soc structure
|
||||||
|
* @dst_ring_desc: reo dest ring descriptor (used for Lithium DP)
|
||||||
|
* @buf: pointer to the start of RX PKT TLV headers
|
||||||
|
* @txrx_peer: pointer to txrx_peer
|
||||||
|
* @tid: tid value
|
||||||
|
*
|
||||||
|
* Return: qdesc adrress in reo destination ring buffer
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
uint64_t dp_rx_get_reo_qdesc_addr_li(hal_soc_handle_t hal_soc,
|
||||||
|
uint8_t *dst_ring_desc,
|
||||||
|
uint8_t *buf,
|
||||||
|
struct dp_txrx_peer *txrx_peer,
|
||||||
|
unsigned int tid)
|
||||||
|
{
|
||||||
|
return hal_rx_get_qdesc_addr(hal_soc, dst_ring_desc, buf);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_rx_desc_cookie_2_va_li() - Convert RX Desc cookie ID to VA
|
* dp_rx_desc_cookie_2_va_li() - Convert RX Desc cookie ID to VA
|
||||||
|
Reference in New Issue
Block a user