Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic when change mbuf type, clear m_pkthdr so that we ...



details:   https://anonhg.NetBSD.org/src/rev/bc2780ff07c2
branches:  trunk
changeset: 482909:bc2780ff07c2
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Feb 25 03:39:13 2000 +0000

description:
when change mbuf type, clear m_pkthdr so that we do not get panic with
old data in pointer fields.  NOTE: we'll extend m_pkthdr field soon.

Wondering: do mbuf pre-allocation code in elink3.c really buy us much
performance?  it comes with code duplicate/synchronization problem with
sys/mbuf.h...

diffstat:

 sys/dev/ic/elink3.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 018841077ab0 -r bc2780ff07c2 sys/dev/ic/elink3.c
--- a/sys/dev/ic/elink3.c       Fri Feb 25 03:38:59 2000 +0000
+++ b/sys/dev/ic/elink3.c       Fri Feb 25 03:39:13 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elink3.c,v 1.75 2000/02/08 12:49:12 enami Exp $        */
+/*     $NetBSD: elink3.c,v 1.76 2000/02/25 03:39:13 itojun Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1627,6 +1627,7 @@
                sc->next_mb = (sc->next_mb + 1) % MAX_MBS;
                m->m_data = m->m_pktdat;
                m->m_flags = M_PKTHDR;
+               bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
        }
        m->m_pkthdr.rcvif = ifp;
        m->m_pkthdr.len = totlen;



Home | Main Index | Thread Index | Old Index