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

[Minios-devel] [UNIKRAFT PATCH 09/15] 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 f5e9d03..bcc8b6e 100644
--- a/plat/drivers/tap/tap.c
+++ b/plat/drivers/tap/tap.c
@@ -253,18 +253,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.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®.