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
Dieser Commit ist enthalten in:

committet von
Madan Koyyalamudi

Ursprung
47d6589295
Commit
5026c5a3d3
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <dp_types.h>
|
#include <dp_types.h>
|
||||||
#include <hal_li_tx.h>
|
#include <hal_li_tx.h>
|
||||||
|
#include <hal_li_rx.h>
|
||||||
|
|
||||||
/* WBM2SW ring id for rx release */
|
/* WBM2SW ring id for rx release */
|
||||||
#define WBM2SW_REL_ERR_RING_NUM 3
|
#define WBM2SW_REL_ERR_RING_NUM 3
|
||||||
|
@@ -455,6 +455,8 @@ done:
|
|||||||
nbuf = nbuf_head;
|
nbuf = nbuf_head;
|
||||||
while (nbuf) {
|
while (nbuf) {
|
||||||
next = nbuf->next;
|
next = nbuf->next;
|
||||||
|
dp_rx_prefetch_nbuf_data(nbuf, next);
|
||||||
|
|
||||||
if (qdf_unlikely(dp_rx_is_raw_frame_dropped(nbuf))) {
|
if (qdf_unlikely(dp_rx_is_raw_frame_dropped(nbuf))) {
|
||||||
nbuf = next;
|
nbuf = next;
|
||||||
DP_STATS_INC(soc, rx.err.raw_frm_drop, 1);
|
DP_STATS_INC(soc, rx.err.raw_frm_drop, 1);
|
||||||
|
@@ -100,4 +100,34 @@ dp_rx_peer_metadata_peer_id_get_li(struct dp_soc *soc, uint32_t peer_metadata)
|
|||||||
|
|
||||||
return metadata->peer_id;
|
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
|
#endif
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren