[PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Jason Wang
Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to unify them. This could be easily done by adding a quota to the get_rx_bufs() which is used to limit the number of buffers it returns (for mergeable buffer, the quota is simply UIO_MAXIOV, for big

Re: [PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Michael S. Tsirkin
On Mon, Jan 17, 2011 at 04:11:08PM +0800, Jason Wang wrote: Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to unify them. This could be easily done by adding a quota to the get_rx_bufs() which is used to limit the number of buffers it

Re: [PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Jason Wang
Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:11:08PM +0800, Jason Wang wrote: Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to unify them. This could be easily done by adding a quota to the get_rx_bufs() which is used to

Re: [PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Michael S. Tsirkin
On Tue, Jan 18, 2011 at 11:05:33AM +0800, Jason Wang wrote: Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:11:08PM +0800, Jason Wang wrote: Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to unify them. This could be easily

Re: [PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Jason Wang
Michael S. Tsirkin writes: On Tue, Jan 18, 2011 at 11:05:33AM +0800, Jason Wang wrote: Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:11:08PM +0800, Jason Wang wrote: Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to