<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/if_macvlan.h, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-06-10T04:53:09+00:00</updated>
<entry>
<title>vlan: adopt u64_stats_t</title>
<updated>2022-06-10T04:53:09+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2022-06-08T15:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=09cca53c1656960c38c04bb12da30f61952ca660'/>
<id>urn:sha1:09cca53c1656960c38c04bb12da30f61952ca660</id>
<content type='text'>
As explained in commit 316580b69d0a ("u64_stats: provide u64_stats_t type")
we should use u64_stats_t and related accessors to avoid load/store tearing.

Add READ_ONCE() when reading rx_errors &amp; tx_dropped.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: macvlan: add net device refcount tracker</title>
<updated>2022-03-14T10:06:54+00:00</updated>
<author>
<name>Ziyang Xuan</name>
<email>william.xuanziyang@huawei.com</email>
</author>
<published>2022-03-11T09:04:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1f4a5983d623d6dbda4cc7587a2d9d798e0d4035'/>
<id>urn:sha1:1f4a5983d623d6dbda4cc7587a2d9d798e0d4035</id>
<content type='text'>
Add net device refcount tracker to macvlan.

Signed-off-by: Ziyang Xuan &lt;william.xuanziyang@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>macvlan: macvlan_count_rx() needs to be aware of preemption</title>
<updated>2021-03-10T23:20:24+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-03-10T09:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd4fa1dae9f4847cc1fd78ca468ad69e16e5db3e'/>
<id>urn:sha1:dd4fa1dae9f4847cc1fd78ca468ad69e16e5db3e</id>
<content type='text'>
macvlan_count_rx() can be called from process context, it is thus
necessary to disable preemption before calling u64_stats_update_begin()

syzbot was able to spot this on 32bit arch:

WARNING: CPU: 1 PID: 4632 at include/linux/seqlock.h:271 __seqprop_assert include/linux/seqlock.h:271 [inline]
WARNING: CPU: 1 PID: 4632 at include/linux/seqlock.h:271 __seqprop_assert.constprop.0+0xf0/0x11c include/linux/seqlock.h:269
Modules linked in:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 4632 Comm: kworker/1:3 Not tainted 5.12.0-rc2-syzkaller #0
Hardware name: ARM-Versatile Express
Workqueue: events macvlan_process_broadcast
Backtrace:
[&lt;82740468&gt;] (dump_backtrace) from [&lt;827406dc&gt;] (show_stack+0x18/0x1c arch/arm/kernel/traps.c:252)
 r7:00000080 r6:60000093 r5:00000000 r4:8422a3c4
[&lt;827406c4&gt;] (show_stack) from [&lt;82751b58&gt;] (__dump_stack lib/dump_stack.c:79 [inline])
[&lt;827406c4&gt;] (show_stack) from [&lt;82751b58&gt;] (dump_stack+0xb8/0xe8 lib/dump_stack.c:120)
[&lt;82751aa0&gt;] (dump_stack) from [&lt;82741270&gt;] (panic+0x130/0x378 kernel/panic.c:231)
 r7:830209b4 r6:84069ea4 r5:00000000 r4:844350d0
[&lt;82741140&gt;] (panic) from [&lt;80244924&gt;] (__warn+0xb0/0x164 kernel/panic.c:605)
 r3:8404ec8c r2:00000000 r1:00000000 r0:830209b4
 r7:0000010f
[&lt;80244874&gt;] (__warn) from [&lt;82741520&gt;] (warn_slowpath_fmt+0x68/0xd4 kernel/panic.c:628)
 r7:81363f70 r6:0000010f r5:83018e50 r4:00000000
[&lt;827414bc&gt;] (warn_slowpath_fmt) from [&lt;81363f70&gt;] (__seqprop_assert include/linux/seqlock.h:271 [inline])
[&lt;827414bc&gt;] (warn_slowpath_fmt) from [&lt;81363f70&gt;] (__seqprop_assert.constprop.0+0xf0/0x11c include/linux/seqlock.h:269)
 r8:5a109000 r7:0000000f r6:a568dac0 r5:89802300 r4:00000001
