From: linmiaohe <linmiaohe@huawei.com>
To: David Ahern <dsahern@gmail.com>, <davem@davemloft.net>,
<kuznet@ms2.inr.ac.ru>, <yoshfuji@linux-ipv6.org>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: mousuanming <mousuanming@huawei.com>,
Mingfangsen <mingfangsen@huawei.com>
Subject: Re: [PATCH v2] net: route: Fix vrf dst_entry ref count false increasing
Date: Sun, 5 May 2019 11:28:11 +0800 [thread overview]
Message-ID: <77f00304-a9c6-f5b2-2fc8-79da444630e9@huawei.com> (raw)
In-Reply-To: <7702f04c-648d-eed1-d6eb-20132012d29f@gmail.com>
On 2019/5/5 10:56, David Ahern wrote:
> On 5/4/19 8:11 PM, linmiaohe wrote:
>>
>>
>> On 2019/5/4 22:59, David Ahern wrote:
>>> On 5/4/19 7:13 AM, linmiaohe wrote:
>>>> From: Suanming.Mou <mousuanming@huawei.com>
>>>>
>>>> When config ip in default vrf same as the ip in specified
>>>> vrf, fib_lookup will return the route from table local
>>>> even if the in device is an enslaved l3mdev. Then the
>>>
>>> you need to move the local rule with a preference of 0 after the l3mdev
>>> rule.
>>>
>>>
>>
>> Move the local rule after l3mdev rule can get rid of this problem. And
>> even if this happend, we can delete the same ip address in default vrf
>> to fix it.
>> But I think maybe it's still a problem because other rule with default
>> vrf out device holds the specified vrf device. It looks unreasonable.
>>
>> Many Thanks.
>>
>
> VRF is implemented using policy routing. If you do not move the local
> rule below the l3mdev rule, you are doing a lookup in the local table
> first, then vrf table, then main table. Doing the local table first can
> result in false hits - like the case of duplicate IP addresses in
> default VRF and a VRF. In short, it is just wrong.
>
> Looking at the VRF documentation in the kernel tree I do see such a
> comment is missing, but I do mention in all of the VRF tutorials such as
> this one (see slide 79):
>
> http://schd.ws/hosted_files/ossna2017/fe/vrf-tutorial-oss.pdf
>
> .
>
Thanks for your patience. As it's just like the case of duplicate
IP addresses in default VRF and a VRF and can be fix by hand, we
needn't this patch anymore.
Best regards.
prev parent reply other threads:[~2019-05-05 3:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 13:13 linmiaohe
2019-05-04 14:59 ` David Ahern
2019-05-05 2:11 ` linmiaohe
2019-05-05 2:56 ` David Ahern
2019-05-05 3:28 ` linmiaohe [this message]
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=77f00304-a9c6-f5b2-2fc8-79da444630e9@huawei.com \
--to=linmiaohe@huawei.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mingfangsen@huawei.com \
--cc=mousuanming@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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
all inboxes | Powered by JetHome®