From owner-freebsd-net Wed Apr 24 0: 5:34 2002 Delivered-To: freebsd-net@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 4ABFB37B405 for ; Wed, 24 Apr 2002 00:05:30 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3O75SH81915 for ; Wed, 24 Apr 2002 01:05:29 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3O75Rb31423 for ; Wed, 24 Apr 2002 01:05:28 -0600 (MDT) (envelope-from imp@village.org) Date: Wed, 24 Apr 2002 01:05:08 -0600 (MDT) Message-Id: <20020424.010508.131147446.imp@village.org> To: net@freebsd.org Subject: MFC: IF_HANDOFF and IF_HANDOFF_ADJ From: "M. Warner Losh" X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Any objections to MFCing IF_HANDOFF and IF_HANDOFF_ADJ? I'd like there to be a common API between -stable and -current. I'm thinking that the following macros would be sufficient for -stable: #define IF_HANDOFF_ADJ(q, m, ifp, adj) \ if (IF_QFULL((q))) { \ IF_DROP((q)); \ m_freem((m)); \ } else { \ (ifp)->if_obytes += (m)->m_pkthdr.len + (adj); \ if ((m)->m_flags & M_MCAST) \ (ifp)->if_omcasts++; \ IF_ENQUEUE((q), (m)); \ if (((ifp)->if_flags & IFF_OACTIVE) == 0) \ (*(ifp)->if_start)((ifp)); \ } #define IF_HANDOFF(q, m, ifp) IF_HANDOFF_ADJ(q, m, ifp, 0) Comments? Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message