diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-01-14 15:04:53 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-01-14 15:04:53 +0000 |
commit | 879f0684cbc6d39d89800b880ef0d40d39512c54 (patch) | |
tree | e21293966a6f1d73285ff7bd3732abb01895d2c4 /sys/dev/ic | |
parent | 85f83927c10fbc481f918e8b1b06a156a60480b8 (diff) |
rev 1.63
Avoid an unnecessary copy of a packet if it is already in a single mbuf.
Introduce an additional device flag for those NICs which require the
transmit buffers to be aligned to 32-bit boundaries.
From FreeBSD
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/dc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index b8bd247de92..42101cb715c 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.78 2005/01/08 06:02:59 brad Exp $ */ +/* $OpenBSD: dc.c,v 1.79 2005/01/14 15:04:51 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2739,7 +2739,9 @@ dc_start(ifp) if (m_head == NULL) break; - if (sc->dc_flags & DC_TX_COALESCE) { + if (sc->dc_flags & DC_TX_COALESCE && + (m_head->m_next != NULL || + sc->dc_flags & DC_TX_ALIGN)) { #ifdef ALTQ /* note: dc_coal breaks the poll-and-dequeue rule. * if dc_coal fails, we lose the packet. |