1.. SPDX-License-Identifier: GPL-2.0 2 3========================= 4netdevsim devlink support 5========================= 6 7This document describes the ``devlink`` features supported by the 8``netdevsim`` device driver. 9 10Parameters 11========== 12 13.. list-table:: Generic parameters implemented 14 15 * - Name 16 - Mode 17 * - ``max_macs`` 18 - driverinit 19 20The ``netdevsim`` driver also implements the following driver-specific 21parameters. 22 23.. list-table:: Driver-specific parameters implemented 24 :widths: 5 5 5 85 25 26 * - Name 27 - Type 28 - Mode 29 - Description 30 * - ``test1`` 31 - Boolean 32 - driverinit 33 - Test parameter used to show how a driver-specific devlink parameter 34 can be implemented. 35 36The ``netdevsim`` driver supports reloading via ``DEVLINK_CMD_RELOAD`` 37 38Regions 39======= 40 41The ``netdevsim`` driver exposes a ``dummy`` region as an example of how the 42devlink-region interfaces work. A snapshot is taken whenever the 43``take_snapshot`` debugfs file is written to. 44 45Resources 46========= 47 48The ``netdevsim`` driver exposes resources to control the number of FIB 49entries, FIB rule entries and nexthops that the driver will allow. 50 51.. code:: shell 52 53 $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib size 96 54 $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib-rules size 16 55 $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib size 64 56 $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib-rules size 16 57 $ devlink resource set netdevsim/netdevsim0 path /nexthops size 16 58 $ devlink dev reload netdevsim/netdevsim0 59 60Driver-specific Traps 61===================== 62 63.. list-table:: List of Driver-specific Traps Registered by ``netdevsim`` 64 :widths: 5 5 90 65 66 * - Name 67 - Type 68 - Description 69 * - ``fid_miss`` 70 - ``exception`` 71 - When a packet enters the device it is classified to a filtering 72 indentifier (FID) based on the ingress port and VLAN. This trap is used 73 to trap packets for which a FID could not be found 74