Bug 125845 - [tcp] [patch] tcp_lro_rx() should make use of hardware IP cksum assistance when available
Summary: [tcp] [patch] tcp_lro_rx() should make use of hardware IP cksum assistance wh...
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-net (Nobody)
Depends on:
Reported: 2008-07-22 00:30 UTC by Navdeep Parhar
Modified: 2020-10-23 23:02 UTC (History)
5 users (show)

See Also:

file.diff (992 bytes, patch)
2008-07-22 00:30 UTC, Navdeep Parhar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Navdeep Parhar 2008-07-22 00:30:02 UTC
tcp_lro_rx() in sys/netinet/tcp_lro.c calculates the IP checksum of all
non-fragmented TCP packets while determining whether they can be queued for LRO.

Some optimization is possible here if the hardware has already verified the IP
checksum - just take CSUM_IP_CHECKED and CSUM_IP_VALID into account before doing
the checksum in software.

Fix: Patch attached.

Patch attached with submission follows:
How-To-Repeat: N/A.  Problem was discovered while reading the code.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-07-22 03:37:07 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Hiren Panchasara freebsd_committer 2016-12-27 19:26:47 UTC
Is this something still valid and you care about? If not, can we close it?
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:46:42 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
- Untouched since 2018-01-01.
- Affects Base System OR Documentation


Reset to open status.

I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 4 Hans Petter Selasky freebsd_committer 2020-10-23 18:30:05 UTC
Change looks good to me.
Comment 5 Navdeep Parhar freebsd_committer 2020-10-23 23:02:47 UTC
The LRO code has been modified extensively since this bug was filed.  The latest
code does take CSUM_IP_CHECKED and CSUM_IP_VALID into account.