svn commit: r347944 - head/sys/dev/netmap

Vincenzo Maffione vmaffione at FreeBSD.org
Fri May 17 20:29:32 UTC 2019


Author: vmaffione
Date: Fri May 17 20:29:31 2019
New Revision: 347944
URL: https://svnweb.freebsd.org/changeset/base/347944

Log:
  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

Modified:
  head/sys/dev/netmap/if_ptnet.c

Modified: head/sys/dev/netmap/if_ptnet.c
==============================================================================
--- head/sys/dev/netmap/if_ptnet.c	Fri May 17 19:57:08 2019	(r347943)
+++ head/sys/dev/netmap/if_ptnet.c	Fri May 17 20:29:31 2019	(r347944)
@@ -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_t
 		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);
@@ -1595,11 +1590,6 @@ ptnet_rx_csum_by_parse(struct mbuf *m, uint16_t eth_ty
 			return (1);
 		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:
 		/*


More information about the svn-src-head mailing list