Skip to content

rpmsg_virtio_send_offchannel_nocopy does not return error when RPMSG_ASSERT fails #342

Open
@tammyleino

Description

@tammyleino

This routine ultimately returns the number of bytes transmitted to a calling API.

The following fail cases do not propagate a failure back up the call stack and therefore the caller will think the data has been transmitted:

	status = metal_io_block_write(io, metal_io_virt_to_offset(io, hdr),
				      &rp_hdr, sizeof(rp_hdr));
	RPMSG_ASSERT(status == sizeof(rp_hdr), "failed to write header\r\n");

. . .

	/* Enqueue buffer on virtqueue. */
	status = rpmsg_virtio_enqueue_buffer(rvdev, hdr, buff_len, idx);
	RPMSG_ASSERT(status == VQUEUE_SUCCESS, "failed to enqueue buffer\r\n");

We could either propagate the error code back up the call stack, return a generic error indicating tx failure or return 0 indicating no data was transmitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions