net/dpaa: fix FD offset data type
authorNipun Gupta <nipun.gupta@nxp.com>
Tue, 7 Jul 2020 09:22:17 +0000 (14:52 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sat, 11 Jul 2020 04:18:52 +0000 (06:18 +0200)
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>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/net/dpaa/dpaa_rxtx.c

index 5dba1db..3aeecb7 100644 (file)
@@ -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) {