From c28aeefe7168d40b3f213892f8da224bdad47c1a Mon Sep 17 00:00:00 2001 From: brad Date: Wed, 21 Jan 2015 09:52:55 +0000 Subject: [PATCH] Use the RL_FLAG_AUTOPAD flag when trying to determine when to pad short frames. --- sys/dev/ic/re.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index 2e5e17f8182..33469fb8db6 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.171 2015/01/20 04:46:11 brad Exp $ */ +/* $OpenBSD: re.c,v 1.172 2015/01/21 09:52:55 brad Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1660,9 +1660,9 @@ re_encap(struct rl_softc *sc, struct mbuf *m, int *idx) nsegs = map->dm_nsegs; pad = 0; - if ((sc->rl_flags & RL_FLAG_DESCV2) == 0 && - m->m_pkthdr.len <= RL_IP4CSUMTX_PADLEN && - (csum_flags & RL_TDESC_CMD_IPCSUM) != 0) { + if ((sc->rl_flags & RL_FLAG_AUTOPAD) == 0 && + m->m_pkthdr.len < RL_IP4CSUMTX_PADLEN && + (m->m_pkthdr.csum_flags & M_IPV4_CSUM_OUT) != 0) { pad = 1; nsegs++; } -- 2.20.1