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, Feb 5, 1:16 PM
Unknown Object (File)
Fri, Jan 31, 11:28 AM
Unknown Object (File)
Fri, Jan 31, 10:25 AM
Unknown Object (File)
Sat, Jan 25, 9:47 AM
Unknown Object (File)
Jan 7 2025, 9:35 PM
Unknown Object (File)
Dec 17 2024, 1:41 PM
Unknown Object (File)
Dec 8 2024, 2:46 AM
Unknown Object (File)
Nov 19 2024, 4:29 PM
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.