Date: Mon, 19 Mar 2007 18:39:36 +0000 (UTC) From: Bruce M Simpson <bms@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/net if_ethersubr.c Message-ID: <200703191839.l2JIdaLv098604@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703191839.l2JIdaLv098604>