On Mon, Mar 18, 2013 at 08:04:45PM +1030, Rusty Russell wrote: > We never add buffers with input and output parts, so use the new accessors. > > Cc: "Michael S. Tsirkin" <mst@xxxxxxxxxx> > Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Reviewed-by: Asias He <asias@xxxxxxxxxx> > --- > drivers/net/virtio_net.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index f19865a..38c01d9 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -443,7 +443,7 @@ static int add_recvbuf_small(struct receive_queue *rq, gfp_t gfp) > > skb_to_sgvec(skb, rq->sg + 1, 0, skb->len); > > - err = virtqueue_add_buf(rq->vq, rq->sg, 0, 2, skb, gfp); > + err = virtqueue_add_inbuf(rq->vq, rq->sg, 2, skb, gfp); > if (err < 0) > dev_kfree_skb(skb); > > @@ -488,8 +488,8 @@ static int add_recvbuf_big(struct receive_queue *rq, gfp_t gfp) > > /* chain first in list head */ > first->private = (unsigned long)list; > - err = virtqueue_add_buf(rq->vq, rq->sg, 0, MAX_SKB_FRAGS + 2, > - first, gfp); > + err = virtqueue_add_inbuf(rq->vq, rq->sg, MAX_SKB_FRAGS + 2, > + first, gfp); > if (err < 0) > give_pages(rq, first); > > @@ -507,7 +507,7 @@ static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) > > sg_init_one(rq->sg, page_address(page), PAGE_SIZE); > > - err = virtqueue_add_buf(rq->vq, rq->sg, 0, 1, page, gfp); > + err = virtqueue_add_inbuf(rq->vq, rq->sg, 1, page, gfp); > if (err < 0) > give_pages(rq, page); > > @@ -710,8 +710,7 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) > sg_set_buf(sq->sg, &hdr->hdr, sizeof hdr->hdr); > > num_sg = skb_to_sgvec(skb, sq->sg + 1, 0, skb->len) + 1; > - return virtqueue_add_buf(sq->vq, sq->sg, num_sg, > - 0, skb, GFP_ATOMIC); > + return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, GFP_ATOMIC); > } > > static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) > -- > 1.7.10.4 > > _______________________________________________ > Virtualization mailing list > Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx > https://lists.linuxfoundation.org/mailman/listinfo/virtualization -- Asias _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization