diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index a4527a623f92..d81e4d664437 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -2171,7 +2171,7 @@ re_encap(sc, m_head) * offload is enabled, we always manually pad short frames out * to the minimum ethernet frame size. */ - if ((*m_head)->m_pkthdr.len < RL_MIN_FRAMELEN && + if ((*m_head)->m_pkthdr.len < RL_IP4CSUMTX_PADLEN && ((*m_head)->m_pkthdr.csum_flags & CSUM_IP) != 0) { padlen = RL_MIN_FRAMELEN - (*m_head)->m_pkthdr.len; if (M_WRITABLE(*m_head) == 0) { diff --git a/sys/pci/if_rlreg.h b/sys/pci/if_rlreg.h index 7e866891d14a..5038666551c0 100644 --- a/sys/pci/if_rlreg.h +++ b/sys/pci/if_rlreg.h @@ -497,6 +497,12 @@ #define RL_ETHER_ALIGN 2 +/* + * re(4) hardware ip4csum-tx could be mangled with 28 bytes or less IP packets. + */ +#define RL_IP4CSUMTX_MINLEN 28 +#define RL_IP4CSUMTX_PADLEN (ETHER_HDR_LEN + RL_IP4CSUMTX_MINLEN) + struct rl_chain_data { uint16_t cur_rx; uint8_t *rl_rx_buf;