All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Anastasov <ja@ssi.bg>
To: Vadim Fedorenko <vfedorenko@yandex-team.ru>
Cc: Wensong Zhang <wensong@linux-vs.org>,
	Simon Horman <horms@verge.net.au>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Patrick McHardy <kaber@trash.net>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, lvs-devel@vger.kernel.org
Subject: Re: [PATCH] Implement full-functionality option for ECN encapsulation in tunnel
Date: Wed, 15 Feb 2017 22:39:16 +0200 (EET)	[thread overview]
Message-ID: <alpine.LFD.2.11.1702152235410.1942@ja.home.ssi.bg> (raw)
In-Reply-To: <1487165636-10157-1-git-send-email-vfedorenko@yandex-team.ru>


	Hello,

On Wed, 15 Feb 2017, Vadim Fedorenko wrote:

> IPVS tunnel mode works as simple tunnel (see RFC 3168) copying ECN field
> to outer header. That's result in packet drops on egress tunnels in case
> the egress tunnel operates as ECN-capable with Full-functionality option
> (like ip_tunnel and ip6_tunnel kernel modules), according to RFC 3168
> section 9.1.1 recommendation.
> 
> This patch implements ECN full-functionality option into ipvs xmit code.
> 
> Cc: netdev@vger.kernel.org
> Cc: lvs-devel@vger.kernel.org
> Signed-off-by: Vadim Fedorenko <vfedorenko@yandex-team.ru>
> Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>

	Looks good to me, thanks!

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

> ---
>  net/netfilter/ipvs/ip_vs_xmit.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
> index 01d3d89..b3286f3 100644
> --- a/net/netfilter/ipvs/ip_vs_xmit.c
> +++ b/net/netfilter/ipvs/ip_vs_xmit.c
> @@ -879,6 +879,7 @@ static inline int ip_vs_send_or_cont(int pf, struct sk_buff *skb,
>  {
>  	struct sk_buff *new_skb = NULL;
>  	struct iphdr *old_iph = NULL;
> +	__u8 old_dsfield;
>  #ifdef CONFIG_IP_VS_IPV6
>  	struct ipv6hdr *old_ipv6h = NULL;
>  #endif
> @@ -903,7 +904,7 @@ static inline int ip_vs_send_or_cont(int pf, struct sk_buff *skb,
>  			*payload_len =
>  				ntohs(old_ipv6h->payload_len) +
>  				sizeof(*old_ipv6h);
> -		*dsfield = ipv6_get_dsfield(old_ipv6h);
> +		old_dsfield = ipv6_get_dsfield(old_ipv6h);
>  		*ttl = old_ipv6h->hop_limit;
>  		if (df)
>  			*df = 0;
> @@ -918,12 +919,15 @@ static inline int ip_vs_send_or_cont(int pf, struct sk_buff *skb,
>  
>  		/* fix old IP header checksum */
>  		ip_send_check(old_iph);
> -		*dsfield = ipv4_get_dsfield(old_iph);
> +		old_dsfield = ipv4_get_dsfield(old_iph);
>  		*ttl = old_iph->ttl;
>  		if (payload_len)
>  			*payload_len = ntohs(old_iph->tot_len);
>  	}
>  
> +	/* Implement full-functionality option for ECN encapsulation */
> +	*dsfield = INET_ECN_encapsulate(old_dsfield, old_dsfield);
> +
>  	return skb;
>  error:
>  	kfree_skb(skb);
> -- 
> 1.9.1

Regards

--
Julian Anastasov <ja@ssi.bg>

  reply	other threads:[~2017-02-15 20:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 13:33 [PATCH] Implement full-functionality option for ECN encapsulation in tunnel Vadim Fedorenko
2017-02-15 20:39 ` Julian Anastasov [this message]
     [not found]   ` <392771506413394@webcorp01h.yandex-team.ru>
2017-09-26 12:07     ` Pablo Neira Ayuso

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.11.1702152235410.1942@ja.home.ssi.bg \
    --to=ja@ssi.bg \
    --cc=davem@davemloft.net \
    --cc=horms@verge.net.au \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=vfedorenko@yandex-team.ru \
    --cc=wensong@linux-vs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.