<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/netdevsim/dev.c, branch v5.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-06-18T18:28:27Z</updated>
<entry>
<title>drivers: net: netdevsim: fix devlink_trap selftests failing</title>
<updated>2021-06-18T18:28:27Z</updated>
<author>
<name>Oleksandr Mazur</name>
<email>oleksandr.mazur@plvision.eu</email>
</author>
<published>2021-06-17T11:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=275b51c27cc382325cf833dfbe1ce44071c2e2c4'/>
<id>urn:sha1:275b51c27cc382325cf833dfbe1ce44071c2e2c4</id>
<content type='text'>
devlink_trap tests for the netdevsim fail due to misspelled
debugfs file name. Change this name, as well as name of callback
function, to match the naming as in the devlink itself - 'trap_drop_counter'.

Test-results:
selftests: drivers/net/netdevsim: devlink_trap.sh
TEST: Initialization                                                [ OK ]
TEST: Trap action                                                   [ OK ]
TEST: Trap metadata                                                 [ OK ]
TEST: Non-existing trap                                             [ OK ]
TEST: Non-existing trap action                                      [ OK ]
TEST: Trap statistics                                               [ OK ]
TEST: Trap group action                                             [ OK ]
TEST: Non-existing trap group                                       [ OK ]
TEST: Trap group statistics                                         [ OK ]
TEST: Trap policer                                                  [ OK ]
TEST: Trap policer binding                                          [ OK ]
TEST: Port delete                                                   [ OK ]
TEST: Device delete                                                 [ OK ]

Fixes: a7b3527a43fe ("drivers: net: netdevsim: add devlink trap_drop_counter_get implementation")
Signed-off-by: Oleksandr Mazur &lt;oleksandr.mazur@plvision.eu&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Tested-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drivers: net: netdevsim: add devlink trap_drop_counter_get implementation</title>
<updated>2021-06-14T20:04:25Z</updated>
<author>
<name>Oleksandr Mazur</name>
<email>oleksandr.mazur@plvision.eu</email>
</author>
<published>2021-06-14T13:01:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7b3527a43feb017f48c699d859aef787c8af031'/>
<id>urn:sha1:a7b3527a43feb017f48c699d859aef787c8af031</id>
<content type='text'>
Whenever query statistics is issued for trap with DROP action,
devlink subsystem would also fill-in statistics 'dropped' field.
In case if device driver did't register callback for hard drop
statistics querying, 'dropped' field will be omitted and not filled.
Add trap_drop_counter_get callback implementation to the netdevsim.
Add new test cases for netdevsim, to test both the callback
functionality, as well as drop statistics alteration check.

Signed-off-by: Oleksandr Mazur &lt;oleksandr.mazur@plvision.eu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netdevsim: delete unnecessary debugfs checking</title>
<updated>2021-06-09T21:16:39Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-06-09T09:56:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e744cb8126deac52257219fad754614a61989da'/>
<id>urn:sha1:4e744cb8126deac52257219fad754614a61989da</id>
<content type='text'>
In normal situations where the driver doesn't dereference
"nsim_node-&gt;ddir" or "nsim_node-&gt;rate_parent" itself then we are not
supposed to check the return from debugfs functions.  In the case of
debugfs_create_dir() the check was wrong as well because it doesn't
return NULL, it returns error pointers.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netdevsim: Allow setting parent node of rate objects</title>
<updated>2021-06-02T21:08:37Z</updated>
<author>
<name>Dmytro Linkin</name>
<email>dlinkin@nvidia.com</email>
</author>
<published>2021-06-02T12:17:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f3d101b485ca2c831088d72878fe6e7416676cb8'/>
<id>urn:sha1:f3d101b485ca2c831088d72878fe6e7416676cb8</id>
<content type='text'>
Implement new devlink ops that allow setting rate node as a parent for
devlink port (leaf) or another devlink node through devlink API.
Expose parent names to netdevsim debugfs in read only mode.

