brintos

brintos / linux-shallow public Read only

0
0
Text · 2.8 KiB · 8848272 Raw
100 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3=========================4netdevsim devlink support5=========================6 7This document describes the ``devlink`` features supported by the8``netdevsim`` device driver.9 10Parameters11==========12 13.. list-table:: Generic parameters implemented14 15   * - Name16     - Mode17   * - ``max_macs``18     - driverinit19 20The ``netdevsim`` driver also implements the following driver-specific21parameters.22 23.. list-table:: Driver-specific parameters implemented24   :widths: 5 5 5 8525 26   * - Name27     - Type28     - Mode29     - Description30   * - ``test1``31     - Boolean32     - driverinit33     - Test parameter used to show how a driver-specific devlink parameter34       can be implemented.35 36The ``netdevsim`` driver supports reloading via ``DEVLINK_CMD_RELOAD``37 38Regions39=======40 41The ``netdevsim`` driver exposes a ``dummy`` region as an example of how the42devlink-region interfaces work. A snapshot is taken whenever the43``take_snapshot`` debugfs file is written to.44 45Resources46=========47 48The ``netdevsim`` driver exposes resources to control the number of FIB49entries, FIB rule entries and nexthops that the driver will allow.50 51.. code:: shell52 53    $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib size 9654    $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib-rules size 1655    $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib size 6456    $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib-rules size 1657    $ devlink resource set netdevsim/netdevsim0 path /nexthops size 1658    $ devlink dev reload netdevsim/netdevsim059 60Rate objects61============62 63The ``netdevsim`` driver supports rate objects management, which includes:64 65- registerging/unregistering leaf rate objects per VF devlink port;66- creation/deletion node rate objects;67- setting tx_share and tx_max rate values for any rate object type;68- setting parent node for any rate object type.69 70Rate nodes and their parameters are exposed in ``netdevsim`` debugfs in RO mode.71For example created rate node with name ``some_group``:72 73.. code:: shell74 75    $ ls /sys/kernel/debug/netdevsim/netdevsim0/rate_groups/some_group76    rate_parent  tx_max  tx_share77 78Same parameters are exposed for leaf objects in corresponding ports directories.79For ex.:80 81.. code:: shell82 83    $ ls /sys/kernel/debug/netdevsim/netdevsim0/ports/184    dev  ethtool  rate_parent  tx_max  tx_share85 86Driver-specific Traps87=====================88 89.. list-table:: List of Driver-specific Traps Registered by ``netdevsim``90   :widths: 5 5 9091 92   * - Name93     - Type94     - Description95   * - ``fid_miss``96     - ``exception``97     - When a packet enters the device it is classified to a filtering98       identifier (FID) based on the ingress port and VLAN. This trap is used99       to trap packets for which a FID could not be found100