-
Notifications
You must be signed in to change notification settings - Fork 22
mctp-client: add a generic mctp client #84
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
base: main
Are you sure you want to change the base?
Conversation
Looks great! Just a couple of minor things: Firstly: could you add a Signed-off-by line, to indicate an agreement to the DCO? Secondly: your usage text mentions:
But you're parsing with: tmp = strtoul(val, &endp, 0); - with the Not a huge issue, but I'd suggest we could make things more succinct with: tmp = strtoul(val, &endp, 16); and printing with printf("%02x", recv_buffer[ctr]); With the fixed two-char format (ie., from the |
no wait, I'm looking at the wrong parsing there. I see you have Still, want to make the output the same format (ie, without the 0x prefix?) |
ack to all, i'll follow up tomorrow u.s. time |
Adds a generic mctp client to use from the cli. Currently does not support extended addressing. Testing --- control commands ``` mctp-client type control eid 8 data 0x80 0x02 00 02 00 08 01 00 ``` corner case testing ``` mctp-client type control eid 10 data 0x80 0x02 mctp-client: sendto(2): No route to host mctp-client type control eid 8 data mctp-client: no data to send mctp-client type control eid data 0x80 0x02 usage: mctp-client [net <net>] eid <eid> type <type> data <data> net defaults to MCTP_NET_ANY, data is space delimited hexadecimal. data must be the last parameter possible types: control: control mctp messages per DSP0236 pldm: platform level data model per DSP0241 nc-si: NC-SI traffic over MCTP per DSP0261 ethernet: Ethernet traffic over MCTP per DSP0261 nvme: nvme over mctp per DSP0235 spdm: spdm over mctp per DSP0275 secured: secured messages using spdm over mctp per DSP0276 pci: vdm using a pci based vendor id per DSP0236 iana: vdm using an iana based vendor id per DSP0236 mctp-client type control eid data 0x80 0x02 usage: mctp-client [net <net>] eid <eid> type <type> data <data> net defaults to MCTP_NET_ANY, data is space delimited hexadecimal. data must be the last parameter possible types: control: control mctp messages per DSP0236 pldm: platform level data model per DSP0241 nc-si: NC-SI traffic over MCTP per DSP0261 ethernet: Ethernet traffic over MCTP per DSP0261 nvme: nvme over mctp per DSP0235 spdm: spdm over mctp per DSP0275 secured: secured messages using spdm over mctp per DSP0276 pci: vdm using a pci based vendor id per DSP0236 iana: vdm using an iana based vendor id per DSP0236 echo $? 1 mctp-client eid 8 data 0x80 0x02 usage: mctp-client [net <net>] eid <eid> type <type> data <data> net defaults to MCTP_NET_ANY, data is space delimited hexadecimal. data must be the last parameter possible types: control: control mctp messages per DSP0236 pldm: platform level data model per DSP0241 nc-si: NC-SI traffic over MCTP per DSP0261 ethernet: Ethernet traffic over MCTP per DSP0261 nvme: nvme over mctp per DSP0235 spdm: spdm over mctp per DSP0275 secured: secured messages using spdm over mctp per DSP0276 pci: vdm using a pci based vendor id per DSP0236 iana: vdm using an iana based vendor id per DSP0236 mctp-client type eid 8 data 0x80 0x02 mctp-client: invalid type: eid ``` Signed-off-by: Marc Olberding <[email protected]>
Looks great, thanks! |
Adds a generic mctp client to use from the cli. Currently does not support extended addressing.
Testing
control commands
corner case testing