[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH] driver/virtio: Configure the max desc as default



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 04.12.18, 14:53, "Sharan Santhanam" <Sharan.Santhanam@xxxxxxxxx> wrote:

    As a part of this patch, we configure the max queue size as the
    configuration for the number descriptor if the user set the number
    of descriptors to zero.
    
    Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
    ---
     plat/drivers/virtio/virtio_net.c | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/plat/drivers/virtio/virtio_net.c 
b/plat/drivers/virtio/virtio_net.c
    index e2b19c0..14e8a27 100644
    --- a/plat/drivers/virtio/virtio_net.c
    +++ b/plat/drivers/virtio/virtio_net.c
    @@ -629,6 +629,9 @@ static int virtio_netdev_vqueue_setup(struct 
virtio_net_device *vndev,
                return -ENOBUFS;
        }
     
    +   nr_desc = (nr_desc != 0) ? nr_desc : max_desc;
    +   uk_pr_debug("Configuring the %d descriptors\n", nr_desc);
    +
        /* Check if the descriptor is a power of 2 */
        if (unlikely(nr_desc & (nr_desc - 1))) {
                uk_pr_err("Expect descriptor count as a power 2\n");
    -- 
    2.7.4
    
    

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.