[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 09/15] argo: implement the sendv op; evtchn: expose send_guest_global_virq
>>> On 31.01.19 at 17:35, <roger.pau@xxxxxxxxxx> wrote: > On Wed, Jan 30, 2019 at 08:28:14PM -0800, Christopher Clark wrote: >> +static int >> +ringbuf_insert(const struct domain *d, struct argo_ring_info *ring_info, >> + const struct argo_ring_id *src_id, xen_argo_iov_t *iovs, >> + unsigned int niov, uint32_t message_type, >> + unsigned long *out_len) >> +{ >> + xen_argo_ring_t ring; >> + struct xen_argo_ring_message_header mh = { }; >> + int sp, ret; >> + unsigned int len = 0; >> + xen_argo_iov_t *piov; >> + XEN_GUEST_HANDLE(uint8) NULL_hnd = { }; >> + >> + ASSERT(LOCKING_L3(d, ring_info)); >> + >> + /* >> + * Obtain the total size of data to transmit -- sets the 'len' variable >> + * -- and sanity check that the iovs conform to size and number limits. >> + * Enforced below: no more than 'len' bytes of guest data >> + * (plus the message header) will be sent in this operation. >> + */ >> + ret = iov_count(iovs, niov, &len); >> + if ( ret ) >> + return ret; >> + >> + /* >> + * Upper bound check the message len against the ring size. >> + * The message must not fill the ring; there must be at least one slot >> + * remaining so we can distinguish a full ring from an empty one. >> + * iov_count has already verified: len <= MAX_ARGO_MESSAGE_SIZE. >> + */ >> + if ( (ROUNDUP_MESSAGE(len) + sizeof(struct >> xen_argo_ring_message_header)) > missing space > ^ >> + >= ring_info->len ) > > Align of >= also looks weird, should be aligned to the parenthesis > before ROUNDUP_. Well, to be precise the >= belongs at the end of the previous line, so perhaps the line wrapping wants to be changed altogether. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |