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)
Tue, Dec 17, 1:41 PM
Unknown Object (File)
Sun, Dec 8, 2:46 AM
Unknown Object (File)
Nov 19 2024, 4:29 PM
Unknown Object (File)
Nov 8 2024, 1:57 AM
Unknown Object (File)
Oct 24 2024, 10:03 AM
Unknown Object (File)
Oct 23 2024, 5:27 AM
Unknown Object (File)
Oct 20 2024, 11:45 AM
Unknown Object (File)
Oct 14 2024, 8:44 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.