Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145891831
D24331.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D24331.diff
View Options
Index: head/sys/net/if_lagg.c
===================================================================
--- head/sys/net/if_lagg.c
+++ head/sys/net/if_lagg.c
@@ -1874,10 +1874,6 @@
error = lagg_proto_start(sc, m);
LAGG_RUNLOCK();
-
- if (error != 0)
- if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
-
return (error);
}
@@ -2100,6 +2096,7 @@
* port if the link is down or the port is NULL.
*/
if ((lp = lagg_link_active(sc, lp)) == NULL) {
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1);
m_freem(m);
return (ENETDOWN);
}
@@ -2145,31 +2142,28 @@
errors++;
break;
}
-
- ret = lagg_enqueue(last->lp_ifp, m0);
- if (ret != 0)
- errors++;
+ lagg_enqueue(last->lp_ifp, m0);
}
last = lp;
}
if (last == NULL) {
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1);
m_freem(m);
return (ENOENT);
}
if ((last = lagg_link_active(sc, last)) == NULL) {
+ errors++;
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, errors);
m_freem(m);
return (ENETDOWN);
}
ret = lagg_enqueue(last->lp_ifp, m);
- if (ret != 0)
- errors++;
+ if (errors != 0)
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, errors);
- if (errors == 0)
- return (ret);
-
- return (0);
+ return (ret);
}
static struct mbuf*
@@ -2192,6 +2186,7 @@
/* Use the master port if active or the next available port */
if ((lp = lagg_link_active(sc, sc->sc_primary)) == NULL) {
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1);
m_freem(m);
return (ENETDOWN);
}
@@ -2315,6 +2310,7 @@
* port if the link is down or the port is NULL.
*/
if ((lp = lagg_link_active(sc, lp)) == NULL) {
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1);
m_freem(m);
return (ENETDOWN);
}
@@ -2386,6 +2382,7 @@
lp = lacp_select_tx_port(sc, m);
if (lp == NULL) {
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1);
m_freem(m);
return (ENETDOWN);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 26, 7:24 PM (1 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29006878
Default Alt Text
D24331.diff (1 KB)
Attached To
Mode
D24331: lagg: stop double-counting output errors and counting drops as errors
Attached
Detach File
Event Timeline
Log In to Comment