From owner-svn-src-head@FreeBSD.ORG Mon May 12 09:46:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D64F033C; Mon, 12 May 2014 09:46:48 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3D732FC2; Mon, 12 May 2014 09:46:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4C9kmF6035761; Mon, 12 May 2014 09:46:48 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4C9kmuZ035760; Mon, 12 May 2014 09:46:48 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201405120946.s4C9kmuZ035760@svn.freebsd.org> From: Michael Tuexen Date: Mon, 12 May 2014 09:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265909 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 09:46:48 -0000 Author: tuexen Date: Mon May 12 09:46:48 2014 New Revision: 265909 URL: http://svnweb.freebsd.org/changeset/base/265909 Log: Disable TX checksum offload for UDP-Lite completely. It wasn't used for partial checksum coverage, but even for full checksum coverage it doesn't work. This was discussed with Kevin Lo (kevlo@). Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Mon May 12 09:05:07 2014 (r265908) +++ head/sys/netinet/udp_usrreq.c Mon May 12 09:46:48 2014 (r265909) @@ -1370,13 +1370,17 @@ udp_output(struct inpcb *inp, struct mbu * Set up checksum and output datagram. */ ui->ui_sum = 0; - if (cscov_partial) { + if (pr == IPPROTO_UDPLITE) { if (inp->inp_flags & INP_ONESBCAST) faddr.s_addr = INADDR_BROADCAST; - if ((ui->ui_sum = in_cksum(m, sizeof(struct ip) + cscov)) == 0) - ui->ui_sum = 0xffff; - } else if (V_udp_cksum || pr == IPPROTO_UDPLITE) { - /* for UDP-Lite full checksum coverage is requested */ + if (cscov_partial) { + if ((ui->ui_sum = in_cksum(m, sizeof(struct ip) + cscov)) == 0) + ui->ui_sum = 0xffff; + } else { + if ((ui->ui_sum = in_cksum(m, sizeof(struct udpiphdr) + len)) == 0) + ui->ui_sum = 0xffff; + } + } else if (V_udp_cksum) { if (inp->inp_flags & INP_ONESBCAST) faddr.s_addr = INADDR_BROADCAST; ui->ui_sum = in_pseudo(ui->ui_src.s_addr, faddr.s_addr,