[tipc-discussion] [net] tipc: fix false detection of retransmit failures

2019-08-14 Thread Tuong Lien
simplify stale link failure criteria") Reported-by: Hoang Le Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/link.c | 92 - net/tipc/msg.h | 8 +++-- 2 files changed, 57 insertions(+), 43 dele

[tipc-discussion] [PATCH RFC] tipc: improve bundle algorithm

2019-08-26 Thread Tuong Lien
Signed-off-by: Tuong Lien --- net/tipc/link.c | 29 ++--- net/tipc/msg.c | 4 ++-- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index 6cc75ffd9e2c..22ba0c8af3a8 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c

[tipc-discussion] [PATCH RFC 2/2] tipc: improve message bundling algorithm

2019-08-29 Thread Tuong Lien
reover, since now we have both the messages in hand, we can even optimize the 'tipc_msg_bundle()' function, make bundle of a very large (size ~ MSS) and small messages which is not with the current algorithm, e.g. [1400-byte message] + [10-byte message] (MTU = 1500). Signed-off-by: Tu

[tipc-discussion] [PATCH RFC 1/2] tipc: fix unlimited bundling of small messages

2019-08-29 Thread Tuong Lien
r message comes, a new bundle is created and so on... We will solve this issue radically by the 2nd patch of this series. Fixes: 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Reported-by: Hoang Le Acked-by: Jon Maloy Signed-off-by: Tuong Lien ---

[tipc-discussion] [net] tipc: fix unlimited bundling of small messages

2019-10-02 Thread Tuong Lien
r message comes, a new bundle is created and so on... We will solve this issue radically by another patch. Fixes: 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Reported-by: Hoang Le Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/link.c |

[tipc-discussion] [PATCH RFC 5/5] tipc: add support for AEAD key setting via netlink

2019-10-14 Thread Tuong Lien
H' command will remove all existing keys if any. Signed-off-by: Tuong Lien --- include/uapi/linux/tipc_netlink.h | 4 ++ net/tipc/netlink.c| 16 - net/tipc/node.c | 133 ++ net/tipc/node.h | 2 +

[tipc-discussion] [PATCH RFC 1/5] tipc: add reference counter to bearer

2019-10-14 Thread Tuong Lien
or interface can be disabled in the meanwhile. If that happens, the bearer will be released then when the crypto operation is completed and 'tipc_bearer_put()' is called. Signed-off-by: Tuong Lien --- net/tipc/bearer.c | 23 ++- net/tipc/bearer.h | 3 +++ 2 file

[tipc-discussion] [PATCH RFC 2/5] tipc: enable creating a "preliminary" node

2019-10-14 Thread Tuong Lien
gned-off-by: Tuong Lien --- net/tipc/node.c | 103 net/tipc/node.h | 3 ++ 2 files changed, 77 insertions(+), 29 deletions(-) diff --git a/net/tipc/node.c b/net/tipc/node.c index f2e3cf70c922..2eeffc380e8f 100644 --- a/net/tipc/node.c +++ b

[tipc-discussion] [PATCH RFC 3/5] tipc: add new AEAD key structure for user API

2019-10-14 Thread Tuong Lien
The new structure 'tipc_aead_key' is added to the 'tipc.h' for user to be able to transfer a key to TIPC in kernel. Netlink will be used for this purpose in the later commits. Signed-off-by: Tuong Lien --- include/uapi/linux/tipc.h | 21 + 1 file ch

[tipc-discussion] [PATCH RFC 4/5] tipc: introduce TIPC encryption & authentication

2019-10-14 Thread Tuong Lien
s. With the support from hardware crypto i.e. the Intel AES-NI CPU instructions, the throughput increases upto ~85% for small messages and ~55% for large messages. MAINTAINERS | add two new files 'crypto.h' & 'crypto.c' in tipc Signed-off-by: Tuong Lien --- net/tipc/Makefile

[tipc-discussion] [PATCH RFC 0/5] TIPC encryption

2019-10-14 Thread Tuong Lien
This series provides TIPC encryption feature, kernel part. There will be another one in the 'iproute2/tipc' for user space to set key. Tuong Lien (5): tipc: add reference counter to bearer tipc: enable creating a "preliminary" node tipc: add new AEAD key structure

[tipc-discussion] [iproute2] tipc: add new commands to set TIPC AEAD key

2019-10-14 Thread Tuong Lien
- If NODEID is own node, the key is used for message encryption (TX) from the node. Whereas, if NODEID is a peer node, the key is for message decryption (RX) from that peer node. This is the 'per-node-key' mode that each nodes in the cluster has its specific (TX) key. Signed-off-by: Tuong Li

[tipc-discussion] [net-next] tipc: improve message bundling algorithm

