[SRU][F:linux-bluefield][PATCH] UBUNTU: SAUCE: xfrm: IPsec Export xfrm_policy_lookup_bytype function
Stefan Bader
stefan.bader at canonical.com
Fri Jul 2 07:51:27 UTC 2021
On 01.07.21 18:47, Bodong Wang wrote:
> From: Raed Salem <raeds at nvidia.com>
>
> BugLink: https://launchpad.net/bugs/1934313
>
> Export policy lookup function so drivers could lookup
> a policy that match specific criteria.
>
> Signed-off-by: Raed Salem <raeds at nvidia.com>
> Signed-off-by: Bodong Wang <bodong at nvidia.com>
> ---
The bug report should contain the standard SRU justification boilerplate info.
-Stefan
> include/net/xfrm.h | 4 ++++
> net/xfrm/xfrm_policy.c | 9 +++++----
> 2 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/include/net/xfrm.h b/include/net/xfrm.h
> index bb89b6f6..f9e6b50 100644
> --- a/include/net/xfrm.h
> +++ b/include/net/xfrm.h
> @@ -345,6 +345,10 @@ int km_query(struct xfrm_state *x, struct xfrm_tmpl *t,
> struct xfrm_policy *pol);
> void km_state_expired(struct xfrm_state *x, int hard, u32 portid);
> int __xfrm_state_delete(struct xfrm_state *x);
> +struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
> + const struct flowi *fl,
> + u16 family, u8 dir,
> + u32 if_id);
>
> struct xfrm_state_afinfo {
> u8 family;
> diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
> index cfbe490..e318ec7 100644
> --- a/net/xfrm/xfrm_policy.c
> +++ b/net/xfrm/xfrm_policy.c
> @@ -2071,10 +2071,10 @@ static int xfrm_policy_match(const struct xfrm_policy *pol,
> return prefer;
> }
>
> -static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
> - const struct flowi *fl,
> - u16 family, u8 dir,
> - u32 if_id)
> +struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
> + const struct flowi *fl,
> + u16 family, u8 dir,
> + u32 if_id)
> {
> struct xfrm_pol_inexact_candidates cand;
> const xfrm_address_t *daddr, *saddr;
> @@ -2135,6 +2135,7 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
>
> return ret;
> }
> +EXPORT_SYMBOL(xfrm_policy_lookup_bytype);
>
> static struct xfrm_policy *xfrm_policy_lookup(struct net *net,
> const struct flowi *fl,
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20210702/a8e3bb4e/attachment-0001.sig>
More information about the kernel-team
mailing list