From owner-cvs-src@FreeBSD.ORG Mon Mar 19 18:39:36 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B43C16A403; Mon, 19 Mar 2007 18:39:36 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 5E25213C45D; Mon, 19 Mar 2007 18:39:36 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l2JIdaog098605; Mon, 19 Mar 2007 18:39:36 GMT (envelope-from bms@repoman.freebsd.org) Received: (from bms@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l2JIdaLv098604; Mon, 19 Mar 2007 18:39:36 GMT (envelope-from bms) Message-Id: <200703191839.l2JIdaLv098604@repoman.freebsd.org> From: Bruce M Simpson Date: Mon, 19 Mar 2007 18:39:36 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/net if_ethersubr.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2007 18:39:36 -0000 bms 2007-03-19 18:39:36 UTC FreeBSD src repository Modified files: sys/net if_ethersubr.c Log: Clean up the ether_input() path by using the M_PROMISC flag. Main points of this change: * Drop frames immediately if the interface is not marked IFF_UP. * Always trim off the frame checksum if present. * Always use M_VLANTAG in preference to passing 802.1Q frames to consumers. * Use __func__ consistently for KASSERT(). * Use the M_PROMISC flag to detect situations where ether_input() may reenter itself on the same call graph with the same mbuf which was promiscuously received on behalf of subsystems such as netgraph, carp, and vlan. * 802.1P frames (that is, VLAN frames with an ID of 0) will now be passed to layer 3 input paths. * Deal with the special case for CARP in a sane way. This is a significant rewrite of code on the critical path. Please report any issues to me if they arise. Frames will now only pass through dummynet if M_PROMISC is cleared, to avoid problems with re-entry. The handling of CARP needs to be revisited architecturally. The M_PROMISC flag may potentially be demoted to a link-layer flag only as it is in NetBSD, where the idea originated. Discussed on: net Idea from: NetBSD Reviewed by: yar MFC after: 1 month Revision Changes Path 1.224 +125 -120 src/sys/net/if_ethersubr.c