netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pravin Shelar <pshelar@ovn.org>
To: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Girish Moodalbail <girish.moodalbail@oracle.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] geneve: Fix setting ttl value in collect metadata mode
Date: Tue, 12 Sep 2017 16:43:16 -0700	[thread overview]
Message-ID: <CAOrHB_AWuWXw1fLvY2arKf0XO6GM0g379KDadwf=ymz47cTOMw@mail.gmail.com> (raw)
In-Reply-To: <1505199911-21153-1-git-send-email-yanhaishuang@cmss.chinamobile.com>

On Tue, Sep 12, 2017 at 12:05 AM, Haishuang Yan
<yanhaishuang@cmss.chinamobile.com> wrote:
> Similar to vxlan/ipip tunnel, if key->tos is zero in collect metadata
> mode, tos should also fallback to ip{4,6}_dst_hoplimit.
>
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
>
> ---
> Changes since v2:
>   * Make the commit message more clearer.
> ---
>  drivers/net/geneve.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
> index f640407..d52a65f 100644
> --- a/drivers/net/geneve.c
> +++ b/drivers/net/geneve.c
> @@ -834,11 +834,10 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
>         sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
>         if (geneve->collect_md) {
>                 tos = ip_tunnel_ecn_encap(key->tos, ip_hdr(skb), skb);
> -               ttl = key->ttl;
>         } else {
>                 tos = ip_tunnel_ecn_encap(fl4.flowi4_tos, ip_hdr(skb), skb);
> -               ttl = key->ttl ? : ip4_dst_hoplimit(&rt->dst);
>         }
> +       ttl = key->ttl ? : ip4_dst_hoplimit(&rt->dst);
>         df = key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0;
>
This changes user API of Geneve collect-metadata mode. I do not see
good reason for this. Why user can not set right TTL for the flow?

  reply	other threads:[~2017-09-12 23:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12  7:05 [PATCH v2] geneve: Fix setting ttl value in collect metadata mode Haishuang Yan
2017-09-12 23:43 ` Pravin Shelar [this message]
2017-09-13 11:15   ` 严海双
2017-09-13 20:22     ` Pravin Shelar

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='CAOrHB_AWuWXw1fLvY2arKf0XO6GM0g379KDadwf=ymz47cTOMw@mail.gmail.com' \
    --to=pshelar@ovn.org \
    --cc=davem@davemloft.net \
    --cc=girish.moodalbail@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yanhaishuang@cmss.chinamobile.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).