Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2017 05:49:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-net@FreeBSD.org
Subject:   [Bug 217721] axge(4) hangs while link goes offline
Message-ID:  <bug-217721-2472-DcnRJU3JHd@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-217721-2472@https.bugs.freebsd.org/bugzilla/>
References:  <bug-217721-2472@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217721

--- Comment #3 from Pyun YongHyeon <yongari@FreeBSD.org> ---
(In reply to Eugene Lozovoy from comment #2)
Wouldn't you're able to send packets again if you wait some more
time(i.e. link establishment time + time taken to empty queued
packets)?

I guess your patch dequeues packets from if_snd queue and skip
packet write when the link is not UP.  This will quickly empty
if_snd queue if link is not UP.  So if your intention is to
transmit packets regardless of link state, the patch will work in
that case.   BTW, I think you also want to free dequeued packets,
otherwise you would end up with exhausting mbufs(i.e. mbuf leak).

Traditional drivers try very hard not to drop TX packets since TX
is more expensive operation than RX. Suppose you unplug UTP cable
in the middle of TCP operation or ARP resolving and plug it again
after some time.  If driver ignores link state, it will quickly
drop all queued packets and upper stack has to retransmit all of
them when the link is UP.  If application is using UDP(i.e. NFS
over UDP) it will also consume lots of CPU cycles.  If driver keep
packets in if_snd queue, it can send them again when link is UP.
Many drivers honor link state and don't drop packets when link is
not available.  This approach has a side-effect that queued packets
are sent out later and those packets could be meaningless to
receiver.  For instance, if link down time is longer than TCP
timeout, receiver may already have dropped the connection.=20=20
However, given that link DOWN is not frequent event, I guess
current behavior would be slightly better than just dropping
packets.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217721-2472-DcnRJU3JHd>