From a81b2a3d65250830c4706c6e798632c855c6d1c6 Mon Sep 17 00:00:00 2001
From: Daniel Salzman <daniel.salzman@nic.cz>
Date: Tue, 13 Jun 2023 10:19:37 +0200
Subject: [PATCH] fixup! kxdpgun: update documentation

---
 doc/man/kxdpgun.8in | 17 +++++++++++++++++
 doc/man_kxdpgun.rst | 18 ++++++++++--------
 2 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/doc/man/kxdpgun.8in b/doc/man/kxdpgun.8in
index 04821d6d4c..1faa15fb50 100644
--- a/doc/man/kxdpgun.8in
+++ b/doc/man/kxdpgun.8in
@@ -102,6 +102,23 @@ Override auto\-detected remote MAC address.
 \fB\-v\fP, \fB\-\-vlan\fP \fIid\fP
 Add VLAN 802.1Q header with the given id. VLAN offloading should be disabled.
 .TP
+\fB\-m\fP, \fB\-\-mode\fP \fImode\fP
+Set the XDP mode. Supported values are:
+.INDENT 7.0
+.IP \(bu 2
+\fBauto\fP (default) – the XDP mode is selected automatically to achieve
+the best performance, which means that native driver support is preferred
+over the generic one, and zero\-copy is used if available.
+.IP \(bu 2
+\fBcopy\fP – the XDP socket copy mode is forced even if zero\-copy
+is available. This can resolve various driver issues, but at the cost
+of lower performance.
+.IP \(bu 2
+\fBgeneric\fP – the generic XDP implementation is forced even if native
+implementation is available. This mode doesn\(aqt require support from the
+driver nor hardware, but offers the worst performance.
+.UNINDENT
+.TP
 \fB\-h\fP, \fB\-\-help\fP
 Print the program help.
 .TP
diff --git a/doc/man_kxdpgun.rst b/doc/man_kxdpgun.rst
index a3eae78242..504d49533f 100644
--- a/doc/man_kxdpgun.rst
+++ b/doc/man_kxdpgun.rst
@@ -80,17 +80,19 @@ Options
   Add VLAN 802.1Q header with the given id. VLAN offloading should be disabled.
 
 **-m**, **--mode** *mode*
-  Set the XDP mode. Supported values are *auto* (default), *copy*, and *generic*.
+  Set the XDP mode. Supported values are:
 
-  When the mode is set to *auto*, kxdpgun uses native driver or hardware XDP
-  implementation. The zero-copy for packet data between kernel and user space is
-  also enabled if supported by the implementation.
+  - **auto** (default) – the XDP mode is selected automatically to achieve
+    the best performance, which means that native driver support is preferred
+    over the generic one, and zero-copy is used if available.
 
-  When the mode is set to *copy*, kxdpgun also uses native driver but disables
-  the zero-copy.
+  - **copy** – the XDP socket copy mode is forced even if zero-copy
+    is available. This can resolve various driver issues, but at the cost
+    of lower performance.
 
-  When the mode is set to *generic*, kxdpgun uses generic XDP implementation
-  which doesn't require support from the driver nor hardware.
+  - **generic** – the generic XDP implementation is forced even if native
+    implementation is available. This mode doesn't require support from the
+    driver nor hardware, but offers the worst performance.
 
 **-h**, **--help**
   Print the program help.
-- 
GitLab