lkml.org 
[lkml]   [2012]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [net-next rfc v7 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info
Date
Jason Wang <jasowang@redhat.com> writes:
> To support multiqueue transmitq/receiveq, the first step is to separate queue
> related structure from virtnet_info. This patch introduce send_queue and
> receive_queue structure and use the pointer to them as the parameter in
> functions handling sending/receiving.

OK, seems like a straightforward xform: a few nit-picks:

> +/* Internal representation of a receive virtqueue */
> +struct receive_queue {
> + /* Virtqueue associated with this receive_queue */
> + struct virtqueue *vq;
> +
> + struct napi_struct napi;
> +
> + /* Number of input buffers, and max we've ever had. */
> + unsigned int num, max;

Weird whitespace here.

> +
> + /* Work struct for refilling if we run low on memory. */
> + struct delayed_work refill;

I can't really see the justificaiton for a refill per queue. Just have
one work iterate all the queues if it happens, unless it happens often
(in which case, we need to look harder at this anyway).

> struct virtnet_info {
> struct virtio_device *vdev;
> - struct virtqueue *rvq, *svq, *cvq;
> + struct virtqueue *cvq;
> struct net_device *dev;
> struct napi_struct napi;

You leave napi here, and take it away in the next patch. I think it's
supposed to go away now.

Cheers,
Rusty.


\
 
 \ /
  Last update: 2012-12-03 04:21    [W:0.197 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site