Repository navigation
Commit 3a1c395
net/packet: make packet_fanout.arr size configurable up to 64K
[ Upstream commit 9c661b0 ]
One use case of PACKET_FANOUT is lockless reception with one socket
per CPU. 256 is a practical limit on increasingly many machines.
Increase PACKET_FANOUT_MAX to 64K. Expand setsockopt PACKET_FANOUT to
take an extra argument max_num_members. Also explicitly define a
fanout_args struct, instead of implicitly casting to an integer. This
documents the API and simplifies the control flow.
If max_num_members is not specified or is set to 0, then 256 is used,
same as before.
Signed-off-by: Tanner Love <tannerlove@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent d10c516 commit 3a1c395
3 files changed
Lines changed: 40 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
299 | 311 | | |
300 | 312 | | |
301 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1636 | 1636 | | |
1637 | 1637 | | |
1638 | 1638 | | |
1639 | | - | |
| 1639 | + | |
1640 | 1640 | | |
1641 | 1641 | | |
1642 | 1642 | | |
| 1643 | + | |
1643 | 1644 | | |
1644 | 1645 | | |
1645 | 1646 | | |
| 1647 | + | |
1646 | 1648 | | |
1647 | 1649 | | |
1648 | 1650 | | |
| |||
1700 | 1702 | | |
1701 | 1703 | | |
1702 | 1704 | | |
1703 | | - | |
1704 | | - | |
1705 | | - | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
1706 | 1717 | | |
1707 | | - | |
| 1718 | + | |
| 1719 | + | |
1708 | 1720 | | |
1709 | 1721 | | |
1710 | 1722 | | |
| |||
1720 | 1732 | | |
1721 | 1733 | | |
1722 | 1734 | | |
| 1735 | + | |
1723 | 1736 | | |
1724 | 1737 | | |
1725 | 1738 | | |
| |||
1730 | 1743 | | |
1731 | 1744 | | |
1732 | 1745 | | |
1733 | | - | |
| 1746 | + | |
1734 | 1747 | | |
1735 | 1748 | | |
1736 | 1749 | | |
| |||
1744 | 1757 | | |
1745 | 1758 | | |
1746 | 1759 | | |
1747 | | - | |
| 1760 | + | |
1748 | 1761 | | |
1749 | 1762 | | |
1750 | 1763 | | |
| |||
3075 | 3088 | | |
3076 | 3089 | | |
3077 | 3090 | | |
3078 | | - | |
| 3091 | + | |
3079 | 3092 | | |
3080 | 3093 | | |
3081 | 3094 | | |
| |||
3866 | 3879 | | |
3867 | 3880 | | |
3868 | 3881 | | |
3869 | | - | |
| 3882 | + | |
3870 | 3883 | | |
3871 | | - | |
| 3884 | + | |
3872 | 3885 | | |
3873 | | - | |
| 3886 | + | |
3874 | 3887 | | |
3875 | 3888 | | |
3876 | | - | |
| 3889 | + | |
3877 | 3890 | | |
3878 | 3891 | | |
3879 | 3892 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
0 commit comments