Displaying 20 results from an estimated 40 matches for "virtio_d".
Did you mean:
virtio_id
2011 Jun 15
3
[PATCH] virtio-net: per cpu 64 bit stats
...et.c 2011-06-15 09:54:22.914426067 -0400
@@ -40,6 +40,15 @@ module_param(gso, bool, 0444);
#define VIRTNET_SEND_COMMAND_SG_MAX 2
+struct virtnet_stats {
+ struct u64_stats_sync syncp;
+ u64 tx_bytes;
+ u64 tx_packets;
+
+ u64 rx_bytes;
+ u64 rx_packets;
+};
+
struct virtnet_info {
struct virtio_device *vdev;
struct virtqueue *rvq, *svq, *cvq;
@@ -56,6 +65,9 @@ struct virtnet_info {
/* Host will merge rx buffers for big packets (shake it! shake it!) */
bool mergeable_rx_bufs;
+ /* Active statistics */
+ struct virtnet_stats __percpu *stats;
+
/* Work struct for refilling if we run...
2011 Jun 15
3
[PATCH] virtio-net: per cpu 64 bit stats
...et.c 2011-06-15 09:54:22.914426067 -0400
@@ -40,6 +40,15 @@ module_param(gso, bool, 0444);
#define VIRTNET_SEND_COMMAND_SG_MAX 2
+struct virtnet_stats {
+ struct u64_stats_sync syncp;
+ u64 tx_bytes;
+ u64 tx_packets;
+
+ u64 rx_bytes;
+ u64 rx_packets;
+};
+
struct virtnet_info {
struct virtio_device *vdev;
struct virtqueue *rvq, *svq, *cvq;
@@ -56,6 +65,9 @@ struct virtnet_info {
/* Host will merge rx buffers for big packets (shake it! shake it!) */
bool mergeable_rx_bufs;
+ /* Active statistics */
+ struct virtnet_stats __percpu *stats;
+
/* Work struct for refilling if we run...
2008 Feb 11
1
[PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code
...t/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: kvm/drivers/net/virtio_net.c
===================================================================
--- kvm.orig/drivers/net/virtio_net.c
+++ kvm/drivers/net/virtio_net.c
@@ -361,6 +361,7 @@ static int virtnet_probe(struct virtio_d
netif_napi_add(dev, &vi->napi, virtnet_poll, napi_weight);
vi->dev = dev;
vi->vdev = vdev;
+ vdev->priv = vi;
/* We expect two virtqueues, receive then send. */
vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done);
@@ -395,7 +396,6 @@ static int virtnet_probe...
2008 Feb 11
1
[PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code
...t/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: kvm/drivers/net/virtio_net.c
===================================================================
--- kvm.orig/drivers/net/virtio_net.c
+++ kvm/drivers/net/virtio_net.c
@@ -361,6 +361,7 @@ static int virtnet_probe(struct virtio_d
netif_napi_add(dev, &vi->napi, virtnet_poll, napi_weight);
vi->dev = dev;
vi->vdev = vdev;
+ vdev->priv = vi;
/* We expect two virtqueues, receive then send. */
vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done);
@@ -395,7 +396,6 @@ static int virtnet_probe...
2008 Jan 31
4
[PATCH] virtio_blk: Dont waste major numbers
...SG (3+MAX_PHYS_SEGMENTS)
+#define PART_BITS 4
MODULE_LICENSE("GPL");
static unsigned char virtblk_index = 'a';
+static int major, minor;
+
struct virtio_blk
{
spinlock_t lock;
@@ -173,10 +176,13 @@ static struct block_device_operations vi
static int virtblk_probe(struct virtio_device *vdev)
{
struct virtio_blk *vblk;
- int err, major;
+ int err;
u64 cap;
u32 v;
+ if (minor >= 1 << MINORBITS)
+ return -ENOSPC;
+
vdev->priv = vblk = kmalloc(sizeof(*vblk), GFP_KERNEL);
if (!vblk) {
err = -ENOMEM;
@@ -200,17 +206,11 @@ static int virtblk_probe(stru...
2008 Jan 31
4
[PATCH] virtio_blk: Dont waste major numbers
...SG (3+MAX_PHYS_SEGMENTS)
+#define PART_BITS 4
MODULE_LICENSE("GPL");
static unsigned char virtblk_index = 'a';
+static int major, minor;
+
struct virtio_blk
{
spinlock_t lock;
@@ -173,10 +176,13 @@ static struct block_device_operations vi
static int virtblk_probe(struct virtio_device *vdev)
{
struct virtio_blk *vblk;
- int err, major;
+ int err;
u64 cap;
u32 v;
+ if (minor >= 1 << MINORBITS)
+ return -ENOSPC;
+
vdev->priv = vblk = kmalloc(sizeof(*vblk), GFP_KERNEL);
if (!vblk) {
err = -ENOMEM;
@@ -200,17 +206,11 @@ static int virtblk_probe(stru...
2008 May 27
1
[PATCH/RFC] virtio_blk: check for hardsector size from host
...lk.h | 3 +++
2 files changed, 12 insertions(+), 1 deletion(-)
Index: kvm/drivers/block/virtio_blk.c
===================================================================
--- kvm.orig/drivers/block/virtio_blk.c
+++ kvm/drivers/block/virtio_blk.c
@@ -196,6 +196,7 @@ static int virtblk_probe(struct virtio_d
int err;
u64 cap;
u32 v;
+ u64 blk_size;
if (index_to_minor(index) >= 1 << MINORBITS)
return -ENOSPC;
@@ -290,6 +291,13 @@ static int virtblk_probe(struct virtio_d
if (!err)
blk_queue_max_hw_segments(vblk->disk->queue, v);
+ /* Host can optionally specify the bloc...
2008 May 27
1
[PATCH/RFC] virtio_blk: check for hardsector size from host
...lk.h | 3 +++
2 files changed, 12 insertions(+), 1 deletion(-)
Index: kvm/drivers/block/virtio_blk.c
===================================================================
--- kvm.orig/drivers/block/virtio_blk.c
+++ kvm/drivers/block/virtio_blk.c
@@ -196,6 +196,7 @@ static int virtblk_probe(struct virtio_d
int err;
u64 cap;
u32 v;
+ u64 blk_size;
if (index_to_minor(index) >= 1 << MINORBITS)
return -ENOSPC;
@@ -290,6 +291,13 @@ static int virtblk_probe(struct virtio_d
if (!err)
blk_queue_max_hw_segments(vblk->disk->queue, v);
+ /* Host can optionally specify the bloc...
2008 Jun 08
2
[PATCH 1/4] virtio_net: Fix skb->csum_start computation
From: Mark McLoughlin <markmc at redhat.com>
hdr->csum_start is the offset from the start of the ethernet
header to the transport layer checksum field. skb->csum_start
is the offset from skb->head.
skb_partial_csum_set() assumes that skb->data points to the
ethernet header - i.e. it computes skb->csum_start by adding
the headroom to hdr->csum_start.
Since
2009 May 29
1
[PATCH 3/4] virtio_net: don't free buffers in xmit ring
...)data;
-
- netif_tx_lock_bh(vi->dev);
- free_old_xmit_skbs(vi);
- netif_tx_unlock_bh(vi->dev);
+ return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb);
}
static int start_xmit(struct sk_buff *skb, struct net_device *dev)
@@ -869,10 +830,6 @@ static int virtnet_probe(struct virtio_d
vdev->priv = vi;
vi->pages = NULL;
- /* If they give us a callback when all buffers are done, we don't need
- * the timer. */
- vi->free_in_tasklet = virtio_has_feature(vdev,VIRTIO_F_NOTIFY_ON_EMPTY);
-
/* If we can receive ANY GSO packets, we must allocate large ones. */
if...
2009 May 29
1
[PATCH 3/4] virtio_net: don't free buffers in xmit ring
...)data;
-
- netif_tx_lock_bh(vi->dev);
- free_old_xmit_skbs(vi);
- netif_tx_unlock_bh(vi->dev);
+ return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb);
}
static int start_xmit(struct sk_buff *skb, struct net_device *dev)
@@ -869,10 +830,6 @@ static int virtnet_probe(struct virtio_d
vdev->priv = vi;
vi->pages = NULL;
- /* If they give us a callback when all buffers are done, we don't need
- * the timer. */
- vi->free_in_tasklet = virtio_has_feature(vdev,VIRTIO_F_NOTIFY_ON_EMPTY);
-
/* If we can receive ANY GSO packets, we must allocate large ones. */
if...
2012 Apr 04
2
question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)
...{
> struct virtnet_info *vi = netdev_priv(dev);
>
> + /* Make sure refill_work doesn't re-enable napi! */
> + cancel_delayed_work_sync(&vi->refill);
> napi_disable(&vi->napi);
>
> return 0;
> @@ -1082,7 +1094,6 @@ static int virtnet_probe(struct virtio_d
>
> unregister:
> unregister_netdev(dev);
> - cancel_delayed_work_sync(&vi->refill);
> free_vqs:
> vdev->config->del_vqs(vdev);
> free_stats:
> @@ -1121,9 +1132,7 @@ static void __devexit virtnet_remove(str
> /* Stop all the virtqueues. */
> v...
2012 Apr 04
2
question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)
...{
> struct virtnet_info *vi = netdev_priv(dev);
>
> + /* Make sure refill_work doesn't re-enable napi! */
> + cancel_delayed_work_sync(&vi->refill);
> napi_disable(&vi->napi);
>
> return 0;
> @@ -1082,7 +1094,6 @@ static int virtnet_probe(struct virtio_d
>
> unregister:
> unregister_netdev(dev);
> - cancel_delayed_work_sync(&vi->refill);
> free_vqs:
> vdev->config->del_vqs(vdev);
> free_stats:
> @@ -1121,9 +1132,7 @@ static void __devexit virtnet_remove(str
> /* Stop all the virtqueues. */
> v...
2008 Apr 28
3
[PATCH 1/4] virtio: wean net driver off NETDEV_TX_BUSY
Herbert tells me that returning NETDEV_TX_BUSY from hard_start_xmit is
seen as a poor thing to do; we should cache the packet and stop the queue.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
drivers/net/virtio_net.c | 58 ++++++++++++++++++++++++++++++++---------------
1 file changed, 40 insertions(+), 18 deletions(-)
diff -r 26ba2dd67f46 drivers/net/virtio_net.c
---
2008 Apr 28
3
[PATCH 1/4] virtio: wean net driver off NETDEV_TX_BUSY
Herbert tells me that returning NETDEV_TX_BUSY from hard_start_xmit is
seen as a poor thing to do; we should cache the packet and stop the queue.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
drivers/net/virtio_net.c | 58 ++++++++++++++++++++++++++++++++---------------
1 file changed, 40 insertions(+), 18 deletions(-)
diff -r 26ba2dd67f46 drivers/net/virtio_net.c
---
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
...e */
void *ioaddr;
+ /* the shared device configuration */
+ void *config;
+
+ /* the size of the shared device configuration */
+ u32 config_len;
+
/* a list of queues so we can dispatch IRQs */
spinlock_t lock;
struct list_head virtqueues;
@@ -111,47 +117,12 @@ static void vp_get(struct virtio_device *vdev, unsigned offset,
void *buf, unsigned len)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
-
- /* We translate appropriately sized get requests into more natural
- * IO operations. These functions also t...
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
...e */
void *ioaddr;
+ /* the shared device configuration */
+ void *config;
+
+ /* the size of the shared device configuration */
+ u32 config_len;
+
/* a list of queues so we can dispatch IRQs */
spinlock_t lock;
struct list_head virtqueues;
@@ -111,47 +117,12 @@ static void vp_get(struct virtio_device *vdev, unsigned offset,
void *buf, unsigned len)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
- void *ioaddr = vp_dev->ioaddr + VIRTIO_PCI_CONFIG + offset;
-
- /* We translate appropriately sized get requests into more natural
- * IO operations. These functions also t...
2008 May 26
7
[PATCH 1/3] virtio: fix virtio_net xmit of freed skb bug
If we fail to transmit a packet, we assume the queue is full and put
the skb into last_xmit_skb. However, if more space frees up before we
xmit it, we loop, and the result can be transmitting the same skb twice.
Fix is simple: set skb to NULL if we've used it in some way, and check
before sending.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
drivers/net/virtio_net.c |
2008 May 26
7
[PATCH 1/3] virtio: fix virtio_net xmit of freed skb bug
If we fail to transmit a packet, we assume the queue is full and put
the skb into last_xmit_skb. However, if more space frees up before we
xmit it, we loop, and the result can be transmitting the same skb twice.
Fix is simple: set skb to NULL if we've used it in some way, and check
before sending.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
drivers/net/virtio_net.c |
2008 Jan 23
2
[PATCH 1/2] reset support: make net driver alloc/cleanup in probe and remove
...ue(&vi->recv)) != NULL) {
- kfree_skb(skb);
- vi->num--;
- }
- vi->svq->vq_ops->shutdown(vi->svq);
- while ((skb = __skb_dequeue(&vi->send)) != NULL)
- kfree_skb(skb);
-
- BUG_ON(vi->num != 0);
return 0;
}
@@ -403,10 +384,22 @@ static int virtnet_probe(struct virtio_d
pr_debug("virtio_net: registering device failed\n");
goto free_send;
}
+
+ /* Last of all, set up some receive buffers. */
+ try_fill_recv(vi);
+
+ /* If we didn't even get one input buffer, we're useless. */
+ if (vi->num == 0) {
+ err = -ENOMEM;
+ goto unregister;
+...