mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Clean up unused CSUM_FRAGMENT.
Sponsored by: Nginx, Inc.
This commit is contained in:
parent
b1f8b58696
commit
bf7dcda366
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271006
@ -1501,7 +1501,7 @@ vlan_capabilities(struct ifvlan *ifv)
|
|||||||
p->if_capenable & IFCAP_VLAN_HWTAGGING) {
|
p->if_capenable & IFCAP_VLAN_HWTAGGING) {
|
||||||
ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM;
|
ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM;
|
||||||
ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP |
|
ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP |
|
||||||
CSUM_UDP | CSUM_SCTP | CSUM_FRAGMENT);
|
CSUM_UDP | CSUM_SCTP);
|
||||||
} else {
|
} else {
|
||||||
ifp->if_capenable = 0;
|
ifp->if_capenable = 0;
|
||||||
ifp->if_hwassist = 0;
|
ifp->if_hwassist = 0;
|
||||||
|
@ -523,8 +523,7 @@ ip_fastforward(struct mbuf *m)
|
|||||||
else
|
else
|
||||||
mtu = ifp->if_mtu;
|
mtu = ifp->if_mtu;
|
||||||
|
|
||||||
if (ip_len <= mtu ||
|
if (ip_len <= mtu) {
|
||||||
(ifp->if_hwassist & CSUM_FRAGMENT && (ip_off & IP_DF) == 0)) {
|
|
||||||
/*
|
/*
|
||||||
* Avoid confusing lower layers.
|
* Avoid confusing lower layers.
|
||||||
*/
|
*/
|
||||||
|
@ -624,8 +624,7 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
|
|||||||
* care of the fragmentation for us, we can just send directly.
|
* care of the fragmentation for us, we can just send directly.
|
||||||
*/
|
*/
|
||||||
if (ip_len <= mtu ||
|
if (ip_len <= mtu ||
|
||||||
(m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 ||
|
(m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0) {
|
||||||
((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) {
|
|
||||||
ip->ip_sum = 0;
|
ip->ip_sum = 0;
|
||||||
if (m->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) {
|
if (m->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) {
|
||||||
ip->ip_sum = in_cksum(m, hlen);
|
ip->ip_sum = in_cksum(m, hlen);
|
||||||
|
@ -5332,8 +5332,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
|
|||||||
* care of the fragmentation for us, we can just send directly.
|
* care of the fragmentation for us, we can just send directly.
|
||||||
*/
|
*/
|
||||||
if (ip_len <= ifp->if_mtu ||
|
if (ip_len <= ifp->if_mtu ||
|
||||||
(m0->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 ||
|
(m0->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0) {
|
||||||
((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) {
|
|
||||||
ip->ip_sum = 0;
|
ip->ip_sum = 0;
|
||||||
if (m0->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) {
|
if (m0->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) {
|
||||||
ip->ip_sum = in_cksum(m0, ip->ip_hl << 2);
|
ip->ip_sum = in_cksum(m0, ip->ip_hl << 2);
|
||||||
|
@ -445,7 +445,6 @@ void sf_ext_free(void *, void *);
|
|||||||
#define CSUM_UDP_IPV6 CSUM_IP6_UDP
|
#define CSUM_UDP_IPV6 CSUM_IP6_UDP
|
||||||
#define CSUM_TCP_IPV6 CSUM_IP6_TCP
|
#define CSUM_TCP_IPV6 CSUM_IP6_TCP
|
||||||
#define CSUM_SCTP_IPV6 CSUM_IP6_SCTP
|
#define CSUM_SCTP_IPV6 CSUM_IP6_SCTP
|
||||||
#define CSUM_FRAGMENT 0x0 /* Unused */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mbuf types describing the content of the mbuf (including external storage).
|
* mbuf types describing the content of the mbuf (including external storage).
|
||||||
|
Loading…
Reference in New Issue
Block a user