Remove unused M_FRAG, M_FIRSTFRAG and M_LASTFRAG tagging from ip_fragment().

There wasn't any real driver (and hardware) support for it.  Modern hardware
does full fragmentation/segmentation offload instead.
This commit is contained in:
Andre Oppermann 2013-08-19 10:30:15 +00:00
parent 9d1c4ca773
commit fb86dfcd2f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254517

View File

@ -784,7 +784,7 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu,
IPSTAT_INC(ips_odropped);
goto done;
}
m->m_flags |= (m0->m_flags & M_MCAST) | M_FRAG;
m->m_flags |= (m0->m_flags & M_MCAST);
/*
* In the first mbuf, leave room for the link header, then
* copy the original IP header including options. The payload
@ -801,10 +801,9 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu,
m->m_len = mhlen;
/* XXX do we need to add ip_off below ? */
mhip->ip_off = ((off - hlen) >> 3) + ip_off;
if (off + len >= ip_len) { /* last fragment */
if (off + len >= ip_len)
len = ip_len - off;
m->m_flags |= M_LASTFRAG;
} else
else
mhip->ip_off |= IP_MF;
mhip->ip_len = htons((u_short)(len + mhlen));
m->m_next = m_copym(m0, off, len, M_NOWAIT);
@ -831,10 +830,6 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu,
}
IPSTAT_ADD(ips_ofragments, nfrags);
/* set first marker for fragment chain */
m0->m_flags |= M_FIRSTFRAG | M_FRAG;
m0->m_pkthdr.csum_data = nfrags;
/*
* Update first fragment by trimming what's been copied out
* and updating header.