From: brad Date: Wed, 21 Jan 2015 09:52:55 +0000 (+0000) Subject: Use the RL_FLAG_AUTOPAD flag when trying to determine when X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c28aeefe7168d40b3f213892f8da224bdad47c1a;p=openbsd Use the RL_FLAG_AUTOPAD flag when trying to determine when to pad short frames. --- 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++; }