The macro RTE_MIN has some hidden assignments to provide type
safety which means the statement can not be fully evaluated in
first pass of compiler. Replace RTE_MIN() with equivalent macro.
Fixes: 4f936666d790 ("net/sfc: support TSO for EF100 native datapath")
Cc: [email protected]
Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Tyler Retzlaff <[email protected]>
---
drivers/net/sfc/sfc_ef100_tx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/sfc/sfc_ef100_tx.c b/drivers/net/sfc/sfc_ef100_tx.c
index 1b6374775f07..c49d004113d3 100644
--- a/drivers/net/sfc/sfc_ef100_tx.c
+++ b/drivers/net/sfc/sfc_ef100_tx.c
@@ -26,7 +26,6 @@
#include "sfc_ef100.h"
#include "sfc_nic_dma_dp.h"
-
#define sfc_ef100_tx_err(_txq, ...) \
SFC_DP_LOG(SFC_KVARG_DATAPATH_EF100, ERR, &(_txq)->dp.dpq, __VA_ARGS__)
@@ -563,8 +562,7 @@ sfc_ef100_tx_pkt_descs_max(const struct rte_mbuf *m)
* (split into many Tx descriptors).
*/
RTE_BUILD_BUG_ON(SFC_EF100_TX_SEND_DESC_LEN_MAX <
- RTE_MIN((unsigned int)EFX_MAC_PDU_MAX,
- SFC_MBUF_SEG_LEN_MAX));
+ RTE_MIN_T(EFX_MAC_PDU_MAX,
SFC_MBUF_SEG_LEN_MAX, uint32_t));
}
if (m->ol_flags & sfc_dp_mport_override) {
--
2.43.0