[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v3 01/12] lib/uknetdev: Make Ethernet macros visible to all network devices
Hello, This patch seems fine. Reviewed-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx> Thanks & Regards Sharan On 3/3/20 3:13 PM, Costin Lupu wrote: Both Ethernet header and payload sizes have the same values for all network devices. Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- lib/uknetdev/include/uk/netdev_core.h | 7 +++++++ plat/drivers/virtio/virtio_net.c | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/uknetdev/include/uk/netdev_core.h b/lib/uknetdev/include/uk/netdev_core.h index dba719fc..f073e101 100644 --- a/lib/uknetdev/include/uk/netdev_core.h +++ b/lib/uknetdev/include/uk/netdev_core.h @@ -68,6 +68,13 @@ extern "C" { struct uk_netdev; UK_TAILQ_HEAD(uk_netdev_list, struct uk_netdev);+/**+ * Ethernet macros + */ +#define ETH_HDR_LEN 14 +#define ETH_PKT_PAYLOAD_LEN 1500 +#define ETH_PKT_LEN (ETH_HDR_LEN + ETH_PKT_PAYLOAD_LEN) + /** * A structure used for Ethernet hardware addresses */ diff --git a/plat/drivers/virtio/virtio_net.c b/plat/drivers/virtio/virtio_net.c index 3025ed3f..efc2cb71 100644 --- a/plat/drivers/virtio/virtio_net.c +++ b/plat/drivers/virtio/virtio_net.c @@ -47,8 +47,6 @@ * 12 bytes in length in modern mode. */ #define VIRTIO_HDR_LEN 12 -#define ETH_HDR_LEN 14 -#define ETH_PKT_PAYLOAD_LEN 1500 #define VIRTIO_PKT_BUFFER_LEN ((ETH_PKT_PAYLOAD_LEN) \ + (ETH_HDR_LEN) \ + (VIRTIO_HDR_LEN))
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |