Re: [RFC PATCH net-next v8 13/14] net: add devmem TCP documentation

Bagas Sanjaya
2024-05-03T13:14:06Z

[-- Attachment #1: Type: text/plain, Size: 1524 bytes --]

On Tue, Apr 02, 2024 at 05:20:50PM -0700, Mina Almasry wrote:
> +ncdevmem has a validation mode as well that expects a repeating pattern of
> +incoming data and validates it as such::
> +
> + # On server:
> + ncdevmem -s <server IP> -c <client IP> -f eth1 -d 3 -n 0000:06:00.0 -l \
> + -p 5201 -v 7
> +
> + # On client:
> + yes $(echo -e \\x01\\x02\\x03\\x04\\x05\\x06) | \
> + tr \\n \\0 | head -c 5G | nc <server IP> 5201 -p 5201

What about splitting server and client usage?

---- >8 ----
diff --git a/Documentation/networking/devmem.rst b/Documentation/networking/devmem.rst
index e4e978fbcdbd5f..f32acfd62075d2 100644
--- a/Documentation/networking/devmem.rst
+++ b/Documentation/networking/devmem.rst
@@ -245,12 +245,14 @@ To run ncdevmem, you need to run it on a server on the machine under test, and
you need to run netcat on a peer to provide the TX data.

ncdevmem has a validation mode as well that expects a repeating pattern of
-incoming data and validates it as such::
+incoming data and validates it as such. For example, you can launch
+ncdevmem on the server by::

- # On server:
ncdevmem -s <server IP> -c <client IP> -f eth1 -d 3 -n 0000:06:00.0 -l \
-p 5201 -v 7

- # On client:
+On client side, use regular netcat to send TX data to ncdevmem process
+on the server::
+
yes $(echo -e \\x01\\x02\\x03\\x04\\x05\\x06) | \
tr \\n \\0 | head -c 5G | nc <server IP> 5201 -p 5201

Thanks.

--
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]