Commit 8edf086
mptcp: rework poll+nospace handling
MPTCP maintains a status bit, MPTCP_SEND_SPACE, that is set when at
least one subflow and the mptcp socket itself are writeable.
mptcp_poll returns EPOLLOUT if the bit is set.
mptcp_sendmsg makes sure MPTCP_SEND_SPACE gets cleared when last write
has used up all subflows or the mptcp socket wmem.
This reworks nospace handling as follows:
MPTCP_SEND_SPACE is replaced with MPTCP_NOSPACE, i.e. inverted meaning.
This bit is set when the mptcp socket is not writeable.
The mptcp-level ack path schedule will then schedule the mptcp worker
to allow it to free already-acked data (and reduce wmem usage).
This will then wake userspace processes that wait for a POLLOUT event.
sendmsg will set MPTCP_NOSPACE only when it has to wait for more
wmem (blocking I/O case).
poll path will set MPTCP_NOSPACE in case the mptcp socket is
not writeable.
Normal tcp-level notification (SOCK_NOSPACE) is only enabled
in case the subflow socket has no available wmem.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 813e0a6 commit 8edf086
3 files changed
+54
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
| 727 | + | |
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
| |||
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | 838 | | |
853 | 839 | | |
854 | 840 | | |
| |||
901 | 887 | | |
902 | 888 | | |
903 | 889 | | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
| 890 | + | |
| 891 | + | |
911 | 892 | | |
912 | 893 | | |
913 | 894 | | |
| |||
1041 | 1022 | | |
1042 | 1023 | | |
1043 | 1024 | | |
1044 | | - | |
| 1025 | + | |
1045 | 1026 | | |
1046 | 1027 | | |
1047 | 1028 | | |
1048 | 1029 | | |
| 1030 | + | |
1049 | 1031 | | |
1050 | 1032 | | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
1051 | 1036 | | |
1052 | | - | |
1053 | | - | |
| 1037 | + | |
1054 | 1038 | | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
1055 | 1044 | | |
1056 | 1045 | | |
1057 | 1046 | | |
| |||
1155 | 1144 | | |
1156 | 1145 | | |
1157 | 1146 | | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | 1147 | | |
1165 | 1148 | | |
1166 | 1149 | | |
| |||
1332 | 1315 | | |
1333 | 1316 | | |
1334 | 1317 | | |
1335 | | - | |
1336 | 1318 | | |
1337 | 1319 | | |
1338 | 1320 | | |
| |||
1344 | 1326 | | |
1345 | 1327 | | |
1346 | 1328 | | |
1347 | | - | |
1348 | 1329 | | |
1349 | 1330 | | |
1350 | 1331 | | |
| |||
1921 | 1902 | | |
1922 | 1903 | | |
1923 | 1904 | | |
1924 | | - | |
1925 | 1905 | | |
1926 | 1906 | | |
1927 | 1907 | | |
| |||
2619 | 2599 | | |
2620 | 2600 | | |
2621 | 2601 | | |
2622 | | - | |
2623 | | - | |
2624 | | - | |
2625 | | - | |
2626 | | - | |
2627 | | - | |
2628 | | - | |
2629 | 2602 | | |
2630 | 2603 | | |
2631 | 2604 | | |
| |||
2646 | 2619 | | |
2647 | 2620 | | |
2648 | 2621 | | |
2649 | | - | |
2650 | 2622 | | |
2651 | 2623 | | |
2652 | 2624 | | |
| |||
2820 | 2792 | | |
2821 | 2793 | | |
2822 | 2794 | | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
2823 | 2828 | | |
2824 | 2829 | | |
2825 | 2830 | | |
| |||
2838 | 2843 | | |
2839 | 2844 | | |
2840 | 2845 | | |
2841 | | - | |
2842 | | - | |
| 2846 | + | |
2843 | 2847 | | |
2844 | 2848 | | |
2845 | 2849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
997 | 997 | | |
998 | 998 | | |
999 | 999 | | |
| 1000 | + | |
1000 | 1001 | | |
1001 | 1002 | | |
1002 | 1003 | | |
1003 | 1004 | | |
1004 | 1005 | | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
1011 | 1010 | | |
1012 | 1011 | | |
1013 | 1012 | | |
| |||
0 commit comments