<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/net/openvswitch/vport-internal_dev.c, branch v4.8</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>OVS: Ignore negative headroom value</title>
<updated>2016-08-06T04:06:11+00:00</updated>
<author>
<name>Ian Wienand</name>
<email>iwienand@redhat.com</email>
</author>
<published>2016-08-03T05:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5ef9f289c4e698054e5687edb54f0da3cdc9173a'/>
<id>5ef9f289c4e698054e5687edb54f0da3cdc9173a</id>
<content type='text'>
net_device-&gt;ndo_set_rx_headroom (introduced in
871b642adebe300be2e50aa5f65a418510f636ec) says

  "Setting a negtaive value reset the rx headroom
   to the default value".

It seems that the OVS implementation in
3a927bc7cf9d0fbe8f4a8189dd5f8440228f64e7 overlooked this and sets
dev-&gt;needed_headroom unconditionally.

This doesn't have an immediate effect, but can mess up later
LL_RESERVED_SPACE calculations, such as done in
net/ipv6/mcast.c:mld_newpack.  For reference, this issue was found
from a skb_panic raised there after the length calculations had given
the wrong result.

Note the other current users of this interface
(drivers/net/tun.c:tun_set_headroom and
drivers/net/veth.c:veth_set_rx_headroom) are both checking this
correctly thus need no modification.

Thanks to Ben for some pointers from the crash dumps!

Cc: Benjamin Poirier &lt;bpoirier@suse.com&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1361414
Signed-off-by: Ian Wienand &lt;iwienand@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
net_device-&gt;ndo_set_rx_headroom (introduced in
871b642adebe300be2e50aa5f65a418510f636ec) says

  "Setting a negtaive value reset the rx headroom
   to the default value".

It seems that the OVS implementation in
3a927bc7cf9d0fbe8f4a8189dd5f8440228f64e7 overlooked this and sets
dev-&gt;needed_headroom unconditionally.

This doesn't have an immediate effect, but can mess up later
LL_RESERVED_SPACE calculations, such as done in
net/ipv6/mcast.c:mld_newpack.  For reference, this issue was found
from a skb_panic raised there after the length calculations had given
the wrong result.

Note the other current users of this interface
(drivers/net/tun.c:tun_set_headroom and
drivers/net/veth.c:veth_set_rx_headroom) are both checking this
correctly thus need no modification.

Thanks to Ben for some pointers from the crash dumps!

Cc: Benjamin Poirier &lt;bpoirier@suse.com&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1361414
Signed-off-by: Ian Wienand &lt;iwienand@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovs: set name assign type of internal port</title>
<updated>2016-06-02T22:05:47+00:00</updated>
<author>
<name>Zhang Shengju</name>
<email>zhangshengju@cmss.chinamobile.com</email>
</author>
<published>2016-05-31T13:41:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=684ff4ef5edd758c47929b852b4ea79be56f8bc0'/>
<id>684ff4ef5edd758c47929b852b4ea79be56f8bc0</id>
<content type='text'>
Set name_assign_type of internal port to NET_NAME_USER.

Signed-off-by: Zhang Shengju &lt;zhangshengju@cmss.chinamobile.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set name_assign_type of internal port to NET_NAME_USER.

Signed-off-by: Zhang Shengju &lt;zhangshengju@cmss.chinamobile.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Convert to using IFF_NO_QUEUE</title>
<updated>2016-04-17T02:02:14+00:00</updated>
<author>
<name>Phil Sutter</name>
<email>phil@nwl.cc</email>
</author>
<published>2016-04-15T17:14:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4272cc51a6dcf2c086863372fd593809ffced7d5'/>
<id>4272cc51a6dcf2c086863372fd593809ffced7d5</id>
<content type='text'>
Cc: Pravin Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cc: Pravin Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovs: internal_set_rx_headroom() can be static</title>
<updated>2016-03-18T21:50:36+00:00</updated>
<author>
<name>Wu Fengguang</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2016-03-18T16:54:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e014e8468552236f0f0cb64c7c341c1dce506070'/>
<id>e014e8468552236f0f0cb64c7c341c1dce506070</id>
<content type='text'>
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovs: propagate per dp max headroom to all vports</title>
<updated>2016-03-01T20:54:30+00:00</updated>
<author>
<name>Paolo Abeni</name>
<email>pabeni@redhat.com</email>
</author>
<published>2016-02-26T09:45:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3a927bc7cf9d0fbe8f4a8189dd5f8440228f64e7'/>
<id>3a927bc7cf9d0fbe8f4a8189dd5f8440228f64e7</id>
<content type='text'>
This patch implements bookkeeping support to compute the maximum
headroom for all the devices in each datapath. When said value
changes, the underlying devs are notified via the
ndo_set_rx_headroom method.

