[SRU][F:linux-bluefield][PATCH] UBUNTU: SAUCE: xfrm: IPsec Export xfrm_policy_lookup_bytype function
Bodong Wang
bodong at nvidia.com
Tue Jul 6 17:15:24 UTC 2021
On 7/2/2021 2:51 AM, Stefan Bader wrote:
> 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,
>>
>
>
Updated bug report accordingly. Thanks.
More information about the kernel-team
mailing list