From d337c8c7314dbee8ef0664f14d114a08b0dafb2b Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Fri, 17 May 2019 20:29:31 +0000 Subject: netmap: align if_ptnet to the changes introduced by r347233 This removes non-functional SCTP checksum offload support. More information in the log message of r347233. MFC after: 2 weeks --- sys/dev/netmap/if_ptnet.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'sys/dev/netmap') diff --git a/sys/dev/netmap/if_ptnet.c b/sys/dev/netmap/if_ptnet.c index 5ba34aa67600..468ebabe9d90 100644 --- a/sys/dev/netmap/if_ptnet.c +++ b/sys/dev/netmap/if_ptnet.c @@ -68,7 +68,6 @@ #include #include #include -#include #include #include @@ -281,9 +280,8 @@ static inline void ptnet_kick(struct ptnet_queue *pq) #define PTNET_HDR_SIZE sizeof(struct virtio_net_hdr_mrg_rxbuf) #define PTNET_MAX_PKT_SIZE 65536 -#define PTNET_CSUM_OFFLOAD (CSUM_TCP | CSUM_UDP | CSUM_SCTP) -#define PTNET_CSUM_OFFLOAD_IPV6 (CSUM_TCP_IPV6 | CSUM_UDP_IPV6 |\ - CSUM_SCTP_IPV6) +#define PTNET_CSUM_OFFLOAD (CSUM_TCP | CSUM_UDP) +#define PTNET_CSUM_OFFLOAD_IPV6 (CSUM_TCP_IPV6 | CSUM_UDP_IPV6) #define PTNET_ALL_OFFLOAD (CSUM_TSO | PTNET_CSUM_OFFLOAD |\ PTNET_CSUM_OFFLOAD_IPV6) @@ -1539,9 +1537,6 @@ ptnet_rx_csum_by_offset(struct mbuf *m, uint16_t eth_type, int ip_start, m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xFFFF; break; - case offsetof(struct sctphdr, checksum): - m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; - break; default: /* Here we should increment the rx_csum_bad_offset counter. */ return (1); @@ -1596,11 +1591,6 @@ ptnet_rx_csum_by_parse(struct mbuf *m, uint16_t eth_type, int ip_start, m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xFFFF; break; - case IPPROTO_SCTP: - if (__predict_false(m->m_len < offset + sizeof(struct sctphdr))) - return (1); - m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; - break; default: /* * For the remaining protocols, FreeBSD does not support -- cgit v1.3