Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mctp-req generic #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Sep 14, 2023

  1. mctp-req: Add data argument in usage

    The usage description is missing the `data` argument, add it and an
    example of how it is used.
    
    Signed-off-by: Lei YU <[email protected]>
    leiyu-bytedance committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    4324538 View commit details
    Browse the repository at this point in the history
  2. mctp-req: Make it generic

    The mctp-req was acting like a echo client that sends and receive the
    same data.
    
    Change the code to make it a generic sender and receiver, so that user
    could use it to send all types of data and prints the received data.
    * Add a `type` argument to specify the mctp type, default to 1 (PLDM).
    * Remove the code that expects the same len and data for sent and
      received data.
    * Add print of the received data.
    
    Tested: Get UUID of an endpoint:
    
        $ mctp-req eid 9 type 0 data 80:03
        req:  sending to (net 1, eid 9), type 0, len 2
        req:  message from (net 1, eid 9) type 0 len 19
        data:
        0x00 0x03 0x00 0x7e 0x92 0x05 0xfc 0x01 0xc2 0xeb 0x11 0x80 0x00 0xb8
        0xce 0xf6 0xae 0xcd 0x16
    
    Signed-off-by: Lei YU <[email protected]>
    leiyu-bytedance committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    93f45c9 View commit details
    Browse the repository at this point in the history