svn commit: r340375 - head/sys/dev/cxgbe

2018-11-12 Thread Julien Charbon
Author: jch Date: Mon Nov 12 17:57:12 2018 New Revision: 340375 URL: https://svnweb.freebsd.org/changeset/base/340375 Log: cxgbe/netmap: Fix cxgbe netmap when interface is DOWN A kernel panic can occur if the cxgbe interface is DOWN when activating netmap. This patch prevents the driver

svn commit: r324948 - stable/11/sys/netinet

2017-10-24 Thread Julien Charbon
Author: jch Date: Tue Oct 24 08:56:11 2017 New Revision: 324948 URL: https://svnweb.freebsd.org/changeset/base/324948 Log: MFC r324179, r324193: r324179: Fix an infinite loop in tcp_tw_2msl_scan() when an INP_TIMEWAIT inp has been destroyed before its tcptw with INVARIANTS

Re: svn commit: r324179 - head/sys/netinet

2017-10-16 Thread Julien Charbon
Hi Jonathan, On 10/16/17 7:04 PM, Jonathan Looney wrote: > I apologize for just getting to this, but your code just made it into my > local tree. > > The non-INVARIANTS case looks incorrect. Because tw stays on the list, > it can end up stuck at the front of the queue and block everything >

Re: svn commit: r324179 - head/sys/netinet

2017-10-02 Thread Julien Charbon
On 10/2/17 1:12 PM, Gary Jennejohn wrote: > On Sun, 1 Oct 2017 21:20:28 + (UTC) > Julien Charbon <j...@freebsd.org> wrote: > >> Author: jch >> Date: Sun Oct 1 21:20:28 2017 >> New Revision: 324179 >> URL: https://svnweb.freebsd.org/changeset/base/3241

svn commit: r324193 - head/sys/netinet

2017-10-02 Thread Julien Charbon
Author: jch Date: Mon Oct 2 09:45:17 2017 New Revision: 324193 URL: https://svnweb.freebsd.org/changeset/base/324193 Log: Forgotten bits in r324179: Include sys/syslog.h if INVARIANTS is not defined MFC after:1 week X-MFC with: r324179 Pointy hat to:jch Modified:

svn commit: r324179 - head/sys/netinet

2017-10-01 Thread Julien Charbon
Author: jch Date: Sun Oct 1 21:20:28 2017 New Revision: 324179 URL: https://svnweb.freebsd.org/changeset/base/324179 Log: Fix an infinite loop in tcp_tw_2msl_scan() when an INP_TIMEWAIT inp has been destroyed before its tcptw with INVARIANTS undefined. This is a symmetric change of

Re: svn commit: r304218 - head/sys/netinet

2017-01-13 Thread Julien Charbon
Hi, On 8/16/16 3:21 PM, Randall Stewart via svn-src-all wrote: > > In theory it *could* be MFC’d to stable-10 and 11 but I am not sure we want > to do that. I am > told by Drew that it does improve performance since in stable-10 you are > getting the INFO_WLOCK() > but I am not sure if folks

svn commit: r309108 - in stable/10/sys: dev/cxgb/ulp/tom dev/cxgbe/tom netinet netinet6

2016-11-24 Thread Julien Charbon
Author: jch Date: Thu Nov 24 14:48:46 2016 New Revision: 309108 URL: https://svnweb.freebsd.org/changeset/base/309108 Log: MFC r286227, r286443: r286227: Decompose TCP INP_INFO lock to increase short-lived TCP connections scalability: - The existing TCP INP_INFO lock continues

svn commit: r308426 - stable/11/sys/netinet

2016-11-07 Thread Julien Charbon
Author: jch Date: Mon Nov 7 18:29:21 2016 New Revision: 308426 URL: https://svnweb.freebsd.org/changeset/base/308426 Log: MFC r307966: Remove an extraneous call to soisconnected() in syncache_socket(), introduced with r261242. The useful and expected soisconnected() call is done in

svn commit: r308263 - stable/10/sys/netinet

2016-11-03 Thread Julien Charbon
Author: jch Date: Thu Nov 3 19:58:12 2016 New Revision: 308263 URL: https://svnweb.freebsd.org/changeset/base/308263 Log: MFC r307966: Remove an extraneous call to soisconnected() in syncache_socket(), introduced with r261242. The useful and expected soisconnected() call is done in

svn commit: r307966 - head/sys/netinet

