Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/marvell Add DPRINTF() to catch failure of m_defrag()...



details:   https://anonhg.NetBSD.org/src/rev/e745bd5ed950
branches:  trunk
changeset: 366267:e745bd5ed950
user:      rin <rin%NetBSD.org@localhost>
date:      Sat May 21 10:24:50 2022 +0000

description:
Add DPRINTF() to catch failure of m_defrag() in mvgbe_encap().

diffstat:

 sys/dev/marvell/if_mvgbe.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 397c1e8751fe -r e745bd5ed950 sys/dev/marvell/if_mvgbe.c
--- a/sys/dev/marvell/if_mvgbe.c        Sat May 21 10:22:27 2022 +0000
+++ b/sys/dev/marvell/if_mvgbe.c        Sat May 21 10:24:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mvgbe.c,v 1.63 2022/05/21 10:22:27 rin Exp $        */
+/*     $NetBSD: if_mvgbe.c,v 1.64 2022/05/21 10:24:50 rin Exp $        */
 /*
  * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.63 2022/05/21 10:22:27 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.64 2022/05/21 10:24:50 rin Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -1825,8 +1825,10 @@
                /* A small unaligned segment was detected. */
                struct mbuf *m_new;
                m_new = m_defrag(m_head, M_DONTWAIT);
-               if (m_new == NULL)
+               if (m_new == NULL) {
+                       DPRINTFN(2, ("mvgbe_encap: defrag failed\n"));
                        return EFBIG;
+               }
                m_head = m_new;
        }
 



Home | Main Index | Thread Index | Old Index