How to debug ip xfrm rules

To debug xfrm, you can use command ip xfrm monitor.

It will show changes in database policy. And it will show the processing of each data packets.