From owner-svn-src-all@FreeBSD.ORG Wed Feb 19 08:15:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C344D3D; Wed, 19 Feb 2014 08:15:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 37EA41818; Wed, 19 Feb 2014 08:15:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1J8FAvd017297; Wed, 19 Feb 2014 08:15:10 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1J8FAfl017296; Wed, 19 Feb 2014 08:15:10 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201402190815.s1J8FAfl017296@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 19 Feb 2014 08:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262214 - stable/10/sys/dev/netmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2014 08:15:10 -0000 Author: luigi Date: Wed Feb 19 08:15:09 2014 New Revision: 262214 URL: http://svnweb.freebsd.org/changeset/base/262214 Log: allow building without INET Modified: stable/10/sys/dev/netmap/netmap_freebsd.c Modified: stable/10/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_freebsd.c Wed Feb 19 08:05:42 2014 (r262213) +++ stable/10/sys/dev/netmap/netmap_freebsd.c Wed Feb 19 08:15:09 2014 (r262214) @@ -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,