<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/if_macvlan.h, branch v4.11-rc3</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>tap: Renaming tap related APIs, data structures, macros</title>
<updated>2017-02-12T01:59:41+00:00</updated>
<author>
<name>Sainath Grandhi</name>
<email>sainath.grandhi@intel.com</email>
</author>
<published>2017-02-11T00:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=635b8c8ecdd27142d7fdab0df334b2e9201481cf'/>
<id>635b8c8ecdd27142d7fdab0df334b2e9201481cf</id>
<content type='text'>
Renaming tap related APIs, data structures and macros in tap.c from macvtap_.* to tap_.*

Signed-off-by: Sainath Grandhi &lt;sainath.grandhi@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>
Renaming tap related APIs, data structures and macros in tap.c from macvtap_.* to tap_.*

Signed-off-by: Sainath Grandhi &lt;sainath.grandhi@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvtap: Increase limit of macvtap queues</title>
<updated>2015-06-23T13:14:04+00:00</updated>
<author>
<name>Pankaj Gupta</name>
<email>pagupta@redhat.com</email>
</author>
<published>2015-06-19T14:17:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dfe816c5e37272f2f3c1311f0e9934e1b4229261'/>
<id>dfe816c5e37272f2f3c1311f0e9934e1b4229261</id>
<content type='text'>
Macvtap should be compatible with tuntap for
maximum number of queues.

commit 'baf71c5c1f80d82e92924050a60b5baaf97e3094 (tuntap:
Increase the number of queues in tun.)' removes
the limitations and increases number of queues in tuntap.
Now, Its safe to increase number of queues in Macvtap as well.

This patch also modifies 'macvtap_del_queues' function
to avoid extra memory allocation in stack.

Changes from v1-&gt;v2 :
Michael S. Tsirkin, Jason Wang  :
                  Better way to use linked list to
avoid use of extra memory in stack.
Sergei Shtylyov : Specify dependent commit's summary.

Signed-off-by: Pankaj Gupta &lt;pagupta@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>
Macvtap should be compatible with tuntap for
maximum number of queues.

commit 'baf71c5c1f80d82e92924050a60b5baaf97e3094 (tuntap:
Increase the number of queues in tun.)' removes
the limitations and increases number of queues in tuntap.
Now, Its safe to increase number of queues in Macvtap as well.

This patch also modifies 'macvtap_del_queues' function
to avoid extra memory allocation in stack.

Changes from v1-&gt;v2 :
Michael S. Tsirkin, Jason Wang  :
                  Better way to use linked list to
avoid use of extra memory in stack.
Sergei Shtylyov : Specify dependent commit's summary.

Signed-off-by: Pankaj Gupta &lt;pagupta@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: add source mode</title>
<updated>2014-09-29T19:37:01+00:00</updated>
<author>
<name>Michael Braun</name>
<email>michael-dev@fami-braun.de</email>
</author>
<published>2014-09-25T14:31:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=79cf79abce71eb7dbc40e2f3121048ca5405cb47'/>
<id>79cf79abce71eb7dbc40e2f3121048ca5405cb47</id>
<content type='text'>
This patch adds a new mode of operation to macvlan, called "source".
It allows one to set a list of allowed mac address, which is used
to match against source mac address from received frames on underlying
interface.
This enables creating mac based VLAN associations, instead of standard
port or tag based. The feature is useful to deploy 802.1x mac based
behavior, where drivers of underlying interfaces doesn't allows that.

Configuration is done through the netlink interface using e.g.:
 ip link add link eth0 name macvlan0 type macvlan mode source
 ip link add link eth0 name macvlan1 type macvlan mode source
 ip link set link dev macvlan0 type macvlan macaddr add 00:11:11:11:11:11
 ip link set link dev macvlan0 type macvlan macaddr add 00:22:22:22:22:22
 ip link set link dev macvlan0 type macvlan macaddr add 00:33:33:33:33:33
 ip link set link dev macvlan1 type macvlan macaddr add 00:33:33:33:33:33
 ip link set link dev macvlan1 type macvlan macaddr add 00:44:44:44:44:44

