Displaying 20 results from an estimated 72 matches for "send_buf".
2010 Oct 19
1
[PATCH] virtio: console: Don't block entire guest if host doesn't read data
...console.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index c810481..0f69c5e 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -459,9 +459,12 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
/*
* Wait till the host acknowledges it pushed out the data we
- * sent. This is done for ports in blocking mode or for data
- * from the hvc_console; the tty operations are performed with
- * spinlocks held so we can't sleep here.
+...
2010 Oct 19
1
[PATCH] virtio: console: Don't block entire guest if host doesn't read data
...console.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index c810481..0f69c5e 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -459,9 +459,12 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
/*
* Wait till the host acknowledges it pushed out the data we
- * sent. This is done for ports in blocking mode or for data
- * from the hvc_console; the tty operations are performed with
- * spinlocks held so we can't sleep here.
+...
2011 May 25
0
[PATCH 1/1] staging: hv: remove netvsc send buffer and related functions
...perv_net.h b/drivers/staging/hv/hyperv_net.h
index cf762bd..27f987b 100644
--- a/drivers/staging/hv/hyperv_net.h
+++ b/drivers/staging/hv/hyperv_net.h
@@ -355,10 +355,6 @@ struct nvsp_message {
/* #define NVSC_MIN_PROTOCOL_VERSION 1 */
/* #define NVSC_MAX_PROTOCOL_VERSION 1 */
-#define NETVSC_SEND_BUFFER_SIZE (64*1024) /* 64K */
-#define NETVSC_SEND_BUFFER_ID 0xface
-
-
#define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024) /* 1MB */
#define NETVSC_RECEIVE_BUFFER_ID 0xcafe
@@ -383,12 +379,6 @@ struct netvsc_device {
struct list_head recv_pkt_list;
spinlock_t recv_pkt_list_lock;
- /* Send...
2011 May 25
0
[PATCH 1/1] staging: hv: remove netvsc send buffer and related functions
...perv_net.h b/drivers/staging/hv/hyperv_net.h
index cf762bd..27f987b 100644
--- a/drivers/staging/hv/hyperv_net.h
+++ b/drivers/staging/hv/hyperv_net.h
@@ -355,10 +355,6 @@ struct nvsp_message {
/* #define NVSC_MIN_PROTOCOL_VERSION 1 */
/* #define NVSC_MAX_PROTOCOL_VERSION 1 */
-#define NETVSC_SEND_BUFFER_SIZE (64*1024) /* 64K */
-#define NETVSC_SEND_BUFFER_ID 0xface
-
-
#define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024) /* 1MB */
#define NETVSC_RECEIVE_BUFFER_ID 0xcafe
@@ -383,12 +379,6 @@ struct netvsc_device {
struct list_head recv_pkt_list;
spinlock_t recv_pkt_list_lock;
- /* Send...
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
Hey Rusty,
These updated patches in the series return -EFAULT on copy_xx_user
errors and also move the copy_from_user into fops_write() instead of it
being in send_buf. This enables send_buf to just read from kernel
buffers, making it simpler.
This also allows write()s to write more to the host in one go,
removingthe 4k limitation. I do limit the writes to 32k at once to not
put too much pressure on the GFP_KERNEL area.
Both of these were pointed out by Marcelo...
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
Hey Rusty,
These updated patches in the series return -EFAULT on copy_xx_user
errors and also move the copy_from_user into fops_write() instead of it
being in send_buf. This enables send_buf to just read from kernel
buffers, making it simpler.
This also allows write()s to write more to the host in one go,
removingthe 4k limitation. I do limit the writes to 32k at once to not
put too much pressure on the GFP_KERNEL area.
Both of these were pointed out by Marcelo...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...@ static void reclaim_consumed_buffers(struct port *port)
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
- kfree(buf);
+ if (is_console_port(port))
+ kfree(buf);
+ else
+ free_buf(buf);
port->outvq_full = false;
}
}
@@ -498,6 +598,7 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
ssize_t ret;
unsigned long flags;
unsigned int len;
+ struct port_buffer *buf = in_buf;
out_vq = port->out_vq;
@@ -505,8 +606,11 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
reclaim_consumed_buffers...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...@ static void reclaim_consumed_buffers(struct port *port)
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
- kfree(buf);
+ if (is_console_port(port))
+ kfree(buf);
+ else
+ free_buf(buf);
port->outvq_full = false;
}
}
@@ -498,6 +598,7 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
ssize_t ret;
unsigned long flags;
unsigned int len;
+ struct port_buffer *buf = in_buf;
out_vq = port->out_vq;
@@ -505,8 +606,11 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
reclaim_consumed_buffers...
2011 Feb 11
1
[PATCH 1/3]: Staging: hv: Use native page allocation/free functions
...t;recv_buf_size >> PAGE_SHIFT);
+ (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
+ get_order(net_device->recv_buf_size));
if (!net_device->recv_buf) {
DPRINT_ERR(NETVSC,
"unable to allocate receive buffer of size %d",
@@ -360,7 +361,8 @@ static int netvsc_init_send_buf(struct hv_device *device)
/* ASSERT((netDevice->SendBufferSize & (PAGE_SIZE - 1)) == 0); */
net_device->send_buf =
- osd_page_alloc(net_device->send_buf_size >> PAGE_SHIFT);
+ (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
+ get_order(net_device->send_buf_size));...
2011 Feb 11
1
[PATCH 1/3]: Staging: hv: Use native page allocation/free functions
...t;recv_buf_size >> PAGE_SHIFT);
+ (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
+ get_order(net_device->recv_buf_size));
if (!net_device->recv_buf) {
DPRINT_ERR(NETVSC,
"unable to allocate receive buffer of size %d",
@@ -360,7 +361,8 @@ static int netvsc_init_send_buf(struct hv_device *device)
/* ASSERT((netDevice->SendBufferSize & (PAGE_SIZE - 1)) == 0); */
net_device->send_buf =
- osd_page_alloc(net_device->send_buf_size >> PAGE_SHIFT);
+ (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
+ get_order(net_device->send_buf_size));...
2010 Oct 20
0
virtio: console: Don't block entire guest if host doesn't read data
..._console.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index c810481..0f69c5e 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -459,9 +459,12 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
/*
* Wait till the host acknowledges it pushed out the data we
- * sent. This is done for ports in blocking mode or for data
- * from the hvc_console; the tty operations are performed with
- * spinlocks held so we can't sleep here.
+...
2010 Oct 20
0
virtio: console: Don't block entire guest if host doesn't read data
..._console.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index c810481..0f69c5e 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -459,9 +459,12 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
/*
* Wait till the host acknowledges it pushed out the data we
- * sent. This is done for ports in blocking mode or for data
- * from the hvc_console; the tty operations are performed with
- * spinlocks held so we can't sleep here.
+...
2009 Nov 05
0
[PATCH] Add VirtIO Frame Buffer Support
...d));
> + struct {
> + u64 offset;
> + u64 count;
> + } write __attribute__ ((packed));
> + u8 pad[23];
> + };
> +
> + union {
> + /* We remember the data pointer so we we can easily free
> + everything later by only knowing this structure */
> + char *send_buf;
I thought this structure is passed between guest and host?
If so you do not want to stick your pointers there,
add_buf has data pointer for this reason.
> + u64 _pad;
This might create problems with 32 bit userspace on 64 bit kernels:
which bits does the pointer get packed into depends on...
2009 Nov 05
0
[PATCH] Add VirtIO Frame Buffer Support
...d));
> + struct {
> + u64 offset;
> + u64 count;
> + } write __attribute__ ((packed));
> + u8 pad[23];
> + };
> +
> + union {
> + /* We remember the data pointer so we we can easily free
> + everything later by only knowing this structure */
> + char *send_buf;
I thought this structure is passed between guest and host?
If so you do not want to stick your pointers there,
add_buf has data pointer for this reason.
> + u64 _pad;
This might create problems with 32 bit userspace on 64 bit kernels:
which bits does the pointer get packed into depends on...
2012 Sep 25
5
[PATCHv6 0/3] virtio_console: Add rproc_serial device
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
I thought rebasing rproc_serial to linux-next was going to be trivial.
But when starting the merge I realized that I had to refactor the
the patches from Masami Hiramatsu. The splice support has the same issue
as I faced, with different type of buffers in the out_vq.
So I ended up refactoring the splice functionality. The code
size
2012 Sep 25
5
[PATCHv6 0/3] virtio_console: Add rproc_serial device
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
I thought rebasing rproc_serial to linux-next was going to be trivial.
But when starting the merge I realized that I had to refactor the
the patches from Masami Hiramatsu. The splice support has the same issue
as I faced, with different type of buffers in the out_vq.
So I ended up refactoring the splice functionality. The code
size
2010 Mar 30
1
[PATCH 3/4] virtio: console makes incorrect assumption about virtio API
...dhat.com>
---
drivers/char/virtio_console.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -415,20 +415,16 @@ static ssize_t send_buf(struct port *por
out_vq->vq_ops->kick(out_vq);
if (ret < 0) {
- len = 0;
+ in_count = 0;
goto fail;
}
- /*
- * Wait till the host acknowledges it pushed out the data we
- * sent. Also ensure we return to userspace the number of
- * bytes that were successfully consumed by...
2010 Mar 30
1
[PATCH 3/4] virtio: console makes incorrect assumption about virtio API
...dhat.com>
---
drivers/char/virtio_console.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -415,20 +415,16 @@ static ssize_t send_buf(struct port *por
out_vq->vq_ops->kick(out_vq);
if (ret < 0) {
- len = 0;
+ in_count = 0;
goto fail;
}
- /*
- * Wait till the host acknowledges it pushed out the data we
- * sent. Also ensure we return to userspace the number of
- * bytes that were successfully consumed by...
2011 Apr 21
8
[PATCH 0/8] staging: hv: clean up forward declarations and camel cases in netvsc.c
...declaration
staging: hv: move netvsc_receive_completion() to clean up forward
declaration
staging: hv: move netvsc_send_recv_completion() to clean up forward
declaration
staging: hv: move netvsc_destroy_recv_buf() to clean up forward
declaration
staging: hv: move netvsc_destroy_send_buf() to clean up forward
declaration
staging: hv: move netvsc_device_add() to clean up forward declaration
staging: hv: clean up unused forward declarations
staging: hv: convert function name NetVscDisconnectFromVsp to lower
case
drivers/staging/hv/netvsc.c | 686 +++++++++++++++++++++...
2011 Apr 21
8
[PATCH 0/8] staging: hv: clean up forward declarations and camel cases in netvsc.c
...declaration
staging: hv: move netvsc_receive_completion() to clean up forward
declaration
staging: hv: move netvsc_send_recv_completion() to clean up forward
declaration
staging: hv: move netvsc_destroy_recv_buf() to clean up forward
declaration
staging: hv: move netvsc_destroy_send_buf() to clean up forward
declaration
staging: hv: move netvsc_device_add() to clean up forward declaration
staging: hv: clean up unused forward declarations
staging: hv: convert function name NetVscDisconnectFromVsp to lower
case
drivers/staging/hv/netvsc.c | 686 +++++++++++++++++++++...