History

xfrm: rename xfrm_state_offload struct to allow reuse

The struct xfrm_state_offload has all fields needed to hold information for offloaded policies too. In order to do not create new struct with same fields, let's rename existing one and reuse it later.

Leon Romanovsky committed 4 years ago

Commit 87e0a941 parent a36708e4 files · +9 −9Browse files

Showing the changes to include (1 of 4 files). Show all

Unified · Split

include/net/xfrm.h+5−5
@@ -126,7 +126,7 @@ struct xfrm_state_walk { · 125 unmodified lines
126126 struct xfrm_address_filter *filter;
127127 };
128128
129−struct xfrm_state_offload {
129+struct xfrm_dev_offload {
130130 struct net_device *dev;
131131 netdevice_tracker dev_tracker;
132132 struct net_device *real_dev;
@@ -246,7 +246,7 @@ struct xfrm_state { · 113 unmodified lines
246246 struct xfrm_lifetime_cur curlft;
247247 struct hrtimer mtimer;
248248
249− struct xfrm_state_offload xso;
249+ struct xfrm_dev_offload xso;
250250
251251 /* used to fix curlft->add_time when changing date */
252252 long saved_tmo;
@@ -1865,7 +1865,7 @@ bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x); · 1612 unmodified lines
18651865
18661866 static inline void xfrm_dev_state_advance_esn(struct xfrm_state *x)
18671867 {
1868− struct xfrm_state_offload *xso = &x->xso;
1868+ struct xfrm_dev_offload *xso = &x->xso;
18691869
18701870 if (xso->dev && xso->dev->xfrmdev_ops->xdo_dev_state_advance_esn)
18711871 xso->dev->xfrmdev_ops->xdo_dev_state_advance_esn(x);
@@ -1891,7 +1891,7 @@ static inline bool xfrm_dst_offload_ok(struct dst_entry *dst) · 19 unmodified lines
18911891
18921892 static inline void xfrm_dev_state_delete(struct xfrm_state *x)
18931893 {
1894− struct xfrm_state_offload *xso = &x->xso;
1894+ struct xfrm_dev_offload *xso = &x->xso;
18951895
18961896 if (xso->dev)
18971897 xso->dev->xfrmdev_ops->xdo_dev_state_delete(x);
@@ -1899,7 +1899,7 @@ static inline void xfrm_dev_state_delete(struct xfrm_state *x) · 1 unmodified line
18991899
19001900 static inline void xfrm_dev_state_free(struct xfrm_state *x)
19011901 {
1902− struct xfrm_state_offload *xso = &x->xso;
1902+ struct xfrm_dev_offload *xso = &x->xso;
19031903 struct net_device *dev = xso->dev;
19041904
19051905 if (dev && dev->xfrmdev_ops) {