Hi Cong, On Tue, Nov 22, 2016 at 1:29 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Sun, Nov 20, 2016 at 4:56 PM, <f...@ikuai8.com> wrote: >> From: Gao Feng <gfree.w...@gmail.com> >> >> 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.w...@gmail.com> >> --- >> net/l2tp/l2tp_eth.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c >> index 965f7e3..3dc97b4 100644 >> --- a/net/l2tp/l2tp_eth.c >> +++ b/net/l2tp/l2tp_eth.c >> @@ -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)) { > > How could l2tp_xmit_skb() possibly return NET_XMIT_CN? > Note It ignores the return value of l2tp_xmit_core().
You are right. I didn't think about it. Regards Feng