Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
408cc699
Commit
408cc699
authored
Feb 01, 2003
by
David S. Miller
Committed by
David S. Miller
Feb 01, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TG3]: Let chip do pseudo-header csum on rx.
parent
68668e4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
drivers/net/tg3.c
drivers/net/tg3.c
+11
-16
No files found.
drivers/net/tg3.c
View file @
408cc699
...
...
@@ -1941,13 +1941,12 @@ static int tg3_rx(struct tg3 *tp, int budget)
}
if
((
tp
->
tg3_flags
&
TG3_FLAG_RX_CHECKSUMS
)
&&
(
desc
->
type_flags
&
RXD_FLAG_TCPUDP_CSUM
)
)
{
skb
->
csum
=
htons
((
desc
->
ip_tcp_csum
&
RXD_TCPCSUM_MASK
)
>>
RXD_TCPCSUM_SHIFT
);
skb
->
ip_summed
=
CHECKSUM_
HW
;
}
else
{
(
desc
->
type_flags
&
RXD_FLAG_TCPUDP_CSUM
)
&&
(
((
desc
->
ip_tcp_csum
&
RXD_TCPCSUM_MASK
)
>>
RXD_TCPCSUM_SHIFT
)
==
0xffff
))
{
skb
->
ip_summed
=
CHECKSUM_
UNNECESSARY
;
else
skb
->
ip_summed
=
CHECKSUM_NONE
;
}
skb
->
protocol
=
eth_type_trans
(
skb
,
tp
->
dev
);
#if TG3_VLAN_TAG_USED
...
...
@@ -6008,18 +6007,14 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
if
(
tp
->
pci_chip_rev_id
==
CHIPREV_ID_5700_B0
)
tp
->
tg3_flags
|=
TG3_FLAG_BROKEN_CHECKSUMS
;
/* Regardless of whether checksums work or not, we configure
* the StrongARM chips to not compute the pseudo header checksums
* in either direction. Because of the way Linux checksum support
* works we do not need the chips to do this, and taking the load
* off of the TX/RX onboard StrongARM cpus means that they will not be
* the bottleneck. Whoever wrote Broadcom's driver did not
* understand the situation at all. He could have bothered
* to read Jes's Acenic driver because the logic (and this part of
* the Tigon2 hardware/firmware) is pretty much identical.
/* Pseudo-header checksum is done by hardware logic and not
* the offload processers, so make the chip do the pseudo-
* header checksums on receive. For transmit it is more
* convenient to do the pseudo-header checksum in software
* as Linux does that on transmit for us in all cases.
*/
tp
->
tg3_flags
|=
TG3_FLAG_NO_TX_PSEUDO_CSUM
;
tp
->
tg3_flags
|=
TG3_FLAG_NO_RX_PSEUDO_CSUM
;
tp
->
tg3_flags
&=
~
TG3_FLAG_NO_RX_PSEUDO_CSUM
;
/* Derive initial jumbo mode from MTU assigned in
* ether_setup() via the alloc_etherdev() call
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment