From owner-p4-projects@FreeBSD.ORG Wed Nov 1 15:20:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9851916A506; Wed, 1 Nov 2006 15:20:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B83216A4DF for ; Wed, 1 Nov 2006 15:20:39 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4231E43D6B for ; Wed, 1 Nov 2006 15:19:57 +0000 (GMT) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kA1FJhiX060184 for ; Wed, 1 Nov 2006 15:19:43 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kA1FJh5p060181 for perforce@freebsd.org; Wed, 1 Nov 2006 15:19:43 GMT (envelope-from piso@freebsd.org) Date: Wed, 1 Nov 2006 15:19:43 GMT Message-Id: <200611011519.kA1FJh5p060181@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 108918 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2006 15:20:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=108918 Change 108918 by piso@piso_newluxor on 2006/11/01 15:18:55 Fix a comment. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/ip_fw2.c#27 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/ip_fw2.c#27 (text+ko) ==== @@ -3471,55 +3471,49 @@ /* * XXX - Libalias checksum offload 'duct tape': * - * locally generated packets have only - * pseudo-header - * checksum calculated and libalias will - screw it[1], - * so mark them for later fix. - * Moreover there are cases when libalias - modify tcp - * packet data[2], mark it for later fix too. + * locally generated packets have only + * pseudo-header checksum calculated + * and libalias will screw it[1], so + * mark them for later fix. Moreover + * there are cases when libalias + * modify tcp packet data[2], mark it + * for later fix too. * - * [1] libalias was never meant to run in - kernel, so - * it doesn't have any knowledge about - checksum - * offloading, and it expects a packet with - a full - * internet checksum. Unfortunately, packets - * generated locally will have just the pseudo - * header calculated, and when libalias tries - to - * adjust the checksum it will actually screw - it. + * [1] libalias was never meant to run + * in kernel, so it doesn't have any + * knowledge about checksum + * offloading, and it expects a packet + * with a full internet + * checksum. Unfortunately, packets + * generated locally will have just the + * pseudo header calculated, and when + * libalias tries to adjust the + * checksum it will actually screw it. * - * [2] when libalias modify tcp's data content, - * full TCP checksum has to be recomputed: - * the problem is that libalias doesn't have - any - * idea about checksum offloading - * To workaround this, we do not do - checksumming - * in LibAlias, but only mark the packets in - th_x2 - * field. If we receive a marked packet, we - * calculate correct checksum for it aware of - * offloading. - * Why such a terrible hack instead of - * recalculating checksum for each packet? - * Because the previous checksum was not - checked! - * Recalculating checksums for EVERY packet - will - * hide ALL transmission errors. Yes, marked - packets - * still suffer from this problem. But, sigh, - natd(8) - * has this problem, too. + * [2] when libalias modify tcp's data + * content, full TCP checksum has to + * be recomputed: the problem is that + * libalias doesn't have any idea + * about checksum offloading To + * workaround this, we do not do + * checksumming in LibAlias, but only + * mark the packets in th_x2 field. If + * we receive a marked packet, we + * calculate correct checksum for it + * aware of offloading. Why such a + * terrible hack instead of + * recalculating checksum for each + * packet? Because the previous + * checksum was not checked! + * Recalculating checksums for EVERY + * packet will hide ALL transmission + * errors. Yes, marked packets still + * suffer from this problem. But, + * sigh, natd(8) has this problem, + * too. * - * TODO: - * -make libalias mbuf aware (so it can handle - * delayed checksum) + * TODO: -make libalias mbuf aware (so + * it can handle delayed checksum) */ if (mcl->m_pkthdr.rcvif == NULL &&