Commit 054552f
logical-fields: Fix IPv6 dp flow explosion caused by ip6.mcast_rsvd.
OVN routers are configured to drop any traffic with a destination
being one of the Reserved Multicast Addresses (RFC 4291).
This is done by matching on all the bits of ipv6.dst, except for bits
112-116 that cover all the addresses. Once installed into OVS, this
turns into a following match:
ipv6_dst=ff00::/fff0:ffff:ffff:ffff:ffff:ffff:ffff:ffff
We fixed a large chunk of IPv6 datapath flow explosion issues by
turning on prefix tacking in the flow classifier in OVS in commit
89e43f7 ("controller: Fix IPv6 dp flow explosion by setting flow
table prefixes."). However, prefix tracking doesn't work for masks
that are not contiguous. That means that if a packet reaches a
classifier subtable with non-contiguous mask, all the bits of that
mask will be un-wildcarded. It's not a huge problem in a general case,
because most non-contiguous masks would typically match on just a few
bits. But ip6.mcast_rsvd is matching on 124 bits, un-wildcarding them
for most of the IPv6 traffic traversing a router and causing creation
of a separate exact-match datapath flow per destination IP.
For setups that handle large amount of traffic from many different
external addresses this issue makes IPv6 handling significantly harder
than IPv4, causing much higher load on the datapath with potential
overflow of datapath flow tables and a subsequent upcall storm.
Even without the overflow, OVS spends a lot of time revalidating all
these datapath flows burning CPU cycles.
In general, since the number of external IP addresses is virtually
unlimited, there should be no configuration where OVN exact-matches
them, otherwise it will be a significant datapath scaling issue.
Fix that by replacing a non-contiguous bit-match with a match on an
address set where all the reserved multicast addresses are just listed
directly. There are only 16 of them, so this should not be a huge
problem to have extra 15 OpenFlow rules per router, but it will allow
OVS to use prefix tracking for these flows and avoid creating separate
datapath flow per destination IP.
Also adding a simple lsp-to-external routing test case to make sure
we don't have exact matches in this simple common use case.
The OVS classifier can likely be improved to handle non-contiguous
masks better, but it's not how the prefix tracking is designed, so
it's not a simple task.
Fixes: 677a3ba ("ovn: Add MLD support.")
Reported-at: https://issues.redhat.com/browse/FDP-1557
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Han Zhou <hzhou@ovn.org>
(cherry picked from commit ab19375)1 parent 4e12cc2 commit 054552f
2 files changed
Lines changed: 157 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
266 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40565 | 40565 | | |
40566 | 40566 | | |
40567 | 40567 | | |
| 40568 | + | |
| 40569 | + | |
| 40570 | + | |
| 40571 | + | |
| 40572 | + | |
| 40573 | + | |
| 40574 | + | |
| 40575 | + | |
| 40576 | + | |
| 40577 | + | |
| 40578 | + | |
| 40579 | + | |
| 40580 | + | |
| 40581 | + | |
| 40582 | + | |
| 40583 | + | |
| 40584 | + | |
| 40585 | + | |
| 40586 | + | |
| 40587 | + | |
| 40588 | + | |
| 40589 | + | |
| 40590 | + | |
| 40591 | + | |
| 40592 | + | |
| 40593 | + | |
| 40594 | + | |
| 40595 | + | |
| 40596 | + | |
| 40597 | + | |
| 40598 | + | |
| 40599 | + | |
| 40600 | + | |
| 40601 | + | |
| 40602 | + | |
| 40603 | + | |
| 40604 | + | |
| 40605 | + | |
| 40606 | + | |
| 40607 | + | |
| 40608 | + | |
| 40609 | + | |
| 40610 | + | |
| 40611 | + | |
| 40612 | + | |
| 40613 | + | |
| 40614 | + | |
| 40615 | + | |
| 40616 | + | |
| 40617 | + | |
| 40618 | + | |
| 40619 | + | |
| 40620 | + | |
| 40621 | + | |
| 40622 | + | |
| 40623 | + | |
| 40624 | + | |
| 40625 | + | |
| 40626 | + | |
| 40627 | + | |
| 40628 | + | |
| 40629 | + | |
| 40630 | + | |
| 40631 | + | |
| 40632 | + | |
| 40633 | + | |
| 40634 | + | |
| 40635 | + | |
| 40636 | + | |
| 40637 | + | |
| 40638 | + | |
| 40639 | + | |
| 40640 | + | |
| 40641 | + | |
| 40642 | + | |
| 40643 | + | |
| 40644 | + | |
| 40645 | + | |
| 40646 | + | |
| 40647 | + | |
| 40648 | + | |
| 40649 | + | |
| 40650 | + | |
| 40651 | + | |
| 40652 | + | |
| 40653 | + | |
| 40654 | + | |
| 40655 | + | |
| 40656 | + | |
| 40657 | + | |
| 40658 | + | |
| 40659 | + | |
| 40660 | + | |
| 40661 | + | |
| 40662 | + | |
| 40663 | + | |
| 40664 | + | |
| 40665 | + | |
| 40666 | + | |
| 40667 | + | |
| 40668 | + | |
| 40669 | + | |
| 40670 | + | |
| 40671 | + | |
| 40672 | + | |
| 40673 | + | |
| 40674 | + | |
| 40675 | + | |
| 40676 | + | |
| 40677 | + | |
| 40678 | + | |
| 40679 | + | |
| 40680 | + | |
| 40681 | + | |
| 40682 | + | |
| 40683 | + | |
| 40684 | + | |
| 40685 | + | |
| 40686 | + | |
| 40687 | + | |
| 40688 | + | |
| 40689 | + | |
| 40690 | + | |
| 40691 | + | |
| 40692 | + | |
| 40693 | + | |
| 40694 | + | |
| 40695 | + | |
| 40696 | + | |
| 40697 | + | |
| 40698 | + | |
| 40699 | + | |
| 40700 | + | |
| 40701 | + | |
| 40702 | + | |
| 40703 | + | |
| 40704 | + | |
| 40705 | + | |
| 40706 | + | |
| 40707 | + | |
| 40708 | + | |
| 40709 | + | |
| 40710 | + | |
| 40711 | + | |
| 40712 | + | |
| 40713 | + | |
| 40714 | + | |
| 40715 | + | |
| 40716 | + | |
| 40717 | + | |
| 40718 | + | |
40568 | 40719 | | |
40569 | 40720 | | |
40570 | 40721 | | |
| |||
0 commit comments