From: William Tu <witu@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: <jiri@nvidia.com>, <bodong@nvidia.com>, <kuba@kernel.org>,
<witu@nvidia.com>
Subject: [PATCH net-next] Documentation: Add documentation for eswitch attribute
Date: Fri, 8 Mar 2024 02:01:06 +0200 [thread overview]
Message-ID: <20240308000106.17605-1-witu@nvidia.com> (raw)
Provide devlink documentation for three eswitch attributes:
mode, inline-mode, and encap-mode.
Signed-off-by: William Tu <witu@nvidia.com>
---
.../devlink/devlink-eswitch-attr.rst | 58 +++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 Documentation/networking/devlink/devlink-eswitch-attr.rst
diff --git a/Documentation/networking/devlink/devlink-eswitch-attr.rst b/Documentation/networking/devlink/devlink-eswitch-attr.rst
new file mode 100644
index 000000000000..2405f19e1439
--- /dev/null
+++ b/Documentation/networking/devlink/devlink-eswitch-attr.rst
@@ -0,0 +1,58 @@
+.. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+
+=========================
+Devlink Eswitch Attribute
+=========================
+
+The ``devlink-eswitch-attribute`` allows setting/getting devlink eswitch
+device's attributes.
+
+
+Attributes Description
+======================
+
+The following is a list of eswitch attributes that users may use.
+
+.. list-table:: eswitch attributes
+ :widths: 8 5 45
+
+ * - Name
+ - Type
+ - Description
+ * - ``mode``
+ - enum
+ - The mode of the device. The mode can be one of the following:
+
+ * ``legacy`` Legacy SRIOV.
+ * ``switchdev`` SRIOV switchdev offloads.
+ * - ``inline-mode``
+ - enum
+ - Some HWs need the VF driver to put part of the packet
+ headers on the TX descriptor so the e-switch can do proper
+ matching and steering.
+
+ * ``none`` none.
+ * ``link`` L2 mode.
+ * ``network`` L3 mode.
+ * ``transport`` L4 mode.
+ * - ``encap-mode``
+ - enum
+ - The encapsulation mode of the device. The mode can be one of the following:
+
+ * ``none`` Disable encapsulation support.
+ * ``basic`` Enable encapsulation support.
+
+example usage
+-------------
+
+.. code:: shell
+
+ # enable switchdev mode
+ $ devlink dev eswitch set pci/0000:08:00.0 mode switchdev
+
+ # set inline-mode and encap-mode
+ $ devlink dev eswitch set pci/0000:08:00.0 inline-mode none encap-mode basic
+
+ # display devlink device eswitch attributes
+ $ devlink dev eswitch show pci/0000:08:00.0
+ pci/0000:08:00.0: mode switchdev inline-mode none encap-mode basic
--
2.38.1
next reply other threads:[~2024-03-08 0:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 0:01 William Tu [this message]
2024-03-09 4:14 ` [PATCH net-next] Documentation: Add documentation for eswitch attribute Jakub Kicinski
2024-03-10 15:10 ` William Tu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240308000106.17605-1-witu@nvidia.com \
--to=witu@nvidia.com \
--cc=bodong@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).