This allows clients with MAC addresses 00:11:11:11:11:11,
00:22:22:22:22:22 to be part of only VLAN associated with macvlan0
interface. Clients with MAC addresses 00:44:44:44:44:44 with only VLAN
associated with macvlan1 interface. And client with MAC address
00:33:33:33:33:33 to be associated with both VLANs.

Based on work of Stefan Gula &lt;steweg@gmail.com&gt;

v8: last version of Stefan Gula for Kernel 3.2.1
v9: rework onto linux-next 2014-03-12 by Michael Braun
    add MACADDR_SET command, enable to configure mac for source mode
    while creating interface
v10:
  - reduce indention level
  - rename source_list to source_entry
  - use aligned 64bit ether address
  - use hash_64 instead of addr[5]
v11:
  - rebase for 3.14 / linux-next 20.04.2014
v12
  - rebase for linux-next 2014-09-25

Signed-off-by: Michael Braun &lt;michael-dev@fami-braun.de&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 adds a new mode of operation to macvlan, called "source".
It allows one to set a list of allowed mac address, which is used
to match against source mac address from received frames on underlying
interface.
This enables creating mac based VLAN associations, instead of standard
port or tag based. The feature is useful to deploy 802.1x mac based
behavior, where drivers of underlying interfaces doesn't allows that.

Configuration is done through the netlink interface using e.g.:
 ip link add link eth0 name macvlan0 type macvlan mode source
 ip link add link eth0 name macvlan1 type macvlan mode source
 ip link set link dev macvlan0 type macvlan macaddr add 00:11:11:11:11:11
 ip link set link dev macvlan0 type macvlan macaddr add 00:22:22:22:22:22
 ip link set link dev macvlan0 type macvlan macaddr add 00:33:33:33:33:33
 ip link set link dev macvlan1 type macvlan macaddr add 00:33:33:33:33:33
 ip link set link dev macvlan1 type macvlan macaddr add 00:44:44:44:44:44

This allows clients with MAC addresses 00:11:11:11:11:11,
00:22:22:22:22:22 to be part of only VLAN associated with macvlan0
interface. Clients with MAC addresses 00:44:44:44:44:44 with only VLAN
associated with macvlan1 interface. And client with MAC address
00:33:33:33:33:33 to be associated with both VLANs.

Based on work of Stefan Gula &lt;steweg@gmail.com&gt;

v8: last version of Stefan Gula for Kernel 3.2.1
v9: rework onto linux-next 2014-03-12 by Michael Braun
    add MACADDR_SET command, enable to configure mac for source mode
    while creating interface
v10:
  - reduce indention level
  - rename source_list to source_entry
  - use aligned 64bit ether address
  - use hash_64 instead of addr[5]
v11:
  - rebase for 3.14 / linux-next 20.04.2014
v12
  - rebase for linux-next 2014-09-25

Signed-off-by: Michael Braun &lt;michael-dev@fami-braun.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: add netpoll support</title>
<updated>2014-06-02T23:05:24+00:00</updated>
<author>
<name>dingtianhong</name>
<email>dingtianhong@huawei.com</email>
</author>
<published>2014-05-30T08:00:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=688cea83f4396fa98b77a126ed278b89daccccdc'/>
<id>688cea83f4396fa98b77a126ed278b89daccccdc</id>
<content type='text'>
Add netpoll support to macvlan devices. Based on the netpoll support in the 802.1q vlan code.

Tested and macvlan could work well with netconsole.

Signed-off-by: Ding Tianhong &lt;dingtianhong@huawei.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 netpoll support to macvlan devices. Based on the netpoll support in the 802.1q vlan code.

Tested and macvlan could work well with netconsole.

Signed-off-by: Ding Tianhong &lt;dingtianhong@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: Fix lockdep warnings with stacked macvlan devices</title>
<updated>2014-05-17T02:14:49+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=c674ac30c549596295eb0a5af7f4714c0b905b6f'/>
<id>c674ac30c549596295eb0a5af7f4714c0b905b6f</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: unify macvlan_pcpu_stats and vlan_pcpu_stats</title>
<updated>2014-01-05T01:11:33+00:00</updated>
<author>
<name>Li RongQing</name>
<email>roy.qing.li@gmail.com</email>
</author>
<published>2014-01-04T06:22:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cdf3e274cf1b36e9a2fef2d175cabc566af841b2'/>
<id>cdf3e274cf1b36e9a2fef2d175cabc566af841b2</id>
<content type='text'>
They are same, so unify them as one; since macvlan is a kind of vlan,
vlan_pcpu_stats should be a proper name for vlan and macvlan.

Signed-off-by: Li RongQing &lt;roy.qing.li@gmail.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>
They are same, so unify them as one; since macvlan is a kind of vlan,
vlan_pcpu_stats should be a proper name for vlan and macvlan.

Signed-off-by: Li RongQing &lt;roy.qing.li@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: make start_xmit local</title>
<updated>2013-12-28T06:20:46+00:00</updated>
<author>
<name>stephen hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2013-12-27T20:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0db901bd33f09b0dbf39d12261f689812e343c26'/>
<id>0db901bd33f09b0dbf39d12261f689812e343c26</id>
<content type='text'>
Only used in one file, no need to expose

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.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>
Only used in one file, no need to expose

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>macvlan: Remove custom recieve and forward handlers</title>
<updated>2013-12-12T18:38:39+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2013-12-11T18:27:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f6a1b6607fd6b0eb9501843a40e0c7555f37b4a'/>
<id>2f6a1b6607fd6b0eb9501843a40e0c7555f37b4a</id>
<content type='text'>
Since now macvlan and macvtap use the same receive and
forward handlers, we can remove them completely and use
netif_rx and dev_forward_skb() directly.

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>
Since now macvlan and macvtap use the same receive and
forward handlers, we can remove them completely and use
netif_rx and dev_forward_skb() directly.

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: introduce macvlan_dev_real_dev() helper function</title>
<updated>2013-11-15T22:55:48+00:00</updated>
<author>
<name>Michal Kubeček</name>
<email>mkubecek@suse.cz</email>
</author>
<published>2013-11-15T05:18:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=be9eac48274a2d9b142d6dd8567b9b2362939346'/>
<id>be9eac48274a2d9b142d6dd8567b9b2362939346</id>
<content type='text'>
Introduce helper function macvlan_dev_real_dev which returns the
underlying device of a macvlan device, similar to vlan_dev_real_dev()
for 802.1q VLAN devices.

v2: IFF_MACVLAN flag and equivalent of is_macvlan_dev() were
introduced in the meantime

v3: do BUG() if compiled without macvlan support

Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&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>
Introduce helper function macvlan_dev_real_dev which returns the
underlying device of a macvlan device, similar to vlan_dev_real_dev()
for 802.1q VLAN devices.

v2: IFF_MACVLAN flag and equivalent of is_macvlan_dev() were
introduced in the meantime

v3: do BUG() if compiled without macvlan support

Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Add layer 2 hardware acceleration operations for macvlan devices</title>
<updated>2013-11-08T00:11:41+00:00</updated>
<author>
<name>John Fastabend</name>
<email>john.r.fastabend@intel.com</email>
</author>
<published>2013-11-06T17:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a6cc0cfa72e0b6d9f2c8fd858aacc32313c4f272'/>
<id>a6cc0cfa72e0b6d9f2c8fd858aacc32313c4f272</id>
<content type='text'>
Add a operations structure that allows a network interface to export
the fact that it supports package forwarding in hardware between
physical interfaces and other mac layer devices assigned to it (such
as macvlans). This operaions structure can be used by virtual mac
devices to bypass software switching so that forwarding can be done
in hardware more efficiently.

Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&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 a operations structure that allows a network interface to export
the fact that it supports package forwarding in hardware between
physical interfaces and other mac layer devices assigned to it (such
as macvlans). This operaions structure can be used by virtual mac
devices to bypass software switching so that forwarding can be done
in hardware more efficiently.

Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
