<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/flow.h, branch v3.16-rc3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/net/flow.h?h=v3.16-rc3</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/net/flow.h?h=v3.16-rc3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-04-16T19:05:11Z</updated>
<entry>
<title>ipv4, fib: pass LOOPBACK_IFINDEX instead of 0 to flowi4_iif</title>
<updated>2014-04-16T19:05:11Z</updated>
<author>
<name>Cong Wang</name>
<email>cwang@twopensource.com</email>
</author>
<published>2014-04-15T23:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a662719c9868b3d6c7d26b3a085f0cd3cc15e64'/>
<id>urn:sha1:6a662719c9868b3d6c7d26b3a085f0cd3cc15e64</id>
<content type='text'>
As suggested by Julian:

	Simply, flowi4_iif must not contain 0, it does not
	look logical to ignore all ip rules with specified iif.

because in fib_rule_match() we do:

        if (rule-&gt;iifindex &amp;&amp; (rule-&gt;iifindex != fl-&gt;flowi_iif))
                goto out;

flowi4_iif should be LOOPBACK_IFINDEX by default.

We need to move LOOPBACK_IFINDEX to include/net/flow.h:

1) It is mostly used by flowi_iif

2) Fix the following compile error if we use it in flow.h
by the patches latter:

In file included from include/linux/netfilter.h:277:0,
                 from include/net/netns/netfilter.h:5,
                 from include/net/net_namespace.h:21,
                 from include/linux/netdevice.h:43,
                 from include/linux/icmpv6.h:12,
                 from include/linux/ipv6.h:61,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from include/linux/nfs_fs.h:30,
                 from init/do_mounts.c:32:
include/net/flow.h: In function ‘flowi4_init_output’:
include/net/flow.h:84:32: error: ‘LOOPBACK_IFINDEX’ undeclared (first use in this function)

Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>flowcache: Fix resource leaks on namespace exit.</title>
<updated>2014-03-12T19:31:18Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2014-03-12T08:43:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4a93f5095a628d812b0b30c16d7bacea1efd783c'/>
<id>urn:sha1:4a93f5095a628d812b0b30c16d7bacea1efd783c</id>
<content type='text'>
We leak an active timer, the hotcpu notifier and all allocated
resources when we exit a namespace. Fix this by introducing a
flow_cache_fini() function where we release the resources before
we exit.

Fixes: ca925cf1534e ("flowcache: Make flow cache name space aware")
Reported-by: Jakub Kicinski &lt;moorray3@wp.pl&gt;
Tested-by: Jakub Kicinski &lt;moorray3@wp.pl&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Fan Du &lt;fan.du@windriver.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>flowcache: Make flow cache name space aware</title>
<updated>2014-02-12T06:02:11Z</updated>
<author>
<name>Fan Du</name>
<email>fan.du@windriver.com</email>
</author>
<published>2014-01-18T01:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ca925cf1534ebcec332c08719a7dee6ee1782ce4'/>
<id>urn:sha1:ca925cf1534ebcec332c08719a7dee6ee1782ce4</id>
<content type='text'>
Inserting a entry into flowcache, or flushing flowcache should be based
on per net scope. The reason to do so is flushing operation from fat
netns crammed with flow entries will also making the slim netns with only
a few flow cache entries go away in original implementation.

Since flowcache is tightly coupled with IPsec, so it would be easier to
put flow cache global parameters into xfrm namespace part. And one last
thing needs to do is bumping flow cache genid, and flush flow cache should
also be made in per net style.

