Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97620
b: refs/heads/master
c: e48d6d9
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed May 30, 2008
1 parent 51f8453 commit 1a1db23
Show file tree
Hide file tree
Showing 228 changed files with 2,599 additions and 4,762 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ded383569d6316d68d2aed298f8eb8d7bca37af
refs/heads/master: e48d6d97bb6bd8c008045ea0522ea8278fdccc55
12 changes: 2 additions & 10 deletions trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ struct virtqueue

/* The routine to call when the Guest pings us. */
void (*handle_output)(int fd, struct virtqueue *me);

/* Outstanding buffers */
unsigned int inflight;
};

/* Remember the arguments to the program so we can "reboot" */
Expand Down Expand Up @@ -705,7 +702,6 @@ static unsigned get_vq_desc(struct virtqueue *vq,
errx(1, "Looped descriptor");
} while ((i = next_desc(vq, i)) != vq->vring.num);

vq->inflight++;
return head;
}

Expand All @@ -723,17 +719,15 @@ static void add_used(struct virtqueue *vq, unsigned int head, int len)
/* Make sure buffer is written before we update index. */
wmb();
vq->vring.used->idx++;
vq->inflight--;
}

/* This actually sends the interrupt for this virtqueue */
static void trigger_irq(int fd, struct virtqueue *vq)
{
unsigned long buf[] = { LHREQ_IRQ, vq->config.irq };

/* If they don't want an interrupt, don't send one, unless empty. */
if ((vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)
&& vq->inflight)
/* If they don't want an interrupt, don't send one. */
if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)
return;

/* Send the Guest an interrupt tell them we used something up. */
Expand Down Expand Up @@ -1113,7 +1107,6 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
vq->next = NULL;
vq->last_avail_idx = 0;
vq->dev = dev;
vq->inflight = 0;

/* Initialize the configuration. */
vq->config.num = num_descs;
Expand Down Expand Up @@ -1375,7 +1368,6 @@ static void setup_tun_net(const char *arg)

/* Tell Guest what MAC address to use. */
add_feature(dev, VIRTIO_NET_F_MAC);
add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
set_config(dev, sizeof(conf), &conf);

/* We don't need the socket any more; setup is done. */
Expand Down
Loading

0 comments on commit 1a1db23

Please sign in to comment.