Message ID | 1365931311-26285-1-git-send-email-mike.rapoport@ravellosystems.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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...
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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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.
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 :)
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! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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);
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(-)