From owner-freebsd-net@FreeBSD.ORG Tue Feb 23 10:34:10 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 021F61065670 for ; Tue, 23 Feb 2010 10:34:10 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 944F98FC13 for ; Tue, 23 Feb 2010 10:34:09 +0000 (UTC) Received: by mail-ww0-f54.google.com with SMTP id 22so726266wwb.13 for ; Tue, 23 Feb 2010 02:34:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=Xn6c+7fY3O1+n1jpCWXhZKWq9qtxueAbD69SJafQVlk=; b=cWOBoAvQVBnAPGjauHjBJ6A0BO7TJnq+tq5l0m6/tyHj372YVeA2TN03JUVK+/2nNV dxj2tNpFj1XCxiWqVdoMJxea+v02nZXqXO9kS+9RgRQiTQurFsBrYZPj0Wi07mMPoVaR o1zOgEiiF+Xkm/t+g0RW7sLXdnSDecHdUVtPQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=u3rUc6rrPWMcRyTII5aIPPK0CH2wYl81En1eN58IUFV0hCnplriS8qPk+m1Ihkv1SB dhqqz1RkLyuxT9o5HsufzKHAHSML4a9cwKHX/fSdGoPz5o9gS865o+XCXYyWAsYS2Il2 UFHvvmX5z3Bbas0sjwsa0uj4ZwNDWpPRyFsLg= MIME-Version: 1.0 Received: by 10.216.87.13 with SMTP id x13mr1535094wee.12.1266921249265; Tue, 23 Feb 2010 02:34:09 -0800 (PST) From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= Date: Tue, 23 Feb 2010 11:33:49 +0100 Message-ID: <9a542da31002230233o24aa8db3nc77017fbe141a1fc@mail.gmail.com> To: freebsd-net Content-Type: text/plain; charset=ISO-8859-1 Subject: CSUM_TSO question... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2010 10:34:10 -0000 Hello all, i was reading ip_output() code today and stumbled accross this http://fxr.watson.org/fxr/source/netinet/ip_output.c#L587. Can anybody shad any light on the check being done ? (m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || Shouldn't it be just (m->m_pkthdr.csum_flags & CSUM_TSO) != 0 || or it shold be (ifp->if_hwassist & CSUM_TSO) != 0 || while just a few lines above the following computation is done m->m_pkthdr.csum_flags &= ifp->if_hwassist; I am not sure how the compiler interprets it and it might be right though reading it is somewhat not clear what is going on. Is this correct? Regards, -- Ermal