Re: svn commit: r352657 - in head/sys: conf kern modules/tcp modules/tcp/bbr netinet netinet/tcp_stacks sys

2019-09-24 Thread Randall Stewart via svn-src-all
Hmm

It looks like BBR needs an update too since it calls the inpcb detach of the 
ratelimit function too… I may
need to reassess this since it should use only the tcp_ratelimit interfaces… 
but for now an simple
ifdef will work

make sure to pick up r352660

(and actually it might be best to include ratelimit.. it costs little and makes 
it so if you
 do get a nic that supports rate limiting you will be able to take advantage of 
it)

R

> On Sep 24, 2019, at 1:06 PM, Randall Stewart  wrote:
> 
> Right
> 
> Thats because GENERIC does not add the optional TCP stacks.
> 
> Ok the problem is fixed with r352659
> 
> The tcp_ratelimit.h had a mixed up ifdef
> 
> i.e.
> 
> #ifdef RATELIMIT
> #ifdef _KERNEL
> 
> definitions
> 
> #else
> 
> macro definitions that return error
> #endif
> #endif
> 
> 
> Which should have  been the opposite
> 
> #ifdef _KERNEL
> #ifdef RATELIMIT
> 
> definitions
> 
> #else
> 
> 
> macros def’s returning errors
> 
> #endif
> #endif
> 
> Reversing that will fix the issue if you add the extra stacks but fail to add 
> RATELIMIT
> 
> R
> 
>> On Sep 24, 2019, at 1:01 PM, Li-Wen Hsu  wrote:
>> 
>> I mean the head (r352657) world and GENERIC kernel can be built
>> successfully on 12.0-R, which is we guaranteed.
>> Also the LINT kernel build is fine on CI:
>> https://ci.freebsd.org/job/FreeBSD-head-amd64-LINT/13781/
>> 
>> So I was curious about the build environment of that build failure.
>> 
>> Best,
>> Li-Wen
>> 
>> On Tue, Sep 24, 2019 at 9:55 PM Randall Stewart  wrote:
>>> 
>>> 12.0R would not have BBR .. its only in head… hmm it could be a issue with 
>>> TCP_RATELIMIT not defined
>>> though I did compile GENERIC without the extra stacks (and without rate 
>>> limit and hpts) and that
>>> compiled ok..
>>> 
>>> R
>>> 
 On Sep 24, 2019, at 12:49 PM, Li-Wen Hsu  wrote:
 
 On Tue, Sep 24, 2019 at 9:29 PM O. Hartmann  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Am Tue, 24 Sep 2019 18:18:11 + (UTC)
> Randall Stewart  schrieb:
> 
>> Author: rrs
>> Date: Tue Sep 24 18:18:11 2019
>> New Revision: 352657
>> URL: https://svnweb.freebsd.org/changeset/base/352657
 
 ...
 
