bus/dpaa: optimize fq callback routine
Avoid array of fq as packets are dq only from a single q. Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
This commit is contained in:
parent
65a70a98f1
commit
9abdad12b8
@ -1058,7 +1058,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
|
||||
struct qm_portal *portal = &p->p;
|
||||
register struct qm_dqrr *dqrr = &portal->dqrr;
|
||||
struct qm_dqrr_entry *dq[QM_DQRR_SIZE], *shadow[QM_DQRR_SIZE];
|
||||
struct qman_fq *fq[QM_DQRR_SIZE];
|
||||
struct qman_fq *fq;
|
||||
unsigned int limit = 0, rx_number = 0;
|
||||
uint32_t consume = 0;
|
||||
|
||||
@ -1092,14 +1092,13 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
|
||||
|
||||
/* SDQCR: context_b points to the FQ */
|
||||
#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
|
||||
fq[rx_number] = qman_fq_lookup_table[be32_to_cpu(
|
||||
dq[rx_number]->contextB)];
|
||||
fq = qman_fq_lookup_table[be32_to_cpu(dq[rx_number]->contextB)];
|
||||
#else
|
||||
fq[rx_number] = (void *)be32_to_cpu(
|
||||
dq[rx_number]->contextB);
|
||||
fq = (void *)be32_to_cpu(dq[rx_number]->contextB);
|
||||
#endif
|
||||
fq[rx_number]->cb.dqrr_prepare(shadow[rx_number],
|
||||
&bufs[rx_number]);
|
||||
if (fq->cb.dqrr_prepare)
|
||||
fq->cb.dqrr_prepare(shadow[rx_number],
|
||||
&bufs[rx_number]);
|
||||
|
||||
consume |= (1 << (31 - DQRR_PTR2IDX(shadow[rx_number])));
|
||||
rx_number++;
|
||||
@ -1107,7 +1106,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
|
||||
} while (++limit < poll_limit);
|
||||
|
||||
if (rx_number)
|
||||
fq[0]->cb.dqrr_dpdk_pull_cb(fq, shadow, bufs, rx_number);
|
||||
fq->cb.dqrr_dpdk_pull_cb(&fq, shadow, bufs, rx_number);
|
||||
|
||||
/* Consume all the DQRR enries together */
|
||||
qm_out(DQRR_DCAP, (1 << 8) | consume);
|
||||
|
@ -431,7 +431,7 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,
|
||||
}
|
||||
|
||||
fd = &dqrr[i]->fd;
|
||||
dpaa_intf = fq[i]->dpaa_intf;
|
||||
dpaa_intf = fq[0]->dpaa_intf;
|
||||
|
||||
format = (fd->opaque & DPAA_FD_FORMAT_MASK) >>
|
||||
DPAA_FD_FORMAT_SHIFT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user