Thread (14 messages) 14 messages, 4 authors, 2021-04-08

Re: [PATCH v2] docs: usbip: Fix major fields and descriptions in protocol

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-03-15 07:36:48
Also in: linux-usb, lkml

On Mon, Mar 15, 2021 at 02:18:49PM +0800, Hongren Zheng (Zenithal) wrote:
The old document for usbip protocol is misleading and hard to read:
  * Some fields in header are incorrect
  * Explanation of some fields are unclear or even wrong
  * Padding of header (namely all headers have the same length) is
    not explicitly point out, which is crucial for stream protocol like
    TCP

These fixes are made through reading usbip kernel drivers and userland
codes. Also I have implemented one usbip server.

Major changes:
  * Document the correct field as described in the codebase.
  * Document the padding in usbip headers. This is crucial for TCP
    stream hence these padding should be explicitly point out.
    In code these padding are implemented by a union of all headers.
  * Fix two FIXME related to usbip unlink and Document the behavior
    of unlink in different situation.
  * Clarify some field with more accurate explanation, like those
    fields associated with URB. Some constraints are extracted from
    code.
  * Delete specific transfer_flag doc in usbip as it should be
    documented by the URB part.
  * Add data captured from wire as example

Also some changes suggested by a previous patch in
https://lore.kernel.org/linux-usb/20180128071514.9107-1-alexandre.f.demers@gmail.com/ (local)
is adopted in this patch.

Co-developed-by: Alexandre Demers <redacted>
Signed-off-by: Hongren Zheng (Zenithal) <i@zenithal.me>
---
 Documentation/usb/usbip_protocol.rst | 290 +++++++++++++++------------
 1 file changed, 159 insertions(+), 131 deletions(-)
What changed from v1?  Always list that here below the --- line.
quoted hunk ↗ jump to hunk
diff --git a/Documentation/usb/usbip_protocol.rst b/Documentation/usb/usbip_protocol.rst
index 988c832166cd..a15d9c1254e2 100644
--- a/Documentation/usb/usbip_protocol.rst
+++ b/Documentation/usb/usbip_protocol.rst
@@ -5,8 +5,14 @@ USB/IP protocol
 PRELIMINARY DRAFT, MAY CONTAIN MISTAKES!
 28 Jun 2011
 
+Update: Fix major fields in protocol
+14 Mar 2021
This does not belong here, the git changelog shows this information.

The original date above can be removed as well if you want.  And if the
mistakes are all fixed now, that line can be dropped too :)

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help