Page MenuHomeFreeBSD

sfxge: fix overflow queue freeze
ClosedPublic

Authored by arybchik on May 16 2015, 5:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 15, 9:00 AM
Unknown Object (File)
Tue, Apr 14, 1:59 PM
Unknown Object (File)
Tue, Apr 7, 10:57 AM
Unknown Object (File)
Mon, Apr 6, 8:40 PM
Unknown Object (File)
Mon, Apr 6, 7:44 PM
Unknown Object (File)
Mon, Apr 6, 5:02 PM
Unknown Object (File)
Sun, Apr 5, 6:01 AM
Unknown Object (File)
Sat, Apr 4, 6:15 AM
Subscribers

Details

Summary

If TxQ lock is obtained, deferred packet list shold be serviced even if
the packet addition fails because of overflow.

Without the patch freeze happens if:

  • queue is not blocked (i.e. completion does not trigger unblock and service)
  • put-list overflow (1024 entries)
  • sfxge_tx_packet_add() acquires TxQ lock just as it is released it in sfxge_tx_qdpl_service() on the second CPU but before pending check
  • sfxge_tx_packet_add() swizzles put-list to get-list, fails because of non-tcp get-list overflow and returns without packet list service
  • sfxge_tx_qdpl_service() on the second CPU checks that there are no pending packets in the put-list and returns

Other possible solution is to guaranee that maximum length of the put-list
is less than maximum length of any get-list.

Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days

Test Plan

Build tested. Driver loaded.
Tested heavily using many various netperf test simultaneously
(TCP/UDP stream/rr with different payload length)

Diff Detail

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

Event Timeline

arybchik retitled this revision from to sfxge: fix overflow queue freeze.
arybchik updated this object.
arybchik edited the test plan for this revision. (Show Details)
arybchik added a reviewer: gnn.
gnn edited edge metadata.
This revision is now accepted and ready to land.May 17 2015, 2:34 AM
This revision was automatically updated to reflect the committed changes.