[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V7 5/6] Adding packet abstraction for VMWARE net
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH V7 5/6] Adding packet abstraction for VMWARE network devices |
Date: |
Fri, 30 Nov 2012 17:23:21 +0100 |
On Fri, Nov 16, 2012 at 2:55 PM, Dmitry Fleytman <address@hidden> wrote:
> +/*=============================================================================
> +
> *=============================================================================
> + *
> + * TX CODE
> + *
> +
> *=============================================================================
> +
> *===========================================================================*/
Is this huge comment box a sign that the code should be split into a
foo_tx.c and an foo_rx.c file?
> +size_t vmxnet_tx_pkt_send(VmxnetTxPktH pkt, NetClientState *vc)
'vc' is an old name that was used for VLANClientState. The struct has
since been renamed to NetClientState and the rest of QEMU uses 'nc'
instead of 'vc'.
> +/* tx module context handle */
> +typedef void *VmxnetTxPktH;
Forward-declaring the struct is nicer:
typedef struct VmxnetTxPkt VmxnetTxPkt;
The definition of VmxnetTxPkt is still hidden from the caller but you
avoid the void* and casting. In vmxnet_pkt.c define using:
struct VmxnetTxPkt {
...
};
> diff --git a/hw/vmxnet_utils.c b/hw/vmxnet_utils.c
> index 9ba045f..56fda9f 100644
> --- a/hw/vmxnet_utils.c
> +++ b/hw/vmxnet_utils.c
> @@ -6,9 +6,9 @@
> * Developed by Daynix Computing LTD (http://www.daynix.com)
> *
> * Authors:
> - * Dmitry Fleytman <address@hidden>
> - * Tamir Shomer <address@hidden>
> - * Yan Vugenfirer <address@hidden>
> + * 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.
Please squash these fixes into the previous patch.
> diff --git a/hw/vmxnet_utils.h b/hw/vmxnet_utils.h
> index 7fd9a01..fac3b7b 100644
> --- a/hw/vmxnet_utils.h
> +++ b/hw/vmxnet_utils.h
Please squash these fixes into the previous patch.
- [Qemu-devel] [PATCH V7 0/6] VMXNET3 paravirtual NIC device implementation, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 1/6] Adding utility function net_checksum_add_cont() that allows checksum calculation of scattered data with odd chunk sizes, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 2/6] Adding utility function iov_net_csum_add() for iovec checksum calculation Adding utility function iov_rebuild() for smart iovec copy, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 3/6] Adding common definitions for VMWARE devices, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 4/6] Adding common code for VMWARE network devices, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 5/6] Adding packet abstraction for VMWARE network devices, Dmitry Fleytman, 2012/11/16
- Re: [Qemu-devel] [PATCH V7 5/6] Adding packet abstraction for VMWARE network devices,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH V7 6/6] Adding VMXNET3 device implementation, Dmitry Fleytman, 2012/11/16
- Re: [Qemu-devel] [PATCH V7 0/6] VMXNET3 paravirtual NIC device implementation, Stefan Hajnoczi, 2012/11/21
- Re: [Qemu-devel] [PATCH V7 0/6] VMXNET3 paravirtual NIC device implementation, Stefan Hajnoczi, 2012/11/29