* [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
@ 2013-04-14 9:21 Mike Rapoport
2013-04-14 15:24 ` Cong Wang
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Mike Rapoport @ 2013-04-14 9:21 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Stephen Hemminger, Mike Rapoport
The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
and therefore will be sent out bypassing encapsulation. This breaks
delivery of packets sent to the vxlan multicast group.
Disabling encapsulation bypass for multicasts and broadcasts fixes the
issue.
Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
---
drivers/net/vxlan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 725aba3..97a306c 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1014,7 +1014,8 @@ static netdev_tx_t vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
}
/* Bypass encapsulation if the destination is local */
- if (rt->rt_flags & RTCF_LOCAL) {
+ if (rt->rt_flags & RTCF_LOCAL &&
+ !(rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))) {
struct vxlan_dev *dst_vxlan;
ip_rt_put(rt);
--
1.8.1.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
2013-04-14 9:21 [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts Mike Rapoport
@ 2013-04-14 15:24 ` Cong Wang
2013-04-14 19:39 ` David Miller
2013-04-15 16:58 ` Cong Wang
2 siblings, 0 replies; 10+ messages in thread
From: Cong Wang @ 2013-04-14 15:24 UTC (permalink / raw)
To: netdev
On Sun, 14 Apr 2013 at 09:21 GMT, Mike Rapoport <mike.rapoport@ravellosystems.com> wrote:
> The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
> and therefore will be sent out bypassing encapsulation. This breaks
> delivery of packets sent to the vxlan multicast group.
> Disabling encapsulation bypass for multicasts and broadcasts fixes the
> issue.
>
This could probably fix the regression that I reported:
http://marc.info/?l=linux-netdev&m=136550149118954&w=2
I will test it tomorrow.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
2013-04-14 9:21 [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts Mike Rapoport
2013-04-14 15:24 ` Cong Wang
@ 2013-04-14 19:39 ` David Miller
2013-04-15 5:31 ` Mike Rapoport
2013-04-15 16:58 ` Cong Wang
2 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2013-04-14 19:39 UTC (permalink / raw)
To: mike.rapoport; +Cc: netdev, stephen
From: Mike Rapoport <mike.rapoport@ravellosystems.com>
Date: Sun, 14 Apr 2013 12:21:51 +0300
> The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
> and therefore will be sent out bypassing encapsulation. This breaks
> delivery of packets sent to the vxlan multicast group.
> Disabling encapsulation bypass for multicasts and broadcasts fixes the
> issue.
>
> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
This still won't handle the case of encapsulations occuring in different
namespaces or virtual machines.
I really want this fixed correctly.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
2013-04-14 19:39 ` David Miller
@ 2013-04-15 5:31 ` Mike Rapoport
2013-04-15 5:45 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Mike Rapoport @ 2013-04-15 5:31 UTC (permalink / raw)
To: David Miller; +Cc: netdev, stephen
On Sun, Apr 14, 2013 at 10:39 PM, David Miller <davem@davemloft.net> wrote:
> From: Mike Rapoport <mike.rapoport@ravellosystems.com>
> Date: Sun, 14 Apr 2013 12:21:51 +0300
>
>> The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
>> and therefore will be sent out bypassing encapsulation. This breaks
>> delivery of packets sent to the vxlan multicast group.
>> Disabling encapsulation bypass for multicasts and broadcasts fixes the
>> issue.
>>
>> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
>
> This still won't handle the case of encapsulations occuring in different
> namespaces or virtual machines.
>
> I really want this fixed correctly.
I'm sorry, but I don't quite follow you. The patch does not aim to
reduce the amount of encapsulation. On the contrary, it prevents some
packets from being encapsulated when they should not be...
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
2013-04-15 5:31 ` Mike Rapoport
@ 2013-04-15 5:45 ` David Miller
2013-04-15 6:23 ` Mike Rapoport
2013-04-15 13:32 ` Mike Rapoport
0 siblings, 2 replies; 10+ messages in thread
From: David Miller @ 2013-04-15 5:45 UTC (permalink / raw)
To: mike.rapoport; +Cc: netdev, stephen
From: Mike Rapoport <mike.rapoport@ravellosystems.com>
Date: Mon, 15 Apr 2013 08:31:15 +0300
> On Sun, Apr 14, 2013 at 10:39 PM, David Miller <davem@davemloft.net> wrote:
>> From: Mike Rapoport <mike.rapoport@ravellosystems.com>
>> Date: Sun, 14 Apr 2013 12:21:51 +0300
>>
>>> The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
>>> and therefore will be sent out bypassing encapsulation. This breaks
>>> delivery of packets sent to the vxlan multicast group.
>>> Disabling encapsulation bypass for multicasts and broadcasts fixes the
>>> issue.
>>>
>>> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
>>
>> This still won't handle the case of encapsulations occuring in different
>> namespaces or virtual machines.
>>
>> I really want this fixed correctly.
>
> I'm sorry, but I don't quite follow you. The patch does not aim to
> reduce the amount of encapsulation. On the contrary, it prevents some
> packets from being encapsulated when they should not be...
I'm saying you need to make sure the bypass is avoided in these
situations as well.
There is an ongoing discussion about this on the list between Cong
Wang and the author of the bypass changes.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
2013-04-15 5:45 ` David Miller
@ 2013-04-15 6:23 ` Mike Rapoport
2013-04-15 13:32 ` Mike Rapoport
1 sibling, 0 replies; 10+ messages in thread
From: Mike Rapoport @ 2013-04-15 6:23 UTC (permalink / raw)
To: David Miller; +Cc: netdev, stephen
On Mon, Apr 15, 2013 at 8:45 AM, David Miller <davem@davemloft.net> wrote:
> From: Mike Rapoport <mike.rapoport@ravellosystems.com>
> Date: Mon, 15 Apr 2013 08:31:15 +0300
>
>> On Sun, Apr 14, 2013 at 10:39 PM, David Miller <davem@davemloft.net> wrote:
>>> From: Mike Rapoport <mike.rapoport@ravellosystems.com>
>>> Date: Sun, 14 Apr 2013 12:21:51 +0300
>>>
>>>> The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
>>>> and therefore will be sent out bypassing encapsulation. This breaks
>>>> delivery of packets sent to the vxlan multicast group.
>>>> Disabling encapsulation bypass for multicasts and broadcasts fixes the
>>>> issue.
>>>>
>>>> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
>>>
>>> This still won't handle the case of encapsulations occuring in different
>>> namespaces or virtual machines.
>>>
>>> I really want this fixed correctly.
>>
>> I'm sorry, but I don't quite follow you. The patch does not aim to
>> reduce the amount of encapsulation. On the contrary, it prevents some
>> packets from being encapsulated when they should not be...
>
> I'm saying you need to make sure the bypass is avoided in these
> situations as well.
Ok, I see, thanks.
> There is an ongoing discussion about this on the list between Cong
> Wang and the author of the bypass changes.
Yes, I'm following that discussion.
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
2013-04-15 5:45 ` David Miller
2013-04-15 6:23 ` Mike Rapoport
@ 2013-04-15 13:32 ` Mike Rapoport
1 sibling, 0 replies; 10+ messages in thread
From: Mike Rapoport @ 2013-04-15 13:32 UTC (permalink / raw)
To: David Miller; +Cc: netdev, stephen
On Mon, Apr 15, 2013 at 8:45 AM, David Miller <davem@davemloft.net> wrote:
> From: Mike Rapoport <mike.rapoport@ravellosystems.com>
> Date: Mon, 15 Apr 2013 08:31:15 +0300
>
>> On Sun, Apr 14, 2013 at 10:39 PM, David Miller <davem@davemloft.net> wrote:
>>> From: Mike Rapoport <mike.rapoport@ravellosystems.com>
>>> Date: Sun, 14 Apr 2013 12:21:51 +0300
>>>
>>>> The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
>>>> and therefore will be sent out bypassing encapsulation. This breaks
>>>> delivery of packets sent to the vxlan multicast group.
>>>> Disabling encapsulation bypass for multicasts and broadcasts fixes the
>>>> issue.
>>>>
>>>> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
>>>
>>> This still won't handle the case of encapsulations occuring in different
>>> namespaces or virtual machines.
>>>
>>> I really want this fixed correctly.
>>
>> I'm sorry, but I don't quite follow you. The patch does not aim to
>> reduce the amount of encapsulation. On the contrary, it prevents some
>> packets from being encapsulated when they should not be...
>
> I'm saying you need to make sure the bypass is avoided in these
> situations as well.
I've tried the cases with different namespaces and virtual machines.
Both worked for me.
Maybe I'm missing something, but I could not identify a case where
encapsulation occurs when it should not.
> There is an ongoing discussion about this on the list between Cong
> Wang and the author of the bypass changes.
And it seems that for Sridhar Samudrala it worked as well :)
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
2013-04-14 9:21 [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts Mike Rapoport
2013-04-14 15:24 ` Cong Wang
2013-04-14 19:39 ` David Miller
@ 2013-04-15 16:58 ` Cong Wang
2013-04-15 17:39 ` Sridhar Samudrala
2013-04-15 18:06 ` David Miller
2 siblings, 2 replies; 10+ messages in thread
From: Cong Wang @ 2013-04-15 16:58 UTC (permalink / raw)
To: netdev
On Sun, 14 Apr 2013 at 09:21 GMT, Mike Rapoport <mike.rapoport@ravellosystems.com> wrote:
> The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
> and therefore will be sent out bypassing encapsulation. This breaks
> delivery of packets sent to the vxlan multicast group.
> Disabling encapsulation bypass for multicasts and broadcasts fixes the
> issue.
>
> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
This fixes the regression I reported.
Tested-by: Cong Wang <xiyou.wangcong@gmail.com>
Thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
2013-04-15 16:58 ` Cong Wang
@ 2013-04-15 17:39 ` Sridhar Samudrala
2013-04-15 18:06 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: Sridhar Samudrala @ 2013-04-15 17:39 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, davem@davemloft.net
On 4/15/2013 9:58 AM, Cong Wang wrote:
> On Sun, 14 Apr 2013 at 09:21 GMT, Mike Rapoport <mike.rapoport@ravellosystems.com> wrote:
>> The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
>> and therefore will be sent out bypassing encapsulation. This breaks
>> delivery of packets sent to the vxlan multicast group.
>> Disabling encapsulation bypass for multicasts and broadcasts fixes the
>> issue.
>>
>> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
> This fixes the regression I reported.
>
> Tested-by: Cong Wang <xiyou.wangcong@gmail.com>
>
>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Tested-by: Sridhar Samudrala <sri@us.ibm.com>
Thanks
Sridhar
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts
2013-04-15 16:58 ` Cong Wang
2013-04-15 17:39 ` Sridhar Samudrala
@ 2013-04-15 18:06 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2013-04-15 18:06 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Mon, 15 Apr 2013 16:58:02 +0000 (UTC)
> On Sun, 14 Apr 2013 at 09:21 GMT, Mike Rapoport <mike.rapoport@ravellosystems.com> wrote:
>> The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
>> and therefore will be sent out bypassing encapsulation. This breaks
>> delivery of packets sent to the vxlan multicast group.
>> Disabling encapsulation bypass for multicasts and broadcasts fixes the
>> issue.
>>
>> Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
>
> This fixes the regression I reported.
>
> Tested-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-04-15 18:06 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-14 9:21 [PATCH net-next] vxlan: don't bypass encapsulation for multi- and broadcasts Mike Rapoport
2013-04-14 15:24 ` Cong Wang
2013-04-14 19:39 ` David Miller
2013-04-15 5:31 ` Mike Rapoport
2013-04-15 5:45 ` David Miller
2013-04-15 6:23 ` Mike Rapoport
2013-04-15 13:32 ` Mike Rapoport
2013-04-15 16:58 ` Cong Wang
2013-04-15 17:39 ` Sridhar Samudrala
2013-04-15 18:06 ` David Miller
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).