[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220513144432.GK680067@gauss3.secunet.de>
Date: Fri, 13 May 2022 16:44:32 +0200
From: Steffen Klassert <steffen.klassert@...unet.com>
To: Leon Romanovsky <leon@...nel.org>
CC: Leon Romanovsky <leonro@...dia.com>,
"David S . Miller" <davem@...emloft.net>,
Herbert Xu <herbert@...dor.apana.org.au>,
<netdev@...r.kernel.org>, Raed Salem <raeds@...dia.com>,
ipsec-devel <devel@...ux-ipsec.org>
Subject: Re: [PATCH ipsec-next 3/6] xfrm: add an interface to offload policy
On Tue, May 10, 2022 at 01:36:54PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@...dia.com>
>
> +int xfrm_dev_policy_add(struct net *net, struct xfrm_policy *xp,
> + struct xfrm_user_offload *xuo, u8 dir)
> +{
> + struct xfrm_dev_offload *xdo = &xp->xdo;
> + struct net_device *dev;
> + int err;
> +
> + if (!xuo->flags || xuo->flags & ~XFRM_OFFLOAD_FULL)
> + /* We support only Full offload mode and it means
> + * that user must set XFRM_OFFLOAD_FULL bit.
> + */
> + return -EINVAL;
Minor nit: Please add the comment before the 'if' statement or
use braces.
Powered by blists - more mailing lists