[&lt;81363e80&gt;] (__seqprop_assert.constprop.0) from [&lt;81364af0&gt;] (u64_stats_update_begin include/linux/u64_stats_sync.h:128 [inline])
[&lt;81363e80&gt;] (__seqprop_assert.constprop.0) from [&lt;81364af0&gt;] (macvlan_count_rx include/linux/if_macvlan.h:47 [inline])
[&lt;81363e80&gt;] (__seqprop_assert.constprop.0) from [&lt;81364af0&gt;] (macvlan_broadcast+0x154/0x26c drivers/net/macvlan.c:291)
 r5:89802300 r4:8a927740
[&lt;8136499c&gt;] (macvlan_broadcast) from [&lt;81365020&gt;] (macvlan_process_broadcast+0x258/0x2d0 drivers/net/macvlan.c:317)
 r10:81364f78 r9:8a86d000 r8:8a9c7e7c r7:8413aa5c r6:00000000 r5:00000000
 r4:89802840
[&lt;81364dc8&gt;] (macvlan_process_broadcast) from [&lt;802696a4&gt;] (process_one_work+0x2d4/0x998 kernel/workqueue.c:2275)
 r10:00000008 r9:8404ec98 r8:84367a02 r7:ddfe6400 r6:ddfe2d40 r5:898dac80
 r4:8a86d43c
[&lt;802693d0&gt;] (process_one_work) from [&lt;80269dcc&gt;] (worker_thread+0x64/0x54c kernel/workqueue.c:2421)
 r10:00000008 r9:8a9c6000 r8:84006d00 r7:ddfe2d78 r6:898dac94 r5:ddfe2d40
 r4:898dac80
[&lt;80269d68&gt;] (worker_thread) from [&lt;80271f40&gt;] (kthread+0x184/0x1a4 kernel/kthread.c:292)
 r10:85247e64 r9:898dac80 r8:80269d68 r7:00000000 r6:8a9c6000 r5:89a2ee40
 r4:8a97bd00
[&lt;80271dbc&gt;] (kthread) from [&lt;80200114&gt;] (ret_from_fork+0x14/0x20 arch/arm/kernel/entry-common.S:158)
Exception stack(0x8a9c7fb0 to 0x8a9c7ff8)

Fixes: 412ca1550cbe ("macvlan: Move broadcasts into a work queue")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Reported-by: syzbot &lt;syzkaller@googlegroups.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>macvlan: Support for high multicast packet rate</title>
<updated>2020-12-03T16:21:29+00:00</updated>
<author>
<name>Thomas Karlsson</name>
<email>thomas.karlsson@paneda.se</email>
</author>
<published>2020-12-02T18:49:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d4bff72c8401e6f56194ecf455db70ebc22929e2'/>
<id>urn:sha1:d4bff72c8401e6f56194ecf455db70ebc22929e2</id>
<content type='text'>
Background:
Broadcast and multicast packages are enqueued for later processing.
This queue was previously hardcoded to 1000.

This proved insufficient for handling very high packet rates.
This resulted in packet drops for multicast.
While at the same time unicast worked fine.

The change:
This patch make the queue length adjustable to accommodate
for environments with very high multicast packet rate.
But still keeps the default value of 1000 unless specified.

The queue length is specified as a request per macvlan
using the IFLA_MACVLAN_BC_QUEUE_LEN parameter.

The actual used queue length will then be the maximum of
any macvlan connected to the same port. The actual used
queue length for the port can be retrieved (read only)
by the IFLA_MACVLAN_BC_QUEUE_LEN_USED parameter for verification.

This will be followed up by a patch to iproute2
in order to adjust the parameter from userspace.

Signed-off-by: Thomas Karlsson &lt;thomas.karlsson@paneda.se&gt;
Link: https://lore.kernel.org/r/dd4673b2-7eab-edda-6815-85c67ce87f63@paneda.se
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: remove unnecessary variables and callback</title>
<updated>2019-10-24T21:53:49+00:00</updated>
<author>
<name>Taehee Yoo</name>
<email>ap420073@gmail.com</email>
</author>
<published>2019-10-21T18:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f3b0a18bb6cb07a9abb75e21b1f08eeaefa78e81'/>
<id>urn:sha1:f3b0a18bb6cb07a9abb75e21b1f08eeaefa78e81</id>
<content type='text'>
This patch removes variables and callback these are related to the nested
device structure.
devices that can be nested have their own nest_level variable that
represents the depth of nested devices.
In the previous patch, new {lower/upper}_level variables are added and
they replace old private nest_level variable.
So, this patch removes all 'nest_level' variables.

In order to avoid lockdep warning, -&gt;ndo_get_lock_subclass() was added
to get lockdep subclass value, which is actually lower nested depth value.
But now, they use the dynamic lockdep key to avoid lockdep warning instead
of the subclass.
So, this patch removes -&gt;ndo_get_lock_subclass() callback.

Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>macvlan: Provide function for interfaces to release HW offload</title>
<updated>2018-04-25T15:26:19+00:00</updated>
<author>
<name>Alexander Duyck</name>
<email>alexander.h.duyck@intel.com</email>
</author>
<published>2018-04-03T21:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=53cd4d8e4dfb231fa5ba125b6c0666b82a0504fa'/>
<id>urn:sha1:53cd4d8e4dfb231fa5ba125b6c0666b82a0504fa</id>
<content type='text'>
This patch provides a basic function to allow a lower device to disable
macvlan offload if it was previously enabled on a given macvlan. The idea
here is to allow for recovery from failure should the lowerdev run out of
resources.

Signed-off-by: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
Tested-by: Andrew Bowers &lt;andrewx.bowers@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>macvlan: Add function to test for destination filtering support</title>
<updated>2018-04-25T15:26:19+00:00</updated>
<author>
<name>Alexander Duyck</name>
<email>alexander.h.duyck@intel.com</email>
</author>
<published>2018-04-03T21:16:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6cb1937d4eff6936089139169377fda208a2701a'/>
<id>urn:sha1:6cb1937d4eff6936089139169377fda208a2701a</id>
<content type='text'>
This patch adds a function indicating if a given macvlan can fully supports
destination filtering, especially as it relates to unicast traffic. For
those macvlan interfaces that do not support destination filtering such
passthru or source mode filtering we should not be enabling offload
support.

Signed-off-by: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
Tested-by: Andrew Bowers &lt;andrewx.bowers@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>macvlan: macvlan_count_rx shouldn't be static inline AND extern</title>
<updated>2018-04-25T15:26:19+00:00</updated>
<author>
<name>Alexander Duyck</name>
<email>alexander.h.duyck@intel.com</email>
</author>
<published>2018-04-03T21:16:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a222311283641c9a476426ccacb2a3c82bfe5aaa'/>
<id>urn:sha1:a222311283641c9a476426ccacb2a3c82bfe5aaa</id>
<content type='text'>
It doesn't make sense to define macvlan_count_rx as a static inline and
then add a forward declaration after that as an extern. I am dropping the
extern declaration since it seems like it is something that likely got
missed when the function was made an inline.

Signed-off-by: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
Tested-by: Andrew Bowers &lt;andrewx.bowers@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>macvlan: Rename fwd_priv to accel_priv and add accessor function</title>
<updated>2018-04-25T15:26:19+00:00</updated>
<author>
<name>Alexander Duyck</name>
<email>alexander.h.duyck@intel.com</email>
</author>
<published>2018-04-03T21:16:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d775f63470c3b6ddf34c770c973293ab925a7bb'/>
<id>urn:sha1:7d775f63470c3b6ddf34c770c973293ab925a7bb</id>
<content type='text'>
This change renames the fwd_priv member to accel_priv as this more
accurately reflects the actual purpose of this value. In addition I am
adding an accessor which will allow us to further abstract this in the
future if needed.

Signed-off-by: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
Tested-by: Andrew Bowers &lt;andrewx.bowers@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>macvlan: fix memory hole in macvlan_dev</title>
<updated>2017-12-08T19:51:46+00:00</updated>
<author>
<name>Girish Moodalbail</name>
<email>girish.moodalbail@oracle.com</email>
</author>
<published>2017-12-08T14:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e54b3c1202765ae62de24a160f1eaf6b0ebf9d4'/>
<id>urn:sha1:5e54b3c1202765ae62de24a160f1eaf6b0ebf9d4</id>
<content type='text'>
Move 'macaddr_count' from after 'netpoll' to after 'nest_level' to pack
and reduce a memory hole.

Fixes: 88ca59d1aaf28c25 (macvlan: remove unused fields in struct macvlan_dev)
Signed-off-by: Girish Moodalbail &lt;girish.moodalbail@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
