Subject: [RFC net-next 1/1] : sctp: denoise deprecation log on SCTP_EVENTS

From: Jamal Hadi Salim <[email-masked]>
Date: Thu, 09 Jul 2015 06:38:15 -0400

In the newer kernels this message is extremely noisy. After a quick
discussion with Daniel it seems to me it will be very hard to get
existing apps that nobody is going to update to continue to work
(i.e no forward compat). And newer apps that desire to play in both
older kernels and new kernels will have to play some tricks to work
(i.e weak backward compatibility).  These are good reasons
to totally get rid of this message. At minimal to neutre it.
The attached change tries to do that. However, if you had multiple
apps, you will only get warning for the first one.

Will send proper patch when theres some consensus.

cheers,
jamal
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 5f6c4e6..0e8c937 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2207,9 +2207,10 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
 		return -EFAULT;
 
 	if (sctp_sk(sk)->subscribe.sctp_data_io_event)
-		pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
-				    "Requested SCTP_SNDRCVINFO event.\n"
-				    "Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n",
+		pr_warn_once(DEPRECATED "%s (pid %d) "
+				    "SCTP_EVENTS Option - DEPRECATED\n"
+				    "Use SCTP_EVENT Option instead\n"
+				    "Refer to RFC6458 section 6.2\n",
 				    current->comm, task_pid_nr(current));
 
 	/* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,