]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cxgbe(4): Stop but don't free netmap queues when netmap is switched off.
authorNavdeep Parhar <np@FreeBSD.org>
Thu, 3 Dec 2020 08:30:29 +0000 (08:30 +0000)
committerNavdeep Parhar <np@FreeBSD.org>
Wed, 20 Oct 2021 20:55:36 +0000 (13:55 -0700)
commit1f4943c92cdd783e31a7c145660e8ac961aaabbd
treef830461567a1c1d8ee975055c3622058b73d6855
parentd31b8f0dece18bb5c301a71200d8a8c03ab84602
cxgbe(4): Stop but don't free netmap queues when netmap is switched off.

It is common for freelists to be starving when a netmap application
stops.  Mailbox commands to free queues can hang in such a situation.
Avoid that by not freeing the queues when netmap is switched off.
Instead, use an alternate method to stop the queues without releasing
the context ids.  If netmap is enabled again later then the same queue
is reinitialized for use.  Move alloc_nm_rxq and txq to t4_netmap.c
while here.

Sponsored by: Chelsio Communications

(cherry picked from commit 8eba75ed68854188c01a2058fe1f826b3428dbfa)
sys/dev/cxgbe/adapter.h
sys/dev/cxgbe/common/common.h
sys/dev/cxgbe/common/t4_hw.c
sys/dev/cxgbe/t4_netmap.c
sys/dev/cxgbe/t4_sge.c