aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincenzo Maffione <vmaffione@FreeBSD.org>2019-05-17 20:29:31 +0000
committerVincenzo Maffione <vmaffione@FreeBSD.org>2019-05-17 20:29:31 +0000
commitd337c8c7314dbee8ef0664f14d114a08b0dafb2b (patch)
tree461ae2343a14cf0826d2bb307f906d60f98997f1
parentd69b94bab0e2a72c62747c188e9df7170824c034 (diff)
downloadsrc-d337c8c7314dbee8ef0664f14d114a08b0dafb2b.tar.gz
src-d337c8c7314dbee8ef0664f14d114a08b0dafb2b.zip
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
Notes
Notes: svn path=/head/; revision=347944
-rw-r--r--sys/dev/netmap/if_ptnet.c14
1 files changed, 2 insertions, 12 deletions
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 <netinet6/ip6_var.h>
#include <netinet/udp.h>
#include <netinet/tcp.h>
-#include <netinet/sctp.h>
#include <machine/bus.h>
#include <machine/resource.h>
@@ -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