svn commit: r298743 - in head/sys/netinet: . tcp_stacks

Andrew Thompson andy at fud.org.nz
Wed May 4 00:01:49 UTC 2016


On 29 April 2016 at 01:27, Randall Stewart <rrs at freebsd.org> wrote:

> Author: rrs
> Date: Thu Apr 28 13:27:12 2016
> New Revision: 298743
> URL: https://svnweb.freebsd.org/changeset/base/298743
>
> Log:
>   This cleans up the timers code in TCP to start using the new
>   async_drain functionality. This as been tested in NF as well as
>   by Verisign. Still to do in here is to remove all the old flags. They
>   are currently left being maintained but probably are no longer needed.
>
>   Sponsored by: Netflix Inc.
>   Differential Revision:        http://reviews.freebsd.org/D5924
>
> Modified:
>   head/sys/netinet/tcp_stacks/fastpath.c
>   head/sys/netinet/tcp_subr.c
>   head/sys/netinet/tcp_timer.c
>   head/sys/netinet/tcp_timer.h
>   head/sys/netinet/tcp_var.h
>
> Modified: head/sys/netinet/tcp_stacks/fastpath.c
>
> ==============================================================================
> --- head/sys/netinet/tcp_stacks/fastpath.c      Thu Apr 28 13:00:40 2016
>       (r298742)
> +++ head/sys/netinet/tcp_stacks/fastpath.c      Thu Apr 28 13:27:12 2016
>       (r298743)
> @@ -2386,7 +2386,6 @@ struct tcp_function_block __tcp_fastslow
>         NULL,
>         NULL,
>         NULL,
> -       NULL,
>         0,
>         0
>
> @@ -2403,7 +2402,6 @@ struct tcp_function_block __tcp_fastack
>         NULL,
>         NULL,
>         NULL,
> -       NULL,
>         0,
>         0
>  };
>


Is there a reason not to use named struct initialisers here? It is
self-describing and also does not require the nulls to be set.  ie {
.tfb_tcp_output
= tcp_output <http://fxr.watson.org/fxr/ident?im=3;i=tcp_output>, ... }

cheers,
Andrew


More information about the svn-src-all mailing list