2016-10-26 Thread Julien Charbon
Author: jch Date: Wed Oct 26 15:19:18 2016 New Revision: 307966 URL: https://svnweb.freebsd.org/changeset/base/307966 Log: Remove an extraneous call to soisconnected() in syncache_socket(), introduced with r261242. The useful and expected soisconnected() call is done in tcp_do_segment().

svn commit: r307906 - stable/10/sys/netinet

2016-10-25 Thread Julien Charbon
Author: jch Date: Tue Oct 25 12:58:36 2016 New Revision: 307906 URL: https://svnweb.freebsd.org/changeset/base/307906 Log: MFC r307551: Fix a double-free when an inp transitions to INP_TIMEWAIT state after having been dropped. This change enforces in_pcbdrop() logic in tcp_input():

svn commit: r307905 - stable/11/sys/netinet

2016-10-25 Thread Julien Charbon
Author: jch Date: Tue Oct 25 12:53:14 2016 New Revision: 307905 URL: https://svnweb.freebsd.org/changeset/base/307905 Log: MFC r307551: Fix a double-free when an inp transitions to INP_TIMEWAIT state after having been dropped. This change enforces in_pcbdrop() logic in tcp_input():

svn commit: r307551 - head/sys/netinet

2016-10-18 Thread Julien Charbon
Author: jch Date: Tue Oct 18 07:16:49 2016 New Revision: 307551 URL: https://svnweb.freebsd.org/changeset/base/307551 Log: Fix a double-free when an inp transitions to INP_TIMEWAIT state after having been dropped. This fixes enforces in_pcbdrop() logic in tcp_input(): "in_pcbdrop()

svn commit: r306925 - stable/10/sys/netinet

2016-10-09 Thread Julien Charbon
Author: jch Date: Sun Oct 9 21:35:12 2016 New Revision: 306925 URL: https://svnweb.freebsd.org/changeset/base/306925 Log: MFC r306443: Fix an issue with accept_filter introduced with r261242: As a side effect of r261242 when using accept_filter the first call to soisconnected() is

svn commit: r306922 - stable/11/sys/netinet

2016-10-09 Thread Julien Charbon
Author: jch Date: Sun Oct 9 21:02:33 2016 New Revision: 306922 URL: https://svnweb.freebsd.org/changeset/base/306922 Log: MFC r306443: Fix an issue with accept_filter introduced with r261242: As a side effect of r261242 when using accept_filter the first call to soisconnected() is

svn commit: r306443 - head/sys/netinet

2016-09-29 Thread Julien Charbon
Author: jch Date: Thu Sep 29 11:18:48 2016 New Revision: 306443 URL: https://svnweb.freebsd.org/changeset/base/306443 Log: Fix an issue with accept_filter introduced with r261242: As a side effect of r261242 when using accept_filter the first call to soisconnected() is done earlier in

svn commit: r303389 - stable/10/sys/netinet

2016-07-27 Thread Julien Charbon
Author: jch Date: Wed Jul 27 13:53:15 2016 New Revision: 303389 URL: https://svnweb.freebsd.org/changeset/base/303389 Log: MFC r286873: Make clear that TIME_WAIT timeout expiration is managed solely by tcp_tw_2msl_scan(). Sponsored by: Verisign, Inc. Modified:

svn commit: r303371 - stable/10/sys/netinet

2016-07-27 Thread Julien Charbon
input processing starvation in context of high SYN load (e.g. short-lived TCP connections or SYN flood). Submitted by: Julien Charbon <jchar...@verisign.com> Reviewed by: adrian, hiren, jhb, Mike Bentkofsky r272081: Catch up with r271119. Modified: stable/10/sys/n

svn commit: r303365 - stable/10/sys/netinet

2016-07-27 Thread Julien Charbon
Author: jch Date: Wed Jul 27 06:31:40 2016 New Revision: 303365 URL: https://svnweb.freebsd.org/changeset/base/303365 Log: MFC r273014: A connection in TIME_WAIT state before calling close() actually did not received any RST packet. Do not set error to ECONNRESET in this case.

svn commit: r302995 - stable/10/sys/netinet

2016-07-18 Thread Julien Charbon
the advice already in the code. See the PR below for a full discussion of this change and its measured effects. PR: 183659 Submitted by: Julien Charbon Reviewed by: jhb Modified: stable/10/sys/netinet/tcp_syncache.c stable/10/sys/netinet/tcp_usrreq.c Directory Properties

Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys

2015-09-22 Thread Julien Charbon
Hi guys, On 19/09/15 10:55, Hans Petter Selasky wrote: > On 09/18/15 22:33, Davide Italiano wrote: >> On Thu, Sep 17, 2015 at 12:20 AM, Hans Petter Selasky >> wrote: >>> On 09/17/15 00:05, Gleb Smirnoff wrote: >> [...] 2) Your commit message didn't explain what (if any) is

svn commit: r287305 - head/sys/kern

2015-08-30 Thread Julien Charbon
Author: jch Date: Sun Aug 30 13:44:46 2015 New Revision: 287305 URL: https://svnweb.freebsd.org/changeset/base/287305 Log: Revert r286880: If at first this change made sense, it turns out it helps only the TCP timers callout(9) usage. As the benefit for others callout(9) usages did not

Re: svn commit: r286880 - head/sys/kern

2015-08-28 Thread Julien Charbon
Hi Konstantin, On 27/08/15 19:19, Konstantin Belousov wrote: On Thu, Aug 27, 2015 at 06:28:03PM +0200, Julien Charbon wrote: On 27/08/15 12:49, Konstantin Belousov wrote: On Wed, Aug 26, 2015 at 08:14:15PM +0200, Julien Charbon wrote: As I said, I am not opposed to back out this change

Re: svn commit: r286880 - head/sys/kern

2015-08-27 Thread Julien Charbon
Hi Konstantin, On 27/08/15 12:49, Konstantin Belousov wrote: On Wed, Aug 26, 2015 at 08:14:15PM +0200, Julien Charbon wrote: As I said, I am not opposed to back out this change, callout(9) API in mpsafe mode is a already complex/subtle API, it won't change too much the current complexity

svn commit: r287200 - head/sys/kern

2015-08-27 Thread Julien Charbon
Author: jch Date: Thu Aug 27 10:43:35 2015 New Revision: 287200 URL: https://svnweb.freebsd.org/changeset/base/287200 Log: Silent a compilation warning on callout_stop() Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c

svn commit: r287196 - head/sys/kern

2015-08-27 Thread Julien Charbon
Author: jch Date: Thu Aug 27 08:15:32 2015 New Revision: 287196 URL: https://svnweb.freebsd.org/changeset/base/287196 Log: In callout_stop(), if a callout is both pending and currently being serviced return 0 (fail) but it is applicable only mpsafe callouts. Thanks to hselasky for finding

Re: svn commit: r286880 - head/sys/kern

2015-08-27 Thread Julien Charbon
Hi Hans, On 26/08/15 18:31, Julien Charbon wrote: On 26/08/15 09:25, Hans Petter Selasky wrote: On 08/18/15 12:15, Julien Charbon wrote: Author: jch Date: Tue Aug 18 10:15:09 2015 New Revision: 286880 URL: https://svnweb.freebsd.org/changeset/base/286880 Log: callout_stop() should

svn commit: r287198 - head/sys/kern

2015-08-27 Thread Julien Charbon
Author: jch Date: Thu Aug 27 08:58:03 2015 New Revision: 287198 URL: https://svnweb.freebsd.org/changeset/base/287198 Log: In callout_stop(), do not forget to initialize not_running variable. Thanks to hselasky for noticing that. Differential Revision:

Re: svn commit: r286880 - head/sys/kern

2015-08-27 Thread Julien Charbon
Hi Hans, On 26/08/15 20:31, Hans Petter Selasky wrote: On 08/26/15 20:14, Julien Charbon wrote: Let say that if nobody screams until Friday 8/28, I will put back r284245 and revert this change_and_ I will make this case clear in the man page. If you can update the manual page about

Re: svn commit: r286880 - head/sys/kern

2015-08-26 Thread Julien Charbon
Hi Hans, On 26/08/15 10:12, Hans Petter Selasky wrote: On 08/26/15 09:25, Hans Petter Selasky wrote: On 08/18/15 12:15, Julien Charbon wrote: Author: jch Date: Tue Aug 18 10:15:09 2015 New Revision: 286880 URL: https://svnweb.freebsd.org/changeset/base/286880 Log: callout_stop

Re: svn commit: r286880 - head/sys/kern

2015-08-26 Thread Julien Charbon
Hi Hans, On 26/08/15 09:25, Hans Petter Selasky wrote: On 08/18/15 12:15, Julien Charbon wrote: Author: jch Date: Tue Aug 18 10:15:09 2015 New Revision: 286880 URL: https://svnweb.freebsd.org/changeset/base/286880 Log: callout_stop() should return 0 (fail) when the callout

