docs: net: add an explanation of VF (and other) Representors
Subsystems (3)
PATCH v3 1/1 docs: net: add an explanation of VF (and other) Representors
From: Edward Cree <[email protected]>
There's no clear explanation of what VF Representors are for, their
semantics, etc., outside of vendor docs and random conference slides.
Add a document explaining Representors and defining what drivers that
implement them are expected to do.
---
Changed in v3:
- renamed "master PF" to "switchdev function" (Parav)
- reworded sentence in Motivation that caused some confusion (Marcin)
- fixed preposition to->by (Parav)
- used the word "external" when talking about other PCIe controllers, for consistency with devlink port documentation (Parav)
- added more explanation about virtio-blk representors, and the conceptual point I was trying to use them to illustrate
- made it more explicit that vswitch ports, and thus representors, can appear dynamically at run time, not just at probe (Parav)
- used $VARIABLES for netdev names in TC rule examples (Marcin)
Changed in v2:
- incorporated feedback from Jakub including rewrite of the Motivation section, representors for uplink/phys port, replace phys_port_name conventions with devlink port.
- fixed archaic spelling (Randy)
- painted the bike shed blue ("master PF") for now, we can always change it again later
- added Definitions section
--- Documentation/networking/index.rst | 1 + Documentation/networking/representors.rst | 259 ++++++++++++++++++++++ Documentation/networking/switchdev.rst | 1 + 3 files changed, 261 insertions(+) create mode 100644 Documentation/networking/representors.rst
Documentation/networking/index.rst +1 -0
@@ -93,6 +93,7 @@ Contents: radiotap-headers rds regulatory + representors rxrpc sctp secid
Documentation/networking/representors.rst new file +259 -0
259 lines not on this page · raw message
Documentation/networking/switchdev.rst +1 -0
@@ -1,5 +1,6 @@ .. SPDX-License-Identifier: GPL-2.0 .. include:: <isonum.txt> +.. _switchdev: =============================================== Ethernet switch device driver model (switchdev)
Quoted 17 lines · On 9/5/22 20:55, [email protected] wrote:
Documentation/networking/representors.rst new file +17
-0+Thus, the following should all have representors: + + - VFs belonging to the switchdev function. + - Other PFs on the local PCIe controller, and any VFs belonging to them. + - PFs and VFs on external PCIe controllers on the device (e.g. for any embedded + System-on-Chip within the SmartNIC). + - PFs and VFs with other personalities, including network block devices (such + as a vDPA virtio-blk PF backed by remote/distributed storage), if (and only + if) their network access is implemented through a virtual switch port. [#]_ + Note that such functions can require a representor despite the representee + not having a netdev. + - Subfunctions (SFs) belonging to any of the above PFs or VFs, if they have + their own port on the switch (as opposed to using their parent PF's port). + - Any accelerators or plugins on the device whose interface to the network is + through a virtual switch port, even if they do not have a corresponding PCIe + PF or VF. +
<snipped>
Quoted 5 lines
Documentation/networking/representors.rst new file +5
-0+ +.. [#] The concept here is that a hardware IP stack in the device performs the + translation between block DMA requests and network packets, so that only + network packets pass through the virtual port onto the switch. The network + access that the IP stack "sees" would then be configurable through tc rules;
Documentation/networking/representors.rst line 142
Quoted 10 lines
Documentation/networking/representors.rst new file +10
-0+ e.g. its traffic might all be wrapped in a specific VLAN or VxLAN. However, + any needed configuration of the block device *qua* block device, not being a + networking entity, would not be appropriate for the representor and would + thus use some other channel such as devlink. + Contrast this with the case of a virtio-blk implementation which forwards the + DMA requests unchanged to another PF whose driver then initiates and + terminates IP traffic in software; in that case the DMA traffic would *not* + run over the virtual switch and the virtio-blk PF should thus *not* have a + representor. +
I think by convention, footnotes should be put on bottom of the doc.
Other than that, LGTM.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 1 line · Bagas Sanjaya
I think by convention, footnotes should be put on bottom of the doc.
Hmm, a quick and unscientific sample of Documentation/ suggests that
many/most existing examples put the footnote shortly after the reference or at the end of the section, roughly as I did here. I looked at five rST files found by "grep \[#\]_" and all of them had the footnote body close to the reference.
The placement of the footnote text in the generated output is up to
the stylesheet / renderer, of course.
-ed
Jonathan Corbet
maintainerQuoted 10 lines · Edward Cree
Quoted 1 line · Bagas Sanjaya
I think by convention, footnotes should be put on bottom of the doc.
Hmm, a quick and unscientific sample of
Documentation/suggests that
many/most existing examples put the footnote shortly after the reference or at the end of the section, roughly as I did here. I looked at five rST files found by "grep \[#\]_" and all of them had the footnote body close to the reference.
The placement of the footnote text in the generated output is up to
the stylesheet / renderer, of course.
We certainly have no established convention in this area as far as I know, and I'm not convinced we need one.
Bagas, could I ask you please to focus a bit more on doing useful work and less on telling others how they should be working?
Thanks,
jon
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 5 Sep 2022 14:55:57 +0100 you wrote:
From: Edward Cree <[email protected]>
There's no clear explanation of what VF Representors are for, their
semantics, etc., outside of vendor docs and random conference slides.
Add a document explaining Representors and defining what drivers that
implement them are expected to do.[...]
Here is the summary with links:
- [v3,net-next] docs: net: add an explanation of VF (and other) Representors
https://git.kernel.org/netdev/net-next/c/6fb4825e492b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html