net/octeontx2: fix buffer size assignment
authorAnkur Dwivedi <adwivedi@marvell.com>
Wed, 20 May 2020 12:20:10 +0000 (17:50 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 21 May 2020 13:53:14 +0000 (15:53 +0200)
commit357439ad0927ce817ad9d4138b71554c683406a8
treecb64c7773880d4d1313d0d942be8aafcd570c56f
parent20cb28a0ec7fb0c49807c63e6f57b5e0cdb36065
net/octeontx2: fix buffer size assignment

The elt_size field in mempool holds the size of one packet buffer.
It can be used to set the lpm_sizem1 field in rq context.

The lpb_sizem1 field in rq context is 12 bit, direct assignment
to it was causing overflow of value. Because of this errors
were observed while trying inline inbound with large packets.
This patch resolves the errors.

Fixes: 094fc8a3a1e2 ("net/octeontx2: add Rx queue setup and release")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
drivers/net/octeontx2/otx2_ethdev.c