Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78273
b: refs/heads/master
c: cb75994
h: refs/heads/master
i:
  78271: eed44cd
v: v3
  • Loading branch information
Wang Chen authored and David S. Miller committed Jan 28, 2008
1 parent 91023ea commit 40a3e08
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6859d49475d4f32abe640372117e4b687906e6b6
refs/heads/master: cb75994ec311b2cd50e5205efdcc0696abd6675d
2 changes: 1 addition & 1 deletion trunk/Documentation/networking/udplite.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@

This displays UDP-Lite statistics variables, whose meaning is as follows.

InDatagrams: Total number of received datagrams.
InDatagrams: The total number of datagrams delivered to users.

NoPorts: Number of packets received to an unknown port.
These cases are counted separately (not as InErrors).
Expand Down
7 changes: 3 additions & 4 deletions trunk/net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
if (err)
goto out_free;

UDP_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite);

sock_recv_timestamp(msg, sk, skb);

/* Copy the address. */
Expand Down Expand Up @@ -966,10 +968,8 @@ int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
int ret;

ret = (*up->encap_rcv)(sk, skb);
if (ret <= 0) {
UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS, up->pcflag);
if (ret <= 0)
return -ret;
}
}

/* FALLTHROUGH -- it's a UDP Packet */
Expand Down Expand Up @@ -1023,7 +1023,6 @@ int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
goto drop;
}

UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS, up->pcflag);
return 0;

drop:
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv6/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
if (err)
goto out_free;

UDP6_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite);

sock_recv_timestamp(msg, sk, skb);

/* Copy the address. */
Expand Down Expand Up @@ -292,7 +294,7 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
UDP6_INC_STATS_BH(UDP_MIB_RCVBUFERRORS, up->pcflag);
goto drop;
}
UDP6_INC_STATS_BH(UDP_MIB_INDATAGRAMS, up->pcflag);

return 0;
drop:
UDP6_INC_STATS_BH(UDP_MIB_INERRORS, up->pcflag);
Expand Down

0 comments on commit 40a3e08

Please sign in to comment.