This also increases the internal vports xmit performance.

Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements bookkeeping support to compute the maximum
headroom for all the devices in each datapath. When said value
changes, the underlying devs are notified via the
ndo_set_rx_headroom method.

This also increases the internal vports xmit performance.

Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2015-10-24T13:54:12+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-10-24T13:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ba3e2084f268bdfed7627046e58a2218037e15af'/>
<id>ba3e2084f268bdfed7627046e58a2218037e15af</id>
<content type='text'>
Conflicts:
	net/ipv6/xfrm6_output.c
	net/openvswitch/flow_netlink.c
	net/openvswitch/vport-gre.c
	net/openvswitch/vport-vxlan.c
	net/openvswitch/vport.c
	net/openvswitch/vport.h

The openvswitch conflicts were overlapping changes.  One was
the egress tunnel info fix in 'net' and the other was the
vport -&gt;send() op simplification in 'net-next'.

The xfrm6_output.c conflicts was also a simplification
overlapping a bug fix.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	net/ipv6/xfrm6_output.c
	net/openvswitch/flow_netlink.c
	net/openvswitch/vport-gre.c
	net/openvswitch/vport-vxlan.c
	net/openvswitch/vport.c
	net/openvswitch/vport.h

The openvswitch conflicts were overlapping changes.  One was
the egress tunnel info fix in 'net' and the other was the
vport -&gt;send() op simplification in 'net-next'.

The xfrm6_output.c conflicts was also a simplification
overlapping a bug fix.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Use dev_queue_xmit for vport send.</title>
<updated>2015-10-22T13:46:16+00:00</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2015-10-21T06:00:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=aec15924740edc9886051593bc7769873be9498b'/>
<id>aec15924740edc9886051593bc7769873be9498b</id>
<content type='text'>
With use of lwtunnel, we can directly call dev_queue_xmit()
rather than calling netdev vport send operation.
Following change make tunnel vport code bit cleaner.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Acked-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With use of lwtunnel, we can directly call dev_queue_xmit()
rather than calling netdev vport send operation.
Following change make tunnel vport code bit cleaner.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Acked-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Allocate memory for ovs internal device stats.</title>
<updated>2015-10-22T02:06:36+00:00</updated>
<author>
<name>James Morse</name>
<email>james.morse@arm.com</email>
</author>
<published>2015-10-19T15:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1241365f1aeb24ef0ffe82970f7c558022ddc85f'/>
<id>1241365f1aeb24ef0ffe82970f7c558022ddc85f</id>
<content type='text'>
"openvswitch: Remove vport stats" removed the per-vport statistics, in
order to use the netdev's statistics fields.
"openvswitch: Fix ovs_vport_get_stats()" fixed the export of these stats
to user-space, by using the provided netdev_ops to collate them - but ovs
internal devices still use an unallocated dev-&gt;tstats field to count
packets, which are no longer exported by this api.

Allocate the dev-&gt;tstats field for ovs internal devices, and wire up
ndo_get_stats64 with the original implementation of
ovs_vport_get_stats().

On its own, "openvswitch: Fix ovs_vport_get_stats()" fixes the OOPs,
unmasking a full-on panic on arm64:

