aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking/devlink/netdevsim.rst
blob: 88482725422c2345adccc0f04d2566fb5ba5ef6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.. SPDX-License-Identifier: GPL-2.0

=========================
netdevsim devlink support
=========================

This document describes the ``devlink`` features supported by the
``netdevsim`` device driver.

Parameters
==========

.. list-table:: Generic parameters implemented

   * - Name
     - Mode
   * - ``max_macs``
     - driverinit

The ``netdevsim`` driver also implements the following driver-specific
parameters.

.. list-table:: Driver-specific parameters implemented
   :widths: 5 5 5 85

   * - Name
     - Type
     - Mode
     - Description
   * - ``test1``
     - Boolean
     - driverinit
     - Test parameter used to show how a driver-specific devlink parameter
       can be implemented.

The ``netdevsim`` driver supports reloading via ``DEVLINK_CMD_RELOAD``

Regions
=======

The ``netdevsim`` driver exposes a ``dummy`` region as an example of how the
devlink-region interfaces work. A snapshot is taken whenever the
``take_snapshot`` debugfs file is written to.

Resources
=========

The ``netdevsim`` driver exposes resources to control the number of FIB
entries, FIB rule entries and nexthops that the driver will allow.

.. code:: shell

    $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib size 96
    $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib-rules size 16
    $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib size 64
    $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib-rules size 16
    $ devlink resource set netdevsim/netdevsim0 path /nexthops size 16
    $ devlink dev reload netdevsim/netdevsim0

Rate objects
============

The ``netdevsim`` driver supports rate objects management, which includes:

- registerging/unregistering leaf rate objects per VF devlink port;
- creation/deletion node rate objects;
- setting tx_share and tx_max rate values for any rate object type;
- setting parent node for any rate object type.

Rate nodes and their parameters are exposed in ``netdevsim`` debugfs in RO mode.
For example created rate node with name ``some_group``:

.. code:: shell

    $ ls /sys/kernel/debug/netdevsim/netdevsim0/rate_groups/some_group
    rate_parent  tx_max  tx_share

Same parameters are exposed for leaf objects in corresponding ports directories.
For ex.:

.. code:: shell

    $ ls /sys/kernel/debug/netdevsim/netdevsim0/ports/1
    dev  ethtool  rate_parent  tx_max  tx_share

Driver-specific Traps
=====================

.. list-table:: List of Driver-specific Traps Registered by ``netdevsim``
   :widths: 5 5 90

   * - Name
     - Type
     - Description
   * - ``fid_miss``
     - ``exception``
     - When a packet enters the device it is classified to a filtering
       identifier (FID) based on the ingress port and VLAN. This trap is used
       to trap packets for which a FID could not be found
15:54:46 -0400'>2012-04-09nl80211: ensure interface is up in various APIsJohannes Berg1-13/+18 2012-04-09mac80211: fix association beacon wait timeoutJohannes Berg1-2/+1 2012-04-06Make the "word-at-a-time" helper functions more commonly usableLinus Torvalds2-32/+49 2012-04-06net: fix a race in sock_queue_err_skb()Eric Dumazet1-1/+3 2012-04-06netlink: fix races after skb queueingEric Dumazet1-11/+13 2012-04-06doc, net: Update ndo_start_xmit return type and valuesBen Hutchings1-10/+12 2012-04-06doc, net: Remove instruction to set net_device::trans_startBen Hutchings1-5/+2 2012-04-06doc, net: Update netdev operation namesBen Hutchings2-14/+14 2012-04-06doc, net: Update documentation of synchronisation for TX multiqueueBen Hutchings1-3/+3 2012-04-06doc, net: Remove obsolete reference to dev->pollBen Hutchings1-2/+1 2012-04-06ethtool: Remove exception to the requirement of holding RTNL lockBen Hutchings1-2/+1 2012-04-06blackfin: update defconfig for bf527-ezkitBob Liu1-0/+1 2012-04-06blackfin: gpio: fix compile error if !CONFIG_GPIOLIBBob Liu1-2/+12 2012-04-06blackfin: fix L1 data A overflow link issueMike Frysinger1-1/+1 2012-04-05MAINTAINERS: update for Marvell Ethernet driversstephen hemminger1-12/+7 2012-04-05bonding: properly unset current_arp_slave on slave link upVeaceslav Falico1-1/+5 2012-04-05phonet: Check input from user before allocatingSasha Levin1-0/+3 2012-04-05tcp: tcp_sendpages() should call tcp_push() onceEric Dumazet4-6/+9 2012-04-05memcg swap: use mem_cgroup_uncharge_swap fixMichal Hocko1-7/+7 2012-04-05backlight: add driver for DA9052/53 PMIC v1Ashish Jangam3-0/+194 2012-04-05C6X: use set_current_blocked() and block_sigmask()Matt Fleming1-13/+3 2012-04-05MAINTAINERS: add entry for sparse checkerChristopher Li1-0/+9 2012-04-05MAINTAINERS: fix REMOTEPROC F: typoJoe Perches1-1/+1 2012-04-05alpha: use set_current_blocked() and block_sigmask()Matt Fleming1-21/+10 2012-04-05simple_open: automatically convert to simple_open()Stephen Boyd63-572/+176