Module Name:    src
Committed By:   rin
Date:           Sat May 21 10:24:50 UTC 2022

Modified Files:
        src/sys/dev/marvell: if_mvgbe.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/marvell/if_mvgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/marvell/if_mvgbe.c
diff -u src/sys/dev/marvell/if_mvgbe.c:1.63 src/sys/dev/marvell/if_mvgbe.c:1.64
--- src/sys/dev/marvell/if_mvgbe.c:1.63	Sat May 21 10:22:27 2022
+++ src/sys/dev/marvell/if_mvgbe.c	Sat May 21 10:24:50 2022
@@ -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 @@ do_defrag:
 		/* 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;
 	}
 

Reply via email to