On Samstag, 28. Januar 2017 10:25:25 CET Sven Eckelmann wrote:
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 proposed by David Miller
return net_xmit_eval(dev_queue_xmit(skb));
will therefore 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.
Fixes: 17efab9867c5 ("batman-adv: Simplify handling of NET_XMIT_CN") Signed-off-by: Sven Eckelmann sven@narfation.org
net/batman-adv/send.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
I was so embarrassed about not catching these two that I've already applied them an prepared the changes for net-next.
Kind regards, Sven