When dropping a fragment queue count the number of fragments in the queue
When dropping a fragment queue, account for the number of fragments in the queue. This improves accounting between the number of fragments received and the number of fragments dropped. Reviewed by: jtl, bz, transport Approved by: jtl (mentor), bz (mentor) Differential Revision: https://review.freebsd.org/D17521
This commit is contained in:
parent
9f2be4d8b3
commit
79ac8c17fb
@ -593,7 +593,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
|
||||
af6 = af6->ip6af_down) {
|
||||
if (af6->ip6af_off != next) {
|
||||
if (q6->ip6q_nfrag > V_ip6_maxfragsperpacket) {
|
||||
IP6STAT_INC(ip6s_fragdropped);
|
||||
IP6STAT_ADD(ip6s_fragdropped, q6->ip6q_nfrag);
|
||||
frag6_freef(q6, hash);
|
||||
}
|
||||
IP6Q_UNLOCK(hash);
|
||||
@ -603,7 +603,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
|
||||
}
|
||||
if (af6->ip6af_up->ip6af_mff) {
|
||||
if (q6->ip6q_nfrag > V_ip6_maxfragsperpacket) {
|
||||
IP6STAT_INC(ip6s_fragdropped);
|
||||
IP6STAT_ADD(ip6s_fragdropped, q6->ip6q_nfrag);
|
||||
frag6_freef(q6, hash);
|
||||
}
|
||||
IP6Q_UNLOCK(hash);
|
||||
@ -861,7 +861,8 @@ frag6_slowtimo(void)
|
||||
--q6->ip6q_ttl;
|
||||
q6 = q6->ip6q_next;
|
||||
if (q6->ip6q_prev->ip6q_ttl == 0) {
|
||||
IP6STAT_INC(ip6s_fragtimeout);
|
||||
IP6STAT_ADD(ip6s_fragtimeout,
|
||||
q6->ip6q_prev->ip6q_nfrag);
|
||||
/* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */
|
||||
frag6_freef(q6->ip6q_prev, i);
|
||||
}
|
||||
@ -879,7 +880,8 @@ frag6_slowtimo(void)
|
||||
(V_ip6_maxfragpackets > 0 &&
|
||||
V_ip6q[i].count > V_ip6_maxfragbucketsize)) &&
|
||||
head->ip6q_prev != head) {
|
||||
IP6STAT_INC(ip6s_fragoverflow);
|
||||
IP6STAT_ADD(ip6s_fragoverflow,
|
||||
q6->ip6q_prev->ip6q_nfrag);
|
||||
/* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */
|
||||
frag6_freef(head->ip6q_prev, i);
|
||||
}
|
||||
@ -896,7 +898,8 @@ frag6_slowtimo(void)
|
||||
IP6Q_LOCK(i);
|
||||
head = IP6Q_HEAD(i);
|
||||
if (head->ip6q_prev != head) {
|
||||
IP6STAT_INC(ip6s_fragoverflow);
|
||||
IP6STAT_ADD(ip6s_fragoverflow,
|
||||
q6->ip6q_prev->ip6q_nfrag);
|
||||
/* XXX in6_ifstat_inc(ifp, ifs6_reass_fail) */
|
||||
frag6_freef(head->ip6q_prev, i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user