On 16-06-06 12:18 PM, Florian Westphal wrote:
Eric Dumazet <eric.duma...@gmail.com> wrote:
On Mon, 2016-06-06 at 13:42 +0200, Florian Westphal wrote:
Jamal Hadi Salim <j...@mojatatu.com> wrote:
BTW, returning NET_XMIT_CN could be confusing to tcp;
it does not mean that the packet that we are getting return
code for was dropped; it could mean _another_ packet in
the queue was dropped.

Yes, but we currently conceal NET_XMIT_CN from upper layer (tcp)
via the net_xmit_* macros:

#define net_xmit_eval(e)       ((e) == NET_XMIT_CN ? 0 : (e))
#define net_xmit_errno(e)      ((e) != NET_XMIT_CN ? -ENOBUFS : 0)

Might be worth changing this so tcp reduces cwnd in _CN case too.

It always had been the case.

tcp_transmit_skb() calls tcp_enter_cwr(), unless someone broke this.

No, you're right.  We hide error in ip_send_skb but that function is
not used in tcp case.

So all is good here.


Just making sure because that little gem is not obvious;->

Eric, on the NET_XMIT_CN digression:
depends on the qdisc scheduler.
NET_XMIT_CN could mean one of two things:
"There is congestion. The packet you sent was dropped locally" and
"There is congestion. The packet you sent was not dropped locally"
Yes, they both react with tcp_enter_cwr() and from a macroscopic
view it probably doesnt matter as much because tcp state machine will
kick in at some point. I think better use could be made of such
knowledge.

cheers,
jamal


Reply via email to