[tipc-discussion] [PATCH net v1] tipc: fix hanging clients using poll with EPOLLOUT flag

2019-05-08 Thread Parthasarathy Bhuvaragan
ckets"). Fixes: 517d7c79bdb398 ("tipc: fix hanging poll() for stream sockets") Signed-off-by: Parthasarathy Bhuvaragan Acked-by: Jon Maloy --- 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 b542f14ed444.

[tipc-discussion] [PATCH net v1] tipc: fix hanging clients using poll with EPOLLOUT flag

2019-05-08 Thread Parthasarathy Bhuvaragan
ckets"). Fixes: 517d7c79bdb398 ("tipc: fix hanging poll() for stream sockets") Signed-off-by: Parthasarathy Bhuvaragan --- 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 b542f14ed444..2851937f6e32 100644

Re: [tipc-discussion] [net-next] tipc:add more debug printouts

2018-10-01 Thread Parthasarathy Bhuvaragan
Hi Hoang, In general I feel that you should avoild using pr_debug when the information belongs to per socket. For sockets use tracepoints ( https://lwn.net/Articles/379903/) or atleast the ratelimited variants. See my comments below. On Thu, Sep 27, 2018 at 11:04 AM Hoang Le wrote: > It is usef

[tipc-discussion] [PATCH net v1 1/1] tipc: fix hanging poll() for stream sockets

2017-12-28 Thread Parthasarathy Bhuvaragan
ations are not woken when the connection is ESTABLISHED and hence sleep forever. In this commit, we fix it by including the POLLOUT event for sockets in TIPC_CONNECTING state. Fixes: 42b531de17d2f6 ("tipc: Fix missing connection request handling") Acked-by: Jon Maloy Signed-off-by: Part

[PATCH net v1 1/1] tipc: fix hanging poll() for stream sockets

2017-12-28 Thread Parthasarathy Bhuvaragan
ations are not woken when the connection is ESTABLISHED and hence sleep forever. In this commit, we fix it by including the POLLOUT event for sockets in TIPC_CONNECTING state. Fixes: 42b531de17d2f6 ("tipc: Fix missing connection request handling") Acked-by: Jon Maloy Signed-off-by: Part

[tipc-discussion] PATCH v1: 0001-tipc-fix-hanging-poll-for-stream-clients.patch

2017-12-22 Thread Parthasarathy Bhuvaragan
>From 2c23b6a88a134bd9df0acc998383a34aa1df6583 Mon Sep 17 00:00:00 2001 From: Parthasarathy Bhuvaragan Date: Fri, 22 Dec 2017 15:43:23 +0100 Subject: [PATCH] tipc: fix hanging poll() for stream clients In commit 42b531de17d2f6 ("tipc: Fix missing connection request handling")

Re: [tipc-discussion] FW: Kernel crash

2017-11-29 Thread Parthasarathy Bhuvaragan
Hi Rune, What kind of timeout do you use in your subscription? Is it 0 or low value (< 10ms) ?? Apart from the fixes Jon has suggested, we still have issues as having low timeouts are very racy. /Partha On Wed, Nov 29, 2017 at 3:05 PM, Rune Torgersen wrote: > (Resending as I think it got lost

[tipc-discussion] [PATCH net v1 1/1] tipc: use only positive error codes in messages

2017-09-29 Thread Parthasarathy Bhuvaragan
bit error field of the message header as 0xf instead of TIPC_ERR_NO_NAME (1). The value 0xf is an unknown error code. In this commit, we set only positive error code. Fixes: e3a77561e7d32 ("tipc: split up function tipc_msg_eval()") Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/

[PATCH net v1 1/1] tipc: use only positive error codes in messages

2017-09-29 Thread Parthasarathy Bhuvaragan
bit error field of the message header as 0xf instead of TIPC_ERR_NO_NAME (1). The value 0xf is an unknown error code. In this commit, we set only positive error code. Fixes: e3a77561e7d32 ("tipc: split up function tipc_msg_eval()") Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/

[PATCH net v1 1/1] tipc: permit bond slave as bearer

2017-08-28 Thread Parthasarathy Bhuvaragan
protocol callback per device and look for tipc bearer from both the devices. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/bearer.c | 26 +++--- net/tipc/bearer.h | 2 ++ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/net/tipc/bearer.c b/net/tipc

[tipc-discussion] [PATCH net v1 1/1] tipc: permit bond slave as bearer

2017-08-28 Thread Parthasarathy Bhuvaragan
protocol callback per device and look for tipc bearer from both the devices. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/bearer.c | 26 +++--- net/tipc/bearer.h | 2 ++ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/net/tipc/bearer.c b/net/tipc

[PATCH net v1 3/3] tipc: context imbalance at node read unlock

2017-08-24 Thread Parthasarathy Bhuvaragan
If we fail to find a valid bearer in tipc_node_get_linkname(), node_read_unlock() is called without holding the node read lock. This commit fixes this error. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc

[tipc-discussion] [PATCH net v1 3/3] tipc: context imbalance at node read unlock

2017-08-24 Thread Parthasarathy Bhuvaragan
If we fail to find a valid bearer in tipc_node_get_linkname(), node_read_unlock() is called without holding the node read lock. This commit fixes this error. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc

[PATCH net v1 2/3] tipc: reassign pointers after skb reallocation / linearization

2017-08-24 Thread Parthasarathy Bhuvaragan
commit, we fix this error by ensuring that the pointers are re-assigned after any of these skb operations. Fixes: 29042e19f2c60 ("tipc: let function tipc_msg_reverse() expand header when needed") Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/msg.c | 7 +

[tipc-discussion] [PATCH net v1 2/3] tipc: reassign pointers after skb reallocation / linearization

2017-08-24 Thread Parthasarathy Bhuvaragan
commit, we fix this error by ensuring that the pointers are re-assigned after any of these skb operations. Fixes: 29042e19f2c60 ("tipc: let function tipc_msg_reverse() expand header when needed") Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/msg.c | 7 +

[tipc-discussion] [PATCH net v1 1/3] tipc: perform skb_linearize() before parsing the inner header

2017-08-24 Thread Parthasarathy Bhuvaragan
disturbances if the skb was non linear. In this commit, we perform linearization for the above messages. Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/node.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tipc/node.c b/net/tipc/node.c index 9b4dcb6a16b5

[PATCH net v1 1/3] tipc: perform skb_linearize() before parsing the inner header

2017-08-24 Thread Parthasarathy Bhuvaragan
disturbances if the skb was non linear. In this commit, we perform linearization for the above messages. Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/node.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tipc/node.c b/net/tipc/node.c index 9b4dcb6a16b5

[tipc-discussion] [PATCH net v1 0/3] tipc: buffer reassignment fixes

2017-08-24 Thread Parthasarathy Bhuvaragan
This series contains fixes for buffer reassignments and a context imbalance. Parthasarathy Bhuvaragan (3): tipc: perform skb_linearize() before parsing the inner header tipc: reassign pointers after skb reallocation / linearization tipc: context imbalance at node read unlock net/tipc

[PATCH net v1 0/3] tipc: buffer reassignment fixes

2017-08-24 Thread Parthasarathy Bhuvaragan
This series contains fixes for buffer reassignments and a context imbalance. Parthasarathy Bhuvaragan (3): tipc: perform skb_linearize() before parsing the inner header tipc: reassign pointers after skb reallocation / linearization tipc: context imbalance at node read unlock net/tipc

Re: [tipc-discussion] Add tipc-link-watcher

2017-08-23 Thread Parthasarathy Bhuvaragan
Hi Akbar, Thanks for the patch. Its merged now. https://sourceforge.net/p/tipc/tipcutils/ci/88ffe493ae72d1c16fa5bdb36ed92d39a05f9fd2/ /Partha On 06/15/2017 12:22 PM, Akbar Rezvan wrote: Hi Ying, Sorry for the delay. Here it is (Pls see below): Ciao//Anthony From 11155e72babf481b526e3aa

[tipc-discussion] [PATCH net v1 1/1] tipc: context imbalance at node read unlock

2017-08-22 Thread Parthasarathy Bhuvaragan
If we fail to find a valid bearer in tipc_node_get_linkname(), node_read_unlock() is called without holding the node read lock. This commit fixes this error. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc

[PATCH net v1 2/2] tipc: fix a race condition of releasing subscriber object

2017-08-22 Thread Parthasarathy Bhuvaragan
nic happened. By contrast, if we increase subscriber's refcnt before tipc_subscrb_subscrp_delete() is called in tipc_subscrp_cancel(), the panic issue can be avoided. Fixes: d094c4d5f5c7 ("tipc: add subscription refcount to avoid invalid delete") Reported-by: Parthasarathy Bhuvaraga

[PATCH net v1 1/2] tipc: remove subscription references only for pending timers

2017-08-22 Thread Parthasarathy Bhuvaragan
80 [tipc] RSP: 88003ba03e90 [39.604] ---[ end trace 79ce94b7216cb459 ]--- Fixes: 139bb36f754a ("tipc: advance the time of deleting subscription from subscriber->subscrp_list") Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/subscr.c | 19 +++ 1 file changed, 7 i

[PATCH net v1 0/2] tipc: topology server fixes

2017-08-22 Thread Parthasarathy Bhuvaragan
The following commits fixes two race conditions causing general protection faults. Parthasarathy Bhuvaragan (1): tipc: remove subscription references only for pending timers Ying Xue (1): tipc: fix a race condition of releasing subscriber object net/tipc/subscr.c | 21

[tipc-discussion] [PATCH net-next v1] tipc: permit bond slave as bearer

2017-08-22 Thread Parthasarathy Bhuvaragan
protocol callback per device and look for tipc bearer from both the devices. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/bearer.c | 26 +++--- net/tipc/bearer.h | 2 ++ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/net/tipc/bearer.c b/net/tipc

[tipc-discussion] [PATCH net v1 2/2] tipc: fix a race condition of releasing subscriber object

2017-08-22 Thread Parthasarathy Bhuvaragan
nic happened. By contrast, if we increase subscriber's refcnt before tipc_subscrb_subscrp_delete() is called in tipc_subscrp_cancel(), the panic issue can be avoided. Fixes: d094c4d5f5c7 ("tipc: add subscription refcount to avoid invalid delete") Reported-by: Parthasarathy Bhuvaraga

[tipc-discussion] [PATCH net v1 1/2] tipc: remove subscription references only for pending timers

2017-08-22 Thread Parthasarathy Bhuvaragan
80 [tipc] RSP: 88003ba03e90 [39.604] ---[ end trace 79ce94b7216cb459 ]--- Fixes: 139bb36f754a ("tipc: advance the time of deleting subscription from subscriber->subscrp_list") Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/subscr.c | 19 +++ 1 file changed, 7 i

[tipc-discussion] [PATCH net v1 0/2] tipc: topology server fixes

2017-08-22 Thread Parthasarathy Bhuvaragan
The following commits fixes two race conditions causing general protection faults. Parthasarathy Bhuvaragan (1): tipc: remove subscription references only for pending timers Ying Xue (1): tipc: fix a race condition of releasing subscriber object net/tipc/subscr.c | 21

Re: [tipc-discussion] [net-next v2 1/1] tipc: don't reset stale broadcast send link

2017-08-21 Thread Parthasarathy Bhuvaragan
For the fix, you may add Reviewed-by: Parthasarathy Bhuvaragan . /Partha ///jon -Original Message- From: Jon Maloy Sent: Wednesday, August 09, 2017 14:22 To: Jon Maloy ; Jon Maloy Cc: Parthasarathy Bhuvaragan ; Ying Xue ; tipc-discussion@lists.sourceforge.net Subject: [net-next

Re: [tipc-discussion] TIPC connection stalling due to invalid congestion status when bearer 0 recovers

2017-07-24 Thread Parthasarathy Bhuvaragan
4.4.0 (with a few patches backported from later releases as per John Maloy, Parthasarathy Bhuvaragan, and Ying Xue). (The other 3 cards are using a much older 1.7-based TIPC, but are not actually involved in the testing pertaining to the issue detailed below.) There are applications on several

Re: [tipc-discussion] [PATCH] tipc: fix a race condition of releasing subscriber object

2017-05-19 Thread Parthasarathy Bhuvaragan
to be released, as a consequence, panic > happened. > > By contrast, if we increase subscriber's refcnt before > tipc_subscrb_subscrp_delete() is called in tipc_subscrp_cancel(), > the panic issue can be avoided. > > Fixes: d094c4d5f5c7 ("tipc: add subscription re

Re: [tipc-discussion] [PATCH net v1 1/1] tipc: remove subscription references only for pending timers

2017-05-18 Thread Parthasarathy Bhuvaragan
gt; Hi Partha, > > Sorry for late response. > > Good catch! Please add my "ack-by". > > Thanks, > Ying > > On 05/08/2017 09:46 PM, Parthasarathy Bhuvaragan wrote: >> In commit, 139bb36f754a ("tipc: advance the time of deleting >> subscription from

Re: [tipc-discussion] [PATCH net 1/1] tipc: make macro tipc_wait_for_cond() smp safe

2017-05-10 Thread Parthasarathy Bhuvaragan
Looks good to me. You may add the tag if you like. Reviewed-by: Parthasarathy Bhuvaragan /Partha From: Jon Maloy Sent: Monday, May 8, 2017 3:31:14 PM To: Jon Maloy; Jon Maloy Cc: Parthasarathy Bhuvaragan; Ying Xue; tipc-discussion@lists.sourceforge.net Subject

[tipc-discussion] [PATCH net v1 1/1] tipc: remove subscription references only for pending timers

2017-05-08 Thread Parthasarathy Bhuvaragan
80 [tipc] RSP: 88003ba03e90 [39.604] ---[ end trace 79ce94b7216cb459 ]--- Fixes: 139bb36f754a ("tipc: advance the time of deleting subscription from subscriber->subscrp_list") Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/subscr.c | 19 +++ 1 file changed, 7 i

Re: [tipc-discussion] [net-next v2 2/2] tipc: refactor function tipc_sk_recv_stream()

2017-05-02 Thread Parthasarathy Bhuvaragan
This version is cleaner and easy to read. Thanks. You may add the tag if you like. Reviewed-by: Parthasarathy Bhuvaragan /Partha On 04/29/2017 02:50 AM, Jon Maloy wrote: > We try to make this function more readable by improving variable names > and comments, using more stack variable

Re: [tipc-discussion] [net-next v2 1/2] tipc: refactor function tipc_sk_recvmsg()

2017-05-02 Thread Parthasarathy Bhuvaragan
= !tipc_sk_type_connectionless(sk); We can rename connected to seqpacket by checking for that socket type as thats the one using connection oriented recvmsg. Reviewed-by: Parthasarathy Bhuvaragan /Partha > + int rc, err, hlen, dlen, copy; > + long timeout; > &g

[tipc-discussion] [PATCH net v1 6/6] tipc: reassign pointers after skb reallocation / linearization

2017-04-27 Thread Parthasarathy Bhuvaragan
commit, we fix this error by ensuring that the pointers are re-assigned after any of these skb operations. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/msg.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/tipc/msg.c b/net/tipc/msg.c index ab3087687a32

[tipc-discussion] [PATCH net v1 5/6] tipc: perform skb_linearize() before parsing the inner header

2017-04-27 Thread Parthasarathy Bhuvaragan
disturbances if the skb was non linear. In this commit, we perform linearization for the above messages. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/node.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tipc/node.c b/net/tipc/node.c index e062ef0f01dd..8b08c3952ee7 100644 --- a

[tipc-discussion] [PATCH net v1 4/6] tipc: lock wakeup & inputq at tipc_link_reset()

2017-04-27 Thread Parthasarathy Bhuvaragan
issing packets. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/link.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index ddd2dd6f77aa..722b82a884dc 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -829,9 +829,14 @

[tipc-discussion] [PATCH net v1 3/6] tipc: reset bearer if device carrier not ok

2017-04-27 Thread Parthasarathy Bhuvaragan
If we detect that under lying carrier detects errors and goes down, we reset the bearer immediately. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/bearer.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index

[tipc-discussion] [PATCH net v1 2/6] tipc: expand buffers with GFP_ATOMIC flag

2017-04-27 Thread Parthasarathy Bhuvaragan
x7f [] ? cpuidle_enter_state+0xb6/0x280 In this commit, we allocate memory with GFP_ATOMIC flag while holding spinlock. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/msg.c b/net/tipc/msg.c index 312ef7de5

[tipc-discussion] [PATCH net v1 0/6] tipc: multiple bug fixes

2017-04-27 Thread Parthasarathy Bhuvaragan
This patch series has several fixes. Parthasarathy Bhuvaragan (6): tipc: queue socket protocol error messages into socket receive buffer tipc: expand buffers with GFP_ATOMIC flag tipc: reset bearer if device carrier not ok tipc: lock wakeup & inputq at tipc_link_reset() tipc: per

[tipc-discussion] [PATCH net v1 1/6] tipc: queue socket protocol error messages into socket receive buffer

2017-04-27 Thread Parthasarathy Bhuvaragan
. Now the receive queue will remain empty and the socket sleeps forever. In this commit, we enqueue this error message into the socket's receive queue in addition to the above state change to cover all conditions. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c

[PATCH net v1 0/3] tipc: fix hanging socket connections

2017-04-26 Thread Parthasarathy Bhuvaragan
This patch series contains fixes for the socket layer to prevent hanging / stale connections. Parthasarathy Bhuvaragan (3): tipc: Fix missing connection request handling tipc: improve error validations for sockets in CONNECTING state tipc: close the connection if protocol messages contain

[PATCH net v1 2/3] tipc: improve error validations for sockets in CONNECTING state

2017-04-26 Thread Parthasarathy Bhuvaragan
our users about them using sk_state_change(). Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/socket.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 3b8df510a80c..38c367f6c

[PATCH net v1 1/3] tipc: Fix missing connection request handling

2017-04-26 Thread Parthasarathy Bhuvaragan
callback sk_data_ready(). Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 566906795c8c..3b8df510a80c 100644 --- a/net/tipc/socket.c +++ b/net

[PATCH net v1 3/3] tipc: close the connection if protocol messages contain errors

2017-04-26 Thread Parthasarathy Bhuvaragan
-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/socket.c | 8 1 file changed, 8 insertions(+) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 38c367f6ced4..bdce99f9407a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -866,6 +866,14 @@ static void

[tipc-discussion] [PATCH net v1 2/3] tipc: improve error validations for sockets in CONNECTING state

2017-04-26 Thread Parthasarathy Bhuvaragan
our users about them using sk_state_change(). Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/socket.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 3b8df510a80c..38c367f6c

[tipc-discussion] [PATCH net v1 0/3] tipc: fix hanging socket connections

2017-04-26 Thread Parthasarathy Bhuvaragan
This patch series contains fixes for the socket layer to prevent hanging / stale connections. Parthasarathy Bhuvaragan (3): tipc: Fix missing connection request handling tipc: improve error validations for sockets in CONNECTING state tipc: close the connection if protocol messages contain

[tipc-discussion] [PATCH net v1 3/3] tipc: close the connection if protocol messages contain errors

2017-04-26 Thread Parthasarathy Bhuvaragan
-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/socket.c | 8 1 file changed, 8 insertions(+) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 38c367f6ced4..bdce99f9407a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -866,6 +866,14 @@ static void

[tipc-discussion] [PATCH net v1 1/3] tipc: Fix missing connection request handling

2017-04-26 Thread Parthasarathy Bhuvaragan
callback sk_data_ready(). Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 566906795c8c..3b8df510a80c 100644 --- a/net/tipc/socket.c +++ b/net

[tipc-discussion] [PATCH net v1 2/2] tipc: fix socket flow control accounting error at tipc_recv_stream

2017-04-24 Thread Parthasarathy Bhuvaragan
skb. This leads to a flow control accounting error causing permanent congestion. In this commit, we fix this accounting error by always using the size of the incoming message. Fixes: 10724cc7bb78 ("tipc: redesign connection-level flow control") Signed-off-by: Parthasarathy Bhuvaragan R

[PATCH net v1 2/2] tipc: fix socket flow control accounting error at tipc_recv_stream

2017-04-24 Thread Parthasarathy Bhuvaragan
skb. This leads to a flow control accounting error causing permanent congestion. In this commit, we fix this accounting error by always using the size of the incoming message. Fixes: 10724cc7bb78 ("tipc: redesign connection-level flow control") Signed-off-by: Parthasarathy Bhuvaragan R

[tipc-discussion] [PATCH net v1 1/2] tipc: fix socket flow control accounting error at tipc_send_stream

2017-04-24 Thread Parthasarathy Bhuvaragan
n the partially sent bytes as the return value at link congestion. Fixes: 10724cc7bb78 ("tipc: redesign connection-level flow control") Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/

[PATCH net v1 1/2] tipc: fix socket flow control accounting error at tipc_send_stream

2017-04-24 Thread Parthasarathy Bhuvaragan
n the partially sent bytes as the return value at link congestion. Fixes: 10724cc7bb78 ("tipc: redesign connection-level flow control") Signed-off-by: Parthasarathy Bhuvaragan Reviewed-by: Jon Maloy --- net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/

[PATCH net-next v1 1/2] tipc: add support for stream/seqpacket socketpairs

2017-03-29 Thread Parthasarathy Bhuvaragan
From: Erik Hugne sockets A and B are connected back-to-back, similar to what AF_UNIX does. Signed-off-by: Erik Hugne Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc

[PATCH net-next v1 0/2] tipc: add socketpair support

2017-03-29 Thread Parthasarathy Bhuvaragan
We add socketpair support for connection oriented sockets in the first patch and for connection less in the second. Erik Hugne (2): tipc: add support for stream/seqpacket socketpairs tipc: allow rdm/dgram socketpairs net/tipc/socket.c | 28 +--- 1 file changed, 25 ins

[PATCH net-next v1 2/2] tipc: allow rdm/dgram socketpairs

2017-03-29 Thread Parthasarathy Bhuvaragan
From: Erik Hugne for socketpairs using connectionless transport, we cache the respective node local TIPC portid to use in subsequent calls to send() in the socket's private data. Signed-off-by: Erik Hugne Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c

[tipc-discussion] [PATCH net-next v1 2/2] tipc: allow rdm/dgram socketpairs

2017-03-29 Thread Parthasarathy Bhuvaragan
From: Erik Hugne for socketpairs using connectionless transport, we cache the respective node local TIPC portid to use in subsequent calls to send() in the socket's private data. Signed-off-by: Erik Hugne Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c

[tipc-discussion] [PATCH net-next v1 1/2] tipc: add support for stream/seqpacket socketpairs

2017-03-29 Thread Parthasarathy Bhuvaragan
From: Erik Hugne sockets A and B are connected back-to-back, similar to what AF_UNIX does. Signed-off-by: Erik Hugne Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc

[tipc-discussion] [PATCH net-next v1 0/2] tipc: add socketpair support

2017-03-29 Thread Parthasarathy Bhuvaragan
We add socketpair support for connection oriented sockets in the first patch and for connection less in the second. Erik Hugne (2): tipc: add support for stream/seqpacket socketpairs tipc: allow rdm/dgram socketpairs net/tipc/socket.c | 28 +--- 1 file changed, 25 ins

[PATCH net-next v1 2/2] tipc: adjust the policy of holding subscription kref

2017-03-28 Thread Parthasarathy Bhuvaragan
From: Ying Xue When a new subscription object is inserted into name_seq->subscriptions list, it's under name_seq->lock protection; when a subscription is deleted from the list, it's also under the same lock protection; similarly, when accessing a subscription by going through subscriptions list,

[PATCH net-next v1 1/2] tipc: advance the time of deleting subscription from subscriber->subscrp_list

2017-03-28 Thread Parthasarathy Bhuvaragan
Maloy Signed-off-by: Ying Xue Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/subscr.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index 271cd66e4b3b..0649bc29c6bb 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c @@

[tipc-discussion] [PATCH net-next v1 1/2] tipc: advance the time of deleting subscription from subscriber->subscrp_list

2017-03-28 Thread Parthasarathy Bhuvaragan
Maloy Signed-off-by: Ying Xue Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/subscr.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index 271cd66e4b3b..0649bc29c6bb 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c @@

[tipc-discussion] [PATCH net-next v1 2/2] tipc: adjust the policy of holding subscription kref

2017-03-28 Thread Parthasarathy Bhuvaragan
From: Ying Xue When a new subscription object is inserted into name_seq->subscriptions list, it's under name_seq->lock protection; when a subscription is deleted from the list, it's also under the same lock protection; similarly, when accessing a subscription by going through subscriptions list,

[PATCH net-next v1 0/2] tipc: subscription refcount simplifications

2017-03-28 Thread Parthasarathy Bhuvaragan
The first patch makes the subscription refcount cleanup lockless and the second updates the subscription refcount policy. Ying Xue (2): tipc: advance the time of deleting subscription from subscriber->subscrp_list tipc: adjust the policy of holding subscription kref net/tipc/name_table.c

[tipc-discussion] [PATCH net-next v1 0/2] tipc: subscription refcount simplifications

2017-03-28 Thread Parthasarathy Bhuvaragan
The first patch makes the subscription refcount cleanup lockless and the second updates the subscription refcount policy. Ying Xue (2): tipc: advance the time of deleting subscription from subscriber->subscrp_list tipc: adjust the policy of holding subscription kref net/tipc/name_table.c

[tipc-discussion] [PATCH net v1 1/1] tipc: fix nametbl deadlock at tipc_nametbl_unsubscribe

2017-03-21 Thread Parthasarathy Bhuvaragan
by: Jon Maloy Signed-off-by: Ying Xue Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/subscr.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index 9d94e65d0894..271cd66e4b3b 100644 --- a/net/tipc/subsc

[PATCH net v1 1/1] tipc: fix nametbl deadlock at tipc_nametbl_unsubscribe

2017-03-21 Thread Parthasarathy Bhuvaragan
by: Jon Maloy Signed-off-by: Ying Xue Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/subscr.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index 9d94e65d0894..271cd66e4b3b 100644 --- a/net/tipc/subsc

Re: [tipc-discussion] [PATCH v2 net-next 6/6] tipc: delete expired subscription

2017-03-21 Thread Parthasarathy Bhuvaragan
to net has the following tag: Fixes: d094c4d5f5c7 ("tipc: add subscription refcount to avoid invalid delete") /Partha From: Jon Maloy Sent: Monday, March 20, 2017 8:30 PM To: Jon Maloy; Parthasarathy Bhuvaragan; John Thompson Cc: tipc-

Re: [tipc-discussion] [PATCH v2 net-next 6/6] tipc: delete expired subscription

2017-03-20 Thread Parthasarathy Bhuvaragan
ipc: adjust the policy of holding subscription kref Any objections? /Partha From: Jon Maloy Sent: Monday, March 20, 2017 1:25:57 PM To: John Thompson; Parthasarathy Bhuvaragan Cc: Ying Xue; tipc-discussion@lists.sourceforge.net Subject: RE: [tipc-discussion] [PATCH v2

[tipc-discussion] [PATCH net v1 4/7] tipc: Fix missing connection request handling

2017-03-20 Thread Parthasarathy Bhuvaragan
: Parthasarathy Bhuvaragan --- v2: Address comments from Ying Xue by replacing wq_has_sleeper().. with sk->sk_data_ready(sk). Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c in

[tipc-discussion] [PATCH net v1 7/7] tipc: fix node read lock imbalance for unidentified bearers

2017-03-20 Thread Parthasarathy Bhuvaragan
When we fail to identify a bearer in tipc_node_get_linkname(), we call node unlock without locking the node read lock. This leads to node read lock imbalance. In this commit, we skip the node read unlock for unidentified bearer. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/node.c | 2

[tipc-discussion] [PATCH net v1 1/7] tipc: fix socket flow control accounting error at tipc_send_stream

2017-03-20 Thread Parthasarathy Bhuvaragan
n the partially sent bytes as the return value at link congestion. Fixes: 10724cc7bb78 ("tipc: redesign connection-level flow control") Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc

[tipc-discussion] [PATCH net v1 0/7] tipc socket layer bug fixes

2017-03-20 Thread Parthasarathy Bhuvaragan
4-6: Fixes the legacy bugs exposed by the new flow control, as the new flow control is way stricter than the previous one based on packet count. Patch#7: Fix node read lock imbalance. Parthasarathy Bhuvaragan (7): tipc: fix socket flow control accounting error at tipc_s

[tipc-discussion] [PATCH net v1 6/7] tipc: close the connection if protocol messages contain errors

2017-03-20 Thread Parthasarathy Bhuvaragan
-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 1f18b435f915..c8137fa5465b 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -73,7 +73,6 @@ enum

[tipc-discussion] [PATCH net v1 2/7] tipc: fix socket flow control accounting error at tipc_recv_stream

2017-03-20 Thread Parthasarathy Bhuvaragan
skb. This leads to a flow control accounting error causing permanent congestion. In this commit, we fix this accounting error by always using the size of the incoming message. Fixes: 10724cc7bb78 ("tipc: redesign connection-level flow control") Signed-off-by: Parthasarathy Bhuvaragan

[tipc-discussion] [PATCH net v1 3/7] tipc: fix flow control accounting for implicit connect

2017-03-20 Thread Parthasarathy Bhuvaragan
his leads to an accounting error and eventually traffic disturbance. In this commit, we perform tipc_node_get_capabilities() at implicit connect and perform accounting based on the peer's capability. Fixes: 10724cc7bb78 ("tipc: redesign connection-level flow control") Signed-off

[tipc-discussion] [PATCH net v1 5/7] tipc: improve error validations for sockets in CONNECTING state

2017-03-20 Thread Parthasarathy Bhuvaragan
out users about them using sk_state_change(). Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index cb8d2dd2b10c..1f18b435f915 100644 --- a/net/tip

Re: [tipc-discussion] [PATCH v2 net-next 6/6] tipc: delete expired subscription

2017-03-15 Thread Parthasarathy Bhuvaragan
tipc_nametbl_unsubscribe tipc: advance the time of deleting subscription from subscriber->subscrp_list tipc: adjust the policy of holding subscription kref regards partha From: Ying Xue Sent: Wednesday, March 15, 2017 12:33 PM To: Parthasarathy Bhuvaragan;

Re: [tipc-discussion] [PATCH net v1 1/2] tipc: fix socket flow control errors

2017-03-13 Thread Parthasarathy Bhuvaragan
Please ignore this patch and 'tipc: Fix missing connection request handling'. They dont belong to this series and they are not the right version. /Partha On 03/13/2017 06:57 PM, Parthasarathy Bhuvaragan wrote: > In this commit, we fix the following two errors: > 1. In tipc_se

[tipc-discussion] [PATCH net v1 1/2] tipc: fix socket flow control errors

2017-03-13 Thread Parthasarathy Bhuvaragan
always based on the incoming message. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 6b09a778cc71..79e628cd08a9 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c

[tipc-discussion] [PATCH net v1 2/2] tipc: Fix missing connection request handling

2017-03-13 Thread Parthasarathy Bhuvaragan
: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 79e628cd08a9..ce6ed0955e36 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1577,7 +1577,7 @@ static bool filter_connect(struct

[tipc-discussion] [PATCH v3 net-next 0/3] solve two deadlock issues

2017-03-13 Thread Parthasarathy Bhuvaragan
commit d094c4d5f5 ("tipc: add subscription refcount to avoid invalid delete") accidently introduce the following deadlock scenarios: CPU1: CPU2: -- tipc_nametbl_publish spin_lock_bh(&tn->nametbl_lock) tipc_nametbl_insert_p

[tipc-discussion] [PATCH v3 net-next 3/3] tipc: adjust the policy of holding subscription kref

2017-03-13 Thread Parthasarathy Bhuvaragan
From: Ying Xue When a new subscription object is inserted into name_seq->subscriptions list, it's under name_seq->lock protection; when a subscription is deleted from the list, it's also under the same lock protection; similarly, when accessing a subscription by going through subscriptions list,

[tipc-discussion] [PATCH v3 net-next 2/3] tipc: advance the time of deleting subscription from subscriber->subscrp_list

2017-03-13 Thread Parthasarathy Bhuvaragan
-by: Ying Xue Signed-off-by: Parthasarathy Bhuvaragan --- v2: Remove the subscrp_list at tipc_subscrp_timeout() also. This prevents any subscription cancel or subscriber delete thread running in parallel seeing the timeout out subscription. --- net/tipc/subscr.c | 9 ++--- 1 file changed,

[tipc-discussion] [PATCH v3 net-next 1/3] tipc: advance the time of calling tipc_nametbl_unsubscribe

2017-03-13 Thread Parthasarathy Bhuvaragan
by: Jon Maloy Signed-off-by: Ying Xue Signed-off-by: Parthasarathy Bhuvaragan --- v2: Call tipc_nametbl_unsubscribe() at tipc_subscrp_timeout() too. This should fix the deadlock and also ensure that applications will not receive any new notifications after timeout event. --- net/tipc/sub

Re: [tipc-discussion] [PATCH v2 net-next 6/6] tipc: delete expired subscription

2017-03-13 Thread Parthasarathy Bhuvaragan
Hi Ying, I have a new patch sets which fixes this issue using fixes from your patches. It deviates from your patch the following way: In my solution, the subscription refcount keeps track of a subscription with or without timer. I do not increment refcount for timer, and use the subscriber lock

Re: [tipc-discussion] TIPC Oops in tipc_sk_recv

2017-02-27 Thread Parthasarathy Bhuvaragan
y are bugs. /Partha > Peter > > > > -Original Message- > From: Parthasarathy Bhuvaragan [mailto:parthasarathy.bhuvara...@ericsson.com] > Sent: February-27-17 7:37 AM > To: Butler, Peter > Cc: Jon Maloy ; tipc-discussion@lists.sourceforge.net > Subject: Re: TIPC Oops in tipc_sk_re

Re: [tipc-discussion] TIPC Oops in tipc_sk_recv

2017-02-27 Thread Parthasarathy Bhuvaragan
running load over several connections (~1000+) and i am yet to find the root cause. /Partha > > > /Peter > > > > *From:*Parthasarathy Bhuvaragan > [mailto:parthasarathy.bhuvara...@ericsson.com] > *Sent:* February-24-17 5:21 AM > *To:* Butler, Peter > *Cc:* Jon Maloy

[tipc-discussion] [PATCH net v1 2/2] tipc: Fix missing connection request handling

2017-02-24 Thread Parthasarathy Bhuvaragan
: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 79e628cd08a9..ce6ed0955e36 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1577,7 +1577,7 @@ static bool filter_connect(struct

[tipc-discussion] [PATCH net v1 1/2] tipc: fix socket flow control errors

2017-02-24 Thread Parthasarathy Bhuvaragan
always based on the incoming message. Signed-off-by: Parthasarathy Bhuvaragan --- net/tipc/socket.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 6b09a778cc71..79e628cd08a9 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c

Re: [tipc-discussion] TIPC Oops in tipc_sk_recv

2017-02-24 Thread Parthasarathy Bhuvaragan
ntainability in the long run. /Partha From: Butler, Peter Sent: Thursday, February 23, 2017 9:29 PM To: Jon Maloy; tipc-discussion@lists.sourceforge.net; Parthasarathy Bhuvaragan Cc: Butler, Peter Subject: RE: TIPC Oops in tipc_sk_recv I have made the followi

Re: [tipc-discussion] [net 5/5] tipc: remove unnecessary increasement of subscription refcount

2017-02-23 Thread Parthasarathy Bhuvaragan
essage, you need to edit the stacktraces as the scenario you describe will not happen due to your previous patches. As we never perform a tipc_subscrp_get() in tipc_subscrp_report_overlap(). /Partha From: John Thompson Sent: Tuesday, February 21, 2017

[tipc-discussion] [PATCH net-next v3 1/2] tipc: add support for stream socketpairs

2017-01-27 Thread Parthasarathy Bhuvaragan
From: Erik Hugne sockets A and B are connected back-to-back, similar to what AF_UNIX does. Signed-off-by: Erik Hugne --- net/tipc/socket.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 103d1fd058c0..eafc9569e679 100

[tipc-discussion] [PATCH net-next v3 2/2] tipc: allow rdm/dgram socketpairs

2017-01-27 Thread Parthasarathy Bhuvaragan
From: Erik Hugne for socketpairs using connectionless transport, we cache the respective node local TIPC portid to use in subsequent calls to send() in the socket's private data. Signed-off-by: Erik Hugne Signed-off-by: Parthasarathy Bhuvaragan --- v3: Specify own_addr() as destinati

[tipc-discussion] [PATCH 2/2] tipc: allow rdm/dgram socketpairs

2017-01-27 Thread Parthasarathy Bhuvaragan
From: Erik Hugne for socketpairs using connectionless transport, we cache the respective node local TIPC portid to use in subsequent calls to send() in the socket's private data. Signed-off-by: Erik Hugne Signed-off-by: Parthasarathy Bhuvaragan --- v3: Specify own_addr() as destinati

[tipc-discussion] [PATCH 1/2] tipc: add support for stream socketpairs

2017-01-27 Thread Parthasarathy Bhuvaragan
From: Erik Hugne sockets A and B are connected back-to-back, similar to what AF_UNIX does. Signed-off-by: Erik Hugne --- net/tipc/socket.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 103d1fd058c0..eafc9569e679 100

Re: [tipc-discussion] [PATCH net-next v2 2/2] tipc: allow rdm/dgram socketpairs

2017-01-27 Thread Parthasarathy Bhuvaragan
y calling tipc_sk_finish_conn(). This patch has is not correct, I need to pass the onode as the peer_node in that api instead of 0 and that should do all of the above. Or were you thinking of something else? /Partha > > ///jon > > >> -Original Message----- >> From: Parthasarathy

[tipc-discussion] [PATCH net-next v2 1/2] tipc: add support for stream socketpairs

2017-01-25 Thread Parthasarathy Bhuvaragan
From: Erik Hugne sockets A and B are connected back-to-back, similar to what AF_UNIX does. Signed-off-by: Erik Hugne --- net/tipc/socket.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 103d1fd058c0..eafc9569e679 100

  1   2   3   4   5   6   >