On Tue, 9 Sep 2025 14:32:56 +1000 Wilfred Mallawa <wilfred.opensou...@gmail.com> wrote:
> From: Wilfred Mallawa <wilfred.mall...@wdc.com> > > This is to support uni-directional transports such as SPDM over Storage. > As specified by the DMTF DSP0286. > > Also update spdm_socket_rsp() to use the new send()/receive() functions. For > the case of spdm_socket_receive(), this allows us to do error checking > in one place with the addition of spdm_socket_command_valid(). > > Signed-off-by: Wilfred Mallawa <wilfred.mall...@wdc.com> One trivial comment below. Either way Reviewed-by: Jonathan Cameron <jonathan.came...@huawei.com> > +uint32_t spdm_socket_rsp(const int socket, uint32_t transport_type, > + void *req, uint32_t req_len, > + void *rsp, uint32_t rsp_len) > +{ > + bool result; > + > + result = spdm_socket_send(socket, SPDM_SOCKET_COMMAND_NORMAL, > + transport_type, req, req_len); > if (!result) { > return 0; > } > > - assert(command != 0); > - > + rsp_len = spdm_socket_receive(socket, transport_type, rsp, rsp_len); > return rsp_len; return spdm_socket_receive(socket, transport_type, rsp, rsp_len); Both shorter and avoids rsp_len changing meaning (slightly). > } >