[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH v3 10/16] plat/tap: Fetch txq and rxq info
The patch implements functions to retrieve information of the rxq and txq. Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx> --- plat/drivers/tap/tap.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/plat/drivers/tap/tap.c b/plat/drivers/tap/tap.c index 439c3c50..abcfc877 100644 --- a/plat/drivers/tap/tap.c +++ b/plat/drivers/tap/tap.c @@ -258,18 +258,31 @@ static int tap_netdev_xmit(struct uk_netdev *dev, static int tap_netdev_txq_info_get(struct uk_netdev *dev __unused, __u16 queue_id __unused, - struct uk_netdev_queue_info *qinfo __unused) + struct uk_netdev_queue_info *qinfo) { - return -EINVAL; + UK_ASSERT(qinfo); + + qinfo->nb_min = 1; + qinfo->nb_max = __U16_MAX; + qinfo->nb_align = 4; + qinfo->nb_is_power_of_two = 0; + return 0; } static int tap_netdev_rxq_info_get(struct uk_netdev *dev __unused, __u16 queue_id __unused, - struct uk_netdev_queue_info *qinfo __unused) + struct uk_netdev_queue_info *qinfo) { - return -EINVAL; + UK_ASSERT(qinfo); + + qinfo->nb_min = 1; + qinfo->nb_max = __U16_MAX; + qinfo->nb_align = 4; + qinfo->nb_is_power_of_two = 0; + return 0; } + static struct uk_netdev_rx_queue *tap_netdev_rxq_setup(struct uk_netdev *dev, __u16 queue_id __unused, __u16 nb_desc __unused, -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |