<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/net/netdevsim/netdev.c, branch v5.4.148</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>netdevsim: init u64 stats for 32bit hardware</title>
<updated>2021-03-17T16:03:35+00:00</updated>
<author>
<name>Hillf Danton</name>
<email>hdanton@sina.com</email>
</author>
<published>2021-03-04T18:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=6d599697e9a8958ea4ba1428e9dfebd7d0c560e0'/>
<id>6d599697e9a8958ea4ba1428e9dfebd7d0c560e0</id>
<content type='text'>
commit 863a42b289c22df63db62b10fc2c2ffc237e2125 upstream.

Init the u64 stats in order to avoid the lockdep prints on the 32bit
hardware like

 INFO: trying to register non-static key.
 the code is fine but needs lockdep annotation.
 turning off the locking correctness validator.
 CPU: 0 PID: 4695 Comm: syz-executor.0 Not tainted 5.11.0-rc5-syzkaller #0
 Hardware name: ARM-Versatile Express
 Backtrace:
 [&lt;826fc5b8&gt;] (dump_backtrace) from [&lt;826fc82c&gt;] (show_stack+0x18/0x1c arch/arm/kernel/traps.c:252)
 [&lt;826fc814&gt;] (show_stack) from [&lt;8270d1f8&gt;] (__dump_stack lib/dump_stack.c:79 [inline])
 [&lt;826fc814&gt;] (show_stack) from [&lt;8270d1f8&gt;] (dump_stack+0xa8/0xc8 lib/dump_stack.c:120)
 [&lt;8270d150&gt;] (dump_stack) from [&lt;802bf9c0&gt;] (assign_lock_key kernel/locking/lockdep.c:935 [inline])
 [&lt;8270d150&gt;] (dump_stack) from [&lt;802bf9c0&gt;] (register_lock_class+0xabc/0xb68 kernel/locking/lockdep.c:1247)
 [&lt;802bef04&gt;] (register_lock_class) from [&lt;802baa2c&gt;] (__lock_acquire+0x84/0x32d4 kernel/locking/lockdep.c:4711)
 [&lt;802ba9a8&gt;] (__lock_acquire) from [&lt;802be840&gt;] (lock_acquire.part.0+0xf0/0x554 kernel/locking/lockdep.c:5442)
 [&lt;802be750&gt;] (lock_acquire.part.0) from [&lt;802bed10&gt;] (lock_acquire+0x6c/0x74 kernel/locking/lockdep.c:5415)
 [&lt;802beca4&gt;] (lock_acquire) from [&lt;81560548&gt;] (seqcount_lockdep_reader_access include/linux/seqlock.h:103 [inline])
 [&lt;802beca4&gt;] (lock_acquire) from [&lt;81560548&gt;] (__u64_stats_fetch_begin include/linux/u64_stats_sync.h:164 [inline])
 [&lt;802beca4&gt;] (lock_acquire) from [&lt;81560548&gt;] (u64_stats_fetch_begin include/linux/u64_stats_sync.h:175 [inline])
 [&lt;802beca4&gt;] (lock_acquire) from [&lt;81560548&gt;] (nsim_get_stats64+0xdc/0xf0 drivers/net/netdevsim/netdev.c:70)
 [&lt;8156046c&gt;] (nsim_get_stats64) from [&lt;81e2efa0&gt;] (dev_get_stats+0x44/0xd0 net/core/dev.c:10405)
 [&lt;81e2ef5c&gt;] (dev_get_stats) from [&lt;81e53204&gt;] (rtnl_fill_stats+0x38/0x120 net/core/rtnetlink.c:1211)
 [&lt;81e531cc&gt;] (rtnl_fill_stats) from [&lt;81e59d58&gt;] (rtnl_fill_ifinfo+0x6d4/0x148c net/core/rtnetlink.c:1783)
 [&lt;81e59684&gt;] (rtnl_fill_ifinfo) from [&lt;81e5ceb4&gt;] (rtmsg_ifinfo_build_skb+0x9c/0x108 net/core/rtnetlink.c:3798)
 [&lt;81e5ce18&gt;] (rtmsg_ifinfo_build_skb) from [&lt;81e5d0ac&gt;] (rtmsg_ifinfo_event net/core/rtnetlink.c:3830 [inline])
 [&lt;81e5ce18&gt;] (rtmsg_ifinfo_build_skb) from [&lt;81e5d0ac&gt;] (rtmsg_ifinfo_event net/core/rtnetlink.c:3821 [inline])
 [&lt;81e5ce18&gt;] (rtmsg_ifinfo_build_skb) from [&lt;81e5d0ac&gt;] (rtmsg_ifinfo+0x44/0x70 net/core/rtnetlink.c:3839)
 [&lt;81e5d068&gt;] (rtmsg_ifinfo) from [&lt;81e45c2c&gt;] (register_netdevice+0x664/0x68c net/core/dev.c:10103)
 [&lt;81e455c8&gt;] (register_netdevice) from [&lt;815608bc&gt;] (nsim_create+0xf8/0x124 drivers/net/netdevsim/netdev.c:317)
 [&lt;815607c4&gt;] (nsim_create) from [&lt;81561184&gt;] (__nsim_dev_port_add+0x108/0x188 drivers/net/netdevsim/dev.c:941)
 [&lt;8156107c&gt;] (__nsim_dev_port_add) from [&lt;815620d8&gt;] (nsim_dev_port_add_all drivers/net/netdevsim/dev.c:990 [inline])
 [&lt;8156107c&gt;] (__nsim_dev_port_add) from [&lt;815620d8&gt;] (nsim_dev_probe+0x5cc/0x750 drivers/net/netdevsim/dev.c:1119)
 [&lt;81561b0c&gt;] (nsim_dev_probe) from [&lt;815661dc&gt;] (nsim_bus_probe+0x10/0x14 drivers/net/netdevsim/bus.c:287)
 [&lt;815661cc&gt;] (nsim_bus_probe) from [&lt;811724c0&gt;] (really_probe+0x100/0x50c drivers/base/dd.c:554)
 [&lt;811723c0&gt;] (really_probe) from [&lt;811729c4&gt;] (driver_probe_device+0xf8/0x1c8 drivers/base/dd.c:740)
 [&lt;811728cc&gt;] (driver_probe_device) from [&lt;81172fe4&gt;] (__device_attach_driver+0x8c/0xf0 drivers/base/dd.c:846)
 [&lt;81172f58&gt;] (__device_attach_driver) from [&lt;8116fee0&gt;] (bus_for_each_drv+0x88/0xd8 drivers/base/bus.c:431)
 [&lt;8116fe58&gt;] (bus_for_each_drv) from [&lt;81172c6c&gt;] (__device_attach+0xdc/0x1d0 drivers/base/dd.c:914)
 [&lt;81172b90&gt;] (__device_attach) from [&lt;8117305c&gt;] (device_initial_probe+0x14/0x18 drivers/base/dd.c:961)
 [&lt;81173048&gt;] (device_initial_probe) from [&lt;81171358&gt;] (bus_probe_device+0x90/0x98 drivers/base/bus.c:491)
 [&lt;811712c8&gt;] (bus_probe_device) from [&lt;8116e77c&gt;] (device_add+0x320/0x824 drivers/base/core.c:3109)
 [&lt;8116e45c&gt;] (device_add) from [&lt;8116ec9c&gt;] (device_register+0x1c/0x20 drivers/base/core.c:3182)
 [&lt;8116ec80&gt;] (device_register) from [&lt;81566710&gt;] (nsim_bus_dev_new drivers/net/netdevsim/bus.c:336 [inline])
 [&lt;8116ec80&gt;] (device_register) from [&lt;81566710&gt;] (new_device_store+0x178/0x208 drivers/net/netdevsim/bus.c:215)
 [&lt;81566598&gt;] (new_device_store) from [&lt;8116fcb4&gt;] (bus_attr_store+0x2c/0x38 drivers/base/bus.c:122)
 [&lt;8116fc88&gt;] (bus_attr_store) from [&lt;805b4b8c&gt;] (sysfs_kf_write+0x48/0x54 fs/sysfs/file.c:139)
 [&lt;805b4b44&gt;] (sysfs_kf_write) from [&lt;805b3c90&gt;] (kernfs_fop_write_iter+0x128/0x1ec fs/kernfs/file.c:296)
 [&lt;805b3b68&gt;] (kernfs_fop_write_iter) from [&lt;804d22fc&gt;] (call_write_iter include/linux/fs.h:1901 [inline])
 [&lt;805b3b68&gt;] (kernfs_fop_write_iter) from [&lt;804d22fc&gt;] (new_sync_write fs/read_write.c:518 [inline])
 [&lt;805b3b68&gt;] (kernfs_fop_write_iter) from [&lt;804d22fc&gt;] (vfs_write+0x3dc/0x57c fs/read_write.c:605)
 [&lt;804d1f20&gt;] (vfs_write) from [&lt;804d2604&gt;] (ksys_write+0x68/0xec fs/read_write.c:658)
 [&lt;804d259c&gt;] (ksys_write) from [&lt;804d2698&gt;] (__do_sys_write fs/read_write.c:670 [inline])
 [&lt;804d259c&gt;] (ksys_write) from [&lt;804d2698&gt;] (sys_write+0x10/0x14 fs/read_write.c:667)
 [&lt;804d2688&gt;] (sys_write) from [&lt;80200060&gt;] (ret_fast_syscall+0x0/0x2c arch/arm/mm/proc-v7.S:64)

Fixes: 83c9e13aa39a ("netdevsim: add software driver for testing offloads")
Reported-by: syzbot+e74a6857f2d0efe3ad81@syzkaller.appspotmail.com
Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Hillf Danton &lt;hdanton@sina.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&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>
commit 863a42b289c22df63db62b10fc2c2ffc237e2125 upstream.

Init the u64 stats in order to avoid the lockdep prints on the 32bit
hardware like

 INFO: trying to register non-static key.
 the code is fine but needs lockdep annotation.
 turning off the locking correctness validator.
 CPU: 0 PID: 4695 Comm: syz-executor.0 Not tainted 5.11.0-rc5-syzkaller #0
 Hardware name: ARM-Versatile Express
 Backtrace:
 [&lt;826fc5b8&gt;] (dump_backtrace) from [&lt;826fc82c&gt;] (show_stack+0x18/0x1c arch/arm/kernel/traps.c:252)
 [&lt;826fc814&gt;] (show_stack) from [&lt;8270d1f8&gt;] (__dump_stack lib/dump_stack.c:79 [inline])
 [&lt;826fc814&gt;] (show_stack) from [&lt;8270d1f8&gt;] (dump_stack+0xa8/0xc8 lib/dump_stack.c:120)
 [&lt;8270d150&gt;] (dump_stack) from [&lt;802bf9c0&gt;] (assign_lock_key kernel/locking/lockdep.c:935 [inline])
 [&lt;8270d150&gt;] (dump_stack) from [&lt;802bf9c0&gt;] (register_lock_class+0xabc/0xb68 kernel/locking/lockdep.c:1247)
 [&lt;802bef04&gt;] (register_lock_class) from [&lt;802baa2c&gt;] (__lock_acquire+0x84/0x32d4 kernel/locking/lockdep.c:4711)
 [&lt;802ba9a8&gt;] (__lock_acquire) from [&lt;802be840&gt;] (lock_acquire.part.0+0xf0/0x554 kernel/locking/lockdep.c:5442)
 [&lt;802be750&gt;] (lock_acquire.part.0) from [&lt;802bed10&gt;] (lock_acquire+0x6c/0x74 kernel/locking/lockdep.c:5415)
 [&lt;802beca4&gt;] (lock_acquire) from [&lt;81560548&gt;] (seqcount_lockdep_reader_access include/linux/seqlock.h:103 [inline])
 [&lt;802beca4&gt;] (lock_acquire) from [&lt;81560548&gt;] (__u64_stats_fetch_begin include/linux/u64_stats_sync.h:164 [inline])
 [&lt;802beca4&gt;] (lock_acquire) from [&lt;81560548&gt;] (u64_stats_fetch_begin include/linux/u64_stats_sync.h:175 [inline])
 [&lt;802beca4&gt;] (lock_acquire) from [&lt;81560548&gt;] (nsim_get_stats64+0xdc/0xf0 drivers/net/netdevsim/netdev.c:70)
 [&lt;8156046c&gt;] (nsim_get_stats64) from [&lt;81e2efa0&gt;] (dev_get_stats+0x44/0xd0 net/core/dev.c:10405)
 [&lt;81e2ef5c&gt;] (dev_get_stats) from [&lt;81e53204&gt;] (rtnl_fill_stats+0x38/0x120 net/core/rtnetlink.c:1211)
 [&lt;81e531cc&gt;] (rtnl_fill_stats) from [&lt;81e59d58&gt;] (rtnl_fill_ifinfo+0x6d4/0x148c net/core/rtnetlink.c:1783)
 [&lt;81e59684&gt;] (rtnl_fill_ifinfo) from [&lt;81e5ceb4&gt;] (rtmsg_ifinfo_build_skb+0x9c/0x108 net/core/rtnetlink.c:3798)
 [&lt;81e5ce18&gt;] (rtmsg_ifinfo_build_skb) from [&lt;81e5d0ac&gt;] (rtmsg_ifinfo_event net/core/rtnetlink.c:3830 [inline])
 [&lt;81e5ce18&gt;] (rtmsg_ifinfo_build_skb) from [&lt;81e5d0ac&gt;] (rtmsg_ifinfo_event net/core/rtnetlink.c:3821 [inline])
 [&lt;81e5ce18&gt;] (rtmsg_ifinfo_build_skb) from [&lt;81e5d0ac&gt;] (rtmsg_ifinfo+0x44/0x70 net/core/rtnetlink.c:3839)
 [&lt;81e5d068&gt;] (rtmsg_ifinfo) from [&lt;81e45c2c&gt;] (register_netdevice+0x664/0x68c net/core/dev.c:10103)
 [&lt;81e455c8&gt;] (register_netdevice) from [&lt;815608bc&gt;] (nsim_create+0xf8/0x124 drivers/net/netdevsim/netdev.c:317)
 [&lt;815607c4&gt;] (nsim_create) from [&lt;81561184&gt;] (__nsim_dev_port_add+0x108/0x188 drivers/net/netdevsim/dev.c:941)
 [&lt;8156107c&gt;] (__nsim_dev_port_add) from [&lt;815620d8&gt;] (nsim_dev_port_add_all drivers/net/netdevsim/dev.c:990 [inline])
 [&lt;8156107c&gt;] (__nsim_dev_port_add) from [&lt;815620d8&gt;] (nsim_dev_probe+0x5cc/0x750 drivers/net/netdevsim/dev.c:1119)
 [&lt;81561b0c&gt;] (nsim_dev_probe) from [&lt;815661dc&gt;] (nsim_bus_probe+0x10/0x14 drivers/net/netdevsim/bus.c:287)
 [&lt;815661cc&gt;] (nsim_bus_probe) from [&lt;811724c0&gt;] (really_probe+0x100/0x50c drivers/base/dd.c:554)
 [&lt;811723c0&gt;] (really_probe) from [&lt;811729c4&gt;] (driver_probe_device+0xf8/0x1c8 drivers/base/dd.c:740)
 [&lt;811728cc&gt;] (driver_probe_device) from [&lt;81172fe4&gt;] (__device_attach_driver+0x8c/0xf0 drivers/base/dd.c:846)
 [&lt;81172f58&gt;] (__device_attach_driver) from [&lt;8116fee0&gt;] (bus_for_each_drv+0x88/0xd8 drivers/base/bus.c:431)
 [&lt;8116fe58&gt;] (bus_for_each_drv) from [&lt;81172c6c&gt;] (__device_attach+0xdc/0x1d0 drivers/base/dd.c:914)
 [&lt;81172b90&gt;] (__device_attach) from [&lt;8117305c&gt;] (device_initial_probe+0x14/0x18 drivers/base/dd.c:961)
 [&lt;81173048&gt;] (device_initial_probe) from [&lt;81171358&gt;] (bus_probe_device+0x90/0x98 drivers/base/bus.c:491)
 [&lt;811712c8&gt;] (bus_probe_device) from [&lt;8116e77c&gt;] (device_add+0x320/0x824 drivers/base/core.c:3109)
 [&lt;8116e45c&gt;] (device_add) from [&lt;8116ec9c&gt;] (device_register+0x1c/0x20 drivers/base/core.c:3182)
 [&lt;8116ec80&gt;] (device_register) from [&lt;81566710&gt;] (nsim_bus_dev_new drivers/net/netdevsim/bus.c:336 [inline])
 [&lt;8116ec80&gt;] (device_register) from [&lt;81566710&gt;] (new_device_store+0x178/0x208 drivers/net/netdevsim/bus.c:215)
 [&lt;81566598&gt;] (new_device_store) from [&lt;8116fcb4&gt;] (bus_attr_store+0x2c/0x38 drivers/base/bus.c:122)
 [&lt;8116fc88&gt;] (bus_attr_store) from [&lt;805b4b8c&gt;] (sysfs_kf_write+0x48/0x54 fs/sysfs/file.c:139)
 [&lt;805b4b44&gt;] (sysfs_kf_write) from [&lt;805b3c90&gt;] (kernfs_fop_write_iter+0x128/0x1ec fs/kernfs/file.c:296)
 [&lt;805b3b68&gt;] (kernfs_fop_write_iter) from [&lt;804d22fc&gt;] (call_write_iter include/linux/fs.h:1901 [inline])
 [&lt;805b3b68&gt;] (kernfs_fop_write_iter) from [&lt;804d22fc&gt;] (new_sync_write fs/read_write.c:518 [inline])
 [&lt;805b3b68&gt;] (kernfs_fop_write_iter) from [&lt;804d22fc&gt;] (vfs_write+0x3dc/0x57c fs/read_write.c:605)
 [&lt;804d1f20&gt;] (vfs_write) from [&lt;804d2604&gt;] (ksys_write+0x68/0xec fs/read_write.c:658)
 [&lt;804d259c&gt;] (ksys_write) from [&lt;804d2698&gt;] (__do_sys_write fs/read_write.c:670 [inline])
 [&lt;804d259c&gt;] (ksys_write) from [&lt;804d2698&gt;] (sys_write+0x10/0x14 fs/read_write.c:667)
 [&lt;804d2688&gt;] (sys_write) from [&lt;80200060&gt;] (ret_fast_syscall+0x0/0x2c arch/arm/mm/proc-v7.S:64)

Fixes: 83c9e13aa39a ("netdevsim: add software driver for testing offloads")
Reported-by: syzbot+e74a6857f2d0efe3ad81@syzkaller.appspotmail.com
Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Hillf Danton &lt;hdanton@sina.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&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>netdevsim: fix unbalaced locking in nsim_create()</title>
<updated>2020-07-29T08:18:33+00:00</updated>
<author>
<name>Taehee Yoo</name>
<email>ap420073@gmail.com</email>
</author>
<published>2020-07-21T14:51:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8d416c038a914c2b5c9f7042db932130c47b8ba4'/>
<id>8d416c038a914c2b5c9f7042db932130c47b8ba4</id>
<content type='text'>
[ Upstream commit 2c9d8e01f0c6017317eee7638496173d4a64e6bc ]

In the nsim_create(), rtnl_lock() is called before nsim_bpf_init().
If nsim_bpf_init() is failed, rtnl_unlock() should be called,
but it isn't called.
So, unbalanced locking would occur.

Fixes: e05b2d141fef ("netdevsim: move netdev creation/destruction to dev probe")
Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 2c9d8e01f0c6017317eee7638496173d4a64e6bc ]

In the nsim_create(), rtnl_lock() is called before nsim_bpf_init().
If nsim_bpf_init() is failed, rtnl_unlock() should be called,
but it isn't called.
So, unbalanced locking would occur.

Fixes: e05b2d141fef ("netdevsim: move netdev creation/destruction to dev probe")
Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevsim: Restore per-network namespace accounting for fib entries</title>
<updated>2019-08-12T03:59:19+00:00</updated>
<author>
<name>David Ahern</name>
<email>dsahern@gmail.com</email>
</author>
<published>2019-08-06T19:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=59c84b9fcf42c99a945d5fdc49220d854e539690'/>
<id>59c84b9fcf42c99a945d5fdc49220d854e539690</id>
<content type='text'>
Prior to the commit in the fixes tag, the resource controller in netdevsim
tracked fib entries and rules per network namespace. Restore that behavior.

Fixes: 5fc494225c1e ("netdevsim: create devlink instance per netdevsim instance")
Signed-off-by: David Ahern &lt;dsahern@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>
Prior to the commit in the fixes tag, the resource controller in netdevsim
tracked fib entries and rules per network namespace. Restore that behavior.

Fixes: 5fc494225c1e ("netdevsim: create devlink instance per netdevsim instance")
Signed-off-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: net: use flow block API</title>
<updated>2019-07-09T21:38:50+00:00</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2019-07-09T20:55:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=955bcb6ea0df0d9ace89ac475405f1295ced5962'/>
<id>955bcb6ea0df0d9ace89ac475405f1295ced5962</id>
<content type='text'>
This patch updates flow_block_cb_setup_simple() to use the flow block API.
Several drivers are also adjusted to use it.

This patch introduces the per-driver list of flow blocks to account for
blocks that are already in use.

Remove tc_block_offload alias.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.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>
This patch updates flow_block_cb_setup_simple() to use the flow block API.
Several drivers are also adjusted to use it.

This patch introduces the per-driver list of flow blocks to account for
blocks that are already in use.

Remove tc_block_offload alias.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: flow_offload: add flow_block_cb_setup_simple()</title>
<updated>2019-07-09T21:38:50+00:00</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2019-07-09T20:55:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=4e95bc268b915c3a19ec8b9110f61e4ea41a1ed0'/>
<id>4e95bc268b915c3a19ec8b9110f61e4ea41a1ed0</id>
<content type='text'>
Most drivers do the same thing to set up the flow block callbacks, this
patch adds a helper function to do this.

This preparation patch reduces the number of changes to adapt the
existing drivers to use the flow block callback API.

This new helper function takes a flow block list per-driver, which is
set to NULL until this driver list is used.

This patch also introduces the flow_block_command and
flow_block_binder_type enumerations, which are renamed to use
FLOW_BLOCK_* in follow up patches.

There are three definitions (aliases) in order to reduce the number of
updates in this patch, which go away once drivers are fully adapted to
use this flow block API.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Reviewed-by: Jakub Kicinski &lt;jakub.kicinski@netronome.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>
Most drivers do the same thing to set up the flow block callbacks, this
patch adds a helper function to do this.

This preparation patch reduces the number of changes to adapt the
existing drivers to use the flow block callback API.

This new helper function takes a flow block list per-driver, which is
set to NULL until this driver list is used.

This patch also introduces the flow_block_command and
flow_block_binder_type enumerations, which are renamed to use
FLOW_BLOCK_* in follow up patches.

There are three definitions (aliases) in order to reduce the number of
updates in this patch, which go away once drivers are fully adapted to
use this flow block API.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Reviewed-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevsim: implement ndo_get_devlink_port</title>
<updated>2019-04-26T05:52:03+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-25T13:59:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=a62fdbbe9403ed4a645529f72eabc2c4c6225bd5'/>
<id>a62fdbbe9403ed4a645529f72eabc2c4c6225bd5</id>
<content type='text'>
Implement ndo_get_devlink_port and allow switch_id and port_name to be
handled by devlink.

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>
Implement ndo_get_devlink_port and allow switch_id and port_name to be
handled by devlink.

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>
<entry>
<title>netdevsim: move netdev creation/destruction to dev probe</title>
<updated>2019-04-26T05:52:03+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-25T13:59:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e05b2d141fef22cfac1928cf0eb6890e5dae4216'/>
<id>e05b2d141fef22cfac1928cf0eb6890e5dae4216</id>
<content type='text'>
Remove the existing way to create netdevsim over rtnetlink and move the
netdev creation/destruction to dev probe, so for every probed port,
a netdevsim-netdev instance is created.

