Page MenuHomeFreeBSD

ix(4): Move {mod,msf,mbx,fdir,phy,link}_task to lock protected handler
ClosedPublic

Authored by piotr.pietruszewski_intel.com on Mar 26 2019, 11:34 AM.
Referenced Files
Unknown Object (File)
Fri, Apr 19, 9:38 AM
Unknown Object (File)
Fri, Apr 19, 8:22 AM
Unknown Object (File)
Mon, Apr 8, 1:25 PM
Unknown Object (File)
Thu, Mar 28, 5:39 PM
Unknown Object (File)
Dec 10 2023, 7:50 AM
Unknown Object (File)
Nov 21 2023, 4:52 AM
Unknown Object (File)
Nov 13 2023, 12:54 AM
Unknown Object (File)
Nov 10 2023, 11:39 PM

Details

Summary

ix(4): Move {mod,msf,mbx,fdir,phy,link}_task to lock protected handler

This patch is a port of rS343621 which fixes bug 221317. At the moment our validation team is involved in internal projects, therefore estimated date of testing this change is not yet known.

This patch introduces adapter->task_requests register responsible for
recording requests for mod_task, msf_task, mbx_task, fdir_task,
phy_task and link_task calls. Instead of enqueueing each of these tasks
with GROUPTASK_ENQUEUE, new task is created and all handlers are called
from one task while holding adapter->core_mtx lock.

SIOCGIFXMEDIA ioctl() call reads adapter->media list. The list is
deleted and rewritten in ixgbe_handle_msf() task without holding
adapter->core_mtx lock. This change is needed to maintain data
coherency when sharing adapter info via ioctl() calls.

Since handlers for abovementioned tasks will no longer act as task
handlers, but as regular functions, 'pending' parameter is removed from
them.

This patch also removes ixgbe_update_link_status() call from
ixgbe_handle_link() handler. From now on, link status will be updated
by calling ixgbe_update_link_status() periodically from
ixgbe_local_timer(). This fixes problem with link flapping during
changing interface state to UP.

Parameter keep_traffic is added to ixgbe_disable_intr(). This
enables ixgbe_handle_admin_task() to not disable and queue interrupts.
Accordingly, skip_traffic parameter is added to ixgbe_enable_intr() to
let ixgbe_handle_admin_task() skip enabling queues while enabling
interrupts.

This patch is a port of rS343621. rS343621 can't be merged from current
since stable/11 contains ixgbe driver without iflib support.

Patch co-authored by Krzysztof Galazka <krzysztof.galazka@intel.com>.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Tested with a 1000 iteration ifdown/up loop using both DA and SR, configured normally and using LAGG.

This revision is now accepted and ready to land.Apr 4 2019, 9:47 AM
This revision was automatically updated to reflect the committed changes.