From: Apeksha Gupta <apeksha.gupta@nxp.com>
store drop priority in mbuf from fd.
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
---
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 1 +
drivers/net/dpaa2/dpaa2_rxtx.c | 1 +
2 files changed, 2 insertions(+)
@@ -328,6 +328,7 @@ enum qbman_fd_format {
#define DPAA2_GET_FD_BPID(fd) (((fd)->simple.bpid_offset & 0x00003FFF))
#define DPAA2_GET_FD_IVP(fd) (((fd)->simple.bpid_offset & 0x00004000) >> 14)
#define DPAA2_GET_FD_OFFSET(fd) (((fd)->simple.bpid_offset & 0x0FFF0000) >> 16)
+#define DPAA2_GET_FD_DROPP(fd) (((fd)->simple.ctrl & 0x07000000) >> 24)
#define DPAA2_GET_FD_FRC(fd) ((fd)->simple.frc)
#define DPAA2_GET_FD_FLC(fd) \
(((uint64_t)((fd)->simple.flc_hi) << 32) + (fd)->simple.flc_lo)
@@ -388,6 +388,7 @@ eth_fd_to_mbuf(const struct qbman_fd *fd,
mbuf->pkt_len = mbuf->data_len;
mbuf->port = port_id;
mbuf->next = NULL;
+ mbuf->hash.sched.color = DPAA2_GET_FD_DROPP(fd);
rte_mbuf_refcnt_set(mbuf, 1);
#ifdef RTE_LIBRTE_MEMPOOL_DEBUG
rte_mempool_check_cookies(rte_mempool_from_obj((void *)mbuf),