Page MenuHomeFreeBSD

Add support to pad Ethernet frames to a minimum size
ClosedPublic

Authored by shurd on Dec 1 2017, 6:55 PM.

Details

Summary

Some bnxt devices do not correctly send frames smaller than
52 bytes (without CRC), so add a quirk that will pad frames to an
arbitrary size before passing off to the encap routine.

Test Plan

Have Broadcom test with their broken hardware

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 13331
Build 13564: arc lint + arc unit

Event Timeline

shurd created this revision.Dec 1 2017, 6:55 PM
shurd updated this revision to Diff 36065.Dec 1 2017, 7:44 PM

Move BNXT_MIN_FRAME_SIZE into bnxt.h where D13269 defined BNXT_MIN_PKT_SIZE

Thanks to Stephen,
Tested with Cumulus A0 NIC, test passed with this patch.
I'll delete the old workaround (used for padding) from driver.

This revision is now accepted and ready to land.Dec 4 2017, 8:43 AM
shurd updated this revision to Diff 36197.Dec 4 2017, 6:38 PM

Return an error of m_append() fails, not success.

This revision now requires review to proceed.Dec 4 2017, 6:38 PM
shurd updated this revision to Diff 36201.Dec 4 2017, 7:43 PM

Move ether padding into spearate function, predict_false() the length test

shurd updated this revision to Diff 36202.Dec 4 2017, 7:51 PM

Mark iflib_ether_pad() as noinline and move device_printf() into it

sbruno accepted this revision.Dec 4 2017, 11:05 PM
This revision is now accepted and ready to land.Dec 4 2017, 11:05 PM
shurd closed this revision.Dec 5 2017, 9:03 PM

Committed as r326578 (which had the wrong Differential Revision of D13269 specified).