<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv4/ip_output.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-12-02T17:34:22Z</updated>
<entry>
<title>ipv4: Set skb-&gt;protocol properly for local output</title>
<updated>2016-12-02T17:34:22Z</updated>
<author>
<name>Eli Cooper</name>
<email>elicooper@gmx.com</email>
</author>
<published>2016-12-01T02:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4180439109aa720774baafdd798b3234ab1a0d2'/>
<id>urn:sha1:f4180439109aa720774baafdd798b3234ab1a0d2</id>
<content type='text'>
When xfrm is applied to TSO/GSO packets, it follows this path:

    xfrm_output() -&gt; xfrm_output_gso() -&gt; skb_gso_segment()

where skb_gso_segment() relies on skb-&gt;protocol to function properly.

This patch sets skb-&gt;protocol to ETH_P_IP before dst_output() is called,
fixing a bug where GSO packets sent through a sit tunnel are dropped
when xfrm is involved.

Cc: stable@vger.kernel.org
Signed-off-by: Eli Cooper &lt;elicooper@gmx.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: update comment to document GSO fragmentation cases.</title>
<updated>2016-11-10T17:01:54Z</updated>
<author>
<name>Lance Richardson</name>
<email>lrichard@redhat.com</email>
</author>
<published>2016-11-09T20:04:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ace81ec7192201af48528c309ee0b4103021f55'/>
<id>urn:sha1:0ace81ec7192201af48528c309ee0b4103021f55</id>
<content type='text'>
This is a follow-up to commit 9ee6c5dc816a ("ipv4: allow local
fragmentation in ip_finish_output_gso()"), updating the comment
documenting cases in which fragmentation is needed for egress
GSO packets.

Suggested-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Reviewed-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Signed-off-by: Lance Richardson &lt;lrichard@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: tcp response should set oif only if it is L3 master</title>
<updated>2016-11-10T03:32:10Z</updated>
<author>
<name>David Ahern</name>
<email>dsa@cumulusnetworks.com</email>
</author>
<published>2016-11-09T17:07:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b6c14d51bd2304b92f842e96172a9cc822fc77c'/>
<id>urn:sha1:9b6c14d51bd2304b92f842e96172a9cc822fc77c</id>
<content type='text'>
Lorenzo noted an Android unit test failed due to e0d56fdd7342:
"The expectation in the test was that the RST replying to a SYN sent to a
closed port should be generated with oif=0. In other words it should not
prefer the interface where the SYN came in on, but instead should follow
whatever the routing table says it should do."

Revert the change to ip_send_unicast_reply and tcp_v6_send_response such
that the oif in the flow is set to the skb_iif only if skb_iif is an L3
master.

Fixes: e0d56fdd7342 ("net: l3mdev: remove redundant calls")
Reported-by: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Signed-off-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Tested-by: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Acked-by: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<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>ipv4: Remove unused but set variable</title>
<updated>2016-10-18T14:30:28Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2016-10-18T07:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7e1670c15c9b18d614b43a674e086eb3e239c8f7'/>
<id>urn:sha1:7e1670c15c9b18d614b43a674e086eb3e239c8f7</id>
<content type='text'>
Remove the unused but set variable dev in ip_do_fragment to fix the
following GCC warning when building with 'W=1':

  net/ipv4/ip_output.c: In function ‘ip_do_fragment’:
  net/ipv4/ip_output.c:541:21: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: l3mdev: remove redundant calls</title>
<updated>2016-09-11T06:12:52Z</updated>
<author>
<name>David Ahern</name>
<email>dsa@cumulusnetworks.com</email>
</author>
<published>2016-09-10T19:09:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0d56fdd734224666e7bd5fafbc620286d2a7ee8'/>
<id>urn:sha1:e0d56fdd734224666e7bd5fafbc620286d2a7ee8</id>
<content type='text'>
A previous patch added l3mdev flow update making these hooks
redundant. Remove them.

Signed-off-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: l3mdev: Add hook to output path</title>
<updated>2016-09-11T06:12:52Z</updated>
<author>
<name>David Ahern</name>
<email>dsa@cumulusnetworks.com</email>
</author>
<published>2016-09-10T19:09:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8e3e1a9f02094145580ea7920c6a1d9aabd5539'/>
<id>urn:sha1:a8e3e1a9f02094145580ea7920c6a1d9aabd5539</id>
<content type='text'>
This patch adds the infrastructure to the output path to pass an skb
to an l3mdev device if it has a hook registered. This is the Tx parallel
to l3mdev_ip{6}_rcv in the receive path and is the basis for removing
the existing hook that returns the vrf dst on the fib lookup.

Signed-off-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: use IS_ENABLED() instead of checking for built-in or module</title>
<updated>2016-09-11T04:19:10Z</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier@osg.samsung.com</email>
</author>
<published>2016-09-09T12:43:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ca40d4e8463c53e6b778010b9331268865725a6'/>
<id>urn:sha1:6ca40d4e8463c53e6b778010b9331268865725a6</id>
<content type='text'>
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
built-in or as a module, use that macro instead of open coding the same.

Using the macro makes the code more readable by helping abstract away some
of the Kconfig built-in and module enable details.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: lwtunnel: Handle fragmentation</title>
<updated>2016-08-31T05:27:18Z</updated>
<author>
<name>Roopa Prabhu</name>
<email>roopa@cumulusnetworks.com</email>
</author>
<published>2016-08-25T03:10:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14972cbd34ff668c390cbd2e6497323484c9e812'/>
<id>urn:sha1:14972cbd34ff668c390cbd2e6497323484c9e812</id>
<content type='text'>
Today mpls iptunnel lwtunnel_output redirect expects the tunnel
output function to handle fragmentation. This is ok but can be
avoided if we did not do the mpls output redirect too early.
ie we could wait until ip fragmentation is done and then call
mpls output for each ip fragment.

To make this work we will need,
1) the lwtunnel state to carry encap headroom
2) and do the redirect to the encap output handler on the ip fragment
(essentially do the output redirect after fragmentation)

This patch adds tunnel headroom in lwtstate to make sure we
account for tunnel data in mtu calculations during fragmentation
and adds new xmit redirect handler to redirect to lwtunnel xmit func
after ip fragmentation.

This includes IPV6 and some mtu fixes and testing from David Ahern.

Signed-off-by: Roopa Prabhu &lt;roopa@cumulusnetworks.com&gt;
Signed-off-by: David Ahern &lt;dsa@cumulusnetworks.com&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>
</feed>
