History

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next

Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2022-05-13 1) Cleanups for the code behind the XFRM offload API. This is a preparation for the extension of the API for policy offload. From Leon Romanovsky. * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next: xfrm: drop not needed flags variable in XFRM offload struct net/mlx5e: Use XFRM state direction instead of flags netdevsim: rely on XFRM state direction instead of flags ixgbe: propagate XFRM offload state direction instead of flags xfrm: store and rely on direction to construct offload flags xfrm: rename xfrm_state_offload struct to allow reuse xfrm: delete not used number of external headers xfrm: free not used XFRM_ESP_NO_TRAILER flag ====================

Jakub Kicinski committed 4 years ago

Commit 2c5f1532 parents f9a210c 0f9008e12 files · +40 −47Browse files

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

Unified · Split

include/net/xfrm.h+12−8
@@ -126,13 +126,17 @@ struct xfrm_state_walk { · 125 unmodified lines
126126 struct xfrm_address_filter *filter;
127127 };
128128
129−struct xfrm_state_offload {
129+enum {
130+ XFRM_DEV_OFFLOAD_IN = 1,
131+ XFRM_DEV_OFFLOAD_OUT,
132+};
133+
134+struct xfrm_dev_offload {
130135 struct net_device *dev;
131136 netdevice_tracker dev_tracker;
132137 struct net_device *real_dev;
133138 unsigned long offload_handle;
134− unsigned int num_exthdrs;
135− u8 flags;
139+ u8 dir : 2;
136140 };
137141
138142 struct xfrm_mode {
@@ -247,7 +251,7 @@ struct xfrm_state { · 108 unmodified lines
247251 struct xfrm_lifetime_cur curlft;
248252 struct hrtimer mtimer;
249253
250− struct xfrm_state_offload xso;
254+ struct xfrm_dev_offload xso;
251255
252256 /* used to fix curlft->add_time when changing date */
253257 long saved_tmo;
@@ -1006,7 +1010,7 @@ struct xfrm_offload { · 752 unmodified lines
10061010 #define CRYPTO_FALLBACK 8
10071011 #define XFRM_GSO_SEGMENT 16
10081012 #define XFRM_GRO 32
1009−#define XFRM_ESP_NO_TRAILER 64
1013+/* 64 is free */
10101014 #define XFRM_DEV_RESUME 128
10111015 #define XFRM_XMIT 256
10121016
@@ -1866,7 +1870,7 @@ bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x); · 853 unmodified lines
18661870
18671871 static inline void xfrm_dev_state_advance_esn(struct xfrm_state *x)
18681872 {
1869− struct xfrm_state_offload *xso = &x->xso;
1873+ struct xfrm_dev_offload *xso = &x->xso;
18701874
18711875 if (xso->dev && xso->dev->xfrmdev_ops->xdo_dev_state_advance_esn)
18721876 xso->dev->xfrmdev_ops->xdo_dev_state_advance_esn(x);
@@ -1892,7 +1896,7 @@ static inline bool xfrm_dst_offload_ok(struct dst_entry *dst) · 19 unmodified lines
18921896
18931897 static inline void xfrm_dev_state_delete(struct xfrm_state *x)
18941898 {
1895− struct xfrm_state_offload *xso = &x->xso;
1899+ struct xfrm_dev_offload *xso = &x->xso;
18961900
18971901 if (xso->dev)
18981902 xso->dev->xfrmdev_ops->xdo_dev_state_delete(x);
@@ -1900,7 +1904,7 @@ static inline void xfrm_dev_state_delete(struct xfrm_state *x) · 1 unmodified line
19001904
19011905 static inline void xfrm_dev_state_free(struct xfrm_state *x)
19021906 {
1903− struct xfrm_state_offload *xso = &x->xso;
1907+ struct xfrm_dev_offload *xso = &x->xso;
19041908 struct net_device *dev = xso->dev;
19051909
19061910 if (dev && dev->xfrmdev_ops) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t