Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E-EXK4 - Operating System Group
projects
Linux
Commits
a18135eb
Commit
a18135eb
authored
18 years ago
by
David S. Miller
Browse files
Options
Downloads
Patches
Plain Diff
[IPV6]: Add UDP_MIB_{SND,RCV}BUFERRORS handling.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
81aa646c
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
net/ipv6/udp.c
+16
-1
16 additions, 1 deletion
net/ipv6/udp.c
with
16 additions
and
1 deletion
net/ipv6/udp.c
+
16
−
1
View file @
a18135eb
...
...
@@ -345,6 +345,8 @@ static void udpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
static
inline
int
udpv6_queue_rcv_skb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
int
rc
;
if
(
!
xfrm6_policy_check
(
sk
,
XFRM_POLICY_IN
,
skb
))
{
kfree_skb
(
skb
);
return
-
1
;
...
...
@@ -356,7 +358,10 @@ static inline int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
return
0
;
}
if
(
sock_queue_rcv_skb
(
sk
,
skb
)
<
0
)
{
if
((
rc
=
sock_queue_rcv_skb
(
sk
,
skb
))
<
0
)
{
/* Note that an ENOMEM error is charged twice */
if
(
rc
==
-
ENOMEM
)
UDP_INC_STATS_BH
(
UDP_MIB_RCVBUFERRORS
);
UDP6_INC_STATS_BH
(
UDP_MIB_INERRORS
);
kfree_skb
(
skb
);
return
0
;
...
...
@@ -857,6 +862,16 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
UDP6_INC_STATS_USER
(
UDP_MIB_OUTDATAGRAMS
);
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
* we don't have a good statistic (IpOutDiscards but it can be too many
* things). We could add another new stat but at least for now that
* seems like overkill.
*/
if
(
err
==
-
ENOBUFS
||
test_bit
(
SOCK_NOSPACE
,
&
sk
->
sk_socket
->
flags
))
{
UDP_INC_STATS_USER
(
UDP_MIB_SNDBUFERRORS
);
}
return
err
;
do_confirm:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment