<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/netdevsim/netdev.c, branch v5.17-rc5</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>netdevsim: move vfconfig to nsim_dev</title>
<updated>2021-11-01T13:29:41+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-10-30T23:15:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e388f3dc38c72da2880549e68374c3b6ba7c589'/>
<id>5e388f3dc38c72da2880549e68374c3b6ba7c589</id>
<content type='text'>
When netdevsim got split into the faux bus vfconfig ended
up in the bus device (think pci_dev) which is strange because
it contains very networky not to say netdevy information.
Move it to nsim_dev, which is the driver "priv" structure
for the device.

To make sure we don't race with probe/remove take
the device lock (much like PCI).

While at it remove the NULL-checking of vfconfigs.
It appears to be pointless.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.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>
When netdevsim got split into the faux bus vfconfig ended
up in the bus device (think pci_dev) which is strange because
it contains very networky not to say netdevy information.
Move it to nsim_dev, which is the driver "priv" structure
for the device.

To make sure we don't race with probe/remove take
the device lock (much like PCI).

While at it remove the NULL-checking of vfconfigs.
It appears to be pointless.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevsim: Add multi-queue support</title>
<updated>2021-07-16T18:17:56+00:00</updated>
<author>
<name>Peilin Ye</name>
<email>peilin.ye@bytedance.com</email>
</author>
<published>2021-07-16T01:52:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d4861fc6be581561d6964700110a4dede54da6a6'/>
<id>d4861fc6be581561d6964700110a4dede54da6a6</id>
<content type='text'>
Currently netdevsim only supports a single queue per port, which is
insufficient for testing multi-queue TC schedulers e.g. sch_mq.  Extend
the current sysfs interface so that users can create ports with multiple
queues:

$ echo "[ID] [PORT_COUNT] [NUM_QUEUES]" &gt; /sys/bus/netdevsim/new_device

As an example, echoing "2 4 8" creates 4 ports, with 8 queues per port.
Note, this is compatible with the current interface, with default number
of queues set to 1.  For example, echoing "2 4" creates 4 ports with 1
queue per port; echoing "2" simply creates 1 port with 1 queue.

Reviewed-by: Cong Wang &lt;cong.wang@bytedance.com&gt;
Signed-off-by: Peilin Ye &lt;peilin.ye@bytedance.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 netdevsim only supports a single queue per port, which is
insufficient for testing multi-queue TC schedulers e.g. sch_mq.  Extend
the current sysfs interface so that users can create ports with multiple
queues:

$ echo "[ID] [PORT_COUNT] [NUM_QUEUES]" &gt; /sys/bus/netdevsim/new_device

As an example, echoing "2 4 8" creates 4 ports, with 8 queues per port.
Note, this is compatible with the current interface, with default number
of queues set to 1.  For example, echoing "2 4" creates 4 ports with 1
queue per port; echoing "2" simply creates 1 port with 1 queue.

Reviewed-by: Cong Wang &lt;cong.wang@bytedance.com&gt;
Signed-off-by: Peilin Ye &lt;peilin.ye@bytedance.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevsim: Implement legacy/switchdev mode for VFs</title>
<updated>2021-06-02T21:08:36+00:00</updated>
<author>
<name>Dmytro Linkin</name>
<email>dlinkin@nvidia.com</email>
</author>
<published>2021-06-02T12:17:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=160dc373eead2143ea51b7f8e2a6bf1e383f24f8'/>
<id>160dc373eead2143ea51b7f8e2a6bf1e383f24f8</id>
<content type='text'>
Implement callbacks to set/get eswitch mode value. Add helpers to check
current mode.

Instantiate VFs' net devices and devlink ports on switchdev enabling and
remove them on legacy enabling. Changing number of VFs while in
switchdev mode triggers VFs creation/deletion.

Also disable NDO API callback to set VF rate, since it's legacy API.
Switchdev API to set VF rate will be implemented in one of the next
patches.

Signed-off-by: Dmytro Linkin &lt;dlinkin@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.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 callbacks to set/get eswitch mode value. Add helpers to check
current mode.

Instantiate VFs' net devices and devlink ports on switchdev enabling and
remove them on legacy enabling. Changing number of VFs while in
switchdev mode triggers VFs creation/deletion.

Also disable NDO API callback to set VF rate, since it's legacy API.
Switchdev API to set VF rate will be implemented in one of the next
patches.

Signed-off-by: Dmytro Linkin &lt;dlinkin@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevsim: Implement VFs</title>
<updated>2021-06-02T21:08:36+00:00</updated>
<author>
<name>Dmytro Linkin</name>
<email>dlinkin@nvidia.com</email>
</author>
<published>2021-06-02T12:17:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=92ba1f29e6e2f16eb93a0a2c7c01985920b89222'/>
<id>92ba1f29e6e2f16eb93a0a2c7c01985920b89222</id>
<content type='text'>
Allow creation of netdevsim ports for VFs along with allocations of
corresponding net devices and devlink ports.
Add enums and helpers to distinguish PFs' ports from VFs' ports.

