Re: svn commit: r300854 - in head/sys: netinet netinet6

2016-05-28 Thread K. Macy
On Friday, May 27, 2016, Bjoern A. Zeeb 
wrote:

>
> > On 28 May 2016, at 00:02 , Gleb Smirnoff  wrote:
> >
> > On Fri, May 27, 2016 at 02:27:45PM -0700, Adrian Chadd wrote:
> > A> Hm, doesnt this make sense to do as part of RO_RTFREE?
> >
> > I agree that it looks messy, but for now we just need to fix instapanic.
> >
> > I will either return to this, or may be melifaro's new routing will
> > outperform FLOWTABLE and we can delete it.
>
> This statement makes no sense to me at this point anymore.
> For local connections you have cached routes;  no lookup will be faster.
>
> For forwarding flowtable should not be used anyway.
>
>

Flowtable does, or at least did (I don't know how much the code has been
handicapped in the meantime), stateful handling of flows. Neither inpcb
caching nor melifaro's routing improvements apply. Perhaps obsolete as the
band aid it was being used for.


What you mean is that with L2 caching in the inPCB, flowtable will become
> obsolete?
>
> /bz
> ___
> svn-src-head@freebsd.org  mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org
> "
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r300854 - in head/sys: netinet netinet6

2016-05-27 Thread Bjoern A. Zeeb

> On 28 May 2016, at 00:02 , Gleb Smirnoff  wrote:
> 
> On Fri, May 27, 2016 at 02:27:45PM -0700, Adrian Chadd wrote:
> A> Hm, doesnt this make sense to do as part of RO_RTFREE?
> 
> I agree that it looks messy, but for now we just need to fix instapanic.
> 
> I will either return to this, or may be melifaro's new routing will
> outperform FLOWTABLE and we can delete it.

This statement makes no sense to me at this point anymore.
For local connections you have cached routes;  no lookup will be faster.

For forwarding flowtable should not be used anyway.

What you mean is that with L2 caching in the inPCB, flowtable will become 
obsolete?

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


Re: svn commit: r300854 - in head/sys: netinet netinet6

2016-05-27 Thread Gleb Smirnoff
On Fri, May 27, 2016 at 02:27:45PM -0700, Adrian Chadd wrote:
A> Hm, doesnt this make sense to do as part of RO_RTFREE?

I agree that it looks messy, but for now we just need to fix instapanic.

I will either return to this, or may be melifaro's new routing will
outperform FLOWTABLE and we can delete it.

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


Re: svn commit: r300854 - in head/sys: netinet netinet6

2016-05-27 Thread Adrian Chadd
Hm, doesnt this make sense to do as part of RO_RTFREE?


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


svn commit: r300854 - in head/sys: netinet netinet6

2016-05-27 Thread Gleb Smirnoff
Author: glebius
Date: Fri May 27 17:31:02 2016
New Revision: 300854
URL: https://svnweb.freebsd.org/changeset/base/300854

Log:
  Plug route reference underleak that happens with FLOWTABLE after r297225.
  
  Submitted by: Mike Karels 

Modified:
  head/sys/netinet/ip_output.c
  head/sys/netinet6/ip6_output.c

Modified: head/sys/netinet/ip_output.c
==
--- head/sys/netinet/ip_output.cFri May 27 17:07:07 2016
(r300853)
+++ head/sys/netinet/ip_output.cFri May 27 17:31:02 2016
(r300854)
@@ -701,7 +701,11 @@ sendit:
IPSTAT_INC(ips_fragmented);
 
 done:
-   if (ro == )
+   /*
+* Release the route if using our private route, or if
+* (with flowtable) we don't have our own reference.
+*/
+   if (ro ==  || ro->ro_flags & RT_NORTREF)
RO_RTFREE(ro);
else if (rte == NULL)
/*

Modified: head/sys/netinet6/ip6_output.c
==
--- head/sys/netinet6/ip6_output.c  Fri May 27 17:07:07 2016
(r300853)
+++ head/sys/netinet6/ip6_output.c  Fri May 27 17:31:02 2016
(r300854)
@@ -1053,7 +1053,11 @@ sendorfree:
IP6STAT_INC(ip6s_fragmented);
 
 done:
-   if (ro == )
+   /*
+* Release the route if using our private route, or if
+* (with flowtable) we don't have our own reference.
+*/
+   if (ro ==  || ro->ro_flags & RT_NORTREF)
RO_RTFREE(ro);
return (error);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"