svn commit: r334049 - head/sys/net
Mark Johnston
markj at FreeBSD.org
Tue May 22 15:35:40 UTC 2018
Author: markj
Date: Tue May 22 15:35:38 2018
New Revision: 334049
URL: https://svnweb.freebsd.org/changeset/base/334049
Log:
Simplify lagg_input().
No functional change intended.
MFC after: 2 weeks
Modified:
head/sys/net/if_lagg.c
head/sys/net/if_lagg.h
Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c Tue May 22 15:13:25 2018 (r334048)
+++ head/sys/net/if_lagg.c Tue May 22 15:35:38 2018 (r334049)
@@ -1680,7 +1680,7 @@ lagg_input(struct ifnet *ifp, struct mbuf *m)
LAGG_RLOCK();
if ((scifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ||
- (lp->lp_flags & LAGG_PORT_DISABLED) ||
+ lp->lp_detaching != 0 ||
sc->sc_proto == LAGG_PROTO_NONE) {
LAGG_RUNLOCK();
m_freem(m);
@@ -1689,17 +1689,10 @@ lagg_input(struct ifnet *ifp, struct mbuf *m)
ETHER_BPF_MTAP(scifp, m);
- if (lp->lp_detaching != 0) {
+ m = lagg_proto_input(sc, lp, m);
+ if (m != NULL && (scifp->if_flags & IFF_MONITOR) != 0) {
m_freem(m);
m = NULL;
- } else
- m = lagg_proto_input(sc, lp, m);
-
- if (m != NULL) {
- if (scifp->if_flags & IFF_MONITOR) {
- m_freem(m);
- m = NULL;
- }
}
LAGG_RUNLOCK();
Modified: head/sys/net/if_lagg.h
==============================================================================
--- head/sys/net/if_lagg.h Tue May 22 15:13:25 2018 (r334048)
+++ head/sys/net/if_lagg.h Tue May 22 15:35:38 2018 (r334049)
@@ -42,9 +42,8 @@
#define LAGG_PORT_ACTIVE 0x00000004 /* port is active */
#define LAGG_PORT_COLLECTING 0x00000008 /* port is receiving frames */
#define LAGG_PORT_DISTRIBUTING 0x00000010 /* port is sending frames */
-#define LAGG_PORT_DISABLED 0x00000020 /* port is disabled */
#define LAGG_PORT_BITS "\20\01MASTER\02STACK\03ACTIVE\04COLLECTING" \
- "\05DISTRIBUTING\06DISABLED"
+ "\05DISTRIBUTING"
/* Supported lagg PROTOs */
typedef enum {
More information about the svn-src-head
mailing list