Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1731838
| From | Pravin Shelar <pshelar@ovn.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] geneve: Fix setting ttl value in collect metadata mode |
| Date | 2017-09-13 22:30 +0200 |
| Message-ID | <upmsh-3DB-9@gated-at.bofh.it> (permalink) |
| References | <uoNuy-6Cp-3@gated-at.bofh.it> <up36h-7ZN-1@gated-at.bofh.it> <updS1-6GT-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Sep 13, 2017 at 4:15 AM, 严海双 <yanhaishuang@cmss.chinamobile.com> wrote:
>
>
>> On 2017年9月13日, at 上午7:43, Pravin Shelar <pshelar@ovn.org> wrote:
>>
>> 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?
>>
>
> For example, I test this case with script samples/bpf/test_tunnel_bpf.sh,
> and modify samples/bpf/tcbpf2_kern.c with following patch:
>
But user is suppose to specify the TTL in collect-md mode for Geneve
tunnel. That is the API.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] geneve: Fix setting ttl value in collect metadata mode Haishuang Yan <yanhaishuang@cmss.chinamobile.com> - 2017-09-12 09:10 +0200
Re: [PATCH v2] geneve: Fix setting ttl value in collect metadata mode Pravin Shelar <pshelar@ovn.org> - 2017-09-13 01:50 +0200
Re: [PATCH v2] geneve: Fix setting ttl value in collect metadata mode 严海双 <yanhaishuang@cmss.chinamobile.com> - 2017-09-13 13:20 +0200
Re: [PATCH v2] geneve: Fix setting ttl value in collect metadata mode Pravin Shelar <pshelar@ovn.org> - 2017-09-13 22:30 +0200
csiph-web