Date: Mon, 12 May 2014 09:46:48 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265909 - head/sys/netinet Message-ID: <201405120946.s4C9kmuZ035760@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405120946.s4C9kmuZ035760>