]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Switch to TX header format rather than directly manipulating header
authoryongari <yongari@FreeBSD.org>
Thu, 18 Aug 2016 05:07:02 +0000 (05:07 +0000)
committeryongari <yongari@FreeBSD.org>
Thu, 18 Aug 2016 05:07:02 +0000 (05:07 +0000)
commit84759d46efab96a0df69b18814fc7c8f354b371d
tree328aaf703829cb6e3aaa4aff4e3807c113006456
parent7a8d7928eb195ea9eab60e18e9a0f82d6a4c3f81
Switch to TX header format rather than directly manipulating header
structures.  This simplifies mbuf copy operation to USB buffers as
well as improving readability.  The controller supports Microsoft
LSOv1(aka TSO) but this change set does not include the support due
to copying overhead to USB buffers and large amount of memory waste.

Remove useless ZLP padding which seems to come from Linux.  Required
bits the code tried to set was not copied into USB buffer so it had
no effect.  Unlike Linux, FreeBSD USB stack automatically generates
ZLP so no explicit padding is required in driver.[1]

Micro-optimize updating IFCOUNTER_OPACKETS counter by moving it out
of TX loop since updating counter is not cheap operation as it did
long time ago and we already know how many number of packets were
queued after exiting the loop.

While here, fix a checksum offloading bug which will happen when
upper stack computes checksum while H/W checksum offloading is
active.  The controller should be notified to not recompute the
checksum in this case.

Reviewed by: kevlo (initial version), hselasky
Pointed out by: hselasky [1]
sys/dev/usb/net/if_axge.c
sys/dev/usb/net/if_axgereg.h