Skip to content

Commit

Permalink
net: l2tp: Treat NET_XMIT_CN as success in l2tp_eth_dev_xmit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gao Feng authored and David S. Miller committed Nov 21, 2016
1 parent 6bc5445 commit 7c6ae61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/l2tp/l2tp_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7c6ae61

Please sign in to comment.