=============%&lt;==============
[&lt;ffffffbffc00ce4c&gt;] internal_dev_recv+0xa8/0x170 [openvswitch]
[&lt;ffffffbffc0008b4&gt;] do_output.isra.31+0x60/0x19c [openvswitch]
[&lt;ffffffbffc000bf8&gt;] do_execute_actions+0x208/0x11c0 [openvswitch]
[&lt;ffffffbffc001c78&gt;] ovs_execute_actions+0xc8/0x238 [openvswitch]
[&lt;ffffffbffc003dfc&gt;] ovs_packet_cmd_execute+0x21c/0x288 [openvswitch]
[&lt;ffffffc0005e8c5c&gt;] genl_family_rcv_msg+0x1b0/0x310
[&lt;ffffffc0005e8e60&gt;] genl_rcv_msg+0xa4/0xe4
[&lt;ffffffc0005e7ddc&gt;] netlink_rcv_skb+0xb0/0xdc
[&lt;ffffffc0005e8a94&gt;] genl_rcv+0x38/0x50
[&lt;ffffffc0005e76c0&gt;] netlink_unicast+0x164/0x210
[&lt;ffffffc0005e7b70&gt;] netlink_sendmsg+0x304/0x368
[&lt;ffffffc0005a21c0&gt;] sock_sendmsg+0x30/0x4c
[SNIP]
Kernel panic - not syncing: Fatal exception in interrupt
=============%&lt;==============

Fixes: 8c876639c985 ("openvswitch: Remove vport stats.")
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"openvswitch: Remove vport stats" removed the per-vport statistics, in
order to use the netdev's statistics fields.
"openvswitch: Fix ovs_vport_get_stats()" fixed the export of these stats
to user-space, by using the provided netdev_ops to collate them - but ovs
internal devices still use an unallocated dev-&gt;tstats field to count
packets, which are no longer exported by this api.

Allocate the dev-&gt;tstats field for ovs internal devices, and wire up
ndo_get_stats64 with the original implementation of
ovs_vport_get_stats().

On its own, "openvswitch: Fix ovs_vport_get_stats()" fixes the OOPs,
unmasking a full-on panic on arm64:

=============%&lt;==============
[&lt;ffffffbffc00ce4c&gt;] internal_dev_recv+0xa8/0x170 [openvswitch]
[&lt;ffffffbffc0008b4&gt;] do_output.isra.31+0x60/0x19c [openvswitch]
[&lt;ffffffbffc000bf8&gt;] do_execute_actions+0x208/0x11c0 [openvswitch]
[&lt;ffffffbffc001c78&gt;] ovs_execute_actions+0xc8/0x238 [openvswitch]
[&lt;ffffffbffc003dfc&gt;] ovs_packet_cmd_execute+0x21c/0x288 [openvswitch]
[&lt;ffffffc0005e8c5c&gt;] genl_family_rcv_msg+0x1b0/0x310
[&lt;ffffffc0005e8e60&gt;] genl_rcv_msg+0xa4/0xe4
[&lt;ffffffc0005e7ddc&gt;] netlink_rcv_skb+0xb0/0xdc
[&lt;ffffffc0005e8a94&gt;] genl_rcv+0x38/0x50
[&lt;ffffffc0005e76c0&gt;] netlink_unicast+0x164/0x210
[&lt;ffffffc0005e7b70&gt;] netlink_sendmsg+0x304/0x368
[&lt;ffffffc0005a21c0&gt;] sock_sendmsg+0x30/0x4c
[SNIP]
Kernel panic - not syncing: Fatal exception in interrupt
=============%&lt;==============

Fixes: 8c876639c985 ("openvswitch: Remove vport stats.")
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Remove vport stats.</title>
<updated>2015-08-30T02:07:15+00:00</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2015-08-30T00:44:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8c876639c98501b049269b554bf4ecbb8f9c012f'/>
<id>8c876639c98501b049269b554bf4ecbb8f9c012f</id>
<content type='text'>
Since all vport types are now backed by netdev, we can directly
use netdev stats. Following patch removes redundant stat
from vport.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since all vport types are now backed by netdev, we can directly
use netdev stats. Following patch removes redundant stat
from vport.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: add netif_is_ovs_master helper with IFF_OPENVSWITCH private flag</title>
<updated>2015-08-27T23:28:35+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2015-08-27T07:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=35d4e1725202e6656fcfa8b88447327ad3ae0c0c'/>
<id>35d4e1725202e6656fcfa8b88447327ad3ae0c0c</id>
<content type='text'>
Add this helper so code can easily figure out if netdev is openswitch.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add this helper so code can easily figure out if netdev is openswitch.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
