[4/5] sparc64: skip control packet while processing LDC RX queue

Submitted by Jag Raman on March 29, 2017, 9:51 p.m.

Details

Message ID 6a6c93cb9676b785dcfce86098ea5111b179c9d6.1490823535.git.jag.raman@oracle.com
State Under Review
Delegated to: David Miller
Headers show

Commit Message

Jag Raman March 29, 2017, 9:51 p.m.
Skip the control-only packet while processing the RX queue, for LDC
channels in UNRELIABLE mode.

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Aaron Young <aaron.young@oracle.com>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Reviewed-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
---
 arch/sparc/kernel/ldc.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index 04996cc..3dc8467 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -1815,9 +1815,14 @@  static int read_nonraw(struct ldc_channel *lp, void *buf, unsigned int size)
 
 		lp->rcv_nxt = p->seqid;
 
+		/*
+		 * If this is a control-only packet, there is nothing
+		 * else to do but advance the rx queue since the packet
+		 * was already processed above.
+		 */
 		if (!(p->type & LDC_DATA)) {
 			new = rx_advance(lp, new);
-			goto no_data;
+			break;
 		}
 		if (p->stype & (LDC_ACK | LDC_NACK)) {
 			err = data_ack_nack(lp, p);