mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
net: sock: add trace for socket errors
This patch will add tracers to trace inet socket errors only. A user space monitor application can track connection errors indepedent from socket lifetime and do additional handling. For example a cluster manager can fence a node if errors occurs in a specific heuristic. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e3ae2365ef
commit
e6a3e44340
2 changed files with 70 additions and 0 deletions
|
@ -334,6 +334,16 @@ EXPORT_SYMBOL(__sk_backlog_rcv);
|
|||
void sk_error_report(struct sock *sk)
|
||||
{
|
||||
sk->sk_error_report(sk);
|
||||
|
||||
switch (sk->sk_family) {
|
||||
case AF_INET:
|
||||
fallthrough;
|
||||
case AF_INET6:
|
||||
trace_inet_sk_error_report(sk);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(sk_error_report);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue