Author: shurd
Date: Mon Dec 11 20:01:28 2017
New Revision: 326775
URL: https://svnweb.freebsd.org/changeset/base/326775

Log:
  Increment encap_pad_mbuf_fail when m_dup() fails in padding
  
  Previously, the counter was only incremented when m_append() failed.  Since
  the function can also fail on m_dup() now, increment the counter there as
  well.
  
  Sponsored by: Limelight Networks

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==============================================================================
--- head/sys/net/iflib.c        Mon Dec 11 19:21:39 2017        (r326774)
+++ head/sys/net/iflib.c        Mon Dec 11 20:01:28 2017        (r326775)
@@ -3127,6 +3127,7 @@ iflib_ether_pad(device_t dev, struct mbuf **m_head, ui
                if (new_head == NULL) {
                        m_freem(*m_head);
                        device_printf(dev, "cannot pad short frame, m_dup() 
failed");
+                       DBG_COUNTER_INC(encap_pad_mbuf_fail);
                        return ENOMEM;
                }
                m_freem(*m_head);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to