diff --git a/arch/lkl/include/uapi/asm/syscalls.h b/arch/lkl/include/uapi/asm/syscalls.h
index a5799858f763a1..65f5ac57d5bb94 100644
--- a/arch/lkl/include/uapi/asm/syscalls.h
+++ b/arch/lkl/include/uapi/asm/syscalls.h
@@ -213,6 +213,8 @@ struct ustat {
 #define SOCK_DCCP		6
 #define SOCK_PACKET		10
 
+#define MSG_TRUNC 0x20
+
 /* avoid colision with system headers defines */
 #define sa_handler sa_handler
 #define st_atime st_atime
diff --git a/tools/lkl/include/lkl.h b/tools/lkl/include/lkl.h
index 0725eb603cecff..f40a52b2ca8cd7 100644
--- a/tools/lkl/include/lkl.h
+++ b/tools/lkl/include/lkl.h
@@ -245,17 +245,28 @@ int lkl_set_ipv6_gateway(void* addr);
  */
 struct lkl_netdev;
 
+/**
+* lkl_netdev_args - arguments to lkl_netdev_add
+* @mac - optional MAC address for the device
+* @offload - offload bits for the device
+*/
+struct lkl_netdev_args {
+	void *mac;
+	unsigned int offload;
+};
+
 /**
  * lkl_netdev_add - add a new network device
  *
  * Must be called before calling lkl_start_kernel.
  *
  * @nd - the network device host handle
- * @mac - optional MAC address for the device
+ * @args - arguments that configs the netdev. Can be NULL
  * @returns a network device id (0 is valid) or a strictly negative value in
  * case of error
  */
-int lkl_netdev_add(struct lkl_netdev *nd, void *mac, int offload);
+
+int lkl_netdev_add(struct lkl_netdev *nd, struct lkl_netdev_args* args);
 
 /**
 * lkl_netdevs_remove - destroy all network devices
diff --git a/tools/lkl/lib/hijack/init.c b/tools/lkl/lib/hijack/init.c
index b4c8d65c3dc74e..36a7d10dd6a14d 100644
--- a/tools/lkl/lib/hijack/init.c
+++ b/tools/lkl/lib/hijack/init.c
@@ -235,6 +235,7 @@ hijack_init(void)
 	char *debug = getenv("LKL_HIJACK_DEBUG");
 	char *mount = getenv("LKL_HIJACK_MOUNT");
 	struct lkl_netdev *nd = NULL;
+	struct lkl_netdev_args nd_args;
 	char *neigh_entries = getenv("LKL_HIJACK_NET_NEIGHBOR");
 	/* single_cpu mode:
 	 * 0: Don't pin to single CPU (default).
@@ -253,6 +254,7 @@ hijack_init(void)
 	char *offload1 = getenv("LKL_HIJACK_OFFLOAD");
 	int offload = 0;
 
+	memset(&nd_args, 0, sizeof(struct lkl_netdev_args));
 	if (!debug) {
 		lkl_host_ops.print = NULL;
 	} else {
@@ -297,6 +299,7 @@ hijack_init(void)
 			"      please use LKL_HIJACK_NET_IFTYPE and "
 			"LKL_HIJACK_NET_IFPARAMS instead.\n");
 		nd = lkl_netdev_tap_create(tap, offload);
+		nd_args.offload = offload;
 	}
 
 	if (!nd && iftype && ifparams) {
@@ -327,11 +330,13 @@ hijack_init(void)
 			fprintf(stderr, "failed to parse mac\n");
 			return;
 		} else if (ret > 0) {
-			ret = lkl_netdev_add(nd, mac, offload);
+			nd_args.mac = mac;
 		} else {
-			ret = lkl_netdev_add(nd, NULL, offload);
+			nd_args.mac = NULL;
 		}
 
+		ret = lkl_netdev_add(nd, &nd_args);
+
 		if (ret < 0) {
 			fprintf(stderr, "failed to add netdev: %s\n",
 				lkl_strerror(ret));
diff --git a/tools/lkl/lib/net.c b/tools/lkl/lib/net.c
index 0b11c80d78afee..aa83ccaeb6e6ff 100644
--- a/tools/lkl/lib/net.c
+++ b/tools/lkl/lib/net.c
@@ -197,8 +197,6 @@ int lkl_netdev_get_ifindex(int id)
 	return ret < 0 ? ret : ifr.lkl_ifr_ifindex;
 }
 
-#define LKL_MSG_TRUNC	0x20
-
 // Copied from iproute2/lib/libnetlink.c
 static unsigned int seq = 0;
 static int rtnl_talk(int fd, struct lkl_nlmsghdr *n)
diff --git a/tools/lkl/lib/virtio_net.c b/tools/lkl/lib/virtio_net.c
index 5993fc10a21be1..1173f4d6046b25 100644
--- a/tools/lkl/lib/virtio_net.c
+++ b/tools/lkl/lib/virtio_net.c
@@ -202,7 +202,7 @@ static struct lkl_mutex **init_queue_locks(int num_queues)
 	return ret;
 }
 
-int lkl_netdev_add(struct lkl_netdev *nd, void *mac, int offload)
+int lkl_netdev_add(struct lkl_netdev *nd, struct lkl_netdev_args* args)
 {
 	struct virtio_net_dev *dev;
 	int ret = -LKL_ENOMEM;
@@ -214,9 +214,14 @@ int lkl_netdev_add(struct lkl_netdev *nd, void *mac, int offload)
 	memset(dev, 0, sizeof(*dev));
 
 	dev->dev.device_id = LKL_VIRTIO_ID_NET;
-	if (mac)
-		dev->dev.device_features |= BIT(LKL_VIRTIO_NET_F_MAC);
-	dev->dev.device_features |= offload;
+	if (args) {
+		if (args->mac) {
+			dev->dev.device_features |= BIT(LKL_VIRTIO_NET_F_MAC);
+			memcpy(dev->config.mac, args->mac, LKL_ETH_ALEN);
+		}
+		dev->dev.device_features |= args->offload;
+
+	}
 	dev->dev.config_data = &dev->config;
 	dev->dev.config_len = sizeof(dev->config);
 	dev->dev.ops = &net_ops;
@@ -227,9 +232,6 @@ int lkl_netdev_add(struct lkl_netdev *nd, void *mac, int offload)
 	if (!dev->queue_locks)
 		goto out_free;
 
-	if (mac)
-		memcpy(dev->config.mac, mac, LKL_ETH_ALEN);
-
 	dev->rx_poll.event = LKL_DEV_NET_POLL_RX;
 	dev->rx_poll.dev = dev;
 
diff --git a/tools/lkl/lib/virtio_net_linux_fdnet.c b/tools/lkl/lib/virtio_net_linux_fdnet.c
index f98c886be7cf58..988b0f97e45fd4 100644
--- a/tools/lkl/lib/virtio_net_linux_fdnet.c
+++ b/tools/lkl/lib/virtio_net_linux_fdnet.c
@@ -208,6 +208,8 @@ struct lkl_netdev_linux_fdnet *lkl_register_netdev_linux_fdnet(int fd)
 		return NULL;
 	}
 
+	memset(nd, 0, sizeof(struct lkl_netdev_linux_fdnet));
+
 	nd->fd = fd;
 	/* Making them edge-triggered to save CPU. */
 	nd->epoll_rx_fd = create_epoll_fd(nd->fd, EPOLLIN | EPOLLPRI | EPOLLET);
diff --git a/tools/lkl/tests/boot.c b/tools/lkl/tests/boot.c
index 6b0b7ac8f626d4..2672fd3c122c8c 100644
--- a/tools/lkl/tests/boot.c
+++ b/tools/lkl/tests/boot.c
@@ -332,7 +332,7 @@ int test_netdev_add(char *str, int len)
 	if (!netdev)
 		goto out;
 
-	ret = lkl_netdev_add((struct lkl_netdev *)netdev, NULL, 0);
+	ret = lkl_netdev_add((struct lkl_netdev *)netdev, NULL);
 	if (ret < 0)
 		goto out;
 
diff --git a/tools/lkl/tests/net-test.c b/tools/lkl/tests/net-test.c
index 480ff7809f6e87..ba5fa0035487b6 100644
--- a/tools/lkl/tests/net-test.c
+++ b/tools/lkl/tests/net-test.c
@@ -143,7 +143,7 @@ static int test_net_init(int argc, char **argv)
 		return -1;
 	}
 
-	ret = lkl_netdev_add(nd, NULL, 0);
+	ret = lkl_netdev_add(nd, NULL);
 	if (ret < 0) {
 		fprintf(stderr, "failed to add netdev: %s\n",
 			lkl_strerror(ret));
