summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-01-08 15:19:55 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-08 15:19:55 -0800
commitb5c094430092b4baf71d276b3ab7896bb4530951 (patch)
tree99e19cb2934d649e17029fb5c41cb7731e64a6f8
parent620b15b8196a3a6d8632f4b03bb9a79eefab4c7c (diff)
parent0718f2eef6af314850dba3dcbf3cd5781507c083 (diff)
downloadwireguard-linux-trimmed-b5c094430092b4baf71d276b3ab7896bb4530951.tar.gz
wireguard-linux-trimmed-b5c094430092b4baf71d276b3ab7896bb4530951.zip
Merge branch 'reduce-open-coded-skb-next-access-for-gso-segment-walking'
Jason A. Donenfeld says: ==================== reduce open coded skb->next access for gso segment walking This patchset introduces the skb_list_walk_safe helper macro, in order to add some sanity to the myrid ways drivers have of walking through gso segments. The goal is to reduce future bugs commonly caused by open coding these sorts of things, and to in the future make it easier to swap out the underlying list representation. This first patch series addresses the easy uses of drivers iterating over the returned list of skb_gso_segments, for drivers that live in drivers/net/*. There are still other use cases to tackle later for net/*, and after these low-hanging fruits are taken care of, I imagine there are more subtle cases of gso segment walking that isn't just a direct return value from skb_gso_segments, and eventually this will have to be tackled. This series is the first in that direction. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/wireguard/device.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/wireguard/device.h b/drivers/net/wireguard/device.h
index c91f305..b15a8be 100644
--- a/drivers/net/wireguard/device.h
+++ b/drivers/net/wireguard/device.h
@@ -62,12 +62,4 @@ 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 */