<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/macvlan.c, branch v3.14.57</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>net: allow macvlans to move to net namespace</title>
<updated>2014-10-15T06:36:41+00:00</updated>
<author>
<name>Francesco Ruggeri</name>
<email>fruggeri@arista.com</email>
</author>
<published>2014-09-17T17:40:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=72c01e6fcc8025685fef4be3d060388dec4aaa2c'/>
<id>72c01e6fcc8025685fef4be3d060388dec4aaa2c</id>
<content type='text'>
[ Upstream commit 0d0162e7a33d3710b9604e7c68c0f31f5c457428 ]

I cannot move a macvlan interface created on top of a bonding interface
to a different namespace:

% ip netns add dummy0
% ip link add link bond0 mac0 type macvlan
% ip link set mac0 netns dummy0
RTNETLINK answers: Invalid argument
%

The problem seems to be that commit f9399814927a ("bonding: Don't allow
bond devices to change network namespaces.") sets NETIF_F_NETNS_LOCAL
on bonding interfaces, and commit 797f87f83b60 ("macvlan: fix netdev
feature propagation from lower device") causes macvlan interfaces
to inherit its features from the lower device.

NETIF_F_NETNS_LOCAL should not be inherited from the lower device
by a macvlan.
Patch tested on 3.16.

Signed-off-by: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Acked-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 0d0162e7a33d3710b9604e7c68c0f31f5c457428 ]

I cannot move a macvlan interface created on top of a bonding interface
to a different namespace:

% ip netns add dummy0
% ip link add link bond0 mac0 type macvlan
% ip link set mac0 netns dummy0
RTNETLINK answers: Invalid argument
%

The problem seems to be that commit f9399814927a ("bonding: Don't allow
bond devices to change network namespaces.") sets NETIF_F_NETNS_LOCAL
on bonding interfaces, and commit 797f87f83b60 ("macvlan: fix netdev
feature propagation from lower device") causes macvlan interfaces
to inherit its features from the lower device.

NETIF_F_NETNS_LOCAL should not be inherited from the lower device
by a macvlan.
Patch tested on 3.16.

Signed-off-by: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Acked-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: Initialize vlan_features to turn on offload support.</title>
<updated>2014-08-14T01:38:24+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2014-07-31T14:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6d7a7d3623a1732deff22faeb4a70322794d70f5'/>
<id>6d7a7d3623a1732deff22faeb4a70322794d70f5</id>
<content type='text'>
[ Upstream commit 081e83a78db9b0ae1f5eabc2dedecc865f509b98 ]

Macvlan devices do not initialize vlan_features.  As a result,
any vlan devices configured on top of macvlans perform very poorly.
Initialize vlan_features based on the vlan features of the lower-level
device.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 081e83a78db9b0ae1f5eabc2dedecc865f509b98 ]

Macvlan devices do not initialize vlan_features.  As a result,
any vlan devices configured on top of macvlans perform very poorly.
Initialize vlan_features based on the vlan features of the lower-level
device.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: force a list_del() in unregister_netdevice_many()</title>
<updated>2014-06-26T19:15:39+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2014-06-06T13:44:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0d0fc9f9e888a6e3fdabdfc08b7c4044b58bc87a'/>
<id>0d0fc9f9e888a6e3fdabdfc08b7c4044b58bc87a</id>
<content type='text'>
[ Upstream commit 87757a917b0b3c0787e0563c679762152be81312 ]

unregister_netdevice_many() API is error prone and we had too
many bugs because of dangling LIST_HEAD on stacks.

See commit f87e6f47933e3e ("net: dont leave active on stack LIST_HEAD")

In fact, instead of making sure no caller leaves an active list_head,
just force a list_del() in the callee. No one seems to need to access
the list after unregister_netdevice_many()

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 87757a917b0b3c0787e0563c679762152be81312 ]

unregister_netdevice_many() API is error prone and we had too
many bugs because of dangling LIST_HEAD on stacks.

See commit f87e6f47933e3e ("net: dont leave active on stack LIST_HEAD")

In fact, instead of making sure no caller leaves an active list_head,
just force a list_del() in the callee. No one seems to need to access
the list after unregister_netdevice_many()

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: Don't propagate IFF_ALLMULTI changes on down interfaces.</title>
<updated>2014-05-31T20:20:37+00:00</updated>
<author>
<name>Peter Christensen</name>
<email>pch@ordbogen.com</email>
</author>
<published>2014-05-08T09:15:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=064651306507908bb68de656f10227311605bd08'/>
<id>064651306507908bb68de656f10227311605bd08</id>
<content type='text'>
[ Upstream commit bbeb0eadcf9fe74fb2b9b1a6fea82cd538b1e556 ]

Clearing the IFF_ALLMULTI flag on a down interface could cause an allmulti
overflow on the underlying interface.

Attempting the set IFF_ALLMULTI on the underlying interface would cause an
error and the log message:

"allmulti touches root, set allmulti failed."

Signed-off-by: Peter Christensen &lt;pch@ordbogen.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit bbeb0eadcf9fe74fb2b9b1a6fea82cd538b1e556 ]

Clearing the IFF_ALLMULTI flag on a down interface could cause an allmulti
overflow on the underlying interface.

Attempting the set IFF_ALLMULTI on the underlying interface would cause an
error and the log message:

"allmulti touches root, set allmulti failed."

Signed-off-by: Peter Christensen &lt;pch@ordbogen.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "macvlan : fix checksums error when we are in bridge mode"</title>
<updated>2014-05-31T20:20:36+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2014-04-29T14:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cea2f34c5fa7f414f648fc7034ce76d5eb0d48ff'/>
<id>cea2f34c5fa7f414f648fc7034ce76d5eb0d48ff</id>
<content type='text'>
[ Upstream commit f114890cdf84d753f6b41cd0cc44ba51d16313da ]

This reverts commit 12a2856b604476c27d85a5f9a57ae1661fc46019.
The commit above doesn't appear to be necessary any more as the
checksums appear to be correctly computed/validated.

Additionally the above commit breaks kvm configurations where
one VM is using a device that support checksum offload (virtio) and
the other VM does not.
In this case, packets leaving virtio device will have CHECKSUM_PARTIAL
set.  The packets is forwarded to a macvtap that has offload features
turned off.  Since we use CHECKSUM_UNNECESSARY, the host does does not
update the checksum and thus a bad checksum is passed up to
the guest.

CC: Daniel Lezcano &lt;daniel.lezcano@free.fr&gt;
CC: Patrick McHardy &lt;kaber@trash.net&gt;
CC: Andrian Nord &lt;nightnord@gmail.com&gt;
CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Michael S. Tsirkin &lt;mst@redhat.com&gt;
CC: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit f114890cdf84d753f6b41cd0cc44ba51d16313da ]

This reverts commit 12a2856b604476c27d85a5f9a57ae1661fc46019.
The commit above doesn't appear to be necessary any more as the
checksums appear to be correctly computed/validated.

Additionally the above commit breaks kvm configurations where
one VM is using a device that support checksum offload (virtio) and
the other VM does not.
In this case, packets leaving virtio device will have CHECKSUM_PARTIAL
set.  The packets is forwarded to a macvtap that has offload features
turned off.  Since we use CHECKSUM_UNNECESSARY, the host does does not
update the checksum and thus a bad checksum is passed up to
the guest.

CC: Daniel Lezcano &lt;daniel.lezcano@free.fr&gt;
CC: Patrick McHardy &lt;kaber@trash.net&gt;
CC: Andrian Nord &lt;nightnord@gmail.com&gt;
CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Michael S. Tsirkin &lt;mst@redhat.com&gt;
CC: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: Fix lockdep warnings with stacked macvlan devices</title>
<updated>2014-05-31T20:20:34+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2014-05-16T21:04:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1c030bf16f8c157ef227ee598ac40ff75fb7ec9c'/>
<id>1c030bf16f8c157ef227ee598ac40ff75fb7ec9c</id>
<content type='text'>
[ Upstream commit c674ac30c549596295eb0a5af7f4714c0b905b6f ]

Macvlan devices try to avoid stacking, but that's not always
successfull or even desired.  As an example, the following
configuration is perefectly legal and valid:

eth0 &lt;--- macvlan0 &lt;---- vlan0.10 &lt;--- macvlan1

However, this configuration produces the following lockdep
trace:
[  115.620418] ======================================================
[  115.620477] [ INFO: possible circular locking dependency detected ]
[  115.620516] 3.15.0-rc1+ #24 Not tainted
[  115.620540] -------------------------------------------------------
[  115.620577] ip/1704 is trying to acquire lock:
[  115.620604]  (&amp;vlan_netdev_addr_lock_key/1){+.....}, at: [&lt;ffffffff815df49c&gt;] dev_uc_sync+0x3c/0x80
[  115.620686]
but task is already holding lock:
[  115.620723]  (&amp;macvlan_netdev_addr_lock_key){+.....}, at: [&lt;ffffffff815da5be&gt;] dev_set_rx_mode+0x1e/0x40
[  115.620795]
which lock already depends on the new lock.

[  115.620853]
the existing dependency chain (in reverse order) is:
[  115.620894]
-&gt; #1 (&amp;macvlan_netdev_addr_lock_key){+.....}:
[  115.620935]        [&lt;ffffffff810d57f2&gt;] lock_acquire+0xa2/0x130
[  115.620974]        [&lt;ffffffff816f62e7&gt;] _raw_spin_lock_nested+0x37/0x50
[  115.621019]        [&lt;ffffffffa07296c3&gt;] vlan_dev_set_rx_mode+0x53/0x110 [8021q]
[  115.621066]        [&lt;ffffffff815da557&gt;] __dev_set_rx_mode+0x57/0xa0
[  115.621105]        [&lt;ffffffff815da5c6&gt;] dev_set_rx_mode+0x26/0x40
[  115.621143]        [&lt;ffffffff815da6be&gt;] __dev_open+0xde/0x140
[  115.621174]        [&lt;ffffffff815da9ad&gt;] __dev_change_flags+0x9d/0x170
[  115.621174]        [&lt;ffffffff815daaa9&gt;] dev_change_flags+0x29/0x60
[  115.621174]        [&lt;ffffffff815e7f11&gt;] do_setlink+0x321/0x9a0
[  115.621174]        [&lt;ffffffff815ea59f&gt;] rtnl_newlink+0x51f/0x730
[  115.621174]        [&lt;ffffffff815e6e75&gt;] rtnetlink_rcv_msg+0x95/0x250
[  115.621174]        [&lt;ffffffff81608b19&gt;] netlink_rcv_skb+0xa9/0xc0
[  115.621174]        [&lt;ffffffff815e6dca&gt;] rtnetlink_rcv+0x2a/0x40
[  115.621174]        [&lt;ffffffff81608150&gt;] netlink_unicast+0xf0/0x1c0
[  115.621174]        [&lt;ffffffff8160851f&gt;] netlink_sendmsg+0x2ff/0x740
[  115.621174]        [&lt;ffffffff815bc9db&gt;] sock_sendmsg+0x8b/0xc0
[  115.621174]        [&lt;ffffffff815bd4b9&gt;] ___sys_sendmsg+0x369/0x380
[  115.621174]        [&lt;ffffffff815bdbb2&gt;] __sys_sendmsg+0x42/0x80
[  115.621174]        [&lt;ffffffff815bdc02&gt;] SyS_sendmsg+0x12/0x20
[  115.621174]        [&lt;ffffffff816ffd69&gt;] system_call_fastpath+0x16/0x1b
[  115.621174]
-&gt; #0 (&amp;vlan_netdev_addr_lock_key/1){+.....}:
[  115.621174]        [&lt;ffffffff810d4d43&gt;] __lock_acquire+0x1773/0x1a60
[  115.621174]        [&lt;ffffffff810d57f2&gt;] lock_acquire+0xa2/0x130
[  115.621174]        [&lt;ffffffff816f62e7&gt;] _raw_spin_lock_nested+0x37/0x50
[  115.621174]        [&lt;ffffffff815df49c&gt;] dev_uc_sync+0x3c/0x80
[  115.621174]        [&lt;ffffffffa0696d2a&gt;] macvlan_set_mac_lists+0xca/0x110 [macvlan]
[  115.621174]        [&lt;ffffffff815da557&gt;] __dev_set_rx_mode+0x57/0xa0
[  115.621174]        [&lt;ffffffff815da5c6&gt;] dev_set_rx_mode+0x26/0x40
[  115.621174]        [&lt;ffffffff815da6be&gt;] __dev_open+0xde/0x140
[  115.621174]        [&lt;ffffffff815da9ad&gt;] __dev_change_flags+0x9d/0x170
[  115.621174]        [&lt;ffffffff815daaa9&gt;] dev_change_flags+0x29/0x60
[  115.621174]        [&lt;ffffffff815e7f11&gt;] do_setlink+0x321/0x9a0
[  115.621174]        [&lt;ffffffff815ea59f&gt;] rtnl_newlink+0x51f/0x730
[  115.621174]        [&lt;ffffffff815e6e75&gt;] rtnetlink_rcv_msg+0x95/0x250
[  115.621174]        [&lt;ffffffff81608b19&gt;] netlink_rcv_skb+0xa9/0xc0
[  115.621174]        [&lt;ffffffff815e6dca&gt;] rtnetlink_rcv+0x2a/0x40
[  115.621174]        [&lt;ffffffff81608150&gt;] netlink_unicast+0xf0/0x1c0
[  115.621174]        [&lt;ffffffff8160851f&gt;] netlink_sendmsg+0x2ff/0x740
[  115.621174]        [&lt;ffffffff815bc9db&gt;] sock_sendmsg+0x8b/0xc0
[  115.621174]        [&lt;ffffffff815bd4b9&gt;] ___sys_sendmsg+0x369/0x380
[  115.621174]        [&lt;ffffffff815bdbb2&gt;] __sys_sendmsg+0x42/0x80
[  115.621174]        [&lt;ffffffff815bdc02&gt;] SyS_sendmsg+0x12/0x20
[  115.621174]        [&lt;ffffffff816ffd69&gt;] system_call_fastpath+0x16/0x1b
[  115.621174]
other info that might help us debug this:

[  115.621174]  Possible unsafe locking scenario:

[  115.621174]        CPU0                    CPU1
[  115.621174]        ----                    ----
[  115.621174]   lock(&amp;macvlan_netdev_addr_lock_key);
[  115.621174]                                lock(&amp;vlan_netdev_addr_lock_key/1);
[  115.621174]                                lock(&amp;macvlan_netdev_addr_lock_key);
[  115.621174]   lock(&amp;vlan_netdev_addr_lock_key/1);
[  115.621174]
 *** DEADLOCK ***

