[ovs-dev] [tests+nxm-ofctl 30/42] queue: Get rid of ovs_queue data structure.

Justin Pettit jpettit at nicira.com
Sun Dec 5 00:32:10 UTC 2010


On Nov 23, 2010, at 2:44 PM, Ben Pfaff wrote:

> @@ -1137,7 +1139,7 @@ dp_netdev_output_control(struct dp_netdev *dp, const struct ofpbuf *packet,
>     header->port = port_no;
>     header->arg = arg;
>     ofpbuf_put(msg, packet->data, packet->size);
> -    queue_push_tail(q, msg);
> +    list_push_back(&dp->queues[queue_no], &msg->list_node);

Did you want to increment "dp->queue_len[queue_no]"?

> static struct ofpbuf *
> +dequeue_packet(struct pinsched *ps, struct pinqueue *q, unsigned int port_no)
> {
> +    struct ofpbuf *packet = ofpbuf_from_list(list_pop_front(&q->packets));
> +    list_remove(&packet->list_node);

Isn't this list_remove() unnecessary due to the list_pop_front()?

Otherwise, looks good.

--Justin






More information about the dev mailing list