* [PATCH 0/2] pull request for net-next: batman-adv 2017-01-28
@ 2017-01-28 10:56 Simon Wunderlich
[not found] ` <20170128105651.3061-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
2017-01-30 0:22 ` [PATCH 0/2] pull request for net-next: batman-adv 2017-01-28 David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Simon Wunderlich @ 2017-01-28 10:56 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
Hi David,
here is another pull request for batman-adv in net-next. One of them fixes
a regression introduced by a patch in the previous pull request two days ago.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit c33705188c493b7de3b8dc2956d67de91b444727:
batman-adv: Treat NET_XMIT_CN as transmit successfully (2017-01-26 08:41:18 +0100)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20170128
for you to fetch changes up to 3e7514afc7d728dd47c5fe9d7a1f5216fe659cda:
batman-adv: Fix includes for IS_ERR/ERR_PTR (2017-01-28 10:40:35 +0100)
----------------------------------------------------------------
Here are two fixes for batman-adv for net-next:
- fix double call of dev_queue_xmit(), caused by the recent introduction
of net_xmit_eval(), by Sven Eckelmann
- Fix includes for IS_ERR/ERR_PTR, by Sven Eckelmann
----------------------------------------------------------------
Sven Eckelmann (2):
batman-adv: Fix double call of dev_queue_xmit
batman-adv: Fix includes for IS_ERR/ERR_PTR
net/batman-adv/debugfs.c | 2 +-
net/batman-adv/send.c | 4 +++-
net/batman-adv/tp_meter.c | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <20170128105651.3061-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>]
* [PATCH 1/2] batman-adv: Fix double call of dev_queue_xmit
[not found] ` <20170128105651.3061-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
@ 2017-01-28 10:56 ` Simon Wunderlich
2017-01-30 12:07 ` David Laight
2017-01-28 10:56 ` [PATCH 2/2] batman-adv: Fix includes for IS_ERR/ERR_PTR Simon Wunderlich
1 sibling, 1 reply; 5+ messages in thread
From: Simon Wunderlich @ 2017-01-28 10:56 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
The net_xmit_eval has side effects because it is not making sure that e
isn't evaluated twice.
#define net_xmit_eval(e) ((e) == NET_XMIT_CN ? 0 : (e))
The code requested by David Miller [1]
return net_xmit_eval(dev_queue_xmit(skb));
will get transformed into
return ((dev_queue_xmit(skb)) == NET_XMIT_CN ? 0 : (dev_queue_xmit(skb)))
dev_queue_xmit will therefore be tried again (with an already consumed skb)
whenever the return code is not NET_XMIT_CN.
[1] https://lkml.kernel.org/r/20170125.225624.965229145391320056.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
Fixes: c33705188c49 ("batman-adv: Treat NET_XMIT_CN as transmit successfully")
Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
Signed-off-by: Simon Wunderlich <sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
---
net/batman-adv/send.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index d9b2889064a6..1489ec27daff 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -77,6 +77,7 @@ int batadv_send_skb_packet(struct sk_buff *skb,
{
struct batadv_priv *bat_priv;
struct ethhdr *ethhdr;
+ int ret;
bat_priv = netdev_priv(hard_iface->soft_iface);
@@ -115,7 +116,8 @@ 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 net_xmit_eval(dev_queue_xmit(skb));
+ ret = dev_queue_xmit(skb);
+ return net_xmit_eval(ret);
send_skb_err:
kfree_skb(skb);
return NET_XMIT_DROP;
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] batman-adv: Fix includes for IS_ERR/ERR_PTR
[not found] ` <20170128105651.3061-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
2017-01-28 10:56 ` [PATCH 1/2] batman-adv: Fix double call of dev_queue_xmit Simon Wunderlich
@ 2017-01-28 10:56 ` Simon Wunderlich
1 sibling, 0 replies; 5+ messages in thread
From: Simon Wunderlich @ 2017-01-28 10:56 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
IS_ERR/ERR_PTR are not defined in linux/device.h but in linux/err.h. The
files using these macros therefore have to include the correct one.
Reported-by: Linus Luessing <linus.luessing-S0/GAf8tV78@public.gmane.org>
Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
Signed-off-by: Simon Wunderlich <sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
---
net/batman-adv/debugfs.c | 2 +-
net/batman-adv/tp_meter.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/batman-adv/debugfs.c b/net/batman-adv/debugfs.c
index 5406148b9497..e32ad47c6efd 100644
--- a/net/batman-adv/debugfs.c
+++ b/net/batman-adv/debugfs.c
@@ -19,7 +19,7 @@
#include "main.h"
#include <linux/debugfs.h>
-#include <linux/device.h>
+#include <linux/err.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/fs.h>
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
index 07f64b60b528..c94ebdecdc3d 100644
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -23,7 +23,7 @@
#include <linux/byteorder/generic.h>
#include <linux/cache.h>
#include <linux/compiler.h>
-#include <linux/device.h>
+#include <linux/err.h>
#include <linux/etherdevice.h>
#include <linux/fs.h>
#include <linux/if_ether.h>
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] pull request for net-next: batman-adv 2017-01-28
2017-01-28 10:56 [PATCH 0/2] pull request for net-next: batman-adv 2017-01-28 Simon Wunderlich
[not found] ` <20170128105651.3061-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
@ 2017-01-30 0:22 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2017-01-30 0:22 UTC (permalink / raw)
To: sw; +Cc: netdev, b.a.t.m.a.n
From: Simon Wunderlich <sw@simonwunderlich.de>
Date: Sat, 28 Jan 2017 11:56:49 +0100
> here is another pull request for batman-adv in net-next. One of them fixes
> a regression introduced by a patch in the previous pull request two days ago.
>
> Please pull or let me know of any problem!
Pulled, thanks Simon.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-30 12:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-28 10:56 [PATCH 0/2] pull request for net-next: batman-adv 2017-01-28 Simon Wunderlich
[not found] ` <20170128105651.3061-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
2017-01-28 10:56 ` [PATCH 1/2] batman-adv: Fix double call of dev_queue_xmit Simon Wunderlich
2017-01-30 12:07 ` David Laight
2017-01-28 10:56 ` [PATCH 2/2] batman-adv: Fix includes for IS_ERR/ERR_PTR Simon Wunderlich
2017-01-30 0:22 ` [PATCH 0/2] pull request for net-next: batman-adv 2017-01-28 David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox