netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julien Gomes <julien@arista.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Julien Gomes <julien@arista.com>
Subject: [PATCH net-next 2/2] ip6mr: restrict mroute6 "queue full" warning to related error values
Date: Wed, 21 Jun 2017 10:58:11 -0700	[thread overview]
Message-ID: <20170621175811.16940-2-julien@arista.com> (raw)
In-Reply-To: <20170621175811.16940-1-julien@arista.com>

When sending a cache report on mroute6_sk, mroute6 will emit a
"pending queue full" warning for every error value returned by
sock_queue_rcv_skb().
This warning can be misleading, for example on the EPERM error value
that sk_filter() can return.

Restricting this warning to only ENOMEM or ENOBUFS seems more
appropriate.

Signed-off-by: Julien Gomes <julien@arista.com>
---
 net/ipv6/ip6mr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 7454850f2098..62fe5fd64f22 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1215,7 +1215,8 @@ static int ip6mr_cache_report(struct mr6_table *mrt, struct sk_buff *pkt,
 	 */
 	ret = sock_queue_rcv_skb(mrt->mroute6_sk, skb);
 	if (ret < 0) {
-		net_warn_ratelimited("mroute6: pending queue full, dropping entries\n");
+		if (ret == -ENOMEM || ret == -ENOBUFS)
+			net_warn_ratelimited("mroute6: pending queue full, dropping entries\n");
 		kfree_skb(skb);
 	}
 
-- 
2.13.1

  reply	other threads:[~2017-06-21 17:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 17:58 [PATCH net-next 1/2] ipmr: restrict mroute "queue full" warning to related error values Julien Gomes
2017-06-21 17:58 ` Julien Gomes [this message]
2017-06-23 17:39 ` David Miller
2017-06-23 17:52   ` Julien Gomes
2017-06-23 18:47     ` David Miller
2017-06-23 20:17       ` Julien Gomes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170621175811.16940-2-julien@arista.com \
    --to=julien@arista.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).