Page MenuHomeFreeBSD

D29429.id86345.diff
No OneTemporary

D29429.id86345.diff

diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -785,7 +785,7 @@
/*
* Record statistics for this interface address.
- * With CSUM_TSO the byte/packet count will be slightly
+ * With TSO the byte/packet count will be slightly
* incorrect because we count the IP+TCP headers only
* once instead of for every generated packet.
*/
@@ -814,9 +814,9 @@
goto done;
}
- /* Balk when DF bit is set or the interface didn't support TSO. */
+ /* Balk when DF bit is set or the interface didn't support offloading. */
if ((ip_off & IP_DF) ||
- (m->m_pkthdr.csum_flags & (CSUM_TSO | CSUM_INNER_TSO))) {
+ (m->m_pkthdr.csum_flags & CSUM_TX_DONT_FRAG)) {
error = EMSGSIZE;
IPSTAT_INC(ips_cantfrag);
goto bad;
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1142,7 +1142,8 @@
/* XXX-BZ m->m_pkthdr.csum_flags &= ~ifp->if_hwassist; */
tlen = m->m_pkthdr.len;
- if ((opt && (opt->ip6po_flags & IP6PO_DONTFRAG)) || tso)
+ if ((opt && (opt->ip6po_flags & IP6PO_DONTFRAG) != 0) ||
+ (m->m_pkthdr.csum_flags & CSUM_TX_DONT_FRAG) != 0)
dontfrag = 1;
else
dontfrag = 0;
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -712,6 +712,15 @@
#define CSUM_UDP_IPV6 CSUM_IP6_UDP
#define CSUM_TCP_IPV6 CSUM_IP6_TCP
#define CSUM_SCTP_IPV6 CSUM_IP6_SCTP
+#define CSUM_TX_DONT_FRAG \
+ (CSUM_TSO| \
+ CSUM_INNER_IP| \
+ CSUM_INNER_IP_UDP| \
+ CSUM_INNER_IP_TCP| \
+ CSUM_INNER_IP_TSO| \
+ CSUM_INNER_IP6_UDP| \
+ CSUM_INNER_IP6_TCP| \
+ CSUM_INNER_IP6_TSO)
/*
* mbuf types describing the content of the mbuf (including external storage).

File Metadata

Mime Type
text/plain
Expires
Wed, Jun 24, 2:07 AM (13 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34268867
Default Alt Text
D29429.id86345.diff (1 KB)

Event Timeline