Signed-off-by: Fan Du &lt;fan.du@windriver.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>net: Remove FLOWI_FLAG_CAN_SLEEP</title>
<updated>2013-12-06T06:24:39Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2013-08-28T06:04:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0e0d44ab4275549998567cd4700b43f7496eb62b'/>
<id>urn:sha1:0e0d44ab4275549998567cd4700b43f7496eb62b</id>
<content type='text'>
FLOWI_FLAG_CAN_SLEEP was used to notify xfrm about the posibility
to sleep until the needed states are resolved. This code is gone,
so FLOWI_FLAG_CAN_SLEEP is not needed anymore.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>flow.h/flow_keys.h: Remove extern from function prototypes</title>
<updated>2013-09-20T18:49:33Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-09-20T18:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4787342c390a8e7570a81a62c9b361d7a4380893'/>
<id>urn:sha1:4787342c390a8e7570a81a62c9b361d7a4380893</id>
<content type='text'>
There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Add FLOWI_FLAG_KNOWN_NH</title>
<updated>2012-10-08T21:42:36Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-10-08T11:41:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c92b96553a80c1dbe2ebe128bbe37c8f98f148bf'/>
<id>urn:sha1:c92b96553a80c1dbe2ebe128bbe37c8f98f148bf</id>
<content type='text'>
Add flag to request that output route should be
returned with known rt_gateway, in case we want to use
it as nexthop for neighbour resolving.

	The returned route can be cached as follows:

- in NH exception: because the cached routes are not shared
	with other destinations
- in FIB NH: when using gateway because all destinations for
	NH share same gateway

	As last option, to return rt_gateway!=0 we have to
set DST_NOCACHE.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Kill FLOWI_FLAG_RT_NOCACHE and associated code.</title>
<updated>2012-07-20T20:36:54Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-07-17T21:02:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ba3f7f04ef2b19aace38f855aedd17fe43035d50'/>
<id>urn:sha1:ba3f7f04ef2b19aace38f855aedd17fe43035d50</id>
<content type='text'>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>inet: Kill FLOWI_FLAG_PRECOW_METRICS.</title>
<updated>2012-07-11T05:40:12Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-07-10T11:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e12939a2a67fbb4cbd962c3b9bc398c73319766'/>
<id>urn:sha1:3e12939a2a67fbb4cbd962c3b9bc398c73319766</id>
<content type='text'>
No longer needed.  TCP writes metrics, but now in it's own special
cache that does not dirty the route metrics.  Therefore there is no
longer any reason to pre-cow metrics in this way.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: tcp: dont cache output dst for syncookies</title>
<updated>2012-06-23T04:47:33Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-20T05:02:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7586eceb0abc0ea1c2b023e3e5d4dfd4ff40930a'/>
<id>urn:sha1:7586eceb0abc0ea1c2b023e3e5d4dfd4ff40930a</id>
<content type='text'>
Don't cache output dst for syncookies, as this adds pressure on IP route
cache and rcu subsystem for no gain.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Hans Schillstrom &lt;hans.schillstrom@ericsson.com&gt;
Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: reset flowi parameters on route connect</title>
<updated>2012-02-05T00:29:48Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-02-04T13:04:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e6b45241c57a83197e5de9166b3b0d32ac562609'/>
<id>urn:sha1:e6b45241c57a83197e5de9166b3b0d32ac562609</id>
<content type='text'>
Eric Dumazet found that commit 813b3b5db83
(ipv4: Use caller's on-stack flowi as-is in output
route lookups.) that comes in 3.0 added a regression.
The problem appears to be that resulting flowi4_oif is
used incorrectly as input parameter to some routing lookups.
The result is that when connecting to local port without
listener if the IP address that is used is not on a loopback
interface we incorrectly assign RTN_UNICAST to the output
route because no route is matched by oif=lo. The RST packet
can not be sent immediately by tcp_v4_send_reset because
it expects RTN_LOCAL.

	So, change ip_route_connect and ip_route_newports to
update the flowi4 fields that are input parameters because
we do not want unnecessary binding to oif.

	To make it clear what are the input parameters that
can be modified during lookup and to show which fields of
floiw4 are reused add a new function to update the flowi4
structure: flowi4_update_output.

Thanks to Yurij M. Plotnikov for providing a bug report including a
program to reproduce the problem.

Thanks to Eric Dumazet for tracking the problem down to
tcp_v4_send_reset and providing initial fix.

Reported-by: Yurij M. Plotnikov &lt;Yurij.Plotnikov@oktetlabs.ru&gt;
Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
