netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Wunderlich <sw@simonwunderlich.de>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
	Gao Feng <gfree.wind@gmail.com>,
	Sven Eckelmann <sven@narfation.org>,
	Simon Wunderlich <sw@simonwunderlich.de>
Subject: [PATCH 7/7] batman-adv: Treat NET_XMIT_CN as transmit successfully
Date: Thu, 26 Jan 2017 17:44:04 +0100	[thread overview]
Message-ID: <20170126164404.16074-8-sw@simonwunderlich.de> (raw)
In-Reply-To: <20170126164404.16074-1-sw@simonwunderlich.de>

From: Gao Feng <gfree.wind@gmail.com>

The tc could return NET_XMIT_CN as one congestion notification, but
it does not mean the packet is lost. Other modules like ipvlan,
macvlan, and others treat NET_XMIT_CN as success too.

So batman-adv should handle NET_XMIT_CN also as NET_XMIT_SUCCESS.

Signed-off-by: Gao Feng <gfree.wind@gmail.com>
[sven@narfation.org: Moved NET_XMIT_CN handling to batadv_send_skb_packet]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 net/batman-adv/send.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index d7308263b8fa..d9b2889064a6 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -115,7 +115,7 @@ int batadv_send_skb_packet(struct sk_buff *skb,
 	 * congestion and traffic shaping, it drops and returns NET_XMIT_DROP
 	 * (which is > 0). This will not be treated as an error.
 	 */
-	return dev_queue_xmit(skb);
+	return net_xmit_eval(dev_queue_xmit(skb));
 send_skb_err:
 	kfree_skb(skb);
 	return NET_XMIT_DROP;
-- 
2.11.0

      parent reply	other threads:[~2017-01-26 16:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 16:43 [PATCH 0/7] pull request for net-next: batman-adv 2017-01-26 Simon Wunderlich
2017-01-26 16:43 ` [PATCH 2/7] batman-adv: don't add loop detect macs to TT Simon Wunderlich
2017-01-26 16:44 ` [PATCH 3/7] uapi: install batman_adv.h header Simon Wunderlich
     [not found] ` <20170126164404.16074-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
2017-01-26 16:43   ` [PATCH 1/7] batman-adv: Start new development cycle Simon Wunderlich
2017-01-26 16:44   ` [PATCH 4/7] batman-adv: update copyright years for 2017 Simon Wunderlich
2017-01-26 19:31   ` [PATCH 0/7] pull request for net-next: batman-adv 2017-01-26 David Miller
2017-01-26 16:44 ` [PATCH 5/7] batman-adv: Remove unused variable in batadv_tt_local_set_flags Simon Wunderlich
2017-01-26 16:44 ` [PATCH 6/7] batman-adv: Remove one condition check in batadv_route_unicast_packet Simon Wunderlich
2017-01-26 16:44 ` Simon Wunderlich [this message]

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=20170126164404.16074-8-sw@simonwunderlich.de \
    --to=sw@simonwunderlich.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=davem@davemloft.net \
    --cc=gfree.wind@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sven@narfation.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).