Re: [PATCH 2/3] virtio-net: correct capacity math on ring full

2012-10-03 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Capacity math on ring full is wrong: we are > looking at num_sg but that might be optimistic > because of indirect buffer use. > > The implementation also penalizes fast path > with extra memory accesses for the benefit of > ring full condition handling which is

Re: [PATCH 2/3] virtio-net: correct capacity math on ring full

2012-10-03 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Capacity math on ring full is wrong: we are looking at num_sg but that might be optimistic because of indirect buffer use. The implementation also penalizes fast path with extra memory accesses for the benefit of ring full condition handling which

[PATCH 2/3] virtio-net: correct capacity math on ring full

2012-09-28 Thread Michael S. Tsirkin
Capacity math on ring full is wrong: we are looking at num_sg but that might be optimistic because of indirect buffer use. The implementation also penalizes fast path with extra memory accesses for the benefit of ring full condition handling which is slow path. It's easy to query ring capacity

[PATCH 2/3] virtio-net: correct capacity math on ring full

2012-09-28 Thread Michael S. Tsirkin
Capacity math on ring full is wrong: we are looking at num_sg but that might be optimistic because of indirect buffer use. The implementation also penalizes fast path with extra memory accesses for the benefit of ring full condition handling which is slow path. It's easy to query ring capacity