Commit e4188f8
netfilter: nf_tables: integrate pipapo into commit protocol
[ Upstream commit 212ed75 ]
The pipapo set backend follows copy-on-update approach, maintaining one
clone of the existing datastructure that is being updated. The clone
and current datastructures are swapped via rcu from the commit step.
The existing integration with the commit protocol is flawed because
there is no operation to clean up the clone if the transaction is
aborted. Moreover, the datastructure swap happens on set element
activation.
This patch adds two new operations for sets: commit and abort, these new
operations are invoked from the commit and abort steps, after the
transactions have been digested, and it updates the pipapo set backend
to use it.
This patch adds a new ->pending_update field to sets to maintain a list
of sets that require this new commit and abort operations.
Fixes: 3c4287f ("nf_tables: Add set type for arbitrary concatenation of ranges")
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>1 parent 4da9d4e commit e4188f8
File tree
3 files changed
+99
-16
lines changed- include/net/netfilter
- net/netfilter
3 files changed
+99
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
| 431 | + | |
431 | 432 | | |
432 | 433 | | |
433 | 434 | | |
| |||
522 | 523 | | |
523 | 524 | | |
524 | 525 | | |
| 526 | + | |
525 | 527 | | |
526 | 528 | | |
527 | 529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4633 | 4633 | | |
4634 | 4634 | | |
4635 | 4635 | | |
| 4636 | + | |
4636 | 4637 | | |
4637 | 4638 | | |
4638 | 4639 | | |
| |||
8786 | 8787 | | |
8787 | 8788 | | |
8788 | 8789 | | |
| 8790 | + | |
| 8791 | + | |
| 8792 | + | |
| 8793 | + | |
| 8794 | + | |
| 8795 | + | |
| 8796 | + | |
| 8797 | + | |
| 8798 | + | |
| 8799 | + | |
| 8800 | + | |
| 8801 | + | |
| 8802 | + | |
| 8803 | + | |
8789 | 8804 | | |
8790 | 8805 | | |
8791 | 8806 | | |
8792 | 8807 | | |
| 8808 | + | |
8793 | 8809 | | |
8794 | 8810 | | |
8795 | 8811 | | |
| |||
8948 | 8964 | | |
8949 | 8965 | | |
8950 | 8966 | | |
| 8967 | + | |
| 8968 | + | |
| 8969 | + | |
| 8970 | + | |
| 8971 | + | |
8951 | 8972 | | |
8952 | 8973 | | |
8953 | 8974 | | |
| |||
8961 | 8982 | | |
8962 | 8983 | | |
8963 | 8984 | | |
| 8985 | + | |
| 8986 | + | |
| 8987 | + | |
| 8988 | + | |
| 8989 | + | |
8964 | 8990 | | |
8965 | 8991 | | |
8966 | 8992 | | |
| |||
9021 | 9047 | | |
9022 | 9048 | | |
9023 | 9049 | | |
| 9050 | + | |
| 9051 | + | |
9024 | 9052 | | |
9025 | 9053 | | |
9026 | 9054 | | |
| |||
9077 | 9105 | | |
9078 | 9106 | | |
9079 | 9107 | | |
| 9108 | + | |
| 9109 | + | |
| 9110 | + | |
| 9111 | + | |
| 9112 | + | |
| 9113 | + | |
| 9114 | + | |
| 9115 | + | |
| 9116 | + | |
| 9117 | + | |
| 9118 | + | |
| 9119 | + | |
| 9120 | + | |
| 9121 | + | |
9080 | 9122 | | |
9081 | 9123 | | |
9082 | 9124 | | |
9083 | 9125 | | |
| 9126 | + | |
9084 | 9127 | | |
9085 | 9128 | | |
9086 | 9129 | | |
| |||
9178 | 9221 | | |
9179 | 9222 | | |
9180 | 9223 | | |
| 9224 | + | |
| 9225 | + | |
| 9226 | + | |
| 9227 | + | |
| 9228 | + | |
| 9229 | + | |
9181 | 9230 | | |
9182 | 9231 | | |
9183 | 9232 | | |
| |||
9187 | 9236 | | |
9188 | 9237 | | |
9189 | 9238 | | |
| 9239 | + | |
| 9240 | + | |
| 9241 | + | |
| 9242 | + | |
| 9243 | + | |
9190 | 9244 | | |
9191 | 9245 | | |
9192 | 9246 | | |
| |||
9227 | 9281 | | |
9228 | 9282 | | |
9229 | 9283 | | |
| 9284 | + | |
| 9285 | + | |
9230 | 9286 | | |
9231 | 9287 | | |
9232 | 9288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
| 1603 | + | |
1608 | 1604 | | |
1609 | | - | |
1610 | 1605 | | |
1611 | 1606 | | |
1612 | | - | |
1613 | | - | |
1614 | 1607 | | |
1615 | 1608 | | |
1616 | 1609 | | |
| |||
1625 | 1618 | | |
1626 | 1619 | | |
1627 | 1620 | | |
1628 | | - | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
1629 | 1634 | | |
1630 | 1635 | | |
1631 | 1636 | | |
| |||
1635 | 1640 | | |
1636 | 1641 | | |
1637 | 1642 | | |
1638 | | - | |
| 1643 | + | |
1639 | 1644 | | |
1640 | 1645 | | |
1641 | 1646 | | |
| |||
1660 | 1665 | | |
1661 | 1666 | | |
1662 | 1667 | | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
1663 | 1688 | | |
1664 | 1689 | | |
1665 | 1690 | | |
1666 | 1691 | | |
1667 | 1692 | | |
1668 | 1693 | | |
1669 | 1694 | | |
1670 | | - | |
1671 | | - | |
| 1695 | + | |
1672 | 1696 | | |
1673 | 1697 | | |
1674 | 1698 | | |
| |||
1684 | 1708 | | |
1685 | 1709 | | |
1686 | 1710 | | |
1687 | | - | |
1688 | | - | |
1689 | 1711 | | |
1690 | 1712 | | |
1691 | 1713 | | |
| |||
1931 | 1953 | | |
1932 | 1954 | | |
1933 | 1955 | | |
1934 | | - | |
1935 | 1956 | | |
1936 | 1957 | | |
1937 | 1958 | | |
| |||
2230 | 2251 | | |
2231 | 2252 | | |
2232 | 2253 | | |
| 2254 | + | |
| 2255 | + | |
2233 | 2256 | | |
2234 | 2257 | | |
2235 | 2258 | | |
| |||
2252 | 2275 | | |
2253 | 2276 | | |
2254 | 2277 | | |
| 2278 | + | |
| 2279 | + | |
2255 | 2280 | | |
2256 | 2281 | | |
2257 | 2282 | | |
| |||
0 commit comments