cvs commit: src/sys/dev/em if_em.c

Robert Watson rwatson at FreeBSD.org
Sun Nov 14 20:20:29 GMT 2004


rwatson     2004-11-14 20:20:28 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/em           if_em.c 
  Log:
  Further refine the if_em vlan fix in if_em.c:1.53:
  
  - Because em_encap() can now fail in a way that leaves us without an
    mbuf chain, potentially set *m_headp to NULL if that happens, so that
    the caller can do the right thing.  This case can occur when we try
    to prepend the vlan header mbuf but can't allocate additional memory.
  
  - Modify the caller of em_encap() to detect a NULL m_head and not try
    to queue the mbuf if that happens.
  
  - When em_encap() fails, make sure to call bus_dmamap_destroy() to
    clean up.
  
  Revision  Changes    Path
  1.54      +19 -4     src/sys/dev/em/if_em.c


More information about the cvs-src mailing list