<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv4/ip_forward.c, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-11-03T20:10:26Z</updated>
<entry>
<title>ipv4: allow local fragmentation in ip_finish_output_gso()</title>
<updated>2016-11-03T20:10:26Z</updated>
<author>
<name>Lance Richardson</name>
<email>lrichard@redhat.com</email>
</author>
<published>2016-11-02T20:36:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ee6c5dc816aa8256257f2cd4008a9291ec7e985'/>
<id>urn:sha1:9ee6c5dc816aa8256257f2cd4008a9291ec7e985</id>
<content type='text'>
Some configurations (e.g. geneve interface with default
MTU of 1500 over an ethernet interface with 1500 MTU) result
in the transmission of packets that exceed the configured MTU.
While this should be considered to be a "bad" configuration,
it is still allowed and should not result in the sending
of packets that exceed the configured MTU.

Fix by dropping the assumption in ip_finish_output_gso() that
locally originated gso packets will never need fragmentation.
Basic testing using iperf (observing CPU usage and bandwidth)
have shown no measurable performance impact for traffic not
requiring fragmentation.

Fixes: c7ba65d7b649 ("net: ip: push gso skb forwarding handling down the stack")
Reported-by: Jan Tluka &lt;jtluka@redhat.com&gt;
Signed-off-by: Lance Richardson &lt;lrichard@redhat.com&gt;
Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ipv4: Introduce IPSKB_FRAG_SEGS bit to inet_skb_parm.flags</title>
<updated>2016-07-19T23:40:22Z</updated>
<author>
<name>Shmulik Ladkani</name>
<email>shmulik.ladkani@gmail.com</email>
</author>
<published>2016-07-18T11:49:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=359ebda25aa06fe3a1d028f7e338a849165e661b'/>
<id>urn:sha1:359ebda25aa06fe3a1d028f7e338a849165e661b</id>
<content type='text'>
This flag indicates whether fragmentation of segments is allowed.

Formerly this policy was hardcoded according to IPSKB_FORWARDED (set by
either ip_forward or ipmr_forward).

Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Cc: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>skbuff: introduce skb_gso_validate_mtu</title>
<updated>2016-06-03T23:37:21Z</updated>
<author>
<name>Marcelo Ricardo Leitner</name>
<email>marcelo.leitner@gmail.com</email>
</author>
<published>2016-06-02T18:05:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae7ef81ef000adeee7a87585b9135ff8a8064acc'/>
<id>urn:sha1:ae7ef81ef000adeee7a87585b9135ff8a8064acc</id>
<content type='text'>
skb_gso_network_seglen is not enough for checking fragment sizes if
skb is using GSO_BY_FRAGS as we have to check frag per frag.

This patch introduces skb_gso_validate_mtu, based on the former, which
will wrap the use case inside it as all calls to skb_gso_network_seglen
were to validate if it fits on a given TMU, and improve the check.

Signed-off-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Tested-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: rename IP_ADD_STATS_BH()</title>
<updated>2016-04-28T02:48:24Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-04-27T23:44:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=98f619957ec2717fea09b398957e130e4bf4b30c'/>
<id>urn:sha1:98f619957ec2717fea09b398957e130e4bf4b30c</id>
<content type='text'>
Rename IP_ADD_STATS_BH() to __IP_ADD_STATS()

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: rename IP_INC_STATS_BH()</title>
<updated>2016-04-28T02:48:23Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-04-27T23:44:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b45386efa2ec4533196a24d397ec5f9f0a42abc4'/>
<id>urn:sha1:b45386efa2ec4533196a24d397ec5f9f0a42abc4</id>
<content type='text'>
Rename IP_INC_STATS_BH() to __IP_INC_STATS(), to
better express this is used in non preemptible context.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: remove skb_sender_cpu_clear()</title>
<updated>2016-03-01T22:36:47Z</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2016-02-28T04:19:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=64d4e3431e686dc37ce388ba531c4c4e866fb141'/>
<id>urn:sha1:64d4e3431e686dc37ce388ba531c4c4e866fb141</id>
<content type='text'>
After commit 52bd2d62ce67 ("net: better skb-&gt;sender_cpu and skb-&gt;napi_id cohabitation")
skb_sender_cpu_clear() becomes empty and can be removed.

Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Pass net into dst_output and remove dst_output_okfn</title>
<updated>2015-10-08T11:26:54Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-10-07T21:48:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=13206b6bff3b15b724926a222406476bf2c23c40'/>
<id>urn:sha1:13206b6bff3b15b724926a222406476bf2c23c40</id>
<content type='text'>
Replace dst_output_okfn with dst_output

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: Pass net into okfn</title>
<updated>2015-09-18T00:18:37Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-09-16T01:04:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c4b51f0054ce85c0ec578ab818f0631834573eb'/>
<id>urn:sha1:0c4b51f0054ce85c0ec578ab818f0631834573eb</id>
<content type='text'>
This is immediately motivated by the bridge code that chains functions that
call into netfilter.  Without passing net into the okfns the bridge code would
need to guess about the best expression for the network namespace to process
packets in.

As net is frequently one of the first things computed in continuation functions
after netfilter has done it's job passing in the desired network namespace is in
many cases a code simplification.

To support this change the function dst_output_okfn is introduced to
simplify passing dst_output as an okfn.  For the moment dst_output_okfn
just silently drops the struct net.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: Pass struct net into the netfilter hooks</title>
<updated>2015-09-18T00:18:37Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-09-16T01:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=29a26a56803855a79dbd028cd61abee56237d6e5'/>
<id>urn:sha1:29a26a56803855a79dbd028cd61abee56237d6e5</id>
<content type='text'>
Pass a network namespace parameter into the netfilter hooks.  At the
call site of the netfilter hooks the path a packet is taking through
the network stack is well known which allows the network namespace to
be easily and reliabily.

This allows the replacement of magic code like
"dev_net(state-&gt;in?:state-&gt;out)" that appears at the start of most
netfilter hooks with "state-&gt;net".

In almost all cases the network namespace passed in is derived
from the first network device passed in, guaranteeing those
paths will not see any changes in practice.

The exceptions are:
xfrm/xfrm_output.c:xfrm_output_resume()         xs_net(skb_dst(skb)-&gt;xfrm)
ipvs/ip_vs_xmit.c:ip_vs_nat_send_or_cont()      ip_vs_conn_net(cp)
ipvs/ip_vs_xmit.c:ip_vs_send_or_cont()          ip_vs_conn_net(cp)
ipv4/raw.c:raw_send_hdrinc()                    sock_net(sk)
ipv6/ip6_output.c:ip6_xmit()			sock_net(sk)
ipv6/ndisc.c:ndisc_send_skb()                   dev_net(skb-&gt;dev) not dev_net(dst-&gt;dev)
ipv6/raw.c:raw6_send_hdrinc()                   sock_net(sk)
br_netfilter_hooks.c:br_nf_pre_routing_finish() dev_net(skb-&gt;dev) before skb-&gt;dev is set to nf_bridge-&gt;physindev

In all cases these exceptions seem to be a better expression for the
network namespace the packet is being processed in then the historic
"dev_net(in?in:out)".  I am documenting them in case something odd
pops up and someone starts trying to track down what happened.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Compute net once in ip_forward_finish</title>
<updated>2015-09-18T00:18:33Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-09-16T01:03:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8e1ac7912700914e4d6d129d38ecbcff8e4f4c4'/>
<id>urn:sha1:f8e1ac7912700914e4d6d129d38ecbcff8e4f4c4</id>
<content type='text'>
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
