Searched hist:"2 c5ebd001d4f0c64a2dfda94eb1d9b31a8863c8d" (Results 1 – 4 of 4) sorted by relevance
/openbmc/linux/net/mptcp/ |
H A D | token.c | diff 2c5ebd001d4f0c64a2dfda94eb1d9b31a8863c8d Fri Jun 26 12:30:00 CDT 2020 Paolo Abeni <pabeni@redhat.com> mptcp: refactor token container
Replace the radix tree with a hash table allocated at boot time. The radix tree has some shortcoming: a single lock is contented by all the mptcp operation, the lookup currently use such lock, and traversing all the items would require a lock, too.
With hash table instead we trade a little memory to address all the above - a per bucket lock is used.
To hash the MPTCP sockets, we re-use the msk' sk_node entry: the MPTCP sockets are never hashed by the stack. Replace the existing hash proto callbacks with a dummy implementation, annotating the above constraint.
Additionally refactor the token creation to code to:
- limit the number of consecutive attempts to a fixed maximum. Hitting a hash bucket with a long chain is considered a failed attempt
- accept() no longer can fail to token management.
- if token creation fails at connect() time, we do fallback to TCP (before the connection was closed)
v1 -> v2: - fix "no newline at end of file" - Jakub
Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
H A D | subflow.c | diff 2c5ebd001d4f0c64a2dfda94eb1d9b31a8863c8d Fri Jun 26 12:30:00 CDT 2020 Paolo Abeni <pabeni@redhat.com> mptcp: refactor token container
Replace the radix tree with a hash table allocated at boot time. The radix tree has some shortcoming: a single lock is contented by all the mptcp operation, the lookup currently use such lock, and traversing all the items would require a lock, too.
With hash table instead we trade a little memory to address all the above - a per bucket lock is used.
To hash the MPTCP sockets, we re-use the msk' sk_node entry: the MPTCP sockets are never hashed by the stack. Replace the existing hash proto callbacks with a dummy implementation, annotating the above constraint.
Additionally refactor the token creation to code to:
- limit the number of consecutive attempts to a fixed maximum. Hitting a hash bucket with a long chain is considered a failed attempt
- accept() no longer can fail to token management.
- if token creation fails at connect() time, we do fallback to TCP (before the connection was closed)
v1 -> v2: - fix "no newline at end of file" - Jakub
Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
H A D | protocol.h | diff 2c5ebd001d4f0c64a2dfda94eb1d9b31a8863c8d Fri Jun 26 12:30:00 CDT 2020 Paolo Abeni <pabeni@redhat.com> mptcp: refactor token container
Replace the radix tree with a hash table allocated at boot time. The radix tree has some shortcoming: a single lock is contented by all the mptcp operation, the lookup currently use such lock, and traversing all the items would require a lock, too.
With hash table instead we trade a little memory to address all the above - a per bucket lock is used.
To hash the MPTCP sockets, we re-use the msk' sk_node entry: the MPTCP sockets are never hashed by the stack. Replace the existing hash proto callbacks with a dummy implementation, annotating the above constraint.
Additionally refactor the token creation to code to:
- limit the number of consecutive attempts to a fixed maximum. Hitting a hash bucket with a long chain is considered a failed attempt
- accept() no longer can fail to token management.
- if token creation fails at connect() time, we do fallback to TCP (before the connection was closed)
v1 -> v2: - fix "no newline at end of file" - Jakub
Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
H A D | protocol.c | diff 2c5ebd001d4f0c64a2dfda94eb1d9b31a8863c8d Fri Jun 26 12:30:00 CDT 2020 Paolo Abeni <pabeni@redhat.com> mptcp: refactor token container
Replace the radix tree with a hash table allocated at boot time. The radix tree has some shortcoming: a single lock is contented by all the mptcp operation, the lookup currently use such lock, and traversing all the items would require a lock, too.
With hash table instead we trade a little memory to address all the above - a per bucket lock is used.
To hash the MPTCP sockets, we re-use the msk' sk_node entry: the MPTCP sockets are never hashed by the stack. Replace the existing hash proto callbacks with a dummy implementation, annotating the above constraint.
Additionally refactor the token creation to code to:
- limit the number of consecutive attempts to a fixed maximum. Hitting a hash bucket with a long chain is considered a failed attempt
- accept() no longer can fail to token management.
- if token creation fails at connect() time, we do fallback to TCP (before the connection was closed)
v1 -> v2: - fix "no newline at end of file" - Jakub
Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|