Ports creation/deletion debugfs API intended to be used with physical
ports only.
VFs instantiation will be done in one of the next patches.

Signed-off-by: Dmytro Linkin &lt;dlinkin@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.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>
Allow creation of netdevsim ports for VFs along with allocations of
corresponding net devices and devlink ports.
Add enums and helpers to distinguish PFs' ports from VFs' ports.

Ports creation/deletion debugfs API intended to be used with physical
ports only.
VFs instantiation will be done in one of the next patches.

Signed-off-by: Dmytro Linkin &lt;dlinkin@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevsim: init u64 stats for 32bit hardware</title>
<updated>2021-03-04T22:36:26+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.toradex.cn/cgit/linux-toradex.git/commit/?id=863a42b289c22df63db62b10fc2c2ffc237e2125'/>
<id>863a42b289c22df63db62b10fc2c2ffc237e2125</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: remove ndo_udp_tunnel_* callbacks</title>
<updated>2021-01-07T20:53:29+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-01-06T21:06:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=30bfce109420912f201d4f295f9130ff44f04b41'/>
<id>30bfce109420912f201d4f295f9130ff44f04b41</id>
<content type='text'>
All UDP tunnel port management is now routed via udp_tunnel_nic
infra directly. Remove the old callbacks.

Reviewed-by: Alexander Duyck &lt;alexanderduyck@fb.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All UDP tunnel port management is now routed via udp_tunnel_nic
infra directly. Remove the old callbacks.

Reviewed-by: Alexander Duyck &lt;alexanderduyck@fb.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevsim: add pause frame stats</title>
<updated>2020-09-15T20:26:28+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2020-09-15T00:11:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ff1f7c17fb20183a4ab5ce92bdb3f3675fb4f751'/>
<id>ff1f7c17fb20183a4ab5ce92bdb3f3675fb4f751</id>
<content type='text'>
Add minimal ethtool interface for testing ethtool pause stats.

v2: add missing static on nsim_ethtool_ops

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Saeed Mahameed &lt;saeedm@nvidia.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 minimal ethtool interface for testing ethtool pause stats.

v2: add missing static on nsim_ethtool_ops

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Saeed Mahameed &lt;saeedm@nvidia.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/netdev/net</title>
<updated>2020-07-26T00:49:04+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2020-07-26T00:49:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a57066b1a01977a646145f4ce8dfb4538b08368a'/>
<id>a57066b1a01977a646145f4ce8dfb4538b08368a</id>
<content type='text'>
The UDP reuseport conflict was a little bit tricky.

The net-next code, via bpf-next, extracted the reuseport handling
into a helper so that the BPF sk lookup code could invoke it.

At the same time, the logic for reuseport handling of unconnected
sockets changed via commit efc6b6f6c3113e8b203b9debfb72d81e0f3dcace
which changed the logic to carry on the reuseport result into the
rest of the lookup loop if we do not return immediately.

This requires moving the reuseport_has_conns() logic into the callers.

While we are here, get rid of inline directives as they do not belong
in foo.c files.

The other changes were cases of more straightforward overlapping
modifications.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The UDP reuseport conflict was a little bit tricky.

The net-next code, via bpf-next, extracted the reuseport handling
into a helper so that the BPF sk lookup code could invoke it.

At the same time, the logic for reuseport handling of unconnected
sockets changed via commit efc6b6f6c3113e8b203b9debfb72d81e0f3dcace
which changed the logic to carry on the reuseport result into the
rest of the lookup loop if we do not return immediately.

This requires moving the reuseport_has_conns() logic into the callers.

While we are here, get rid of inline directives as they do not belong
in foo.c files.

The other changes were cases of more straightforward overlapping
modifications.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevsim: fix unbalaced locking in nsim_create()</title>
<updated>2020-07-21T23:00:43+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.toradex.cn/cgit/linux-toradex.git/commit/?id=2c9d8e01f0c6017317eee7638496173d4a64e6bc'/>
<id>2c9d8e01f0c6017317eee7638496173d4a64e6bc</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevsim: add UDP tunnel port offload support</title>
<updated>2020-07-10T20:54:00+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2020-07-10T00:42:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=424be63ad831fbd5fb04eb6576de44f4aa7661e2'/>
<id>424be63ad831fbd5fb04eb6576de44f4aa7661e2</id>
<content type='text'>
Add UDP tunnel port handlers to our fake driver so we can test
the core infra.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.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>
Add UDP tunnel port handlers to our fake driver so we can test
the core infra.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
