netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Anastasov <ja@ssi.bg>
To: zhang kai <zhangkaiheb@126.com>
Cc: Wensong Zhang <wensong@linux-vs.org>,
	Simon Horman <horms@verge.net.au>,
	lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] ipvs: no need to update skb route entry for local destination packets.
Date: Mon, 30 Sep 2019 21:49:38 +0300 (EEST)	[thread overview]
Message-ID: <alpine.LFD.2.21.1909302146530.2706@ja.home.ssi.bg> (raw)
In-Reply-To: <20190930051455.GA20692@toolchain>


	Hello,

On Mon, 30 Sep 2019, zhang kai wrote:

> In the end of function __ip_vs_get_out_rt/__ip_vs_get_out_rt_v6,the
> 'local' variable is always zero.
> 
> Signed-off-by: zhang kai <zhangkaiheb@126.com>

	Looks good to me, thanks!

Acked-by: Julian Anastasov <ja@ssi.bg>

	Simon, this is for -next kernels...

> ---
>  net/netfilter/ipvs/ip_vs_xmit.c | 18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
> index 9c464d24beec..037c7c91044e 100644
> --- a/net/netfilter/ipvs/ip_vs_xmit.c
> +++ b/net/netfilter/ipvs/ip_vs_xmit.c
> @@ -407,12 +407,9 @@ __ip_vs_get_out_rt(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb,
>  		goto err_put;
>  
>  	skb_dst_drop(skb);
> -	if (noref) {
> -		if (!local)
> -			skb_dst_set_noref(skb, &rt->dst);
> -		else
> -			skb_dst_set(skb, dst_clone(&rt->dst));
> -	} else
> +	if (noref)
> +		skb_dst_set_noref(skb, &rt->dst);
> +	else
>  		skb_dst_set(skb, &rt->dst);
>  
>  	return local;
> @@ -574,12 +571,9 @@ __ip_vs_get_out_rt_v6(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb,
>  		goto err_put;
>  
>  	skb_dst_drop(skb);
> -	if (noref) {
> -		if (!local)
> -			skb_dst_set_noref(skb, &rt->dst);
> -		else
> -			skb_dst_set(skb, dst_clone(&rt->dst));
> -	} else
> +	if (noref)
> +		skb_dst_set_noref(skb, &rt->dst);
> +	else
>  		skb_dst_set(skb, &rt->dst);
>  
>  	return local;
> -- 
> 2.17.1

Regards

--
Julian Anastasov <ja@ssi.bg>

       reply	other threads:[~2019-09-30 20:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190930051455.GA20692@toolchain>
2019-09-30 18:49 ` Julian Anastasov [this message]
2019-10-01  9:54   ` [PATCH] ipvs: no need to update skb route entry for local destination packets Simon Horman

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=alpine.LFD.2.21.1909302146530.2706@ja.home.ssi.bg \
    --to=ja@ssi.bg \
    --cc=horms@verge.net.au \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=wensong@linux-vs.org \
    --cc=zhangkaiheb@126.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).