Adjust selftests to work with new interface.

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>
Remove the existing way to create netdevsim over rtnetlink and move the
netdev creation/destruction to dev probe, so for every probed port,
a netdevsim-netdev instance is created.

Adjust selftests to work with new interface.

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>
<entry>
<title>netdevsim: implement dev probe/remove skeleton with port initialization</title>
<updated>2019-04-26T05:52:02+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-25T13:59:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8320d145912738655cf631d27aa1829d8b17804e'/>
<id>8320d145912738655cf631d27aa1829d8b17804e</id>
<content type='text'>
Implement netdevsim bus probing of netdevsim devices. For every probed
device create a devlink instance. According to the user-passed value,
create a number of ports represented by devlink port instances.

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>
Implement netdevsim bus probing of netdevsim devices. For every probed
device create a devlink instance. According to the user-passed value,
create a number of ports represented by devlink port instances.

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>
<entry>
<title>netdevsim: change debugfs tree topology</title>
<updated>2019-04-26T05:52:02+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-25T13:59:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=ab1d0cc004d706523dcad7cdad97a2b94eecf169'/>
<id>ab1d0cc004d706523dcad7cdad97a2b94eecf169</id>
<content type='text'>
With the model where dev is represented by devlink and ports are
represented by devlink ports, make debugfs file names independent
on netdev names. Change the topology to the one illustrated
by the following example:

$ ls /sys/kernel/debug/netdevsim/
netdevsim1
$ ls /sys/kernel/debug/netdevsim/netdevsim1/
bpf_bind_accept  bpf_bind_verifier_delay  bpf_bound_progs  ports
$ ls /sys/kernel/debug/netdevsim/netdevsim1/ports/
0  1
$ ls /sys/kernel/debug/netdevsim/netdevsim1/ports/0/
bpf_map_accept  bpf_offloaded_id  bpf_tc_accept  bpf_tc_non_bound_accept  bpf_xdpdrv_accept  bpf_xdpoffload_accept  dev  ipsec
$ ls /sys/kernel/debug/netdevsim/netdevsim1/ports/0/dev -l
lrwxrwxrwx 1 root root 0 Apr 13 15:58 /sys/kernel/debug/netdevsim/netdevsim1/ports/0/dev -&gt; ../../../netdevsim1

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>
With the model where dev is represented by devlink and ports are
represented by devlink ports, make debugfs file names independent
on netdev names. Change the topology to the one illustrated
by the following example:

$ ls /sys/kernel/debug/netdevsim/
netdevsim1
$ ls /sys/kernel/debug/netdevsim/netdevsim1/
bpf_bind_accept  bpf_bind_verifier_delay  bpf_bound_progs  ports
$ ls /sys/kernel/debug/netdevsim/netdevsim1/ports/
0  1
$ ls /sys/kernel/debug/netdevsim/netdevsim1/ports/0/
bpf_map_accept  bpf_offloaded_id  bpf_tc_accept  bpf_tc_non_bound_accept  bpf_xdpdrv_accept  bpf_xdpoffload_accept  dev  ipsec
$ ls /sys/kernel/debug/netdevsim/netdevsim1/ports/0/dev -l
lrwxrwxrwx 1 root root 0 Apr 13 15:58 /sys/kernel/debug/netdevsim/netdevsim1/ports/0/dev -&gt; ../../../netdevsim1

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>
<entry>
<title>netdevsim: generate random switch id instead of using dev id</title>
<updated>2019-04-26T05:52:02+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-04-25T13:59:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=514cf64cc5353929fbfb82ed1bda24588acaf96a'/>
<id>514cf64cc5353929fbfb82ed1bda24588acaf96a</id>
<content type='text'>
Current implementation of parent_id/switch_id does not follow the
original idea of being unique. The values are "0", "1", etc. Instead of
that, generate 32 random bytes.

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>
Current implementation of parent_id/switch_id does not follow the
original idea of being unique. The values are "0", "1", etc. Instead of
that, generate 32 random bytes.

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>
