qcacmn: Add nbuf and nbuf->data prefetch in Lithium RX
Adding a nbuf and nbuf->data prefetches in 2nd loop of Lithium datapath RX improved UDP throughput by about 250Mbps. PINE default driver: 3189Mbps @ 100% core-3 PINE with prefetch: 3469Mbps @ 100% core-3 Note: PINE reo ring is mapped to core-3. Change-Id: I7f166b52c3697facdce3954994755c9c1412c1f3
This commit is contained in:

committed by
Madan Koyyalamudi

parent
47d6589295
commit
5026c5a3d3
@@ -100,4 +100,34 @@ dp_rx_peer_metadata_peer_id_get_li(struct dp_soc *soc, uint32_t peer_metadata)
|
||||
|
||||
return metadata->peer_id;
|
||||
}
|
||||
|
||||
#ifdef QCA_DP_RX_NBUF_AND_NBUF_DATA_PREFETCH
|
||||
static inline
|
||||
void dp_rx_prefetch_nbuf_data(qdf_nbuf_t nbuf, qdf_nbuf_t next)
|
||||
{
|
||||
struct rx_pkt_tlvs *pkt_tlvs;
|
||||
|
||||
if (next) {
|
||||
/* prefetch skb->next and first few bytes of skb->cb */
|
||||
qdf_prefetch(next);
|
||||
/* skb->cb spread across 2 cache lines hence below prefetch */
|
||||
qdf_prefetch(&next->_skb_refdst);
|
||||
qdf_prefetch(&next->len);
|
||||
qdf_prefetch(&next->protocol);
|
||||
pkt_tlvs = (struct rx_pkt_tlvs *)next->data;
|
||||
/* sa_idx, da_idx, l3_pad in RX msdu_end TLV */
|
||||
qdf_prefetch(pkt_tlvs);
|
||||
/* msdu_done in RX attention TLV */
|
||||
qdf_prefetch(&pkt_tlvs->attn_tlv);
|
||||
/* fr_ds & to_ds in RX MPDU start TLV */
|
||||
if (qdf_nbuf_is_rx_chfrag_end(nbuf))
|
||||
qdf_prefetch(&pkt_tlvs->mpdu_start_tlv);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
void dp_rx_prefetch_nbuf_data(qdf_nbuf_t nbuf, qdf_nbuf_t next)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user