Skip to contentSkip to conversation

sctp: do not mark chunk abandoned if peer has no PRSCTP capable

PATCH In review Wei Yongjun 2 participants 5 messages Mar 3, 2011 – Mar 7, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sctp: do not mark chunk abandoned if peer has no PRSCTP capable

Chunk is marked abandoned if the chunk is expires, and it not be retransmited even if the peer has no PRSCTP capable, but the peer will still wait for retransmit it to update CTSN.
This patch disable mark chunk abandoned if peer has no PRSCTP capable.

---
 net/sctp/chunk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/sctp/chunk.c +3 -0
index 6c85564..0d4832d 100644
@@ -347,6 +347,9 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
 {
 	struct sctp_datamsg *msg = chunk->msg;
 
+	if (!chunk->asoc->peer.prsctp_capable)
+		return 0;
+
 	if (!msg->can_abandon)
 		return 0;
 
Signature · 1 line
1.6.5.2
#1 lore raw
Quoted 16 lines · Wei Yongjun

Chunk is marked abandoned if the chunk is expires, and it not be retransmited even if the peer has no PRSCTP capable, but the peer will still wait for retransmit it to update CTSN.
This patch disable mark chunk abandoned if peer has no PRSCTP capable.

---
 net/sctp/chunk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/sctp/chunk.c +0 -0
index 6c85564..0d4832d 100644

net/sctp/chunk.c int sctp_chunk_abandoned(struct sctp_chunk *chunk) · line 355

Quoted 9 lines
net/sctp/chunk.c +3 -0
@@ -347,6 +347,9 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
 {
 	struct sctp_datamsg *msg = chunk->msg;
 
+	if (!chunk->asoc->peer.prsctp_capable)
+		return 0;
+
 	if (!msg->can_abandon)
 		return 0;
 

The trouble is that timetolive can be set on a message independent of Partial Reliability. The difference in behavior is that when PR can't be used, a chunk can only be abandoned if it has not yet been transmitted. With PR enabled, the chunk can be abandoned at any time.

So, you can't blindly disallow abandonment.

-vlad

#2 lore raw
Quoted 31 lines · Wei Yongjun
Quoted 16 lines

Chunk is marked abandoned if the chunk is expires, and it not be retransmited even if the peer has no PRSCTP capable, but the peer will still wait for retransmit it to update CTSN.
This patch disable mark chunk abandoned if peer has no PRSCTP capable.

---
 net/sctp/chunk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/sctp/chunk.c +0 -0
index 6c85564..0d4832d 100644

net/sctp/chunk.c int sctp_chunk_abandoned(struct sctp_chunk *chunk) · line 355

Quoted 9 lines
net/sctp/chunk.c +3 -0
@@ -347,6 +347,9 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
 {
 	struct sctp_datamsg *msg = chunk->msg;
 
+	if (!chunk->asoc->peer.prsctp_capable)
+		return 0;
+
 	if (!msg->can_abandon)
 		return 0;
 

The trouble is that timetolive can be set on a message independent of Partial Reliability. The difference in behavior is that when PR can't be used, a chunk can only be abandoned if it has not yet been transmitted. With PR enabled, the chunk can be abandoned at any time.

Quoted 1 line

So, you can't blindly disallow abandonment.

But, how can we do PR if peer has no PRSCTP capable?
Return error to application in sendmsg()? If so, how we check this if there is no asoc?

Quoted 6 lines

-vlad
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 30 lines · Wei Yongjun
Quoted 30 lines · Wei Yongjun
Quoted 16 lines

Chunk is marked abandoned if the chunk is expires, and it not be retransmited even if the peer has no PRSCTP capable, but the peer will still wait for retransmit it to update CTSN.
This patch disable mark chunk abandoned if peer has no PRSCTP capable.

---
 net/sctp/chunk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/sctp/chunk.c +0 -0
index 6c85564..0d4832d 100644

net/sctp/chunk.c int sctp_chunk_abandoned(struct sctp_chunk *chunk) · line 355

Quoted 9 lines
net/sctp/chunk.c +3 -0
@@ -347,6 +347,9 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
 {
 	struct sctp_datamsg *msg = chunk->msg;
 
+	if (!chunk->asoc->peer.prsctp_capable)
+		return 0;
+
 	if (!msg->can_abandon)
 		return 0;
 

The trouble is that timetolive can be set on a message independent of Partial Reliability. The difference in behavior is that when PR can't be used, a chunk can only be abandoned if it has not yet been transmitted. With PR enabled, the chunk can be abandoned at any time.

Quoted 3 lines
Quoted 1 line

So, you can't blindly disallow abandonment.

But, how can we do PR if peer has no PRSCTP capable?

That's already taken care of. We report the message as unsent. When PRSCTP is disabled, you may only abandon messages/chunks that have not been transmitted (assigned a TSN).

Quoted 1 line

Return error to application in sendmsg()? If so, how we check this if there is no asoc?

How would you have data without an association?

-vlad

Quoted 9 lines
Quoted 8 lines

-vlad
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 33 lines · Wei Yongjun
Quoted 30 lines
Quoted 30 lines · Wei Yongjun
Quoted 16 lines

Chunk is marked abandoned if the chunk is expires, and it not be retransmited even if the peer has no PRSCTP capable, but the peer will still wait for retransmit it to update CTSN.
This patch disable mark chunk abandoned if peer has no PRSCTP capable.

---
 net/sctp/chunk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/sctp/chunk.c +0 -0
index 6c85564..0d4832d 100644

net/sctp/chunk.c int sctp_chunk_abandoned(struct sctp_chunk *chunk) · line 355

Quoted 9 lines
net/sctp/chunk.c +3 -0
@@ -347,6 +347,9 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
 {
 	struct sctp_datamsg *msg = chunk->msg;
 
+	if (!chunk->asoc->peer.prsctp_capable)
+		return 0;
+
 	if (!msg->can_abandon)
 		return 0;
 

The trouble is that timetolive can be set on a message independent of Partial Reliability. The difference in behavior is that when PR can't be used, a chunk can only be abandoned if it has not yet been transmitted. With PR enabled, the chunk can be abandoned at any time.

Quoted 5 lines
Quoted 2 lines
Quoted 1 line

So, you can't blindly disallow abandonment.

But, how can we do PR if peer has no PRSCTP capable?

That's already taken care of. We report the message as unsent. When PRSCTP is disabled, you may only abandon messages/chunks that have not been transmitted (assigned a TSN).

I got it, thanks

Quoted 19 lines
Quoted 1 line

Return error to application in sendmsg()? If so, how we check this if there is no asoc?

How would you have data without an association?

-vlad

Quoted 7 lines
Quoted 7 lines

-vlad
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html