i40e: fix build with 16-byte descriptors
The compile error will occur as below when set 'RTE_LIBRTE_I40E_16BYTE_RX_DESC=y'. 'fd_id' should be used to replace 'fd', as 'fd' is not defined in that structure at all. In addition, local variable of 'flexbl' and 'flexbh' must be used only if 32 bytes RX descriptor is selected. error logs: lib/librte_pmd_i40e/i40e_rxtx.c: In function i40e_rxd_build_fdir: lib/librte_pmd_i40e/i40e_rxtx.c:431:28: error: volatile union <anonymous> has no member named fd lib/librte_pmd_i40e/i40e_rxtx.c:427:19: error: unused variable flexbl [-Werror=unused-variable] lib/librte_pmd_i40e/i40e_rxtx.c:427:11: error: unused variable flexbh [-Werror=unused-variable] Signed-off-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
This commit is contained in:
parent
e77339f400
commit
2f423f6385
@ -424,13 +424,9 @@ static inline uint64_t
|
||||
i40e_rxd_build_fdir(volatile union i40e_rx_desc *rxdp, struct rte_mbuf *mb)
|
||||
{
|
||||
uint64_t flags = 0;
|
||||
#ifndef RTE_LIBRTE_I40E_16BYTE_RX_DESC
|
||||
uint16_t flexbh, flexbl;
|
||||
|
||||
#ifdef RTE_LIBRTE_I40E_16BYTE_RX_DESC
|
||||
mb->hash.fdir.hi =
|
||||
rte_le_to_cpu_32(rxdp->wb.qword0.hi_dword.fd);
|
||||
flags |= PKT_RX_FDIR_ID;
|
||||
#else
|
||||
flexbh = (rte_le_to_cpu_32(rxdp->wb.qword2.ext_status) >>
|
||||
I40E_RX_DESC_EXT_STATUS_FLEXBH_SHIFT) &
|
||||
I40E_RX_DESC_EXT_STATUS_FLEXBH_MASK;
|
||||
@ -453,6 +449,10 @@ i40e_rxd_build_fdir(volatile union i40e_rx_desc *rxdp, struct rte_mbuf *mb)
|
||||
rte_le_to_cpu_32(rxdp->wb.qword3.lo_dword.flex_bytes_lo);
|
||||
flags |= PKT_RX_FDIR_FLX;
|
||||
}
|
||||
#else
|
||||
mb->hash.fdir.hi =
|
||||
rte_le_to_cpu_32(rxdp->wb.qword0.hi_dword.fd_id);
|
||||
flags |= PKT_RX_FDIR_ID;
|
||||
#endif
|
||||
return flags;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user