Co-developed-by: Vlad Buslov &lt;vladbu@nvidia.com&gt;
Signed-off-by: Vlad Buslov &lt;vladbu@nvidia.com&gt;
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>
</entry>
<entry>
<title>netdevsim: Implement support for devlink rate nodes</title>
<updated>2021-06-02T21:08:37Z</updated>
<author>
<name>Dmytro Linkin</name>
<email>dlinkin@nvidia.com</email>
</author>
<published>2021-06-02T12:17:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=885226f5680e099ec54564332ea85412372b4958'/>
<id>urn:sha1:885226f5680e099ec54564332ea85412372b4958</id>
<content type='text'>
Implement new devlink ops that allow creation, deletion and setting of
shared/max tx rate of devlink rate nodes through devlink API.
Expose rate node and it's tx rates to netdevsim debugfs.

Co-developed-by: Vlad Buslov &lt;vladbu@nvidia.com&gt;
Signed-off-by: Vlad Buslov &lt;vladbu@nvidia.com&gt;
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>
</entry>
<entry>
<title>netdevsim: Implement devlink rate leafs tx rate support</title>
<updated>2021-06-02T21:08:37Z</updated>
<author>
<name>Dmytro Linkin</name>
<email>dlinkin@nvidia.com</email>
</author>
<published>2021-06-02T12:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=605c4f8f199b8374cf01624822aa0b5f2c09d1c7'/>
<id>urn:sha1:605c4f8f199b8374cf01624822aa0b5f2c09d1c7</id>
<content type='text'>
Implement new devlink ops that allow shared and max tx rate control for
devlink port rate objects (leafs) through devlink API.

Expose rate values of VF ports to netdevsim debugfs.

Co-developed-by: Vlad Buslov &lt;vladbu@nvidia.com&gt;
Signed-off-by: Vlad Buslov &lt;vladbu@nvidia.com&gt;
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>
</entry>
<entry>
<title>netdevsim: Register devlink rate leaf objects per VF</title>
<updated>2021-06-02T21:08:36Z</updated>
<author>
<name>Dmytro Linkin</name>
<email>dlinkin@nvidia.com</email>
</author>
<published>2021-06-02T12:17:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=885dfe121b3862d0cc1de98a69f1ca37d18e3495'/>
<id>urn:sha1:885dfe121b3862d0cc1de98a69f1ca37d18e3495</id>
<content type='text'>
Register devlink rate leaf objects per VF.

Co-developed-by: Vlad Buslov &lt;vladbu@nvidia.com&gt;
Signed-off-by: Vlad Buslov &lt;vladbu@nvidia.com&gt;
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>
</entry>
<entry>
<title>netdevsim: Implement legacy/switchdev mode for VFs</title>
<updated>2021-06-02T21:08:36Z</updated>
<author>
<name>Dmytro Linkin</name>
<email>dlinkin@nvidia.com</email>
</author>
<published>2021-06-02T12:17:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=160dc373eead2143ea51b7f8e2a6bf1e383f24f8'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>netdevsim: Implement VFs</title>
<updated>2021-06-02T21:08:36Z</updated>
<author>
<name>Dmytro Linkin</name>
<email>dlinkin@nvidia.com</email>
</author>
<published>2021-06-02T12:17:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=92ba1f29e6e2f16eb93a0a2c7c01985920b89222'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>netdevsim: Implement port types and indexing</title>
<updated>2021-06-02T21:08:36Z</updated>
<author>
<name>Dmytro Linkin</name>
<email>dlinkin@nvidia.com</email>
</author>
<published>2021-06-02T12:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=814b9ce65ec3b53404eeda7a11e1abb4af8d7df3'/>
<id>urn:sha1:814b9ce65ec3b53404eeda7a11e1abb4af8d7df3</id>
<content type='text'>
Define type of ports, which netdevsim driver currently operates with as
PF. Define new port type - VF, which will be implemented in following
patches. Add helper functions to distinguish them. Add helper function
to get VF index from port index.

Add port indexing logic where PFs' indexes starts from 0, VFs' - from
NSIM_DEV_VF_PORT_INDEX_BASE.
All ports uses same index pool, which means that PF port may be created
with index from VFs' indexes range.
Maximum number of VFs, which the driver can allocate, is limited by
UINT_MAX - BASE.

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>
</entry>
</feed>