svn commit: r287101 - head/sys/netinet

2015-08-24 Thread Julien Charbon
Author: jch Date: Mon Aug 24 09:30:27 2015 New Revision: 287101 URL: https://svnweb.freebsd.org/changeset/base/287101 Log: Revert r284245: Fix a callout race condition introduced in TCP timers callouts with r281599. r281599 fixed a TCP timer race condition, but due a callout(9) bug it

svn commit: r286880 - head/sys/kern

2015-08-18 Thread Julien Charbon
Author: jch Date: Tue Aug 18 10:15:09 2015 New Revision: 286880 URL: https://svnweb.freebsd.org/changeset/base/286880 Log: callout_stop() should return 0 (fail) when the callout is currently being serviced and indeed unstoppable. A scenario to reproduce this case is: - the callout

svn commit: r286873 - head/sys/netinet

2015-08-18 Thread Julien Charbon
Author: jch Date: Tue Aug 18 08:27:26 2015 New Revision: 286873 URL: https://svnweb.freebsd.org/changeset/base/286873 Log: Make clear that TIME_WAIT timeout expiration is managed solely by tcp_tw_2msl_scan(). Sponsored by: Verisign, Inc. Modified: head/sys/netinet/tcp_timer.c

Re: svn commit: r286880 - head/sys/kern

2015-08-18 Thread Julien Charbon
Hi Hans, On 18/08/15 12:59, Hans Petter Selasky wrote: On 08/18/15 12:15, Julien Charbon wrote: Author: jch Date: Tue Aug 18 10:15:09 2015 New Revision: 286880 URL: https://svnweb.freebsd.org/changeset/base/286880 Log: callout_stop() should return 0 (fail) when the callout

svn commit: r286443 - head/sys/netinet

2015-08-08 Thread Julien Charbon
Author: jch Date: Sat Aug 8 08:40:36 2015 New Revision: 286443 URL: https://svnweb.freebsd.org/changeset/base/286443 Log: Fix a kernel assertion issue introduced with r286227: Avoid too strict INP_INFO_RLOCK_ASSERT checks due to tcp_notify() being called from in6_pcbnotify(). Reported

svn commit: r286227 - in head/sys: dev/cxgb/ulp/tom dev/cxgbe/tom netinet netinet6

2015-08-03 Thread Julien Charbon
Author: jch Date: Mon Aug 3 12:13:54 2015 New Revision: 286227 URL: https://svnweb.freebsd.org/changeset/base/286227 Log: Decompose TCP INP_INFO lock to increase short-lived TCP connections scalability: - The existing TCP INP_INFO lock continues to protect the global inpcb list

svn commit: r284261 - stable/10/sys/netinet

2015-06-11 Thread Julien Charbon
Author: jch Date: Thu Jun 11 13:44:06 2015 New Revision: 284261 URL: https://svnweb.freebsd.org/changeset/base/284261 Log: MFC r284245: Fix a callout race condition introduced in TCP timers callouts with r281599. In TCP timer context, it is not enough to check callout_stop() return value

Re: svn commit: r284245 - head/sys/netinet

2015-06-11 Thread Julien Charbon
Hi John, On 10/06/15 17:32, John Baldwin wrote: On 6/10/15 4:43 PM, Julien Charbon wrote: Author: jch Date: Wed Jun 10 20:43:07 2015 New Revision: 284245 URL: https://svnweb.freebsd.org/changeset/base/284245 Log: Fix a callout race condition introduced in TCP timers callouts

svn commit: r284245 - head/sys/netinet

2015-06-10 Thread Julien Charbon
Author: jch Date: Wed Jun 10 20:43:07 2015 New Revision: 284245 URL: https://svnweb.freebsd.org/changeset/base/284245 Log: Fix a callout race condition introduced in TCP timers callouts with r281599. In TCP timer context, it is not enough to check callout_stop() return value to decide if a

svn commit: r282964 - stable/10/sys/netinet

2015-05-15 Thread Julien Charbon
Author: jch Date: Fri May 15 12:07:43 2015 New Revision: 282964 URL: https://svnweb.freebsd.org/changeset/base/282964 Log: MFC: r280904, r280990, r281599 r280904: Use appropriate timeout_t* instead of void* in tcp_timer_activate() Suggested by: imp

svn commit: r282968 - stable/10/sys/netinet

