xfrm: kconfig: Fix XFRM_OFFLOAD dependency on XFRM
Subsystems (3)
PATCH 1/1 xfrm: kconfig: Fix XFRM_OFFLOAD dependency on XFRM
If XFRM_OFFLOAD is configured, but XFRM is not, it will cause
compilation error on include xfrm.h:
C 05:56:39 In file included from /src/linux/kernel_platform/msm-kernel/net/core/sock.c:127:
C 05:56:39 /src/linux/kernel_platform/msm-kernel/include/net/xfrm.h:1932:30: error: no member named 'xfrm' in 'struct dst_entry'
C 05:56:39 struct xfrm_state *x = dst->xfrm;
C 05:56:39 ~~~ ^
Making the XFRM_OFFLOAD select the XFRM.
--- net/xfrm/Kconfig | 1 + 1 file changed, 1 insertion(+)
net/xfrm/Kconfig +1 -0
@@ -10,6 +10,7 @@ config XFRM config XFRM_OFFLOAD bool + select XFRM config XFRM_ALGO tristate
--
2.25.1
Quoted 1 line · Ilia Lin
If
XFRM_OFFLOADis configured, but XFRM is not
How did you do it?
Quoted 21 lines
, it will cause
compilation error on includexfrm.h:
C 05:56:39 In file included from /src/linux/kernel_platform/msm-kernel/net/core/sock.c:127:
C 05:56:39 /src/linux/kernel_platform/msm-kernel/include/net/xfrm.h:1932:30: error: no member named 'xfrm' in 'structdst_entry'
C 05:56:39 structxfrm_state*x =dst->xfrm;
C 05:56:39 ~~~ ^Making the
XFRM_OFFLOADselect the XFRM.Fixes 48e01e001da31 ("ixgbe/ixgbevf: fix XFRM_ALGO dependency")Reported-by Ilia Lin <[email protected]>Signed-off-by Ilia Lin <[email protected]>--- net/xfrm/Kconfig | 1 + 1 file changed, 1 insertion(+)net/xfrm/Kconfig +0
-0
net/xfrm/Kconfig config XFRM · line 13
Quoted 4 lines
net/xfrm/Kconfig +1
-0@@ -10,6 +10,7 @@ config XFRM config XFRM_OFFLOAD bool + select XFRM
struct dst_entry depends on CONFIG_XFRM and not on CONFIG_XFRM_OFFLOAD, so it is unclear to me why do you need to add new "select XFRM" line.
26 struct dst_entry {
27 struct net_device *dev;
28 struct dst_ops *ops;
29 unsigned long _metrics;
30 unsigned long expires;
31 #ifdef CONFIG_XFRM
32 struct xfrm_state *xfrm;
33 #else
34 void *__pad1;
35 #endif
36 intThanks
Hi Leon,
This is exactly like I described:
* xfrm.h is included from the net/core/sock.c unconditionally.
* If CONFIG_XFRM_OFFLOAD is set, then the xfrm_dst_offload_ok() is being compiled.
* If CONFIG_XFRM is not set, the struct dst_entry doesn't have the xfrm member.
* xfrm_dst_offload_ok() tries to access the dst->xfrm and that fails to compile.
Thanks,
Ilia Lin
Quoted 48 lines · Leon Romanovsky
Quoted 1 line · Ilia Lin
If
XFRM_OFFLOADis configured, but XFRM is notHow did you do it?
Quoted 21 lines
, it will cause
compilation error on includexfrm.h:
C 05:56:39 In file included from /src/linux/kernel_platform/msm-kernel/net/core/sock.c:127:
C 05:56:39 /src/linux/kernel_platform/msm-kernel/include/net/xfrm.h:1932:30: error: no member named 'xfrm' in 'structdst_entry'
C 05:56:39 structxfrm_state*x =dst->xfrm;
C 05:56:39 ~~~ ^Making the
XFRM_OFFLOADselect the XFRM.Fixes 48e01e001da31 ("ixgbe/ixgbevf: fix XFRM_ALGO dependency")Reported-by Ilia Lin <[email protected]>Signed-off-by Ilia Lin <[email protected]>--- net/xfrm/Kconfig | 1 + 1 file changed, 1 insertion(+)net/xfrm/Kconfig +0
-0net/xfrm/Kconfig config XFRM · line 13
Quoted 4 lines
net/xfrm/Kconfig +1
-0@@ -10,6 +10,7 @@ config XFRM config XFRM_OFFLOAD bool + select XFRMstruct
dst_entrydepends onCONFIG_XFRMand not onCONFIG_XFRM_OFFLOAD, so it is unclear to me why do you need to add new "select XFRM" line.26 struct dst_entry { 27 struct net_device *dev; 28 struct dst_ops *ops; 29 unsigned long _metrics; 30 unsigned long expires; 31 #ifdef CONFIG_XFRM 32 struct xfrm_state *xfrm; 33 #else 34 void *__pad1; 35 #endif 36 intThanks
Quoted 1 line · Ilia Lin
Hi Leon,
You was already asked do not top-post.
https://lore.kernel.org/netdev/20230718105446.GD8808@unreal/
Please stop it.
Quoted 7 lines
This is exactly like I described:
*xfrm.his included from thenet/core/sock.cunconditionally.
* IfCONFIG_XFRM_OFFLOADis set, then thexfrm_dst_offload_ok()is being compiled.
* IfCONFIG_XFRMis not set, the structdst_entrydoesn't have the xfrm member.
*xfrm_dst_offload_ok()tries to access thedst->xfrmand that fails to compile.
I asked two questions. First one was "How did you set XFRM_OFFLOAD without XFRM?".
Thanks
Quoted 54 lines
Thanks,
Ilia LinQuoted 48 lines · Leon Romanovsky
Quoted 1 line · Ilia Lin
If
XFRM_OFFLOADis configured, but XFRM is notHow did you do it?
Quoted 21 lines
, it will cause
compilation error on includexfrm.h:
C 05:56:39 In file included from /src/linux/kernel_platform/msm-kernel/net/core/sock.c:127:
C 05:56:39 /src/linux/kernel_platform/msm-kernel/include/net/xfrm.h:1932:30: error: no member named 'xfrm' in 'structdst_entry'
C 05:56:39 structxfrm_state*x =dst->xfrm;
C 05:56:39 ~~~ ^Making the
XFRM_OFFLOADselect the XFRM.Fixes 48e01e001da31 ("ixgbe/ixgbevf: fix XFRM_ALGO dependency")Reported-by Ilia Lin <[email protected]>Signed-off-by Ilia Lin <[email protected]>--- net/xfrm/Kconfig | 1 + 1 file changed, 1 insertion(+)net/xfrm/Kconfig +0
-0net/xfrm/Kconfig config XFRM · line 13
Quoted 4 lines
net/xfrm/Kconfig +1
-0@@ -10,6 +10,7 @@ config XFRM config XFRM_OFFLOAD bool + select XFRMstruct
dst_entrydepends onCONFIG_XFRMand not onCONFIG_XFRM_OFFLOAD, so it is unclear to me why do you need to add new "select XFRM" line.26 struct dst_entry { 27 struct net_device *dev; 28 struct dst_ops *ops; 29 unsigned long _metrics; 30 unsigned long expires; 31 #ifdef CONFIG_XFRM 32 struct xfrm_state *xfrm; 33 #else 34 void *__pad1; 35 #endif 36 intThanks
Quoted 16 lines · Leon Romanovsky
Quoted 1 line · Ilia Lin
Hi Leon,
You was already asked do not top-post.
https://lore.kernel.org/netdev/20230718105446.GD8808@unreal/
Please stop it.Quoted 7 lines
This is exactly like I described:
*xfrm.his included from thenet/core/sock.cunconditionally.
* IfCONFIG_XFRM_OFFLOADis set, then thexfrm_dst_offload_ok()is being compiled.
* IfCONFIG_XFRMis not set, the structdst_entrydoesn't have the xfrm member.
*xfrm_dst_offload_ok()tries to access thedst->xfrmand that fails to compile.
Quoted 5 lines
I asked two questions. First one was "How did you set
XFRM_OFFLOADwithout XFRM?".Thanks
In driver Kconfig: "select XFRM_OFFLOAD"
Quoted 55 lines
Quoted 55 lines
Thanks,
Ilia LinQuoted 48 lines · Leon Romanovsky
Quoted 1 line · Ilia Lin
If
XFRM_OFFLOADis configured, but XFRM is notHow did you do it?
Quoted 21 lines
, it will cause
compilation error on includexfrm.h:
C 05:56:39 In file included from /src/linux/kernel_platform/msm-kernel/net/core/sock.c:127:
C 05:56:39 /src/linux/kernel_platform/msm-kernel/include/net/xfrm.h:1932:30: error: no member named 'xfrm' in 'structdst_entry'
C 05:56:39 structxfrm_state*x =dst->xfrm;
C 05:56:39 ~~~ ^Making the
XFRM_OFFLOADselect the XFRM.Fixes 48e01e001da31 ("ixgbe/ixgbevf: fix XFRM_ALGO dependency")Reported-by Ilia Lin <[email protected]>Signed-off-by Ilia Lin <[email protected]>--- net/xfrm/Kconfig | 1 + 1 file changed, 1 insertion(+)net/xfrm/Kconfig +0
-0net/xfrm/Kconfig config XFRM · line 13
Quoted 4 lines
net/xfrm/Kconfig +1
-0@@ -10,6 +10,7 @@ config XFRM config XFRM_OFFLOAD bool + select XFRMstruct
dst_entrydepends onCONFIG_XFRMand not onCONFIG_XFRM_OFFLOAD, so it is unclear to me why do you need to add new "select XFRM" line.26 struct dst_entry { 27 struct net_device *dev; 28 struct dst_ops *ops; 29 unsigned long _metrics; 30 unsigned long expires; 31 #ifdef CONFIG_XFRM 32 struct xfrm_state *xfrm; 33 #else 34 void *__pad1; 35 #endif 36 intThanks
Quoted 17 lines · Ilia Lin
Quoted 16 lines · Leon Romanovsky
Quoted 1 line · Ilia Lin
Hi Leon,
You was already asked do not top-post.
https://lore.kernel.org/netdev/20230718105446.GD8808@unreal/
Please stop it.Quoted 7 lines
This is exactly like I described:
*xfrm.his included from thenet/core/sock.cunconditionally.
* IfCONFIG_XFRM_OFFLOADis set, then thexfrm_dst_offload_ok()is being compiled.
* IfCONFIG_XFRMis not set, the structdst_entrydoesn't have the xfrm member.
*xfrm_dst_offload_ok()tries to access thedst->xfrmand that fails to compile.
Quoted 6 lines
Quoted 5 lines
I asked two questions. First one was "How did you set
XFRM_OFFLOADwithout XFRM?".Thanks
In driver
Kconfig: "selectXFRM_OFFLOAD"
In driver Kconfig, one should use "depends on XFRM_OFFLOAD" and not "select XFRM_OFFLOAD". Drivers shouldn't enable XFRM_OFFLOAD directly and all upstream users are safe here.
Thanks
Quoted 22 lines · Leon Romanovsky
Quoted 20 lines · Ilia Lin
Quoted 19 lines · Leon Romanovsky
Quoted 1 line · Ilia Lin
Hi Leon,
You was already asked do not top-post.
https://lore.kernel.org/netdev/20230718105446.GD8808@unreal/
Please stop it.Quoted 7 lines
This is exactly like I described:
*xfrm.his included from thenet/core/sock.cunconditionally.
* IfCONFIG_XFRM_OFFLOADis set, then thexfrm_dst_offload_ok()is being compiled.
* IfCONFIG_XFRMis not set, the structdst_entrydoesn't have the xfrm member.
*xfrm_dst_offload_ok()tries to access thedst->xfrmand that fails to compile.I asked two questions. First one was "How did you set
XFRM_OFFLOADwithout XFRM?".
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Thanks
In driver
Kconfig: "selectXFRM_OFFLOAD"In driver
Kconfig, one should use "depends onXFRM_OFFLOAD" and not "selectXFRM_OFFLOAD". Drivers shouldn't enableXFRM_OFFLOADdirectly and all upstream users are safe here.
Thank you for that information, but the XFRM_OFFLOAD doesn't depend on XFRM either.
Quoted 2 lines
Thanks
Quoted 25 lines · Ilia Lin
Quoted 24 lines · Leon Romanovsky
Quoted 22 lines · Ilia Lin
Quoted 21 lines · Leon Romanovsky
Quoted 1 line · Ilia Lin
Hi Leon,
You was already asked do not top-post.
https://lore.kernel.org/netdev/20230718105446.GD8808@unreal/
Please stop it.Quoted 7 lines
This is exactly like I described:
*xfrm.his included from thenet/core/sock.cunconditionally.
* IfCONFIG_XFRM_OFFLOADis set, then thexfrm_dst_offload_ok()is being compiled.
* IfCONFIG_XFRMis not set, the structdst_entrydoesn't have the xfrm member.
*xfrm_dst_offload_ok()tries to access thedst->xfrmand that fails to compile.I asked two questions. First one was "How did you set
XFRM_OFFLOADwithout XFRM?".Thanks
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
In driver
Kconfig: "selectXFRM_OFFLOAD"In driver
Kconfig, one should use "depends onXFRM_OFFLOAD" and not "selectXFRM_OFFLOAD". Drivers shouldn't enableXFRM_OFFLOADdirectly and all upstream users are safe here.Thank you for that information, but the
XFRM_OFFLOADdoesn't depend on XFRM either.
Indirectly, XFRM_OFFLOAD depends on XFRM.
INET_ESP_OFFLOAD -> INET_ESP/XFRM_OFFLOAD -> XFRM_ESP -> XFRM_ALGO -> XFRM.
Thanks
Quoted 3 lines
Quoted 3 lines
Thanks