[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v4 7/8] lib/uknetdev: Add driver encapsulation for rx & tx
The patch provides the option for the network driver to reserve headroom separately for transmission and reception part of a net device. Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx> --- lib/uknetdev/include/uk/netdev_core.h | 3 ++- plat/drivers/virtio/virtio_net.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/uknetdev/include/uk/netdev_core.h b/lib/uknetdev/include/uk/netdev_core.h index b14a9c9..b77c45a 100644 --- a/lib/uknetdev/include/uk/netdev_core.h +++ b/lib/uknetdev/include/uk/netdev_core.h @@ -85,7 +85,8 @@ struct uk_netdev_info { uint16_t max_tx_queues; int in_queue_pairs; /**< If true, allocate queues in pairs. */ uint16_t max_mtu; /**< Maximum supported MTU size. */ - uint16_t nb_encap; /**< Number of bytes required as headroom for tx. */ + uint16_t nb_encap_tx; /**< Number of bytes required as headroom for tx. */ + uint16_t nb_encap_rx; /**< Number of bytes required as headroom for rx. */ }; /** diff --git a/plat/drivers/virtio/virtio_net.c b/plat/drivers/virtio/virtio_net.c index 53c0c93..dfabfcc 100644 --- a/plat/drivers/virtio/virtio_net.c +++ b/plat/drivers/virtio/virtio_net.c @@ -688,6 +688,8 @@ static void virtio_net_info_get(struct uk_netdev *dev, dev_info->max_rx_queues = vndev->max_vqueue_pairs; dev_info->max_tx_queues = vndev->max_vqueue_pairs; + dev_info->nb_encap_tx = sizeof(struct virtio_net_hdr); + dev_info->nb_encap_rx = sizeof(struct virtio_net_rx_hdr); } static int virtio_net_start(struct uk_netdev *n) -- 2.7.4 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |