Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174736282
D60281.id188562.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D60281.id188562.diff
View Options
diff --git a/share/man/man9/tcp_functions.9 b/share/man/man9/tcp_functions.9
--- a/share/man/man9/tcp_functions.9
+++ b/share/man/man9/tcp_functions.9
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 13, 2024
+.Dd October 3, 2026
.Dt TCP_FUNCTIONS 9
.Os
.Sh NAME
@@ -264,7 +264,7 @@
TCP control block in a valid state for the remainder of the retransmit
timer logic.
.Pp
-A user may select a new TCP stack before calling at any time.
+A user may select a new TCP stack at any time.
Therefore, the function pointer
.Va tfb_tcp_handoff_ok
field must be non-NULL.
@@ -276,9 +276,16 @@
the TCP stack. In this case, the kernel will call the function pointed to by
.Va tfb_tcp_fb_init
if this function pointer is non-NULL and finally perform the stack switch.
-If the user is not allowed to switch the socket, the function should undo any
-changes it made to the connection state configuration and return an error code,
-which will be returned to the user.
+If the user is not allowed to switch the socket, the function pointed to
+by the
+.Va tfb_tcp_handoff_ok
+field
+should undo any changes it made to the connection state configuration
+and return an error code, which will be returned to the user.
+This error code must not be
+.Er EAGAIN
+or
+.Er EWOULDBLOCK .
.Pp
The
.Va tfb_refcnt
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -10150,10 +10150,7 @@
/*
* Return 0 if we can accept the connection. Return
- * non-zero if we can't handle the connection. A EAGAIN
- * means you need to wait until the connection is up.
- * a EADDRNOTAVAIL means we can never handle the connection
- * (no SACK).
+ * non-zero if we can't handle the connection.
*/
static int
bbr_handoff_ok(struct tcpcb *tp)
@@ -10169,7 +10166,7 @@
* We really don't know you have to get to ESTAB or beyond
* to tell.
*/
- return (EAGAIN);
+ return (EINVAL);
}
if (tp->t_flags & TF_SENTFIN)
return (EINVAL);
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -14869,7 +14869,7 @@
* We really don't know if you support sack,
* you have to get to ESTAB or beyond to tell.
*/
- return (EAGAIN);
+ return (EINVAL);
}
if ((tp->t_flags & TF_SENTFIN) && ((tp->snd_max - tp->snd_una) > 1)) {
/*
@@ -14882,7 +14882,7 @@
* would want to switch to rack after all data is acknowledged
* I have no idea (rrs)!
*/
- return (EAGAIN);
+ return (EINVAL);
}
if ((tp->t_flags & TF_SACK_PERMIT) || rack_sack_not_required){
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 6, 2:57 PM (17 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40220172
Default Alt Text
D60281.id188562.diff (2 KB)
Attached To
Mode
D60281: tcp: improve stack switching
Attached
Detach File
Event Timeline
Log In to Comment