qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] hw/net: add support for Allwinner EMAC Fast


From: Beniamino Galvani
Subject: Re: [Qemu-devel] [PATCH 1/2] hw/net: add support for Allwinner EMAC Fast Ethernet controller
Date: Fri, 3 Jan 2014 18:42:18 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jan 03, 2014 at 11:26:01AM +1000, Peter Crosthwaite wrote:
> >> > +static const VMStateDescription vmstate_tx_fifo = {
> >> > +    .name = "allwinner_emac_tx_fifo",
> >> > +    .version_id = 1,
> >> > +    .minimum_version_id = 1,
> >> > +    .fields = (VMStateField[]) {
> >> > +        VMSTATE_UINT32_ARRAY(data, AwEmacTxFifo, FIFO_SIZE >> 2),
> >> > +        VMSTATE_INT32(length, AwEmacTxFifo),
> >> > +        VMSTATE_INT32(offset, AwEmacTxFifo),
> >> > +        VMSTATE_END_OF_LIST()
> >> > +    }
> >> > +};
> >>
> >> This might warrant a dup of fifo8 as fifo32 if you want to clean this
> >> up. I think I have a patch handy that might help, will send tmrw.
> >> Check util/fifo8.c for fifo8 example.
> >
> > Yes, probably AwEmacTxFifo can be replaced with Fifo32.
> >

I need to obtain a pointer to the fifo backing buffer after the frame
has been copied completely in order to pass it to qemu_send_packet().
The generic fifo implementation doesn't allow that (unless I access
directly the structure member, but I suppose that the intent is to
treat the fifo object as opaque).

Maybe a function fifo_get_data() could be added to the generic
implementation? Otherwise I can go on using my custom implementation.

Beniamino



reply via email to

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