[02/37] net/dpaa: fix fd offset data type
diff mbox series

Message ID 20200527132326.1382-3-hemant.agrawal@nxp.com
State Changes Requested
Delegated to: Ferruh Yigit
Headers show
Series
  • NXP DPAAx enhancements
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Hemant Agrawal May 27, 2020, 1:22 p.m. UTC
From: Nipun Gupta <nipun.gupta@nxp.com>

On DPAA fd offset is 9 bits, but we are using uint8_t in the
SG case. This patch fixes the same.
Fixes: 8cffdcbe85aa ("net/dpaa: support scattered Rx")
Cc: stable@dpdk.org

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Akhil Goyal May 27, 2020, 6:08 p.m. UTC | #1
> From: Nipun Gupta <nipun.gupta@nxp.com>
> 
> On DPAA fd offset is 9 bits, but we are using uint8_t in the
> SG case. This patch fixes the same.
> Fixes: 8cffdcbe85aa ("net/dpaa: support scattered Rx")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Patch
diff mbox series

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 5dba1db8b..3aeecb7d2 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -305,7 +305,7 @@  dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	struct qm_sg_entry *sgt, *sg_temp;
 	void *vaddr, *sg_vaddr;
 	int i = 0;
-	uint8_t fd_offset = fd->offset;
+	uint16_t fd_offset = fd->offset;
 
 	vaddr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
 	if (!vaddr) {