]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: l2tp: Treat NET_XMIT_CN as success in l2tp_eth_dev_xmit
authorGao Feng <gfree.wind@gmail.com>
Mon, 21 Nov 2016 00:56:21 +0000 (08:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Nov 2016 18:10:29 +0000 (13:10 -0500)
The tc could return NET_XMIT_CN as one congestion notification, but
it does not mean the packe is lost. Other modules like ipvlan,
macvlan, and others treat NET_XMIT_CN as success too.
So l2tp_eth_dev_xmit should add the NET_XMIT_CN check.

Signed-off-by: Gao Feng <gfree.wind@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_eth.c

index 965f7e344cef8961a85c4e2e6d36f7d1b043f3d7..3dc97b4f982b57ed4375b5cf971155fdbd2c6eb7 100644 (file)
@@ -97,7 +97,7 @@ static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
        unsigned int len = skb->len;
        int ret = l2tp_xmit_skb(session, skb, session->hdr_len);
 
-       if (likely(ret == NET_XMIT_SUCCESS)) {
+       if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) {
                atomic_long_add(len, &priv->tx_bytes);
                atomic_long_inc(&priv->tx_packets);
        } else {