Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2014 04:56:55 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262238 - head/sys/dev/netmap
Message-ID:  <201402200456.s1K4utpx058293@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Thu Feb 20 04:56:55 2014
New Revision: 262238
URL: http://svnweb.freebsd.org/changeset/base/262238

Log:
  compile with NOINET

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

Modified: head/sys/dev/netmap/netmap_freebsd.c
==============================================================================
--- head/sys/dev/netmap/netmap_freebsd.c	Thu Feb 20 04:50:13 2014	(r262237)
+++ head/sys/dev/netmap/netmap_freebsd.c	Thu Feb 20 04:56:55 2014	(r262238)
@@ -101,6 +101,7 @@ uint16_t nm_csum_ipv4(struct nm_iphdr *i
 void nm_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *data,
 					size_t datalen, uint16_t *check)
 {
+#ifdef INET
 	uint16_t pseudolen = datalen + iph->protocol;
 
 	/* Compute and insert the pseudo-header cheksum. */
@@ -110,6 +111,13 @@ void nm_csum_tcpudp_ipv4(struct nm_iphdr
 	 * (includes the pseudo-header).
 	 */
 	*check = nm_csum_fold(nm_csum_raw(data, datalen, 0));
+#else
+	static int notsupported = 0;
+	if (!notsupported) {
+		notsupported = 1;
+		D("inet4 segmentation not supported");
+	}
+#endif
 }
 
 void nm_csum_tcpudp_ipv6(struct nm_ipv6hdr *ip6h, void *data,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402200456.s1K4utpx058293>