Skip to content

Commit

Permalink
Few comments regarding the variants of socket close functions (#46).
Browse files Browse the repository at this point in the history
  • Loading branch information
keshonok committed Jul 1, 2015
1 parent f9c51a6 commit b4e2d9a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tempesta_fw/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ ss_tcp_process_skb(struct sk_buff *skb, struct sock *sk, unsigned int off,
}

/**
* This is main body of the socket close function in Sync Sockets.
*
* inet_release() can sleep (as well as tcp_close()), so we make our own
* non-sleepable socket closing.
*
Expand Down Expand Up @@ -440,6 +442,9 @@ __ss_do_close(struct sock *sk)
}
}

/*
* This function is for internal Sync Sockets use only.
*/
static void
ss_do_close(struct sock *sk)
{
Expand All @@ -455,6 +460,7 @@ ss_do_close(struct sock *sk)
* it's presumed that all activity in the socket is stopped
* before this function is called. Both are rather important.
*
* This function may be used in process and SoftIRQ contexts.
* Must be called with BH disabled in process context.
*/
void
Expand All @@ -475,6 +481,8 @@ EXPORT_SYMBOL(ss_close);
* procedure if required, and then cut all ties with Tempesta.
* Effectively, that stops all traffic from coming to Tempesta.
* In the end, close the socket.
*
* This function is for internal Sync Sockets use only.
*/
static void
ss_droplink(struct sock *sk)
Expand Down

0 comments on commit b4e2d9a

Please sign in to comment.