[  115.621174] 2 locks held by ip/1704:
[  115.621174]  #0:  (rtnl_mutex){+.+.+.}, at: [&lt;ffffffff815e6dbb&gt;] rtnetlink_rcv+0x1b/0x40
[  115.621174]  #1:  (&amp;macvlan_netdev_addr_lock_key){+.....}, at: [&lt;ffffffff815da5be&gt;] dev_set_rx_mode+0x1e/0x40
[  115.621174]
stack backtrace:
[  115.621174] CPU: 3 PID: 1704 Comm: ip Not tainted 3.15.0-rc1+ #24
[  115.621174] Hardware name: Hewlett-Packard HP xw8400 Workstation/0A08h, BIOS 786D5 v02.38 10/25/2010
[  115.621174]  ffffffff82339ae0 ffff880465f79568 ffffffff816ee20c ffffffff82339ae0
[  115.621174]  ffff880465f795a8 ffffffff816e9e1b ffff880465f79600 ffff880465b019c8
[  115.621174]  0000000000000001 0000000000000002 ffff880465b019c8 ffff880465b01230
[  115.621174] Call Trace:
[  115.621174]  [&lt;ffffffff816ee20c&gt;] dump_stack+0x4d/0x66
[  115.621174]  [&lt;ffffffff816e9e1b&gt;] print_circular_bug+0x200/0x20e
[  115.621174]  [&lt;ffffffff810d4d43&gt;] __lock_acquire+0x1773/0x1a60
[  115.621174]  [&lt;ffffffff810d3172&gt;] ? trace_hardirqs_on_caller+0xb2/0x1d0
[  115.621174]  [&lt;ffffffff810d57f2&gt;] lock_acquire+0xa2/0x130
[  115.621174]  [&lt;ffffffff815df49c&gt;] ? dev_uc_sync+0x3c/0x80
[  115.621174]  [&lt;ffffffff816f62e7&gt;] _raw_spin_lock_nested+0x37/0x50
[  115.621174]  [&lt;ffffffff815df49c&gt;] ? dev_uc_sync+0x3c/0x80
[  115.621174]  [&lt;ffffffff815df49c&gt;] dev_uc_sync+0x3c/0x80
[  115.621174]  [&lt;ffffffffa0696d2a&gt;] macvlan_set_mac_lists+0xca/0x110 [macvlan]
[  115.621174]  [&lt;ffffffff815da557&gt;] __dev_set_rx_mode+0x57/0xa0
[  115.621174]  [&lt;ffffffff815da5c6&gt;] dev_set_rx_mode+0x26/0x40
[  115.621174]  [&lt;ffffffff815da6be&gt;] __dev_open+0xde/0x140
[  115.621174]  [&lt;ffffffff815da9ad&gt;] __dev_change_flags+0x9d/0x170
[  115.621174]  [&lt;ffffffff815daaa9&gt;] dev_change_flags+0x29/0x60
[  115.621174]  [&lt;ffffffff811e1db1&gt;] ? mem_cgroup_bad_page_check+0x21/0x30
[  115.621174]  [&lt;ffffffff815e7f11&gt;] do_setlink+0x321/0x9a0
[  115.621174]  [&lt;ffffffff810d394c&gt;] ? __lock_acquire+0x37c/0x1a60
[  115.621174]  [&lt;ffffffff815ea59f&gt;] rtnl_newlink+0x51f/0x730
[  115.621174]  [&lt;ffffffff815ea169&gt;] ? rtnl_newlink+0xe9/0x730
[  115.621174]  [&lt;ffffffff815e6e75&gt;] rtnetlink_rcv_msg+0x95/0x250
[  115.621174]  [&lt;ffffffff810d329d&gt;] ? trace_hardirqs_on+0xd/0x10
[  115.621174]  [&lt;ffffffff815e6dbb&gt;] ? rtnetlink_rcv+0x1b/0x40
[  115.621174]  [&lt;ffffffff815e6de0&gt;] ? rtnetlink_rcv+0x40/0x40
[  115.621174]  [&lt;ffffffff81608b19&gt;] netlink_rcv_skb+0xa9/0xc0
[  115.621174]  [&lt;ffffffff815e6dca&gt;] rtnetlink_rcv+0x2a/0x40
[  115.621174]  [&lt;ffffffff81608150&gt;] netlink_unicast+0xf0/0x1c0
[  115.621174]  [&lt;ffffffff8160851f&gt;] netlink_sendmsg+0x2ff/0x740
[  115.621174]  [&lt;ffffffff815bc9db&gt;] sock_sendmsg+0x8b/0xc0
[  115.621174]  [&lt;ffffffff8119d4af&gt;] ? might_fault+0x5f/0xb0
[  115.621174]  [&lt;ffffffff8119d4f8&gt;] ? might_fault+0xa8/0xb0
[  115.621174]  [&lt;ffffffff8119d4af&gt;] ? might_fault+0x5f/0xb0
[  115.621174]  [&lt;ffffffff815cb51e&gt;] ? verify_iovec+0x5e/0xe0
[  115.621174]  [&lt;ffffffff815bd4b9&gt;] ___sys_sendmsg+0x369/0x380
[  115.621174]  [&lt;ffffffff816faa0d&gt;] ? __do_page_fault+0x11d/0x570
[  115.621174]  [&lt;ffffffff810cfe9f&gt;] ? up_read+0x1f/0x40
[  115.621174]  [&lt;ffffffff816fab04&gt;] ? __do_page_fault+0x214/0x570
[  115.621174]  [&lt;ffffffff8120a10b&gt;] ? mntput_no_expire+0x6b/0x1c0
[  115.621174]  [&lt;ffffffff8120a0b7&gt;] ? mntput_no_expire+0x17/0x1c0
[  115.621174]  [&lt;ffffffff8120a284&gt;] ? mntput+0x24/0x40
[  115.621174]  [&lt;ffffffff815bdbb2&gt;] __sys_sendmsg+0x42/0x80
[  115.621174]  [&lt;ffffffff815bdc02&gt;] SyS_sendmsg+0x12/0x20
[  115.621174]  [&lt;ffffffff816ffd69&gt;] system_call_fastpath+0x16/0x1b

