qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/7 V6] Various utility functions used by VMWARE


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH 5/7 V6] Various utility functions used by VMWARE network devices
Date: Wed, 18 Apr 2012 03:22:07 +0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Apr 17, 2012 at 03:32:39PM +0300, Dmitry Fleytman wrote:
> diff --git a/hw/vmxnet_utils.h b/hw/vmxnet_utils.h
> new file mode 100644
> index 0000000..18d218d
> --- /dev/null
> +++ b/hw/vmxnet_utils.h
> @@ -0,0 +1,341 @@
> +/*
> + * QEMU VMWARE VMXNET* paravirtual NICs - network auxiliary code
> + *
> + * Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com)
> + *
> + * Developed by Daynix Computing LTD (http://www.daynix.com)
> + *
> + * Authors:
> + * Dmitry Fleytman <address@hidden>
> + * Tamir Shomer <address@hidden>
> + * Yan Vugenfirer <address@hidden>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
> + * See the COPYING file in the top-level directory.
> + *
> + */
> +
> +#ifndef _VMXNET_UTILS_H_
> +#define _VMXNET_UTILS_H_

Please do not start identifiers with _ followed by an uppercase
lattters.

> +
> +#include <sys/types.h>
> +#include <bswap.h>
> +#include <string.h>
> +#include <targphys.h>
> +#include <hw/virtio-net.h>
> +
> +struct eth_header {
> +    uint8_t  h_dest[ETH_ALEN];   /* destination eth addr */
> +    uint8_t  h_source[ETH_ALEN]; /* source ether addr    */
> +    uint16_t h_proto;            /* packet type ID field */
> +};
> +

And fix struct definitions to
1. follow qemu coding style
2. start with vmxnet

I also don't really understand why are these
functions split out - vmxnet is the only user, no?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]