lkml.org 
[lkml]   [2009]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 1/4] Defer skb allocation -- add destroy buffers function for virtio
    On Mon, Dec 14, 2009 at 03:22:22PM -0800, Shirley Ma wrote:
    > Hello Michael,
    >
    > On Mon, 2009-12-14 at 22:22 +0200, Michael S. Tsirkin wrote:
    > > I dont insist, but my idea was
    > >
    > > for (;;) {
    > > b = vq->destroy(vq);
    > > if (!b)
    > > break;
    > > --vi->num;
    > > put_page(b);
    > > }
    > >
    > > so we do not have to lose track of the counter.
    >
    > That's not a bad idea, but to do this, then this fuction will be
    > specific for virtio_net device (vi is virtnet_info) only in a generic
    > virtqueue API.
    >
    > Thanks
    > Shirley

    No, this code would be in virtio net.
    destroy would simply be the virtqueue API that returns
    data pointer.

    --
    MST


    \
     
     \ /
      Last update: 2009-12-15 12:03    [W:0.080 / U:91.816 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site