Source-Changes-HG archive

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

[src/trunk]: src/sys/net micro-optimization for if_snd_is_used()



details:   https://anonhg.NetBSD.org/src/rev/ad50f8fbb11d
branches:  trunk
changeset: 457955:ad50f8fbb11d
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Thu Jul 25 07:45:57 2019 +0000

description:
micro-optimization for if_snd_is_used()

diffstat:

 sys/net/if.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 82f0d7aab979 -r ad50f8fbb11d sys/net/if.c
--- a/sys/net/if.c      Thu Jul 25 07:05:44 2019 +0000
+++ b/sys/net/if.c      Thu Jul 25 07:45:57 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.456 2019/07/04 02:44:25 ozaki-r Exp $ */
+/*     $NetBSD: if.c,v 1.457 2019/07/25 07:45:57 knakahara Exp $       */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.456 2019/07/04 02:44:25 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.457 2019/07/25 07:45:57 knakahara Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1043,9 +1043,9 @@
 if_snd_is_used(struct ifnet *ifp)
 {
 
-       return ifp->if_transmit == NULL || ifp->if_transmit == if_nulltransmit ||
-           ifp->if_transmit == if_transmit ||
-           ALTQ_IS_ENABLED(&ifp->if_snd);
+       return ALTQ_IS_ENABLED(&ifp->if_snd) ||
+               ifp->if_transmit == if_transmit ||
+               ifp->if_transmit == NULL || ifp->if_transmit == if_nulltransmit;
 }
 
 /*



Home | Main Index | Thread Index | Old Index