netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2] docs: net: document guidance of implementing the SR-IOV NDOs
@ 2024-06-20  0:27 Jakub Kicinski
  2024-06-20  0:48 ` Randy Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jakub Kicinski @ 2024-06-20  0:27 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski, corbet, rdunlap,
	linux-doc

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>
---
v2:
 - edits from Randy
v1: https://lore.kernel.org/all/20240618192818.554646-1-kuba@kernel.org/

CC: corbet@lwn.net
CC: rdunlap@infradead.org
CC: linux-doc@vger.kernel.org
---
 Documentation/networking/index.rst |  1 +
 Documentation/networking/sriov.rst | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 Documentation/networking/sriov.rst

diff --git a/Documentation/networking/index.rst b/Documentation/networking/index.rst
index a6443851a142..b4b2a002f183 100644
--- a/Documentation/networking/index.rst
+++ b/Documentation/networking/index.rst
@@ -105,6 +105,7 @@ Refer to :ref:`netdev-FAQ` for a guide on netdev development process specifics.
    seg6-sysctl
    skbuff
    smc-sysctl
+   sriov
    statistics
    strparser
    switchdev
diff --git a/Documentation/networking/sriov.rst b/Documentation/networking/sriov.rst
new file mode 100644
index 000000000000..5deb4ff3154f
--- /dev/null
+++ b/Documentation/networking/sriov.rst
@@ -0,0 +1,25 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+===============
+NIC SR-IOV APIs
+===============
+
+Modern NICs are strongly encouraged to focus on implementing the ``switchdev``
+model (see :ref:`switchdev`) to configure forwarding and security of SR-IOV
+functionality.
+
+Legacy API
+==========
+
+The old SR-IOV API is implemented in ``rtnetlink`` Netlink family as part of
+the ``RTM_GETLINK`` and ``RTM_SETLINK`` commands. On the driver side
+it consists of a number of ``ndo_set_vf_*`` and ``ndo_get_vf_*`` callbacks.
+
+Since the legacy APIs do not integrate well with the rest of the stack
+the API is considered frozen; no new functionality or extensions
+will be accepted. New drivers should not implement the uncommon callbacks;
+namely the following callbacks are off limits:
+
+ - ``ndo_get_vf_port``
+ - ``ndo_set_vf_port``
+ - ``ndo_set_vf_rss_query_en``
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v2] docs: net: document guidance of implementing the SR-IOV NDOs
  2024-06-20  0:27 [PATCH net-next v2] docs: net: document guidance of implementing the SR-IOV NDOs Jakub Kicinski
@ 2024-06-20  0:48 ` Randy Dunlap
  2024-06-20 17:58 ` Simon Horman
  2024-06-21  9:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2024-06-20  0:48 UTC (permalink / raw)
  To: Jakub Kicinski, davem; +Cc: netdev, edumazet, pabeni, corbet, linux-doc



On 6/19/24 5:27 PM, Jakub Kicinski wrote:
> 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>
> ---
> v2:
>  - edits from Randy
> v1: https://lore.kernel.org/all/20240618192818.554646-1-kuba@kernel.org/
> 
> CC: corbet@lwn.net
> CC: rdunlap@infradead.org
> CC: linux-doc@vger.kernel.org
> ---
>  Documentation/networking/index.rst |  1 +
>  Documentation/networking/sriov.rst | 25 +++++++++++++++++++++++++
>  2 files changed, 26 insertions(+)
>  create mode 100644 Documentation/networking/sriov.rst

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v2] docs: net: document guidance of implementing the SR-IOV NDOs
  2024-06-20  0:27 [PATCH net-next v2] docs: net: document guidance of implementing the SR-IOV NDOs Jakub Kicinski
  2024-06-20  0:48 ` Randy Dunlap
@ 2024-06-20 17:58 ` Simon Horman
  2024-06-21  9:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-06-20 17:58 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, corbet, rdunlap, linux-doc

On Wed, Jun 19, 2024 at 05:27:41PM -0700, Jakub Kicinski wrote:
> 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>

Thanks Jakub,

This is as was discussed at the public netdev call the other day [1].
And a change I supported in that meeting.

Reviewed-by: Simon Horman <horms@kernel.org>

[1] https://lore.kernel.org/netdev/20240617083955.1039b2e3@kernel.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v2] docs: net: document guidance of implementing the SR-IOV NDOs
  2024-06-20  0:27 [PATCH net-next v2] docs: net: document guidance of implementing the SR-IOV NDOs Jakub Kicinski
  2024-06-20  0:48 ` Randy Dunlap
  2024-06-20 17:58 ` Simon Horman
@ 2024-06-21  9:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-06-21  9:20 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, corbet, rdunlap, linux-doc

Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 19 Jun 2024 17:27:41 -0700 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next,v2] docs: net: document guidance of implementing the SR-IOV NDOs
    https://git.kernel.org/netdev/net-next/c/4558645d139c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-21  9:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-20  0:27 [PATCH net-next v2] docs: net: document guidance of implementing the SR-IOV NDOs Jakub Kicinski
2024-06-20  0:48 ` Randy Dunlap
2024-06-20 17:58 ` Simon Horman
2024-06-21  9:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).