[Top][All Lists]
[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?
- [Qemu-devel] [PATCH 0/7 V6] VMXNET3 paravirtual NIC device implementation, Dmitry Fleytman, 2012/04/17
- [Qemu-devel] [PATCH 1/7 V6] Adding missing flag VIRTIO_NET_HDR_F_DATA_VALID from Linux kernel source tree Reformatting comments according to checkpatch.pl requirements, Dmitry Fleytman, 2012/04/17
- [Qemu-devel] [PATCH 2/7 V6] Adding utility function net_checksum_add_cont() that allows checksum calculation of scattered data with odd chunk sizes, Dmitry Fleytman, 2012/04/17
- [Qemu-devel] [PATCH 4/7 V6] Header with various utility functions shared by VMWARE SCSI and network devices, Dmitry Fleytman, 2012/04/17
- [Qemu-devel] [PATCH 3/7 V6] Adding utility function iov_net_csum_add() for iovec checksum calculation Adding utility function iov_rebuild() for smart iovec copy, Dmitry Fleytman, 2012/04/17
- [Qemu-devel] [PATCH 5/7 V6] Various utility functions used by VMWARE network devices, Dmitry Fleytman, 2012/04/17
- Re: [Qemu-devel] [PATCH 5/7 V6] Various utility functions used by VMWARE network devices,
Michael S. Tsirkin <=
- [Qemu-devel] [PATCH 6/7 V6] Packet abstraction used by VMWARE network devices, Dmitry Fleytman, 2012/04/17
- [Qemu-devel] [PATCH 7/7 V6] VMXNET3 paravirtualized device implementation Device "vmxnet3" added., Dmitry Fleytman, 2012/04/17
- Re: [Qemu-devel] [PATCH 0/7 V6] VMXNET3 paravirtual NIC device implementation, Gerhard Wiesinger, 2012/04/18