|
From: | Dmitry Fleytman |
Subject: | Re: [Qemu-devel] [PATCH v11 2/5] iovec checksum calculation fuction |
Date: | Sat, 2 Mar 2013 14:30:01 +0200 |
Am 25.02.2013 21:11, schrieb Dmitry Fleytman:
> Signed-off-by: Dmitry Fleytman <address@hidden>Eduardo has worked hard to resolve circular qemu-common.h dependencies!
> Signed-off-by: Yan Vugenfirer <address@hidden>
> ---
> include/net/checksum.h | 8 ++++++++
> net/checksum.c | 28 ++++++++++++++++++++++++++++
> 2 files changed, 36 insertions(+)
>
> diff --git a/include/net/checksum.h b/include/net/checksum.h
> index 3e7b93d..b1cf18a 100644
> --- a/include/net/checksum.h
> +++ b/include/net/checksum.h
> @@ -19,6 +19,7 @@
> #define QEMU_NET_CHECKSUM_H
>
> #include <stdint.h>
> +#include "qemu-common.h"
Are you sure you are not reintroducing one here? What do you actually
need out of it? You already have stdint.h for uint32_t, and struct iovec
is used as pointer so you shouldn't need its internals from
qemu-common.h here and can include it from checksum.c instead.
* net_checksum_add_iov:
>
> uint32_t net_checksum_add_cont(int len, uint8_t *buf, int seq);
> uint16_t net_checksum_finish(uint32_t sum);
> @@ -38,4 +39,11 @@ net_raw_checksum(uint8_t *data, int length)
> return net_checksum_finish(net_checksum_add(length, data));
> }
>
> +/**
* @iov: ...
* @iov_cnt: ...
* @iov_off: ...
* @size: ...
*[snip]
> + * Checksum calculation for scatter-gather vector
> + */
> +uint32_t net_checksum_add_iov(const struct iovec *iov,
> + const unsigned int iov_cnt,
> + uint32_t iov_off, uint32_t size);
> +
> #endif /* QEMU_NET_CHECKSUM_H */
The subject is also improvable: "net: ", an appropriate verb and a typo.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
[Prev in Thread] | Current Thread | [Next in Thread] |