Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: net: document guidance of implementing the SR-IOV NDOs

New drivers were prevented from adding ndo_set_vf_* callbacks
over the last few years. This was expected to result in broader
switchdev adoption, but seems to have had little effect.

Based on recent netdev meeting there is broad support for allowing
adding those ops.

There is a problem with the current API supporting a limited number
of VFs (100+, which is less than some modern HW supports).
We can try to solve it by adding similar functionality on devlink
ports, but that'd be another API variation to maintain.
So a netlink attribute reshuffling is a more likely outcome.

Document the guidance, make it clear that the API is frozen.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jakub Kicinski and committed by
David S. Miller
4558645d dcec8d29

+26
+1
Documentation/networking/index.rst
··· 105 105 seg6-sysctl 106 106 skbuff 107 107 smc-sysctl 108 + sriov 108 109 statistics 109 110 strparser 110 111 switchdev
+25
Documentation/networking/sriov.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + =============== 4 + NIC SR-IOV APIs 5 + =============== 6 + 7 + Modern NICs are strongly encouraged to focus on implementing the ``switchdev`` 8 + model (see :ref:`switchdev`) to configure forwarding and security of SR-IOV 9 + functionality. 10 + 11 + Legacy API 12 + ========== 13 + 14 + The old SR-IOV API is implemented in ``rtnetlink`` Netlink family as part of 15 + the ``RTM_GETLINK`` and ``RTM_SETLINK`` commands. On the driver side 16 + it consists of a number of ``ndo_set_vf_*`` and ``ndo_get_vf_*`` callbacks. 17 + 18 + Since the legacy APIs do not integrate well with the rest of the stack 19 + the API is considered frozen; no new functionality or extensions 20 + will be accepted. New drivers should not implement the uncommon callbacks; 21 + namely the following callbacks are off limits: 22 + 23 + - ``ndo_get_vf_port`` 24 + - ``ndo_set_vf_port`` 25 + - ``ndo_set_vf_rss_query_en``