Fix this by correctly providing macvlan lockdep class.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit c674ac30c549596295eb0a5af7f4714c0b905b6f ]

Macvlan devices try to avoid stacking, but that's not always
successfull or even desired.  As an example, the following
configuration is perefectly legal and valid:

eth0 &lt;--- macvlan0 &lt;---- vlan0.10 &lt;--- macvlan1

However, this configuration produces the following lockdep
trace:
[  115.620418] ======================================================
[  115.620477] [ INFO: possible circular locking dependency detected ]
[  115.620516] 3.15.0-rc1+ #24 Not tainted
[  115.620540] -------------------------------------------------------
[  115.620577] ip/1704 is trying to acquire lock:
[  115.620604]  (&amp;vlan_netdev_addr_lock_key/1){+.....}, at: [&lt;ffffffff815df49c&gt;] dev_uc_sync+0x3c/0x80
[  115.620686]
but task is already holding lock:
[  115.620723]  (&amp;macvlan_netdev_addr_lock_key){+.....}, at: [&lt;ffffffff815da5be&gt;] dev_set_rx_mode+0x1e/0x40
[  115.620795]
which lock already depends on the new lock.

[  115.620853]
the existing dependency chain (in reverse order) is:
[  115.620894]
-&gt; #1 (&amp;macvlan_netdev_addr_lock_key){+.....}:
[  115.620935]        [&lt;ffffffff810d57f2&gt;] lock_acquire+0xa2/0x130
[  115.620974]        [&lt;ffffffff816f62e7&gt;] _raw_spin_lock_nested+0x37/0x50
[  115.621019]        [&lt;ffffffffa07296c3&gt;] vlan_dev_set_rx_mode+0x53/0x110 [8021q]
[  115.621066]        [&lt;ffffffff815da557&gt;] __dev_set_rx_mode+0x57/0xa0
[  115.621105]        [&lt;ffffffff815da5c6&gt;] dev_set_rx_mode+0x26/0x40
[  115.621143]        [&lt;ffffffff815da6be&gt;] __dev_open+0xde/0x140
[  115.621174]        [&lt;ffffffff815da9ad&gt;] __dev_change_flags+0x9d/0x170
[  115.621174]        [&lt;ffffffff815daaa9&gt;] dev_change_flags+0x29/0x60
[  115.621174]        [&lt;ffffffff815e7f11&gt;] do_setlink+0x321/0x9a0
[  115.621174]        [&lt;ffffffff815ea59f&gt;] rtnl_newlink+0x51f/0x730
[  115.621174]        [&lt;ffffffff815e6e75&gt;] rtnetlink_rcv_msg+0x95/0x250
[  115.621174]        [&lt;ffffffff81608b19&gt;] netlink_rcv_skb+0xa9/0xc0
[  115.621174]        [&lt;ffffffff815e6dca&gt;] rtnetlink_rcv+0x2a/0x40
[  115.621174]        [&lt;ffffffff81608150&gt;] netlink_unicast+0xf0/0x1c0
[  115.621174]        [&lt;ffffffff8160851f&gt;] netlink_sendmsg+0x2ff/0x740
[  115.621174]        [&lt;ffffffff815bc9db&gt;] sock_sendmsg+0x8b/0xc0
[  115.621174]        [&lt;ffffffff815bd4b9&gt;] ___sys_sendmsg+0x369/0x380
[  115.621174]        [&lt;ffffffff815bdbb2&gt;] __sys_sendmsg+0x42/0x80
[  115.621174]        [&lt;ffffffff815bdc02&gt;] SyS_sendmsg+0x12/0x20
[  115.621174]        [&lt;ffffffff816ffd69&gt;] system_call_fastpath+0x16/0x1b
[  115.621174]
-&gt; #0 (&amp;vlan_netdev_addr_lock_key/1){+.....}:
[  115.621174]        [&lt;ffffffff810d4d43&gt;] __lock_acquire+0x1773/0x1a60
[  115.621174]        [&lt;ffffffff810d57f2&gt;] lock_acquire+0xa2/0x130
[  115.621174]        [&lt;ffffffff816f62e7&gt;] _raw_spin_lock_nested+0x37/0x50
[  115.621174]        [&lt;ffffffff815df49c&gt;] dev_uc_sync+0x3c/0x80
[  115.621174]        [&lt;ffffffffa0696d2a&gt;] macvlan_set_mac_lists+0xca/0x110 [macvlan]
[  115.621174]        [&lt;ffffffff815da557&gt;] __dev_set_rx_mode+0x57/0xa0
[  115.621174]        [&lt;ffffffff815da5c6&gt;] dev_set_rx_mode+0x26/0x40
[  115.621174]        [&lt;ffffffff815da6be&gt;] __dev_open+0xde/0x140
[  115.621174]        [&lt;ffffffff815da9ad&gt;] __dev_change_flags+0x9d/0x170
[  115.621174]        [&lt;ffffffff815daaa9&gt;] dev_change_flags+0x29/0x60
[  115.621174]        [&lt;ffffffff815e7f11&gt;] do_setlink+0x321/0x9a0
[  115.621174]        [&lt;ffffffff815ea59f&gt;] rtnl_newlink+0x51f/0x730
[  115.621174]        [&lt;ffffffff815e6e75&gt;] rtnetlink_rcv_msg+0x95/0x250
[  115.621174]        [&lt;ffffffff81608b19&gt;] netlink_rcv_skb+0xa9/0xc0
[  115.621174]        [&lt;ffffffff815e6dca&gt;] rtnetlink_rcv+0x2a/0x40
[  115.621174]        [&lt;ffffffff81608150&gt;] netlink_unicast+0xf0/0x1c0
[  115.621174]        [&lt;ffffffff8160851f&gt;] netlink_sendmsg+0x2ff/0x740
[  115.621174]        [&lt;ffffffff815bc9db&gt;] sock_sendmsg+0x8b/0xc0
[  115.621174]        [&lt;ffffffff815bd4b9&gt;] ___sys_sendmsg+0x369/0x380
[  115.621174]        [&lt;ffffffff815bdbb2&gt;] __sys_sendmsg+0x42/0x80
[  115.621174]        [&lt;ffffffff815bdc02&gt;] SyS_sendmsg+0x12/0x20
[  115.621174]        [&lt;ffffffff816ffd69&gt;] system_call_fastpath+0x16/0x1b
[  115.621174]
other info that might help us debug this:

