Date: Tue, 21 Mar 2017 08:30:06 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315665 - stable/11/sys/dev/xen/netfront Message-ID: <201703210830.v2L8U6m5002096@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: royger Date: Tue Mar 21 08:30:06 2017 New Revision: 315665 URL: https://svnweb.freebsd.org/changeset/base/315665 Log: MFC r314842: xen/netfront: fix inbound packet flags for checksum offload Reviewed by: Wei Liu <wei.liu2@citrix.com> Sponsored by: Citrix Systems R&D Modified: stable/11/sys/dev/xen/netfront/netfront.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/11/sys/dev/xen/netfront/netfront.c Tue Mar 21 08:24:40 2017 (r315664) +++ stable/11/sys/dev/xen/netfront/netfront.c Tue Mar 21 08:30:06 2017 (r315665) @@ -1178,15 +1178,17 @@ xn_rxeof(struct netfront_rxq *rxq) m->m_pkthdr.rcvif = ifp; if ( rx->flags & NETRXF_data_validated ) { - /* Tell the stack the checksums are okay */ /* - * XXX this isn't necessarily the case - need to add - * check + * According to mbuf(9) the correct way to tell + * the stack that the checksum of an inbound + * packet is correct, without it actually being + * present (because the underlying interface + * doesn't provide it), is to set the + * CSUM_DATA_VALID and CSUM_PSEUDO_HDR flags, + * and the csum_data field to 0xffff. */ - - m->m_pkthdr.csum_flags |= - (CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID - | CSUM_PSEUDO_HDR); + m->m_pkthdr.csum_flags |= (CSUM_DATA_VALID + | CSUM_PSEUDO_HDR); m->m_pkthdr.csum_data = 0xffff; } if ((rx->flags & NETRXF_extra_info) != 0 &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703210830.v2L8U6m5002096>