Simplify lagg_input().

No functional change intended.

MFC after:	2 weeks
This commit is contained in:
Mark Johnston 2018-05-22 15:35:38 +00:00
parent ee252fc995
commit db5a36bddf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334049
2 changed files with 4 additions and 12 deletions

View File

@ -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();

View File

@ -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 {