> This break kernel builds:
> 
> [...]
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
> error: implicit
> declaration of function 'tcp_chg_pacing_rate' is invalid in C99
> [-Werror,-Wimplicit-function-declaration] nrte = 
> tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
> error: this function
> declaration is not a prototype [-Werror,-Wstrict-prototypes]
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:7: 
> error: incompatible
> integer to pointer conversion assigning to 'const struct 
> tcp_hwrate_limit_table *' from 'int'
> [-Werror,-Wint-conversion] nrte = tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
>  --- all_subdir_toecore --- Building
> /usr/obj/usr/src/amd64.amd64/sys/THOR/modules/usr/src/sys/modules/toecore/toecore.ko
>  ---
> all_subdir_tcp --- 
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4:
> error: implicit declaration of function 'tcp_rel_pacing_rate' is invalid 
> in C99
> [-Werror,-Wimplicit-function-declaration] 
> tcp_rel_pacing_rate(bbr->r_ctl.crte, bbr->rc_tp); ^
> - --- all_subdir_tpm ---
> ===> tpm (all)
> - --- all_subdir_tcp ---
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4: 
> error: this function
> declaration is not a prototype [-Werror,-Wstrict-prototypes] --- 
> all_subdir_trm ---
> ===> trm (all)
> - --- all_subdir_tcp ---
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:14307:21: 
> error: implicit
> declaration of function 'tcp_set_pacing_rate' is invalid in C99
> [-Werror,-Wimplicit-function-declaration] bbr->r_ctl.crte = 
> tcp_set_pacing_rate(bbr->rc_tp,
 
 CI completed a clean build on 12.0-R:
 https://ci.freebsd.org/job/FreeBSD-head-amd64-build/14672/
 
 What's your build environment and platform?
 
 Best,
 Li-Wen
>>> 
>>> --
>>> Randall Stewart
>>> r...@netflix.com
>>> 
>>> 
>>> 
> 
> --
> Randall Stewart
> r...@netflix.com
> 
> 
> 

--
Randall Stewart
r...@netflix.com



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r352657 - in head/sys: conf kern modules/tcp modules/tcp/bbr netinet netinet/tcp_stacks sys

2019-09-24 Thread Randall Stewart via svn-src-all
Right

Thats because GENERIC does not add the optional TCP stacks.

Ok the problem is fixed with r352659

The tcp_ratelimit.h had a mixed up ifdef

i.e.

#ifdef RATELIMIT
#ifdef _KERNEL

definitions

#else

macro definitions that return error
#endif
#endif


Which should have  been the opposite

#ifdef _KERNEL
#ifdef RATELIMIT
 
definitions

#else


macros def’s returning errors

#endif
#endif

Reversing that will fix the issue if you add the extra stacks but fail to add 
RATELIMIT

R

> On Sep 24, 2019, at 1:01 PM, Li-Wen Hsu  wrote:
> 
> I mean the head (r352657) world and GENERIC kernel can be built
> successfully on 12.0-R, which is we guaranteed.
> Also the LINT kernel build is fine on CI:
> https://ci.freebsd.org/job/FreeBSD-head-amd64-LINT/13781/
> 
> So I was curious about the build environment of that build failure.
> 
> Best,
> Li-Wen
> 
> On Tue, Sep 24, 2019 at 9:55 PM Randall Stewart  wrote:
>> 
>> 12.0R would not have BBR .. its only in head… hmm it could be a issue with 
>> TCP_RATELIMIT not defined
>> though I did compile GENERIC without the extra stacks (and without rate 
>> limit and hpts) and that
>> compiled ok..
>> 
>> R
>> 
>>> On Sep 24, 2019, at 12:49 PM, Li-Wen Hsu  wrote:
>>> 
>>> On Tue, Sep 24, 2019 at 9:29 PM O. Hartmann  wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Am Tue, 24 Sep 2019 18:18:11 + (UTC)
 Randall Stewart  schrieb:
 
> Author: rrs
> Date: Tue Sep 24 18:18:11 2019
> New Revision: 352657
> URL: https://svnweb.freebsd.org/changeset/base/352657
>>> 
>>> ...
>>> 
 This break kernel builds:
 
 [...]
 /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
 error: implicit
 declaration of function 'tcp_chg_pacing_rate' is invalid in C99
 [-Werror,-Wimplicit-function-declaration] nrte = 
 tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
 /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
 error: this function
 declaration is not a prototype [-Werror,-Wstrict-prototypes]
 /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:7: 
 error: incompatible
 integer to pointer conversion assigning to 'const struct 
 tcp_hwrate_limit_table *' from 'int'
 [-Werror,-Wint-conversion] nrte = tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
  --- all_subdir_toecore --- Building
 /usr/obj/usr/src/amd64.amd64/sys/THOR/modules/usr/src/sys/modules/toecore/toecore.ko
  ---
 all_subdir_tcp --- 
 /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4:
 error: implicit declaration of function 'tcp_rel_pacing_rate' is invalid 
 in C99
 [-Werror,-Wimplicit-function-declaration] 
 tcp_rel_pacing_rate(bbr->r_ctl.crte, bbr->rc_tp); ^
 - --- all_subdir_tpm ---
 ===> tpm (all)
 - --- all_subdir_tcp ---
 /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4: 
 error: this function
 declaration is not a prototype [-Werror,-Wstrict-prototypes] --- 
 all_subdir_trm ---
 ===> trm (all)
 - --- all_subdir_tcp ---
 /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:14307:21: 
 error: implicit
 declaration of function 'tcp_set_pacing_rate' is invalid in C99
 [-Werror,-Wimplicit-function-declaration] bbr->r_ctl.crte = 
 tcp_set_pacing_rate(bbr->rc_tp,
>>> 
>>> CI completed a clean build on 12.0-R:
>>> https://ci.freebsd.org/job/FreeBSD-head-amd64-build/14672/
>>> 
>>> What's your build environment and platform?
>>> 
>>> Best,
>>> Li-Wen
>> 
>> --
>> Randall Stewart
>> r...@netflix.com
>> 
>> 
>> 

--
Randall Stewart
r...@netflix.com



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r352657 - in head/sys: conf kern modules/tcp modules/tcp/bbr netinet netinet/tcp_stacks sys

2019-09-24 Thread Randall Stewart via svn-src-all
Ok I have found it

Its a reversal in an ifdef in tcp_ratelimit.h .. it supposed to be that if
its not define (RATELIMIT) the main interfaces return errors.. and the
ifdef kernel/ratelimit is reversed of what it should be.

Let me fix that :)

R

> On Sep 24, 2019, at 12:55 PM, Randall Stewart  wrote:
> 
> 12.0R would not have BBR .. its only in head… hmm it could be a issue with 
> TCP_RATELIMIT not defined
> though I did compile GENERIC without the extra stacks (and without rate limit 
> and hpts) and that
> compiled ok..
> 
> R
> 
>> On Sep 24, 2019, at 12:49 PM, Li-Wen Hsu  wrote:
>> 
>> On Tue, Sep 24, 2019 at 9:29 PM O. Hartmann  wrote:
>>> 
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA256
>>> 
>>> Am Tue, 24 Sep 2019 18:18:11 + (UTC)
>>> Randall Stewart  schrieb:
>>> 
 Author: rrs
 Date: Tue Sep 24 18:18:11 2019
 New Revision: 352657
 URL: https://svnweb.freebsd.org/changeset/base/352657
>> 
>> ...
>> 
>>> This break kernel builds:
>>> 
>>> [...]
>>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
>>> error: implicit
>>> declaration of function 'tcp_chg_pacing_rate' is invalid in C99
>>> [-Werror,-Wimplicit-function-declaration] nrte = 
>>> tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
>>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
>>> error: this function
>>> declaration is not a prototype [-Werror,-Wstrict-prototypes]
>>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:7: 
>>> error: incompatible
>>> integer to pointer conversion assigning to 'const struct 
>>> tcp_hwrate_limit_table *' from 'int'
>>> [-Werror,-Wint-conversion] nrte = tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
>>>  --- all_subdir_toecore --- Building
>>> /usr/obj/usr/src/amd64.amd64/sys/THOR/modules/usr/src/sys/modules/toecore/toecore.ko
>>>  ---
>>> all_subdir_tcp --- 
>>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4:
>>> error: implicit declaration of function 'tcp_rel_pacing_rate' is invalid in 
>>> C99
>>> [-Werror,-Wimplicit-function-declaration] 
>>> tcp_rel_pacing_rate(bbr->r_ctl.crte, bbr->rc_tp); ^
>>> - --- all_subdir_tpm ---
>>> ===> tpm (all)
>>> - --- all_subdir_tcp ---
>>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4: 
>>> error: this function
>>> declaration is not a prototype [-Werror,-Wstrict-prototypes] --- 
>>> all_subdir_trm ---
>>> ===> trm (all)
>>> - --- all_subdir_tcp ---
>>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:14307:21: 
>>> error: implicit
>>> declaration of function 'tcp_set_pacing_rate' is invalid in C99
>>> [-Werror,-Wimplicit-function-declaration] bbr->r_ctl.crte = 
>>> tcp_set_pacing_rate(bbr->rc_tp,
>> 
>> CI completed a clean build on 12.0-R:
>> https://ci.freebsd.org/job/FreeBSD-head-amd64-build/14672/
>> 
>> What's your build environment and platform?
>> 
>> Best,
>> Li-Wen
> 
> --
> Randall Stewart
> r...@netflix.com
> 
> 
> 

--
Randall Stewart
r...@netflix.com



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r352657 - in head/sys: conf kern modules/tcp modules/tcp/bbr netinet netinet/tcp_stacks sys

2019-09-24 Thread Li-Wen Hsu
I mean the head (r352657) world and GENERIC kernel can be built
successfully on 12.0-R, which is we guaranteed.
Also the LINT kernel build is fine on CI:
https://ci.freebsd.org/job/FreeBSD-head-amd64-LINT/13781/

So I was curious about the build environment of that build failure.

Best,
Li-Wen

On Tue, Sep 24, 2019 at 9:55 PM Randall Stewart  wrote:
>
> 12.0R would not have BBR .. its only in head… hmm it could be a issue with 
> TCP_RATELIMIT not defined
> though I did compile GENERIC without the extra stacks (and without rate limit 
> and hpts) and that
> compiled ok..
>
> R
>
> > On Sep 24, 2019, at 12:49 PM, Li-Wen Hsu  wrote:
> >
> > On Tue, Sep 24, 2019 at 9:29 PM O. Hartmann  wrote:
> >>
> >> -BEGIN PGP SIGNED MESSAGE-
> >> Hash: SHA256
> >>
> >> Am Tue, 24 Sep 2019 18:18:11 + (UTC)
> >> Randall Stewart  schrieb:
> >>
> >>> Author: rrs
> >>> Date: Tue Sep 24 18:18:11 2019
> >>> New Revision: 352657
> >>> URL: https://svnweb.freebsd.org/changeset/base/352657
> >
> > ...
> >
> >> This break kernel builds:
> >>
> >> [...]
> >> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
> >> error: implicit
> >> declaration of function 'tcp_chg_pacing_rate' is invalid in C99
> >> [-Werror,-Wimplicit-function-declaration] nrte = 
> >> tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
> >> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
> >> error: this function
> >> declaration is not a prototype [-Werror,-Wstrict-prototypes]
> >> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:7: 
> >> error: incompatible
> >> integer to pointer conversion assigning to 'const struct 
> >> tcp_hwrate_limit_table *' from 'int'
> >> [-Werror,-Wint-conversion] nrte = tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
> >>  --- all_subdir_toecore --- Building
> >> /usr/obj/usr/src/amd64.amd64/sys/THOR/modules/usr/src/sys/modules/toecore/toecore.ko
> >>  ---
> >> all_subdir_tcp --- 
> >> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4:
> >> error: implicit declaration of function 'tcp_rel_pacing_rate' is invalid 
> >> in C99
> >> [-Werror,-Wimplicit-function-declaration] 
> >> tcp_rel_pacing_rate(bbr->r_ctl.crte, bbr->rc_tp); ^
> >> - --- all_subdir_tpm ---
> >> ===> tpm (all)
> >> - --- all_subdir_tcp ---
> >> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4: 
> >> error: this function
> >> declaration is not a prototype [-Werror,-Wstrict-prototypes] --- 
> >> all_subdir_trm ---
> >> ===> trm (all)
> >> - --- all_subdir_tcp ---
> >> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:14307:21: 
> >> error: implicit
> >> declaration of function 'tcp_set_pacing_rate' is invalid in C99
> >> [-Werror,-Wimplicit-function-declaration] bbr->r_ctl.crte = 
> >> tcp_set_pacing_rate(bbr->rc_tp,
> >
> > CI completed a clean build on 12.0-R:
> > https://ci.freebsd.org/job/FreeBSD-head-amd64-build/14672/
> >
> > What's your build environment and platform?
> >
> > Best,
> > Li-Wen
>
> --
> Randall Stewart
> r...@netflix.com
>
>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r352657 - in head/sys: conf kern modules/tcp modules/tcp/bbr netinet netinet/tcp_stacks sys

2019-09-24 Thread Randall Stewart via svn-src-all
12.0R would not have BBR .. its only in head… hmm it could be a issue with 
TCP_RATELIMIT not defined
though I did compile GENERIC without the extra stacks (and without rate limit 
and hpts) and that
compiled ok..

R

> On Sep 24, 2019, at 12:49 PM, Li-Wen Hsu  wrote:
> 
> On Tue, Sep 24, 2019 at 9:29 PM O. Hartmann  wrote:
>> 
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>> 
>> Am Tue, 24 Sep 2019 18:18:11 + (UTC)
>> Randall Stewart  schrieb:
>> 
>>> Author: rrs
>>> Date: Tue Sep 24 18:18:11 2019
>>> New Revision: 352657
>>> URL: https://svnweb.freebsd.org/changeset/base/352657
> 
> ...
> 
>> This break kernel builds:
>> 
>> [...]
>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
>> error: implicit
>> declaration of function 'tcp_chg_pacing_rate' is invalid in C99
>> [-Werror,-Wimplicit-function-declaration] nrte = 
>> tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: 
>> error: this function
>> declaration is not a prototype [-Werror,-Wstrict-prototypes]
>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:7: 
>> error: incompatible
>> integer to pointer conversion assigning to 'const struct 
>> tcp_hwrate_limit_table *' from 'int'
>> [-Werror,-Wint-conversion] nrte = tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
>>  --- all_subdir_toecore --- Building
>> /usr/obj/usr/src/amd64.amd64/sys/THOR/modules/usr/src/sys/modules/toecore/toecore.ko
>>  ---
>> all_subdir_tcp --- 
>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4:
>> error: implicit declaration of function 'tcp_rel_pacing_rate' is invalid in 
>> C99
>> [-Werror,-Wimplicit-function-declaration] 
>> tcp_rel_pacing_rate(bbr->r_ctl.crte, bbr->rc_tp); ^
>> - --- all_subdir_tpm ---
>> ===> tpm (all)
>> - --- all_subdir_tcp ---
>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4: 
>> error: this function
>> declaration is not a prototype [-Werror,-Wstrict-prototypes] --- 
>> all_subdir_trm ---
>> ===> trm (all)
>> - --- all_subdir_tcp ---
>> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:14307:21: 
>> error: implicit
>> declaration of function 'tcp_set_pacing_rate' is invalid in C99
>> [-Werror,-Wimplicit-function-declaration] bbr->r_ctl.crte = 
>> tcp_set_pacing_rate(bbr->rc_tp,
> 
> CI completed a clean build on 12.0-R:
> https://ci.freebsd.org/job/FreeBSD-head-amd64-build/14672/
> 
> What's your build environment and platform?
> 
> Best,
> Li-Wen

--
Randall Stewart
r...@netflix.com



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r352657 - in head/sys: conf kern modules/tcp modules/tcp/bbr netinet netinet/tcp_stacks sys

2019-09-24 Thread Randall Stewart via svn-src-all
This is strange I built this and have it running on my machine
with the standard

make buildkern KERNCONF=myconf
and
make installkern KERNCONF=myconf

Why can I build and it blow up.. last time I saw this I was building in 
amd64/compile and
was getting a warning that somehow is an error.. but this time it *should* have 
built fine :(

R

> On Sep 24, 2019, at 12:28 PM, O. Hartmann  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Am Tue, 24 Sep 2019 18:18:11 + (UTC)
> Randall Stewart  schrieb:
> 
>> Author: rrs
>> Date: Tue Sep 24 18:18:11 2019
>> New Revision: 352657
>> URL: https://svnweb.freebsd.org/changeset/base/352657
>> 
>> Log:
>>  This commit adds BBR (Bottleneck Bandwidth and RTT) congestion control. This
>>  is a completely separate TCP stack (tcp_bbr.ko) that will be built only if
>>  you add the make options WITH_EXTRA_TCP_STACKS=1 and also include the option
>>  TCPHPTS. You can also include the RATELIMIT option if you have a NIC 
>> interface that
>>  supports hardware pacing, BBR understands how to use such a feature.
>> 
>>  Note that this commit also adds in a general purpose time-filter which
>>  allows you to have a min-filter or max-filter. A filter allows you to
>>  have a low (or high) value for some period of time and degrade slowly
>>  to another value has time passes. You can find out the details of
>>  BBR by looking at the original paper at:
>> 
>>  https://queue.acm.org/detail.cfm?id=3022184
>> 
>>  or consult many other web resources you can find on the web
>>  referenced by "BBR congestion control". It should be noted that
>>  BBRv1 (which this is) does tend to unfairness in cases of small
>>  buffered paths, and it will usually get less bandwidth in the case
>>  of large BDP paths(when competing with new-reno or cubic flows). BBR
>>  is still an active research area and we do plan on  implementing V2
>>  of BBR to see if it is an improvement over V1.
>> 
>>  Sponsored by:   Netflix Inc.
>>  Differential Revision:  https://reviews.freebsd.org/D21582
>> 
>> Added:
>>  head/sys/kern/subr_filter.c   (contents, props changed)
>>  head/sys/modules/tcp/bbr/
>>  head/sys/modules/tcp/bbr/Makefile   (contents, props changed)
>>  head/sys/netinet/tcp_stacks/bbr.c   (contents, props changed)
>>  head/sys/netinet/tcp_stacks/tcp_bbr.h   (contents, props changed)
>>  head/sys/sys/tim_filter.h   (contents, props changed)
>> Modified:
>>  head/sys/conf/files
>>  head/sys/modules/tcp/Makefile
>>  head/sys/netinet/ip_output.c
>>  head/sys/netinet/ip_var.h
>>  head/sys/netinet/tcp.h
>>  head/sys/netinet/tcp_stacks/rack.c
>>  head/sys/netinet/tcp_stacks/rack_bbr_common.c
>>  head/sys/netinet/tcp_stacks/rack_bbr_common.h
>>  head/sys/netinet/tcp_stacks/sack_filter.c
>>  head/sys/netinet/tcp_stacks/sack_filter.h
>>  head/sys/netinet/tcp_stacks/tcp_rack.h
>>  head/sys/sys/mbuf.h
>> 
>> Modified: head/sys/conf/files
>> ==
>> --- head/sys/conf/files  Tue Sep 24 17:06:32 2019(r352656)
>> +++ head/sys/conf/files  Tue Sep 24 18:18:11 2019(r352657)
>> @@ -3808,6 +3808,7 @@ kern/subr_epoch.c  standard
>> kern/subr_eventhandler.c standard
>> kern/subr_fattime.c  standard
>> kern/subr_firmware.c optional firmware
>> +kern/subr_filter.c  standard
>> kern/subr_gtaskqueue.c   standard
>> kern/subr_hash.c standard
>> kern/subr_hints.cstandard
>> 
>> Added: head/sys/kern/subr_filter.c
>> ==
>> --- /dev/null00:00:00 1970   (empty, because file is newly added)
>> +++ head/sys/kern/subr_filter.c  Tue Sep 24 18:18:11 2019
>> (r352657)
>> @@ -0,0 +1,482 @@
>> +/*-
>> + * Copyright (c) 2016-2019 Netflix, Inc.
>> + * All rights reserved.
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + * 1. Redistributions of source code must retain the above copyright
>> + *notice, this list of conditions and the following disclaimer.
>> + * 2. Redistributions in binary form must reproduce the above copyright
>> + *notice, this list of conditions and the following disclaimer in the
>> + *documentation and/or other materials provided with the distribution.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
>> PURPOSE
>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
>> CONSEQUENTIAL
>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
>> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 

Re: svn commit: r352657 - in head/sys: conf kern modules/tcp modules/tcp/bbr netinet netinet/tcp_stacks sys

2019-09-24 Thread Li-Wen Hsu
On Tue, Sep 24, 2019 at 9:29 PM O. Hartmann  wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Am Tue, 24 Sep 2019 18:18:11 + (UTC)
> Randall Stewart  schrieb:
>
> > Author: rrs
> > Date: Tue Sep 24 18:18:11 2019
> > New Revision: 352657
> > URL: https://svnweb.freebsd.org/changeset/base/352657

...

> This break kernel builds:
>
> [...]
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: error: 
> implicit
> declaration of function 'tcp_chg_pacing_rate' is invalid in C99
> [-Werror,-Wimplicit-function-declaration] nrte = 
> tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:9: error: 
> this function
> declaration is not a prototype [-Werror,-Wstrict-prototypes]
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:5613:7: error: 
> incompatible
> integer to pointer conversion assigning to 'const struct 
> tcp_hwrate_limit_table *' from 'int'
> [-Werror,-Wint-conversion] nrte = tcp_chg_pacing_rate(bbr->r_ctl.crte, ^
>  --- all_subdir_toecore --- Building
> /usr/obj/usr/src/amd64.amd64/sys/THOR/modules/usr/src/sys/modules/toecore/toecore.ko
>  ---
> all_subdir_tcp --- 
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4:
> error: implicit declaration of function 'tcp_rel_pacing_rate' is invalid in 
> C99
> [-Werror,-Wimplicit-function-declaration] 
> tcp_rel_pacing_rate(bbr->r_ctl.crte, bbr->rc_tp); ^
> - --- all_subdir_tpm ---
> ===> tpm (all)
> - --- all_subdir_tcp ---
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:10443:4: 
> error: this function
> declaration is not a prototype [-Werror,-Wstrict-prototypes] --- 
> all_subdir_trm ---
> ===> trm (all)
> - --- all_subdir_tcp ---
> /usr/src/sys/modules/tcp/bbr/../../../netinet/tcp_stacks/bbr.c:14307:21: 
> error: implicit
> declaration of function 'tcp_set_pacing_rate' is invalid in C99
> [-Werror,-Wimplicit-function-declaration] bbr->r_ctl.crte = 
> tcp_set_pacing_rate(bbr->rc_tp,

CI completed a clean build on 12.0-R:
https://ci.freebsd.org/job/FreeBSD-head-amd64-build/14672/

What's your build environment and platform?

Best,
Li-Wen
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r352657 - in head/sys: conf kern modules/tcp modules/tcp/bbr netinet netinet/tcp_stacks sys

2019-09-24 Thread O. Hartmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Am Tue, 24 Sep 2019 18:18:11 + (UTC)
Randall Stewart  schrieb:

> Author: rrs
> Date: Tue Sep 24 18:18:11 2019
> New Revision: 352657
> URL: https://svnweb.freebsd.org/changeset/base/352657
> 
> Log:
>   This commit adds BBR (Bottleneck Bandwidth and RTT) congestion control. This
>   is a completely separate TCP stack (tcp_bbr.ko) that will be built only if
>   you add the make options WITH_EXTRA_TCP_STACKS=1 and also include the option
>   TCPHPTS. You can also include the RATELIMIT option if you have a NIC 
> interface that
>   supports hardware pacing, BBR understands how to use such a feature.
>   
>   Note that this commit also adds in a general purpose time-filter which
>   allows you to have a min-filter or max-filter. A filter allows you to
>   have a low (or high) value for some period of time and degrade slowly
>   to another value has time passes. You can find out the details of
>   BBR by looking at the original paper at:
>   
>   https://queue.acm.org/detail.cfm?id=3022184
>   
>   or consult many other web resources you can find on the web
>   referenced by "BBR congestion control". It should be noted that
>   BBRv1 (which this is) does tend to unfairness in cases of small
>   buffered paths, and it will usually get less bandwidth in the case
>   of large BDP paths(when competing with new-reno or cubic flows). BBR
>   is still an active research area and we do plan on  implementing V2
>   of BBR to see if it is an improvement over V1.
>   
>   Sponsored by:   Netflix Inc.
>   Differential Revision:  https://reviews.freebsd.org/D21582
> 
> Added:
>   head/sys/kern/subr_filter.c   (contents, props changed)
>   head/sys/modules/tcp/bbr/
>   head/sys/modules/tcp/bbr/Makefile   (contents, props changed)
>   head/sys/netinet/tcp_stacks/bbr.c   (contents, props changed)
>   head/sys/netinet/tcp_stacks/tcp_bbr.h   (contents, props changed)
>   head/sys/sys/tim_filter.h   (contents, props changed)
> Modified:
>   head/sys/conf/files
>   head/sys/modules/tcp/Makefile
>   head/sys/netinet/ip_output.c
>   head/sys/netinet/ip_var.h
>   head/sys/netinet/tcp.h
>   head/sys/netinet/tcp_stacks/rack.c
>   head/sys/netinet/tcp_stacks/rack_bbr_common.c
>   head/sys/netinet/tcp_stacks/rack_bbr_common.h
>   head/sys/netinet/tcp_stacks/sack_filter.c
>   head/sys/netinet/tcp_stacks/sack_filter.h
>   head/sys/netinet/tcp_stacks/tcp_rack.h
>   head/sys/sys/mbuf.h
> 
> Modified: head/sys/conf/files
> ==
> --- head/sys/conf/files   Tue Sep 24 17:06:32 2019(r352656)
> +++ head/sys/conf/files   Tue Sep 24 18:18:11 2019(r352657)
> @@ -3808,6 +3808,7 @@ kern/subr_epoch.c   standard
>  kern/subr_eventhandler.c standard
>  kern/subr_fattime.c  standard
>  kern/subr_firmware.c optional firmware
> +kern/subr_filter.c  standard
>  kern/subr_gtaskqueue.c   standard
>  kern/subr_hash.c standard
>  kern/subr_hints.cstandard
> 
> Added: head/sys/kern/subr_filter.c
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/kern/subr_filter.c   Tue Sep 24 18:18:11 2019
> (r352657)
> @@ -0,0 +1,482 @@
> +/*-
> + * Copyright (c) 2016-2019 Netflix, Inc.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> + * SUCH DAMAGE.
> + */
> +
> +/*
> + * Author: Randall Stewart 
> + */
> +#include 
> +__FBSDID("$FreeBSD$");
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +void
> +reset_time(struct 

svn commit: r352657 - in head/sys: conf kern modules/tcp modules/tcp/bbr netinet netinet/tcp_stacks sys

2019-09-24 Thread Randall Stewart
Author: rrs
Date: Tue Sep 24 18:18:11 2019
New Revision: 352657
URL: https://svnweb.freebsd.org/changeset/base/352657

Log:
  This commit adds BBR (Bottleneck Bandwidth and RTT) congestion control. This
  is a completely separate TCP stack (tcp_bbr.ko) that will be built only if
  you add the make options WITH_EXTRA_TCP_STACKS=1 and also include the option
  TCPHPTS. You can also include the RATELIMIT option if you have a NIC 
interface that
  supports hardware pacing, BBR understands how to use such a feature.
  
  Note that this commit also adds in a general purpose time-filter which
  allows you to have a min-filter or max-filter. A filter allows you to
  have a low (or high) value for some period of time and degrade slowly
  to another value has time passes. You can find out the details of
  BBR by looking at the original paper at:
  
  https://queue.acm.org/detail.cfm?id=3022184
  
  or consult many other web resources you can find on the web
  referenced by "BBR congestion control". It should be noted that
  BBRv1 (which this is) does tend to unfairness in cases of small
  buffered paths, and it will usually get less bandwidth in the case
  of large BDP paths(when competing with new-reno or cubic flows). BBR
  is still an active research area and we do plan on  implementing V2
  of BBR to see if it is an improvement over V1.
  
  Sponsored by: Netflix Inc.
  Differential Revision:https://reviews.freebsd.org/D21582

Added:
  head/sys/kern/subr_filter.c   (contents, props changed)
  head/sys/modules/tcp/bbr/
  head/sys/modules/tcp/bbr/Makefile   (contents, props changed)
  head/sys/netinet/tcp_stacks/bbr.c   (contents, props changed)
  head/sys/netinet/tcp_stacks/tcp_bbr.h   (contents, props changed)
  head/sys/sys/tim_filter.h   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/modules/tcp/Makefile
  head/sys/netinet/ip_output.c
  head/sys/netinet/ip_var.h
  head/sys/netinet/tcp.h
  head/sys/netinet/tcp_stacks/rack.c
  head/sys/netinet/tcp_stacks/rack_bbr_common.c
  head/sys/netinet/tcp_stacks/rack_bbr_common.h
  head/sys/netinet/tcp_stacks/sack_filter.c
  head/sys/netinet/tcp_stacks/sack_filter.h
  head/sys/netinet/tcp_stacks/tcp_rack.h
  head/sys/sys/mbuf.h

Modified: head/sys/conf/files
==
--- head/sys/conf/files Tue Sep 24 17:06:32 2019(r352656)
+++ head/sys/conf/files Tue Sep 24 18:18:11 2019(r352657)
@@ -3808,6 +3808,7 @@ kern/subr_epoch.c standard
 kern/subr_eventhandler.c   standard
 kern/subr_fattime.cstandard
 kern/subr_firmware.c   optional firmware
+kern/subr_filter.c  standard
 kern/subr_gtaskqueue.c standard
 kern/subr_hash.c   standard
 kern/subr_hints.c  standard

Added: head/sys/kern/subr_filter.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/kern/subr_filter.c Tue Sep 24 18:18:11 2019(r352657)
@@ -0,0 +1,482 @@
+/*-
+ * Copyright (c) 2016-2019 Netflix, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Author: Randall Stewart 
+ */
+#include 
+__FBSDID("$FreeBSD$");
+#include 
+#include 
+#include 
+#include 
+
+void
+reset_time(struct time_filter *tf, uint32_t time_len)
+{
+   tf->cur_time_limit = time_len;
+}
+
+void
+reset_time_small(struct time_filter_small *tf, uint32_t time_len)
+{
+   tf->cur_time_limit = time_len;
+}
+
+/*
+ * A time filter can be a filter for MIN or MAX. 
+ * You call setup_time_filter() with the pointer to
+ * the filter structure, the type