netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Eyal Birger <eyal.birger@gmail.com>
Cc: steffen.klassert@secunet.com, herbert@gondor.apana.org.au,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	dsahern@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
	devel@linux-ipsec.org
Subject: Re: [PATCH ipsec 1/2] xfrm: extract dst lookup parameters into a struct
Date: Mon, 2 Sep 2024 10:32:07 +0100	[thread overview]
Message-ID: <20240902093207.GG23170@kernel.org> (raw)
In-Reply-To: <20240901235737.2757335-2-eyal.birger@gmail.com>

On Sun, Sep 01, 2024 at 04:57:36PM -0700, Eyal Birger wrote:
> Preparation for adding more fields to dst lookup functions without
> changing their signatures.
> 
> Signed-off-by: Eyal Birger <eyal.birger@gmail.com>

...

> diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c

...

> @@ -277,9 +279,12 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x,
>  			daddr = &x->props.saddr;
>  		}
>  
> -		dst = __xfrm_dst_lookup(net, 0, 0, saddr, daddr,
> -					x->props.family,
> -					xfrm_smark_get(0, x));
> +		memset(&params, 0, sizeof(params));
> +		params.net = net;
> +		params.saddr = saddr;
> +		params.daddr = saddr;

Hi Eyal,

Should this be: params.daddr = daddr;
                               ^^^^^

daddr is flagged as set but otherwise unused by W=1 allmodconfig builds.

> +		params.mark = xfrm_smark_get(0, x);
> +		dst = __xfrm_dst_lookup(x->props.family, &params);
>  		if (IS_ERR(dst))
>  			return (is_packet_offload) ? -EINVAL : 0;
>  

  reply	other threads:[~2024-09-02  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-01 23:57 [PATCH ipsec 0/2] xfrm: respect ip proto rules criteria in xfrm dst lookups Eyal Birger
2024-09-01 23:57 ` [PATCH ipsec 1/2] xfrm: extract dst lookup parameters into a struct Eyal Birger
2024-09-02  9:32   ` Simon Horman [this message]
2024-09-02 10:54     ` Eyal Birger
2024-09-01 23:57 ` [PATCH ipsec 2/2] xfrm: respect ip protocols rules criteria when performing dst lookups Eyal Birger
2024-09-02  8:00 ` [PATCH ipsec 0/2] xfrm: respect ip proto rules criteria in xfrm " Steffen Klassert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240902093207.GG23170@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devel@linux-ipsec.org \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=eyal.birger@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).