netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Hangbin Liu <liuhangbin@gmail.com>, netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Phil Sutter <phil@nwl.cc>
Subject: Re: [PATCH net-next] geneve: fix ttl inherit type
Date: Fri, 28 Sep 2018 11:59:37 -0600	[thread overview]
Message-ID: <b4f9a3b2-34eb-351b-15d2-867c033d667e@gmail.com> (raw)
In-Reply-To: <1538096998-20937-1-git-send-email-liuhangbin@gmail.com>

On 9/27/18 7:09 PM, Hangbin Liu wrote:
> Phil pointed out that there is a mismatch between vxlan and geneve ttl
> inherit. We should define it as a flag and use nla_put_flag to export this
> opiton.
> 
> Fixes: 52d0d404d39dd ("geneve: add ttl inherit support")

same here .. getting an unknown commit id.


> Reported-by: Phil Sutter <phil@nwl.cc>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
>  drivers/net/geneve.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
> index 6625fab..09ab2fd 100644
> --- a/drivers/net/geneve.c
> +++ b/drivers/net/geneve.c
> @@ -1100,7 +1100,7 @@ static const struct nla_policy geneve_policy[IFLA_GENEVE_MAX + 1] = {
>  	[IFLA_GENEVE_UDP_CSUM]		= { .type = NLA_U8 },
>  	[IFLA_GENEVE_UDP_ZERO_CSUM6_TX]	= { .type = NLA_U8 },
>  	[IFLA_GENEVE_UDP_ZERO_CSUM6_RX]	= { .type = NLA_U8 },
> -	[IFLA_GENEVE_TTL_INHERIT]	= { .type = NLA_U8 },
> +	[IFLA_GENEVE_TTL_INHERIT]	= { .type = NLA_FLAG },
>  };
>  
>  static int geneve_validate(struct nlattr *tb[], struct nlattr *data[],
> @@ -1582,7 +1582,7 @@ static size_t geneve_get_size(const struct net_device *dev)
>  		nla_total_size(sizeof(__u8)) + /* IFLA_GENEVE_UDP_CSUM */
>  		nla_total_size(sizeof(__u8)) + /* IFLA_GENEVE_UDP_ZERO_CSUM6_TX */
>  		nla_total_size(sizeof(__u8)) + /* IFLA_GENEVE_UDP_ZERO_CSUM6_RX */
> -		nla_total_size(sizeof(__u8)) + /* IFLA_GENEVE_TTL_INHERIT */
> +		nla_total_size(0) + 	/* IFLA_GENEVE_TTL_INHERIT */
>  		0;
>  }
>  
> @@ -1636,7 +1636,7 @@ static int geneve_fill_info(struct sk_buff *skb, const struct net_device *dev)
>  		goto nla_put_failure;
>  #endif
>  
> -	if (nla_put_u8(skb, IFLA_GENEVE_TTL_INHERIT, ttl_inherit))
> +	if (ttl_inherit && nla_put_flag(skb, IFLA_GENEVE_TTL_INHERIT))
>  		goto nla_put_failure;
>  
>  	return 0;
> 

  parent reply	other threads:[~2018-09-29  0:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28  1:09 [PATCH net-next] geneve: fix ttl inherit type Hangbin Liu
2018-09-28 10:38 ` Phil Sutter
2018-09-28 17:59 ` David Ahern [this message]
2018-09-29  9:20   ` Hangbin Liu
2018-09-28 23:46 ` Michal Kubecek
2018-09-29  9:16   ` Hangbin Liu
2018-10-01 10:56     ` Phil Sutter
2018-09-29 15:03   ` Hangbin Liu
2018-09-29 15:06 ` [PATCHv2 net-next] geneve: allow to clear ttl inherit Hangbin Liu
2018-10-04 20:55   ` David Miller

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=b4f9a3b2-34eb-351b-15d2-867c033d667e@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    --cc=stephen@networkplumber.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 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).