xfrm: extend add policy callback to set failure reason
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 24 Jan 2023 11:54:57 +0000 (13:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Jan 2023 00:28:48 +0000 (16:28 -0800)
commit3089386db0901ac6ac3d99fbd601212c98217e60
treeabd148a8bb944b34d41692b2e89450b61769457b
parent9179f5fe41733ff56f7dfcb83c0c1456f6d2e4ae
xfrm: extend add policy callback to set failure reason

Almost all validation logic is in the drivers, but they are
missing reliable way to convey failure reason to userspace
applications.

Let's use extack to return this information to users.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/xfrm_device.rst
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
include/linux/netdevice.h
net/xfrm/xfrm_device.c