[  115.621174]  Possible unsafe locking scenario:

[  115.621174]        CPU0                    CPU1
[  115.621174]        ----                    ----
[  115.621174]   lock(&amp;macvlan_netdev_addr_lock_key);
[  115.621174]                                lock(&amp;vlan_netdev_addr_lock_key/1);
[  115.621174]                                lock(&amp;macvlan_netdev_addr_lock_key);
[  115.621174]   lock(&amp;vlan_netdev_addr_lock_key/1);
[  115.621174]
 *** DEADLOCK ***

[  115.621174] 2 locks held by ip/1704:
[  115.621174]  #0:  (rtnl_mutex){+.+.+.}, at: [&lt;ffffffff815e6dbb&gt;] rtnetlink_rcv+0x1b/0x40
[  115.621174]  #1:  (&amp;macvlan_netdev_addr_lock_key){+.....}, at: [&lt;ffffffff815da5be&gt;] dev_set_rx_mode+0x1e/0x40
[  115.621174]
stack backtrace:
[  115.621174] CPU: 3 PID: 1704 Comm: ip Not tainted 3.15.0-rc1+ #24
[  115.621174] Hardware name: Hewlett-Packard HP xw8400 Workstation/0A08h, BIOS 786D5 v02.38 10/25/2010
[  115.621174]  ffffffff82339ae0 ffff880465f79568 ffffffff816ee20c ffffffff82339ae0
[  115.621174]  ffff880465f795a8 ffffffff816e9e1b ffff880465f79600 ffff880465b019c8
[  115.621174]  0000000000000001 0000000000000002 ffff880465b019c8 ffff880465b01230
[  115.621174] Call Trace:
[  115.621174]  [&lt;ffffffff816ee20c&gt;] dump_stack+0x4d/0x66
[  115.621174]  [&lt;ffffffff816e9e1b&gt;] print_circular_bug+0x200/0x20e
[  115.621174]  [&lt;ffffffff810d4d43&gt;] __lock_acquire+0x1773/0x1a60
[  115.621174]  [&lt;ffffffff810d3172&gt;] ? trace_hardirqs_on_caller+0xb2/0x1d0
[  115.621174]  [&lt;ffffffff810d57f2&gt;] lock_acquire+0xa2/0x130
[  115.621174]  [&lt;ffffffff815df49c&gt;] ? dev_uc_sync+0x3c/0x80
[  115.621174]  [&lt;ffffffff816f62e7&gt;] _raw_spin_lock_nested+0x37/0x50
[  115.621174]  [&lt;ffffffff815df49c&gt;] ? dev_uc_sync+0x3c/0x80
[  115.621174]  [&lt;ffffffff815df49c&gt;] dev_uc_sync+0x3c/0x80
[  115.621174]  [&lt;ffffffffa0696d2a&gt;] macvlan_set_mac_lists+0xca/0x110 [macvlan]
[  115.621174]  [&lt;ffffffff815da557&gt;] __dev_set_rx_mode+0x57/0xa0
[  115.621174]  [&lt;ffffffff815da5c6&gt;] dev_set_rx_mode+0x26/0x40
[  115.621174]  [&lt;ffffffff815da6be&gt;] __dev_open+0xde/0x140
[  115.621174]  [&lt;ffffffff815da9ad&gt;] __dev_change_flags+0x9d/0x170
[  115.621174]  [&lt;ffffffff815daaa9&gt;] dev_change_flags+0x29/0x60
[  115.621174]  [&lt;ffffffff811e1db1&gt;] ? mem_cgroup_bad_page_check+0x21/0x30
[  115.621174]  [&lt;ffffffff815e7f11&gt;] do_setlink+0x321/0x9a0
[  115.621174]  [&lt;ffffffff810d394c&gt;] ? __lock_acquire+0x37c/0x1a60
[  115.621174]  [&lt;ffffffff815ea59f&gt;] rtnl_newlink+0x51f/0x730
[  115.621174]  [&lt;ffffffff815ea169&gt;] ? rtnl_newlink+0xe9/0x730
[  115.621174]  [&lt;ffffffff815e6e75&gt;] rtnetlink_rcv_msg+0x95/0x250
[  115.621174]  [&lt;ffffffff810d329d&gt;] ? trace_hardirqs_on+0xd/0x10
[  115.621174]  [&lt;ffffffff815e6dbb&gt;] ? rtnetlink_rcv+0x1b/0x40
[  115.621174]  [&lt;ffffffff815e6de0&gt;] ? rtnetlink_rcv+0x40/0x40
[  115.621174]  [&lt;ffffffff81608b19&gt;] netlink_rcv_skb+0xa9/0xc0
[  115.621174]  [&lt;ffffffff815e6dca&gt;] rtnetlink_rcv+0x2a/0x40
[  115.621174]  [&lt;ffffffff81608150&gt;] netlink_unicast+0xf0/0x1c0
[  115.621174]  [&lt;ffffffff8160851f&gt;] netlink_sendmsg+0x2ff/0x740
[  115.621174]  [&lt;ffffffff815bc9db&gt;] sock_sendmsg+0x8b/0xc0
[  115.621174]  [&lt;ffffffff8119d4af&gt;] ? might_fault+0x5f/0xb0
[  115.621174]  [&lt;ffffffff8119d4f8&gt;] ? might_fault+0xa8/0xb0
[  115.621174]  [&lt;ffffffff8119d4af&gt;] ? might_fault+0x5f/0xb0
[  115.621174]  [&lt;ffffffff815cb51e&gt;] ? verify_iovec+0x5e/0xe0
[  115.621174]  [&lt;ffffffff815bd4b9&gt;] ___sys_sendmsg+0x369/0x380
[  115.621174]  [&lt;ffffffff816faa0d&gt;] ? __do_page_fault+0x11d/0x570
[  115.621174]  [&lt;ffffffff810cfe9f&gt;] ? up_read+0x1f/0x40
[  115.621174]  [&lt;ffffffff816fab04&gt;] ? __do_page_fault+0x214/0x570
[  115.621174]  [&lt;ffffffff8120a10b&gt;] ? mntput_no_expire+0x6b/0x1c0
[  115.621174]  [&lt;ffffffff8120a0b7&gt;] ? mntput_no_expire+0x17/0x1c0
[  115.621174]  [&lt;ffffffff8120a284&gt;] ? mntput+0x24/0x40
[  115.621174]  [&lt;ffffffff815bdbb2&gt;] __sys_sendmsg+0x42/0x80
[  115.621174]  [&lt;ffffffff815bdc02&gt;] SyS_sendmsg+0x12/0x20
[  115.621174]  [&lt;ffffffff816ffd69&gt;] system_call_fastpath+0x16/0x1b

Fix this by correctly providing macvlan lockdep class.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: Add support for 'always_on' offload features</title>
<updated>2014-03-03T21:43:56+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2014-03-03T20:33:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8b4703e9bd1172a5f8244276ebb94302e6153e26'/>
<id>8b4703e9bd1172a5f8244276ebb94302e6153e26</id>
<content type='text'>
Macvlan currently inherits all of its features from the lower
device.  When lower device disables offload support, this causes
macvlan to disable offload support as well.  This causes
performance regression when using macvlan/macvtap in bridge
mode.

It can be easily demonstrated by creating 2 namespaces using
macvlan in bridge mode and running netperf between them:

MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.1 () port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    20.00    1204.61

To restore the performance, we add software offload features
to the list of "always_on" features for macvlan.  This way
when a namespace or a guest using macvtap initially sends a
packet, this packet will not be segmented at macvlan level.
It will only be segmented when macvlan sends the packet
to the lower device.

MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.1 () port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    20.00    5507.35

Fixes: 6acf54f1cf0a6747bac9fea26f34cfc5a9029523 (macvtap: Add support of packet capture on macvtap device.)
Fixes: 797f87f83b60685ff8a13fa0572d2f10393c50d3 (macvlan: fix netdev feature propagation from lower device)
CC: Florian Westphal &lt;fw@strlen.de&gt;
CC: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
CC: Jason Wang &lt;jasowang@redhat.com&gt;
CC: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Tested-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Vlad Yasevich &lt;vyasevic@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>
Macvlan currently inherits all of its features from the lower
device.  When lower device disables offload support, this causes
macvlan to disable offload support as well.  This causes
performance regression when using macvlan/macvtap in bridge
mode.