2019-10-14 Thread Tuong Lien
e the overheads to zero. Moreover, since now we have both the messages in hand, we can even optimize the 'tipc_msg_bundle()' function, make bundle of a very large (size ~ MSS) and small messages which is not with the current algorithm e.g. [1400-byte message] + [10-byte message] (MTU = 1500

[tipc-discussion] [net-next] tipc: eliminate the dummy packet in link synching

2019-10-23 Thread Tuong Lien
q, the link synching will just start and stop shortly on the peer side. The patch is backward compatible. Acked-by: Jon Maloy Tested-by: Hoang Le Signed-off-by: Tuong Lien --- net/tipc/link.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/net

[tipc-discussion] [net-next] tipc: support in-order name publication events

2019-10-30 Thread Tuong Lien
pective of when the subscription is issued. This turns out to be easy to fix. We now add functionality to ensure that publication events always are issued in the same temporal order as the corresponding bindings were performed. Acked-by: Jon Maloy Signed-off-by: Tuong Li

[tipc-discussion] [net-next] tipc: improve message bundling algorithm

2019-10-31 Thread Tuong Lien
0). Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/link.c | 59 +++--- net/tipc/msg.c | 153 +--- net/tipc/msg.h | 5 +- 3 files changed, 113 insertions(+), 104 deletions(-) diff --g

[tipc-discussion] [PATCH v2 2/5] tipc: enable creating a "preliminary" node

2019-11-05 Thread Tuong Lien
v2: rebase Signed-off-by: Tuong Lien --- net/tipc/node.c | 103 +++- net/tipc/node.h | 1 + 2 files changed, 73 insertions(+), 31 deletions(-) diff --git a/net/tipc/node.c b/net/tipc/node.c index 4b60928049ea..5d5c95c9b4e6 100644 --- a/net/

[tipc-discussion] [PATCH v2 0/5] TIPC encryption

2019-11-05 Thread Tuong Lien
This series provides TIPC encryption feature, kernel part. There will be another one in the 'iproute2/tipc' for user space to set key. Tuong Lien (5): tipc: add reference counter to bearer tipc: enable creating a "preliminary" node tipc: add new AEAD key structure

[tipc-discussion] [PATCH v2 4/5] tipc: introduce TIPC encryption & authentication

2019-11-05 Thread Tuong Lien
uot;TIPC_CRYPTO" in the kernel configuration to enable/disable the new code when needed. v2: rebase, add new kernel option ("TIPC_CRYPTO") MAINTAINERS | add two new files 'crypto.h' & 'crypto.c' in tipc Signed-off-by: Tuong Lien --- net/tipc/Kconfig | 12

[tipc-discussion] [PATCH v2 1/5] tipc: add reference counter to bearer

2019-11-05 Thread Tuong Lien
or interface can be disabled in the meanwhile. If that happens, the bearer will be released then when the crypto operation is completed and 'tipc_bearer_put()' is called. Signed-off-by: Tuong Lien --- net/tipc/bearer.c | 14 +- net/tipc/bearer.h | 3 +++ 2 files changed

[tipc-discussion] [PATCH v2 5/5] tipc: add support for AEAD key setting via netlink

2019-11-05 Thread Tuong Lien
H' command will remove all existing keys if any. v2: rebase, add new kernel option ("TIPC_CRYPTO") Signed-off-by: Tuong Lien --- include/uapi/linux/tipc_netlink.h | 8 +++ net/tipc/netlink.c| 20 +- net/tipc/node.c | 135 ++

[tipc-discussion] [PATCH v2 3/5] tipc: add new AEAD key structure for user API

2019-11-05 Thread Tuong Lien
The new structure 'tipc_aead_key' is added to the 'tipc.h' for user to be able to transfer a key to TIPC in kernel. Netlink will be used for this purpose in the later commits. Signed-off-by: Tuong Lien --- include/uapi/linux/tipc.h | 21 + 1 file ch

[tipc-discussion] [PATCH v3 4/5] tipc: introduce TIPC encryption & authentication

2019-11-06 Thread Tuong Lien
uot;TIPC_CRYPTO" in the kernel configuration to enable/disable the new code when needed. v2: rebase, add new kernel option ("TIPC_CRYPTO") v3: remove the "ifdef/else" for the bearer_xmit() MAINTAINERS | add two new files 'crypto.h' & 'crypto.c' in tipc

[tipc-discussion] [PATCH RFC] tipc: fix name table rbtree issues

2019-11-06 Thread Tuong Lien
d a round-robin fashion for it. Besides, since now we have the 'max' value, we can even improve the searching for a next range matching e.g. in case of multicast, so get rid of the unneeded looping over all the nodes in the tree. Signed-off-by: Tuong Lien --- net/tipc/name_table.c |

[tipc-discussion] [net-next] tipc: eliminate the dummy packet in link synching

2019-11-06 Thread Tuong Lien
q, the link synching will just start and stop shortly on the peer side. The patch is backward compatible. Acked-by: Jon Maloy Tested-by: Hoang Le Signed-off-by: Tuong Lien --- net/tipc/link.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/net

[tipc-discussion] [net-next 2/5] tipc: enable creating a "preliminary" node

2019-11-07 Thread Tuong Lien
d-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/node.c | 103 +++- net/tipc/node.h | 1 + 2 files changed, 73 insertions(+), 31 deletions(-) diff --git a/net/tipc/node.c b/net/tipc/node.c index 1f158451

[tipc-discussion] [net-next 3/5] tipc: add new AEAD key structure for user API

2019-11-07 Thread Tuong Lien
The new structure 'tipc_aead_key' is added to the 'tipc.h' for user to be able to transfer a key to TIPC in kernel. Netlink will be used for this purpose in the later commits. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- include/ua

[tipc-discussion] [net-next 0/5] TIPC encryption

2019-11-07 Thread Tuong Lien
This series provides TIPC encryption feature, kernel part. There will be another one in the 'iproute2/tipc' for user space to set key. Tuong Lien (5): tipc: add reference counter to bearer tipc: enable creating a "preliminary" node tipc: add new AEAD key structure

[tipc-discussion] [net-next 1/5] tipc: add reference counter to bearer

2019-11-07 Thread Tuong Lien
or interface can be disabled in the meanwhile. If that happens, the bearer will be released then when the crypto operation is completed and 'tipc_bearer_put()' is called. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/bearer.c | 14 +- net/t

[tipc-discussion] [net-next 5/5] tipc: add support for AEAD key setting via netlink

2019-11-07 Thread Tuong Lien
H' command will remove all existing keys if any. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- include/uapi/linux/tipc_netlink.h | 4 ++ net/tipc/netlink.c| 18 - net/tipc/node.c | 135 +++

[tipc-discussion] [net-next 4/5] tipc: introduce TIPC encryption & authentication

2019-11-07 Thread Tuong Lien
uot;TIPC_CRYPTO" in the kernel configuration to enable/disable the new code when needed. MAINTAINERS | add two new files 'crypto.h' & 'crypto.c' in tipc Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/Kconfig | 12 + net/tipc/Makefi

[tipc-discussion] [net-next v2 0/5] TIPC Encryption

2019-11-07 Thread Tuong Lien
This series provides TIPC encryption feature, kernel part. There will be another one in the 'iproute2/tipc' for user space to set key. v2: add select crypto 'aes(gcm)' for TIPC_CRYPTO in Kconfig Tuong Lien (5): tipc: add reference counter to bearer tipc: enable creating

[tipc-discussion] [net-next v2 3/5] tipc: add new AEAD key structure for user API

2019-11-07 Thread Tuong Lien
The new structure 'tipc_aead_key' is added to the 'tipc.h' for user to be able to transfer a key to TIPC in kernel. Netlink will be used for this purpose in the later commits. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- include/ua

[tipc-discussion] [net-next v2 1/5] tipc: add reference counter to bearer

2019-11-07 Thread Tuong Lien
or interface can be disabled in the meanwhile. If that happens, the bearer will be released then when the crypto operation is completed and 'tipc_bearer_put()' is called. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/bearer.c | 14 +- net/t

[tipc-discussion] [net-next v2 2/5] tipc: enable creating a "preliminary" node

2019-11-07 Thread Tuong Lien
d-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/node.c | 99 + net/tipc/node.h | 1 + 2 files changed, 73 insertions(+), 27 deletions(-) diff --git a/net/tipc/node.c b/net/tipc/node.c index b66d2f67b1dd..43d12a63

[tipc-discussion] [net-next v2 5/5] tipc: add support for AEAD key setting via netlink

2019-11-07 Thread Tuong Lien
H' command will remove all existing keys if any. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- include/uapi/linux/tipc_netlink.h | 4 ++ net/tipc/netlink.c| 18 - net/tipc/node.c | 135 +++

[tipc-discussion] [net-next v2 4/5] tipc: introduce TIPC encryption & authentication

2019-11-07 Thread Tuong Lien
uot;TIPC_CRYPTO" in the kernel configuration to enable/disable the new code when needed. MAINTAINERS | add two new files 'crypto.h' & 'crypto.c' in tipc Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/Kconfig | 15 + net/tipc/Makefi

[tipc-discussion] [net-next 0/2] nametable related issues

2019-11-13 Thread Tuong Lien
The series consists of two individual patches which were sent earlier but now v2 with some minor updates. Tuong Lien (2): tipc: support in-order name publication events tipc: fix name table rbtree issues net/tipc/name_table.c | 326 +- net

[tipc-discussion] [net-next 2/2] tipc: fix name table rbtree issues

2019-11-13 Thread Tuong Lien
. not fixed) & call the service_range_match_first() directly as suggested by Jon; rebase to make a series. Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/name_table.c | 279 -- 1 file changed, 179 insertions(+), 100 deletions(-) di

[tipc-discussion] [net-next 1/2] tipc: support in-order name publication events

2019-11-13 Thread Tuong Lien
ven if users set their subscription filter to 'TIPC_SUB_PORTS'. Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/name_table.c | 47 +++ net/tipc/name_table.h | 4 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/

[tipc-discussion] [net-next] tipc: support in-order name publication events

2019-11-19 Thread Tuong Lien
pective of when the subscription is issued. This turns out to be easy to fix. We now add functionality to ensure that publication events always are issued in the same temporal order as the corresponding bindings were performed. Acked-by: Jon Maloy Signed-off-by: Tuong Li

[tipc-discussion] [net-next v2] tipc: support in-order name publication events

2019-11-20 Thread Tuong Lien
inline function. Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/name_table.c | 53 +++ net/tipc/name_table.h | 4 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c inde

[tipc-discussion] [iproute2-next] tipc: add new commands to set TIPC AEAD key

2019-11-20 Thread Tuong Lien
r nodes. - If NODEID is own node, the key is used for message encryption (TX) from the node. Whereas, if NODEID is a peer node, the key is for message decryption (RX) from that peer node. This is the 'per-node-key' mode that each nodes in the cluster has its specific (TX) key. Ac

[tipc-discussion] [net-next v3] tipc: support in-order name publication events

2019-11-21 Thread Tuong Lien
with inline function. v3: reuse 'time_after32()' instead of reinventing the same exact code. Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/name_table.c | 51 +++ net/tipc/name_table.h | 4 2 files changed, 47 insertions(+

[tipc-discussion] [net] tipc: fix memory leak in socket streaming

2019-11-25 Thread Tuong Lien
27; will be increased & decreased correctly and the sock object can be released later. Fixes: 0d5fcebf3c37 ("tipc: refactor tipc_sk_timeout() function") Signed-off-by: Tuong Lien --- net/tipc/socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/tipc

[tipc-discussion] [PATCH RFC] tipc: fix potential hanging after b/rcast changing

2019-11-25 Thread Tuong Lien
should not face a link congestion, there is no need to touch the socket 'cong_link_cnt' either. In addition, in the event of any error (e.g. -ENOBUFS), we will purge the entire payload message queue and make a return immediately. Fixes: c55c8edafa91 ("tipc: smooth change between

[tipc-discussion] [PATCH RFC] tipc: fix retrans failure due to wrong destination

2019-11-30 Thread Tuong Lien
#x27; and its header will not be modified by anyone. Fixes: 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Signed-off-by: Tuong Lien --- net/tipc/socket.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff -

[tipc-discussion] [net] tipc: fix use-after-free in tipc_disc_rcv()

2019-12-09 Thread Tuong Lien
other header fields' handling. Fixes: f73b12812a3d ("tipc: improve throughput between nodes in netns") Signed-off-by: Tuong Lien --- net/tipc/discover.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/tipc/discover.c b/net/tipc/discover.c index b043e8c6

[tipc-discussion] [net 1/4] tipc: fix name table rbtree issues

2019-12-10 Thread Tuong Lien
searching appoarch to solve the issues above. Another benefit from this is that we can now improve the searching for a next range matching e.g. in case of multicast, so get rid of the unneeded looping over all nodes in the tree. Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/name_ta

[tipc-discussion] [net 0/4] tipc: fix some issues

2019-12-10 Thread Tuong Lien
This series consists of some bug-fixes for TIPC. Tuong Lien (4): tipc: fix name table rbtree issues tipc: fix potential hanging after b/rcast changing tipc: fix retrans failure due to wrong destination tipc: fix use-after-free in tipc_disc_rcv() net/tipc/bcast.c | 24 +++-- net

[tipc-discussion] [net 2/4] tipc: fix potential hanging after b/rcast changing

2019-12-10 Thread Tuong Lien
should not face a link congestion, there is no need to touch the socket 'cong_link_cnt' either. In addition, in the event of any error (e.g. -ENOBUFS), we will purge the entire payload message queue and make a return immediately. Fixes: c55c8edafa91 ("tipc: smooth ch

[tipc-discussion] [net 3/4] tipc: fix retrans failure due to wrong destination

2019-12-10 Thread Tuong Lien
#x27; and its header will not be modified by anyone. Fixes: 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/socket.c | 32 ++-- 1 file changed, 18 insertions(+), 14

[tipc-discussion] [net 4/4] tipc: fix use-after-free in tipc_disc_rcv()

2019-12-10 Thread Tuong Lien
other header fields' handling. Fixes: f73b12812a3d ("tipc: improve throughput between nodes in netns") Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/discover.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/tipc/discover.c b/net

[tipc-discussion] [net] tipc: fix wrong connect() return code

2019-12-24 Thread Tuong Lien
building & sending a message but then finally gets an unexpected result (e.g. '-EPIPE'). This commit fixes the issue by returning the corresponding error code if any when the wait process is waken up. Signed-off-by: Tuong Lien --- net/tipc/socket.c | 6 -- 1 file changed, 4

[tipc-discussion] [net] tipc: fix link overflow issue at socket shutdown

2019-12-24 Thread Tuong Lien
other socket states; fix a memleak issue (- reported by 'Hoang Huu Le'). -- Signed-off-by: Tuong Lien --- net/tipc/socket.c | 53 - 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/net/tipc/socket.c b/ne

[tipc-discussion] [iproute2] tipc: fix clang warning in tipc/node.c

2019-12-29 Thread Tuong Lien
x27;key' structure in the 'union' form instead. Fixes: 24bee3bf9752 ("tipc: add new commands to set TIPC AEAD key") Reported-by: Stephen Hemminger Signed-off-by: Tuong Lien --- tipc/node.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tipc/node.c b

[tipc-discussion] [net v2] tipc: fix wrong connect() return code

2019-12-30 Thread Tuong Lien
lished. Otherwise, either the socket error code if any or '-ETIMEDOUT'/'-EINTR' will be returned correspondingly. - v2: changed after discussing with Ying - Signed-off-by: Tuong Lien --- net/tipc/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[tipc-discussion] [net] tipc: fix link overflow issue at socket shutdown

2020-01-07 Thread Tuong Lien
ns for such socket messages because they are 'dest-droppable' by default. In addition, the new code makes the other socket states clear (e.g.'TIPC_LISTEN') and treats as a separate case to avoid misbehaving. Acked-by: Ying Xue Acked-by: Jon M

[tipc-discussion] [net] tipc: fix wrong connect() return code

2020-01-07 Thread Tuong Lien
T'/'-EINTR' will be returned correspondingly. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 6ebd809ef207..f9b4fb92c0b1 100

[tipc-discussion] [net] tipc: fix successful connect() but timed out

2020-02-04 Thread Tuong Lien
ll get '-EPIPE' but the socket is still able to read the messages existing in its receive queue. Note: This solution doesn't break the previous one as it deals with a different situation that the socket state is 'DISCONNECTING' but has no error (i.e. sk->sk_err = 0). Fi

[tipc-discussion] [net] tipc: fix successful connect() but timed out

2020-02-10 Thread Tuong Lien
ll get '-EPIPE' but the socket is still able to read the messages existing in its receive queue. Note: This solution doesn't break the previous one as it deals with a different situation that the socket state is 'DISCONNECTING' but has no error (i.e. sk->sk_err = 0). Fixe

[tipc-discussion] [PATCH RFC 0/2] tipc: add a couple of improvements for broadcast

2020-03-13 Thread Tuong Lien
Tuong Lien (2): tipc: add Gap ACK blocks support for broadcast link tipc: enable broadcast retransmission via unicast net/tipc/bcast.c | 16 +- net/tipc/bcast.h | 4 +- net/tipc/link.c | 442 +- net/tipc/link.h | 8 +- net/tipc

[tipc-discussion] [PATCH RFC 1/2] tipc: add Gap ACK blocks support for broadcast link

2020-03-13 Thread Tuong Lien
17.67s Without the patch: $ time tipc-pipe --mc --rdm --data_size 123 --data_num 150 real5m 28.80s user0m 0.85s sys 0m 3.62s Signed-off-by: Tuong Lien --- net/tipc/bcast.c | 9 +- net/tipc/link.c | 440 +-- net/tipc/link

[tipc-discussion] [PATCH RFC 2/2] tipc: enable broadcast retransmission via unicast

2020-03-13 Thread Tuong Lien
etruni Default is '0', i.e. the broadcast retransmission still works as usual. Signed-off-by: Tuong Lien --- net/tipc/bcast.c | 11 --- net/tipc/bcast.h | 4 +++- net/tipc/link.c | 10 ++ net/tipc/link.h | 3 ++- net/tipc/node.c | 2 +- net/tipc/sysctl.c | 9 ++

[tipc-discussion] [PATCH RFC 3/4] tipc: enable broadcast retrans via unicast

2020-03-27 Thread Tuong Lien
etruni Default is '0', i.e. the broadcast retransmission still works as usual. Signed-off-by: Tuong Lien --- net/tipc/bcast.c | 11 --- net/tipc/bcast.h | 4 +++- net/tipc/link.c | 8 +--- net/tipc/link.h | 3 ++- net/tipc/node.c | 2 +- net/tipc/sysctl.c | 9 ++

[tipc-discussion] [PATCH RFC 4/4] tipc: add support for broadcast rcv stats dumping

2020-03-27 Thread Tuong Lien
retrans:0 Congestion link:0 Send queue max:0 avg:0 In addition, the broadcast-receiver link statistics can be reset in the usual way via netlink by specifying that link name in command. Note: the 'tipc_link_name_ext()' is removed because the link name can now be retrieved simply via t

[tipc-discussion] [PATCH RFC 2/4] tipc: add back link trace events

2020-03-27 Thread Tuong Lien
In the previous commit ("tipc: add Gap ACK blocks support for broadcast link"), we have removed the following link trace events due to the code changes: - tipc_link_bc_ack - tipc_link_retrans This commit adds them back along with some minor changes to adapt to the new code. Signed-off

[tipc-discussion] [net] tipc: fix incorrect increasing of link window

2020-03-27 Thread Tuong Lien
resh' is lowered. Signed-off-by: Tuong Lien --- net/tipc/link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index 467c53a1fb5c..d4675e922a8f 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -1065,7 +1065,7 @@ static void tipc_link_u

[tipc-discussion] [PATCH RFC 1/4] tipc: introduce Gap ACK blocks for broadcast link

2020-03-27 Thread Tuong Lien
17.67s Without the patch: $ time tipc-pipe --mc --rdm --data_size 123 --data_num 150 real8m 27.94s user0m 0.55s sys 0m 2.38s Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/bcast.c | 9 +- net/tipc/link.c | 438 +-

[tipc-discussion] [PATCH RFC 4/4] tipc: add support for broadcast rcv stats dumping

2020-03-27 Thread Tuong Lien
retrans:0 Congestion link:0 Send queue max:0 avg:0 In addition, the broadcast-receiver link statistics can be reset in the usual way via netlink by specifying that link name in command. Note: the 'tipc_link_name_ext()' is removed because the link name can now be retrieved simply via t

[tipc-discussion] [PATCH RFC 2/4] tipc: add back link trace events

2020-03-27 Thread Tuong Lien
In the previous commit ("tipc: add Gap ACK blocks support for broadcast link"), we have removed the following link trace events due to the code changes: - tipc_link_bc_ack - tipc_link_retrans This commit adds them back along with some minor changes to adapt to the new code. Signed-off

[tipc-discussion] [PATCH RFC 3/4] tipc: enable broadcast retrans via unicast

2020-03-27 Thread Tuong Lien
etruni Default is '0', i.e. the broadcast retransmission still works as usual. Signed-off-by: Tuong Lien --- net/tipc/bcast.c | 11 --- net/tipc/bcast.h | 4 +++- net/tipc/link.c | 8 +--- net/tipc/link.h | 3 ++- net/tipc/node.c | 2 +- net/tipc/sysctl.c | 9 ++

[tipc-discussion] [PATCH RFC 0/4] tipc: add some improvements for broadcast

2020-03-27 Thread Tuong Lien
s i.e. broadcast rcv stats dumping. Thanks alot! Tuong Lien (4): tipc: introduce Gap ACK blocks for broadcast link tipc: add back link trace events tipc: enable broadcast retrans via unicast tipc: add support for broadcast rcv stats dumping net/tipc/bcast.c | 22 ++- net/tipc/bcast.h

[tipc-discussion] [iproute2-next] tipc: enable printing of broadcast rcv link stats

2020-03-31 Thread Tuong Lien
max:0 avg:0 $ tipc l st re l broadcast-link:1001002 $ tipc l st sh l broadcast-link:1001002 Link Window:50 packets RX packets:0 fragments:0/0 bundles:0/0 TX packets:0 fragments:0/0 bundles:0/0 RX naks:0 defs:0 dups:0 TX naks:0 acks:0 retrans:0 Congestion link:0 Send queue max:0 avg:0 Signed

[tipc-discussion] [PATCH RFC] tipc: make peer node cleanup timer configurable

2020-04-14 Thread Tuong Lien
which indicates in seconds how long a peer down node should be removed. The default value is 300 i.e. 5 mins, while a value of '0' will disable the auto removal feature. Signed-off-by: Tuong Lien --- net/tipc/core.h | 1 + net/tipc/node.c | 15 +-- net/tipc/sysctl.c

[tipc-discussion] [net] tipc: fix incorrect increasing of link window

2020-04-15 Thread Tuong Lien
hresh' is lowered. Fixes: 16ad3f4022bb ("tipc: introduce variable window congestion control") Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index 467c53a1fb5c..d

[tipc-discussion] [net] tipc: fix partial topology connection closure

2020-04-28 Thread Tuong Lien
le cannot be removed (unless the objectes are somehow forced to release first); The commit fixes the issue by closing the connection if the 'recvmsg()' returns '0' i.e. when the peer is shutdown gracefully. It also includes the other unexpected cases. Signed-off-by: Tuong Lien

[tipc-discussion] [RFC PATCH 0/2] tipc: patches for Nagle algorithm issues

2020-05-04 Thread Tuong Lien
Hi Jon, all, Here are the patches for the Nagle issues that I mentioned in the last meeting, please take a look and give me feedback. Thanks a lot! BR/Tuong Tuong Lien (2): tipc: fix large latency in smart Nagle streaming tipc: add test for Nagle algorithm effectiveness net/tipc/msg.c

[tipc-discussion] [RFC PATCH 1/2] tipc: fix large latency in smart Nagle streaming

2020-05-04 Thread Tuong Lien
timize code v3: rebase to non debug v4: rename patch subject Signed-off-by: Tuong Lien --- net/tipc/socket.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 693e8902161e..4e71774528ad 10064

[tipc-discussion] [RFC PATCH 2/2] tipc: add test for Nagle algorithm effectiveness

2020-05-04 Thread Tuong Lien
s messages without a break, so Nagle would still take in effect. Signed-off-by: Tuong Lien --- net/tipc/msg.c| 3 --- net/tipc/msg.h| 14 +++-- net/tipc/socket.c | 60 --- 3 files changed, 60 insertions(+), 17 deletions(-) di

[tipc-discussion] [net] tipc: fix partial topology connection closure

2020-05-04 Thread Tuong Lien
le cannot be removed (unless the objects are somehow forced to release first); The commit fixes the issue by closing the connection if the 'recvmsg()' returns '0' i.e. when the peer is shutdown gracefully. It also includes the other unexpected cases. Acked-by: Jon Maloy Acked

[tipc-discussion] [net 0/2] tipc: fix a couple issues with service subscriptions

2020-05-07 Thread Tuong Lien
Hi Jon, all, There are a couple of issues with our service subscriptions and here is the bug fixes, please help review before I send to net. Thanks a lot! BR/Tuong Tuong Lien (2): tipc: fix memory leak in service subscripting tipc: fix failed service subscription deletion net/tipc

[tipc-discussion] [net 1/2] tipc: fix memory leak in service subscripting

2020-05-07 Thread Tuong Lien
ased all references. This commit fixes the issue by simply adding one test if the connection remains in 'connected' state soon after we obtain the connection's lock then a subscription object can be created as usual, otherwise we ignore it. Reported-by: Thang Ngo Signed-off-by: Tuong Lien

[tipc-discussion] [net 2/2] tipc: fix failed service subscription deletion

2020-05-07 Thread Tuong Lien
ime later. Meanwhile, the number of available subscriptions may be exhausted. This commit fixes the two issues above, so as needed a subscription can be deleted correctly. Signed-off-by: Tuong Lien --- net/tipc/topsrv.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net

[tipc-discussion] [net] tipc: fix failed service subscription deletion

2020-05-10 Thread Tuong Lien
ime later. Meanwhile, the number of available subscriptions may be exhausted. This commit fixes the two issues above, so as needed a subscription can be deleted correctly. v2: define a new macro to write sub field value (- Jon's comment) Signed-off-by: Tuong Lien --- net/tipc/subscr.h | 10

[tipc-discussion] [net] tipc: fix failed service subscription deletion

2020-05-10 Thread Tuong Lien
ime later. Meanwhile, the number of available subscriptions may be exhausted. This commit fixes the two issues above, so as needed a subscription can be deleted correctly. v2: define a new macro to write sub field value (- Jon's comment) v3: break if the sub to be deleted has been found Signe

[tipc-discussion] [net 1/3] tipc: fix large latency in smart Nagle streaming

2020-05-13 Thread Tuong Lien
Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/socket.c | 42 +++--- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 87466607097f..e370ad0edd76 100644 --- a/net/tipc/socket.c +++ b/net/

[tipc-discussion] [net 0/3] tipc: add some patches

2020-05-13 Thread Tuong Lien
This series adds patches to fix some issues in TIPC streaming & service subscription. Tuong Lien (3): tipc: fix large latency in smart Nagle streaming tipc: fix memory leak in service subscripting tipc: fix failed service subscription deletion net/tipc/socket.c

[tipc-discussion] [net 2/3] tipc: fix memory leak in service subscripting

2020-05-13 Thread Tuong Lien
ased all references. This commit fixes the issue by simply adding one test if the connection remains in 'connected' state right after we obtain the connection lock, then a subscription object can be created as usual, otherwise we ignore it. Acked-by: Ying Xue Acked-by: Jon Maloy Reported-by:

[tipc-discussion] [net 3/3] tipc: fix failed service subscription deletion

2020-05-13 Thread Tuong Lien
ime later. Meanwhile, the number of available subscriptions may be exhausted. This commit fixes the two issues above, so as needed a subscription can be deleted correctly. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/subscr.h | 10 ++ net/tipc/topsrv.

[tipc-discussion] [net-next 4/5] tipc: add support for broadcast rcv stats dumping

2020-05-26 Thread Tuong Lien
he 'l->name'. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/bcast.c | 6 ++--- net/tipc/bcast.h | 5 +++-- net/tipc/link.c| 65 +++--- net/tipc/link.h| 3 +-- net/tipc/msg.c | 9 +++

[tipc-discussion] [net-next 2/5] tipc: add back link trace events

2020-05-26 Thread Tuong Lien
: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/link.c | 3 +++ net/tipc/trace.h | 13 - 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index d29b9c531171..288c5670cfa5 100644 --- a/net/tipc/link.c +++ b/net/t

[tipc-discussion] [net-next 3/5] tipc: enable broadcast retrans via unicast

2020-05-26 Thread Tuong Lien
etruni Default is '0', i.e. the broadcast retransmission still works as usual. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/bcast.c | 11 --- net/tipc/bcast.h | 4 +++- net/tipc/link.c | 10 ++ net/tipc/link.h | 3 ++- net/ti

[tipc-discussion] [net-next 0/5] tipc: add some improvements

2020-05-26 Thread Tuong Lien
retransmissions via unicast which might be useful in some cases. Besides, the Nagle algorithm can now automatically 'adjust' itself depending on the specific network condition a stream connection runs by the last patch. Tuong Lien (5): tipc: introduce Gap ACK blocks for broadcast lin

[tipc-discussion] [net-next 1/5] tipc: introduce Gap ACK blocks for broadcast link

2020-05-26 Thread Tuong Lien
17.67s Without the patch: $ time tipc-pipe --mc --rdm --data_size 123 --data_num 150 real8m 27.94s user0m 0.55s sys 0m 2.38s Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/bcast.c | 9 +- net/tipc/link.c | 425 +++

[tipc-discussion] [net-next 5/5] tipc: add test for Nagle algorithm effectiveness

2020-05-26 Thread Tuong Lien
s messages without a break, so Nagle would still take in effect. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien --- net/tipc/msg.c| 3 --- net/tipc/msg.h| 14 ++-- net/tipc/socket.c | 64 --- 3 files changed,

[tipc-discussion] [iproute2-next] tipc: enable printing of broadcast rcv link stats

2020-05-26 Thread Tuong Lien
max:0 avg:0 $ tipc l st re l broadcast-link:1001002 $ tipc l st sh l broadcast-link:1001002 Link Window:50 packets RX packets:0 fragments:0/0 bundles:0/0 TX packets:0 fragments:0/0 bundles:0/0 RX naks:0 defs:0 dups:0 TX naks:0 acks:0 retrans:0 Congestion link:0 Send queue max:0 avg:0 Acked-

[tipc-discussion] [net] tipc: fix incorrect fragment message statistics

2020-05-26 Thread Tuong Lien
gth is no longer accurate. This commit resolves the issue by explicitly checking whether the queue contains a 'MSG_FRAGMENTER' message instead. Signed-off-by: Tuong Lien --- net/tipc/link.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/tipc/link.c b

[tipc-discussion] [RFC PATCH] tipc: fix general protection fault in sendstream()

2020-05-28 Thread Tuong Lien
least one skb to go with the socket header and optional data section that may be empty like what we had with the 'tipc_msg_build()'. Reported-by: syzbot+8eac6d030e7807c21...@syzkaller.appspotmail.com Fixes: c0bceb97db9e ("tipc: add smart nagle feature") Signed-off-by: Tuo

[tipc-discussion] [net 2/2] Revert "tipc: Fix potential tipc_aead refcnt leak in tipc_crypto_rcv"

2020-05-29 Thread Tuong Lien
This reverts commit 441870ee4240cf67b5d3ab8e16216a9ff42eb5d6. Like the previous patch in this series, we revert the above commit that causes similar issues with the 'aead' object. Signed-off-by: Tuong Lien --- net/tipc/crypto.c | 1 - 1 file changed, 1 deletion(-) diff --git

  1   2   3   >