2015-05-15 Thread Julien Charbon
Author: jch Date: Fri May 15 12:35:18 2015 New Revision: 282968 URL: https://svnweb.freebsd.org/changeset/base/282968 Log: MFC r279821: In TCP, connect() can return incorrect error code EINVAL instead of EADDRINUSE or ECONNREFUSED PR: 196035

svn commit: r281599 - head/sys/netinet

2015-04-16 Thread Julien Charbon
Author: jch Date: Thu Apr 16 10:00:06 2015 New Revision: 281599 URL: https://svnweb.freebsd.org/changeset/base/281599 Log: Fix an old and well-documented use-after-free race condition in TCP timers: - Add a reference from tcpcb to its inpcb - Defer tcpcb deletion until TCP timers have

svn commit: r280990 - head/sys/netinet

2015-04-02 Thread Julien Charbon
Author: jch Date: Thu Apr 2 14:43:07 2015 New Revision: 280990 URL: https://svnweb.freebsd.org/changeset/base/280990 Log: Provide better debugging information in tcp_timer_activate() and tcp_timer_active() Differential Revision:https://reviews.freebsd.org/D2179 Suggested by:

svn commit: r280904 - head/sys/netinet

2015-03-31 Thread Julien Charbon
Author: jch Date: Tue Mar 31 10:17:13 2015 New Revision: 280904 URL: https://svnweb.freebsd.org/changeset/base/280904 Log: Use appropriate timeout_t* instead of void* in tcp_timer_activate() Suggested by: imp Differential Revision:https://reviews.freebsd.org/D2154

svn commit: r279821 - head/sys/netinet

2015-03-09 Thread Julien Charbon
Author: jch Date: Mon Mar 9 20:29:16 2015 New Revision: 279821 URL: https://svnweb.freebsd.org/changeset/base/279821 Log: In TCP, connect() can return incorrect error code EINVAL instead of EADDRINUSE or ECONNREFUSED PR:

svn commit: r275402 - stable/10/sys/netinet

2014-12-02 Thread Julien Charbon
Author: jch Date: Tue Dec 2 11:47:26 2014 New Revision: 275402 URL: https://svnweb.freebsd.org/changeset/base/275402 Log: MFC r264321, r264342, r264351, r264356, r273850, r274629: Currently, the TCP slow timer can starve TCP input processing while it walks the list of connections in

svn commit: r274629 - head/sys/netinet

2014-11-17 Thread Julien Charbon
Author: jch Date: Mon Nov 17 14:56:02 2014 New Revision: 274629 URL: https://svnweb.freebsd.org/changeset/base/274629 Log: Re-introduce padding fields removed with r264321 to keep struct tcptw ABI unchanged. Suggested by: jhb Approved by: jhb (mentor) MFC after:1 day

svn commit: r273850 - head/sys/netinet

2014-10-30 Thread Julien Charbon
Author: jch Date: Thu Oct 30 08:53:56 2014 New Revision: 273850 URL: https://svnweb.freebsd.org/changeset/base/273850 Log: Fix a race condition in TCP timewait between tcp_tw_2msl_reuse() and tcp_tw_2msl_scan(). This race condition drives unplanned timewait timeout cancellation. Also

svn commit: r273014 - head/sys/netinet

2014-10-12 Thread Julien Charbon
Author: jch Date: Sun Oct 12 23:01:25 2014 New Revision: 273014 URL: https://svnweb.freebsd.org/changeset/base/273014 Log: A connection in TIME_WAIT state before calling close() actually did not received any RST packet. Do not set error to ECONNRESET in this case. Differential Revision:

svn commit: r272085 - in head: share/misc usr.bin/calendar/calendars

2014-09-24 Thread Julien Charbon
(r272085) @@ -179,6 +179,7 @@ ivoras [label=Ivan Voras\nivoras@FreeBS jamie [label=Jamie Gritton\nja...@freebsd.org\n2009/01/28] jasone [label=Jason Evans\njas...@freebsd.org\n1999/03/03] jceel [label=Jakub Klama\njc...@freebsd.org\n2011/09/25] +jch [label=Julien Charbon\n...@freebsd.org\n2014/09

Re: svn commit: r264321 - head/sys/netinet

2014-04-10 Thread Julien Charbon
Hi Gleb, On 10/04/14 21:29, Gleb Smirnoff wrote: one comment: On Thu, Apr 10, 2014 at 06:15:35PM +, John Baldwin wrote: J +/* J + * Drop a refcount on an tw elevated using tw_pcbref(). Return J + * the tw lock released. J + */ J +static int J +tw_pcbrele(struct tcptw *tw) J +{ J + J