[SLOF] [PATCH v2 08/19] virtio-net: simplify and cleanup driver
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Thu Jan 21 17:46:22 AEDT 2016
Thomas Huth <thuth at redhat.com> writes:
> On 20.01.2016 13:10, Nikunj A Dadhania wrote:
>> * Get rid of PCI virtio defines
>
> What do you mean with "PCI virtio defines"? I did not see anything
> related to PCI in this patch?
Moved to 04/19. Missed to remove the commit log here.
>
>> * Replace array of vq with two different vq_{tx,rx}
>> * Use virtio_fill_desc
>
> Not urgent, but in case you rework this anyway: You could also do these
> two steps in two patches to increase readability.
Sure.
>
>> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
>> ---
>> lib/libvirtio/virtio-net.c | 82 ++++++++++++++++++++--------------------------
>> 1 file changed, 35 insertions(+), 47 deletions(-)
>>
>> diff --git a/lib/libvirtio/virtio-net.c b/lib/libvirtio/virtio-net.c
>> index cafaa4b..672e631 100644
>> --- a/lib/libvirtio/virtio-net.c
>> +++ b/lib/libvirtio/virtio-net.c
>> @@ -38,7 +38,8 @@
>> #define sync() asm volatile (" sync \n" ::: "memory")
>>
>> struct virtio_device virtiodev;
>> -struct vqs vq[2]; /* Information about virtqueues */
>> +struct vqs vq_rx; /* Information about virtqueues */
>> +struct vqs vq_tx;
>
> I know, I know, I originally wrote that code (mea culpa!) ... but
> anyway, could you please make these variables at least "static"
> nowadays?
Sure, for now.
> Or even better, move them to a struct virtio_device
> dev->private field or so?
Let me do this in a separate series.
Regards
Nikunj
More information about the SLOF
mailing list