Skip to content

Commit

Permalink
dpaa2-eth: configure the cache stashing amount on a queue
Browse files Browse the repository at this point in the history
Configure the amount of 64 bytes of frame, annotation and context data
that will be cache stashed for a specific frame queue.  Since the frame
context is not used, configure that only 64 bytes of frame data and 64
bytes of annotation will be stashed.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
  • Loading branch information
Ioana Ciornei authored and Li Yang committed Feb 26, 2019
1 parent 51da14e commit f8b9958
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2303,9 +2303,14 @@ static int setup_rx_flow(struct dpaa2_eth_priv *priv,
queue.destination.type = DPNI_DEST_DPCON;
queue.destination.priority = 1;
queue.user_context = (u64)(uintptr_t)fq;
queue.flc.stash_control = 1;
queue.flc.value &= 0xFFFFFFFFFFFFFFC0;
/* 01 01 00 - data, annotation, flow context */
queue.flc.value |= 0x14;
err = dpni_set_queue(priv->mc_io, 0, priv->mc_token,
DPNI_QUEUE_RX, 0, fq->flowid,
DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST,
DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST |
DPNI_QUEUE_OPT_FLC,
&queue);
if (err) {
dev_err(dev, "dpni_set_queue(RX) failed\n");
Expand Down

0 comments on commit f8b9958

Please sign in to comment.