It can be easily demonstrated by creating 2 namespaces using
macvlan in bridge mode and running netperf between them:

MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.1 () port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    20.00    1204.61

To restore the performance, we add software offload features
to the list of "always_on" features for macvlan.  This way
when a namespace or a guest using macvtap initially sends a
packet, this packet will not be segmented at macvlan level.
It will only be segmented when macvlan sends the packet
to the lower device.

MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.1 () port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    20.00    5507.35

Fixes: 6acf54f1cf0a6747bac9fea26f34cfc5a9029523 (macvtap: Add support of packet capture on macvtap device.)
Fixes: 797f87f83b60685ff8a13fa0572d2f10393c50d3 (macvlan: fix netdev feature propagation from lower device)
CC: Florian Westphal &lt;fw@strlen.de&gt;
CC: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
CC: Jason Wang &lt;jasowang@redhat.com&gt;
CC: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Tested-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: unregister net device when netdev_upper_dev_link() fails</title>
<updated>2014-02-13T22:08:28+00:00</updated>
<author>
<name>Cong Wang</name>
<email>cwang@twopensource.com</email>
</author>
<published>2014-02-11T23:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=da37705cef30841616ed644ff33455bbc7374db0'/>
<id>da37705cef30841616ed644ff33455bbc7374db0</id>
<content type='text'>
rtnl_newlink() doesn't unregister it for us on failure.

Cc: Patrick McHardy &lt;kaber@trash.net&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rtnl_newlink() doesn't unregister it for us on failure.

Cc: Patrick McHardy &lt;kaber@trash.net&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;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2014-01-14T22:42:42+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2014-01-14T22:37:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a379e21c503b2ff66b44d588df9f231e9b0b9ca'/>
<id>0a379e21c503b2ff66b44d588df9f231e9b0b9ca</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>net: core: explicitly select a txq before doing l2 forwarding</title>
<updated>2014-01-10T18:23:08+00:00</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2014-01-10T08:18:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f663dd9aaf9ed124f25f0f8452edf238f087ad50'/>
<id>f663dd9aaf9ed124f25f0f8452edf238f087ad50</id>
<content type='text'>
Currently, the tx queue were selected implicitly in ndo_dfwd_start_xmit(). The
will cause several issues:

- NETIF_F_LLTX were removed for macvlan, so txq lock were done for macvlan
  instead of lower device which misses the necessary txq synchronization for
  lower device such as txq stopping or frozen required by dev watchdog or
  control path.
- dev_hard_start_xmit() was called with NULL txq which bypasses the net device
  watchdog.
- dev_hard_start_xmit() does not check txq everywhere which will lead a crash
  when tso is disabled for lower device.

Fix this by explicitly introducing a new param for .ndo_select_queue() for just
selecting queues in the case of l2 forwarding offload. netdev_pick_tx() was also
extended to accept this parameter and dev_queue_xmit_accel() was used to do l2
forwarding transmission.

With this fixes, NETIF_F_LLTX could be preserved for macvlan and there's no need
to check txq against NULL in dev_hard_start_xmit(). Also there's no need to keep
a dedicated ndo_dfwd_start_xmit() and we can just reuse the code of
dev_queue_xmit() to do the transmission.

In the future, it was also required for macvtap l2 forwarding support since it
provides a necessary synchronization method.

Cc: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: e1000-devel@lists.sourceforge.net
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: John Fastabend &lt;john.r.fastabend@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>
Currently, the tx queue were selected implicitly in ndo_dfwd_start_xmit(). The
will cause several issues:

- NETIF_F_LLTX were removed for macvlan, so txq lock were done for macvlan
  instead of lower device which misses the necessary txq synchronization for
  lower device such as txq stopping or frozen required by dev watchdog or
  control path.
- dev_hard_start_xmit() was called with NULL txq which bypasses the net device
  watchdog.
- dev_hard_start_xmit() does not check txq everywhere which will lead a crash
  when tso is disabled for lower device.

Fix this by explicitly introducing a new param for .ndo_select_queue() for just
selecting queues in the case of l2 forwarding offload. netdev_pick_tx() was also
extended to accept this parameter and dev_queue_xmit_accel() was used to do l2
forwarding transmission.

With this fixes, NETIF_F_LLTX could be preserved for macvlan and there's no need
to check txq against NULL in dev_hard_start_xmit(). Also there's no need to keep
a dedicated ndo_dfwd_start_xmit() and we can just reuse the code of
dev_queue_xmit() to do the transmission.

In the future, it was also required for macvtap l2 forwarding support since it
provides a necessary synchronization method.

Cc: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: e1000-devel@lists.sourceforge.net
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
