netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Pack struct xfrm_usersa_info and struct xfrm_userpolicy_info
@ 2014-01-07  6:48 Fan Du
  2014-01-07  6:48 ` [PATCH net-next 1/2] include/uapi/linux/xfrm.h: Pack " Fan Du
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Fan Du @ 2014-01-07  6:48 UTC (permalink / raw)
  To: steffen.klassert; +Cc: stephen, netdev, davem, dev

When trying to setup IPsec configuration on a 64bits host with
iproute2(32bits compiled), the intened xfrm policy and sa is
either deficit or wrong when kernel trying to parse user land
information.

Further investigatino shows that:
L: kernel
R: iproute2

          sizeof       userpolicy      usersa
64bits(unpacked)        168/168        224/224
32bits(unpacked)        164/164        220/220
                         ^   ^
                         L   R

To keep kernel and user land see a consistent structure, after
add packing attribute, now it looks like this:

64bits(  packed)        164/164        217/217
32bits(  packed)        164/164        217/217
                         ^   ^
                         L   R

Then different kernel/iproute2 build configuration will not impact IPsec setup.

Fan Du (2):
  include/uapi/linux/xfrm.h: Pack struct xfrm_userpolicy_info
  include/uapi/linux/xfrm.h: Pack struct xfrm_usersa_info

 include/uapi/linux/xfrm.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-01-09 22:07 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07  6:48 [PATCH net-next 0/2] Pack struct xfrm_usersa_info and struct xfrm_userpolicy_info Fan Du
2014-01-07  6:48 ` [PATCH net-next 1/2] include/uapi/linux/xfrm.h: Pack " Fan Du
2014-01-07 22:52   ` Sergei Shtylyov
2014-01-09  8:39     ` Fan Du
2014-01-09 22:58       ` Sergei Shtylyov
2014-01-09 23:07         ` Sergei Shtylyov
2014-01-07  6:48 ` [PATCH net-next 2/2] include/uapi/linux/xfrm.h: Pack struct xfrm_usersa_info Fan Du
2014-01-08 20:33   ` Ben Hutchings
2014-01-09  8:24     ` Fan Du
2014-01-09 18:58       ` Ben Hutchings
2014-01-07  6:55 ` [PATCH net-next 0/2] Pack struct xfrm_usersa_info and struct xfrm_userpolicy_info Fan Du
2014-01-07  7:47 ` Steffen Klassert
2014-01-07  7:59   ` Fan Du
2014-01-07 10:00     ` David Laight
2014-01-09  8:34       ` Fan Du
2014-01-09  9:07         ` David Laight
2014-01-07 18:07 ` David Miller
2014-01-09  8:24   ` Fan Du

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).