Netdev List
 help / color / mirror / Atom feed
* [PATCH 4/4] [IPV4]: Just increment OutDatagrams once per a datagram.
@ 2007-09-13  0:31 YOSHIFUJI Hideaki / 吉藤英明
  2007-09-15  0:18 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-09-13  0:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, yoshfuji

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

---
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index facb7e2..ccb67f3 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -504,6 +504,8 @@ send:
 out:
 	up->len = 0;
 	up->pending = 0;
+	if (!err)
+		UDP_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, up->pcflag);
 	return err;
 }
 
@@ -692,10 +694,8 @@ out:
 	ip_rt_put(rt);
 	if (free)
 		kfree(ipc.opt);
-	if (!err) {
-		UDP_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, is_udplite);
+	if (!err)
 		return len;
-	}
 	/*
 	 * ENOBUFS = no kernel mem, SOCK_NOSPACE = no sndbuf space.  Reporting
 	 * ENOBUFS might not be good (it's not tunable per se), but otherwise

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-15  0:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-13  0:31 [PATCH 4/4] [IPV4]: Just increment OutDatagrams once per a datagram YOSHIFUJI Hideaki / 吉藤英明
2007-09-15  0:18 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox