FreeBSD Bugzilla – Attachment 216815 Details for
Bug 248306
if_mvneta: Corrupts TX packets when TXCSUM is not used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix
mvneta.patch (text/plain), 1.12 KB, created by
Mike Cui
on 2020-07-27 18:48:50 UTC
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Mike Cui
Created:
2020-07-27 18:48:50 UTC
Size:
1.12 KB
patch
obsolete
>From c55b9406996d2ac2d2f48138fbf31dd2c253131f Mon Sep 17 00:00:00 2001 >From: Mike Cui <cuicui@gmail.com> >Date: Tue, 21 Jul 2020 10:17:32 -0700 >Subject: [PATCH] mvneta: fix checksum offload breakage. > >mvneta's tx descriptor require a flag to be explicitly set if >TX checksum should not be done, so it's no OK to return from >mvneta_tx_set_csumflag() without doing anything. >--- > sys/dev/neta/if_mvneta.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > >diff --git a/sys/dev/neta/if_mvneta.c b/sys/dev/neta/if_mvneta.c >index d86bdb532a285..ad5227e1c712f 100644 >--- a/sys/dev/neta/if_mvneta.c >+++ b/sys/dev/neta/if_mvneta.c >@@ -2829,18 +2829,15 @@ mvneta_tx_set_csumflag(struct ifnet *ifp, > csum_flags = ifp->if_hwassist & m->m_pkthdr.csum_flags; > eh = mtod(m, struct ether_header *); > >- if (csum_flags == 0) >- return; >- > switch (ntohs(eh->ether_type)) { > case ETHERTYPE_IP: > ipoff = ETHER_HDR_LEN; > break; >- case ETHERTYPE_IPV6: >- return; > case ETHERTYPE_VLAN: > ipoff = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; > break; >+ default: >+ csum_flags = 0; > } > > if (__predict_true(csum_flags & (CSUM_IP|CSUM_IP_TCP|CSUM_IP_UDP))) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 248306
: 216815