Source-Changes-HG archive

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

[src/trunk]: src/sys/net Simplify: use M_MOVE_PKTHDR directly.



details:   https://anonhg.NetBSD.org/src/rev/7ac6c046b02e
branches:  trunk
changeset: 318871:7ac6c046b02e
user:      maxv <maxv%NetBSD.org@localhost>
date:      Tue May 08 06:08:19 2018 +0000
description:
Simplify: use M_MOVE_PKTHDR directly.

ok knakahara@

diffstat:

 sys/net/if_l2tp.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r 1fb29935166f -r 7ac6c046b02e sys/net/if_l2tp.c
--- a/sys/net/if_l2tp.c Tue May 08 05:24:22 2018 +0000
+++ b/sys/net/if_l2tp.c Tue May 08 06:08:19 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_l2tp.c,v 1.26 2018/05/07 09:51:02 maxv Exp $        */
+/*     $NetBSD: if_l2tp.c,v 1.27 2018/05/08 06:08:19 maxv Exp $        */
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.26 2018/05/07 09:51:02 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.27 2018/05/08 06:08:19 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -506,7 +506,7 @@
                        m_freem(m);
                        return;
                }
-               M_COPY_PKTHDR(m_head, m);
+               M_MOVE_PKTHDR(m_head, m);
 
                /*
                 * m_head should be:
@@ -530,11 +530,6 @@
                if (m->m_len == 0) {
                        m_head->m_next = m_free(m);
                } else {
-                       /*
-                        * Already copied mtag with M_COPY_PKTHDR.
-                        * but don't delete mtag in case cut off M_PKTHDR flag
-                        */
-                       m_remove_pkthdr(m);
                        m_head->m_next = m;
                }
 



Home | Main Index | Thread Index | Old Index