From c6b23fc0169057c4b4ffb530a71ec3a4742a4530 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 6 Mar 2020 15:06:52 +0100 Subject: net: Add a slice to struct eth_device Add ethernet code safe for being called from a poller. Signed-off-by: Sascha Hauer --- include/net.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/net.h') diff --git a/include/net.h b/include/net.h index 54db8a179a..aad28e4f4c 100644 --- a/include/net.h +++ b/include/net.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include /* memcpy */ @@ -63,6 +64,10 @@ struct eth_device { char *bootarg; char *linuxdevname; + struct slice slice; + + struct list_head send_queue; + bool ifup; #define ETH_MODE_DHCP 0 #define ETH_MODE_STATIC 1 @@ -72,6 +77,11 @@ struct eth_device { #define dev_to_edev(d) container_of(d, struct eth_device, dev) +static inline struct slice *eth_device_slice(struct eth_device *edev) +{ + return &edev->slice; +} + static inline const char *eth_name(struct eth_device *edev) { return edev->devname; -- cgit v1.2.3