diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-11-29 04:47:27 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-12-05 11:48:25 +0100 |
commit | 2d4c38494e43d647c4ba68c098c5592d7068f25d (patch) | |
tree | 3c66ca076760ac10eeeb54dac95f4e9093839190 /src/device.h | |
parent | 3be7e2f42612c69bdc59e7f633d43a2f3f293978 (diff) |
device: prepare skb_list_walk_safe for upstreaming
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/device.h')
-rw-r--r-- | src/device.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/device.h b/src/device.h index b15a8be..c91f305 100644 --- a/src/device.h +++ b/src/device.h @@ -62,4 +62,12 @@ struct wg_device { int wg_device_init(void); void wg_device_uninit(void); +/* Later after the dust settles, this can be moved into include/linux/skbuff.h, + * where virtually all code that deals with GSO segs can benefit, around ~30 + * drivers as of writing. + */ +#define skb_list_walk_safe(first, skb, next) \ + for (skb = first, next = skb->next; skb; \ + skb = next, next = skb ? skb->next : NULL) + #endif /* _WG_DEVICE_H */ |