Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 2009 04:49:42 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r191041 - user/kmacy/releng_7_net_backport/sys/netinet
Message-ID:  <200904140449.n3E4ngwR094577@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Tue Apr 14 04:49:42 2009
New Revision: 191041
URL: http://svn.freebsd.org/changeset/base/191041

Log:
  update multicast interface

Modified:
  user/kmacy/releng_7_net_backport/sys/netinet/ip_mroute.h

Modified: user/kmacy/releng_7_net_backport/sys/netinet/ip_mroute.h
==============================================================================
--- user/kmacy/releng_7_net_backport/sys/netinet/ip_mroute.h	Tue Apr 14 04:43:25 2009	(r191040)
+++ user/kmacy/releng_7_net_backport/sys/netinet/ip_mroute.h	Tue Apr 14 04:49:42 2009	(r191041)
@@ -70,9 +70,6 @@
 #define MRT_ADD_BW_UPCALL 111	/* create bandwidth monitor */
 #define MRT_DEL_BW_UPCALL 112	/* delete bandwidth monitor */
 
-
-#define GET_TIME(t)	microtime(&t)
-
 /*
  * Types and macros for handling bitmaps with one bit per virtual interface.
  */
@@ -224,6 +221,11 @@ struct mrtstat {
     u_long	mrts_upq_sockfull;	/* upcalls dropped - socket full */
 };
 
+#ifdef _KERNEL
+#define	MRTSTAT_ADD(name, val)	mrtstat.name += (val)
+#define	MRTSTAT_INC(name)	MRTSTAT_ADD(name, 1)
+#endif
+
 /*
  * Argument structure used by mrouted to get src-grp pkt counts
  */
@@ -253,8 +255,6 @@ struct sioc_vif_req {
 struct vif {
     u_char		v_flags;	/* VIFF_ flags defined above         */
     u_char		v_threshold;	/* min ttl required to forward on vif*/
-    u_int		v_rate_limit;	/* ignored; kept for compatibility */
-    struct tbf         *v_tbf;		/* ignored; kept for compatibility */
     struct in_addr	v_lcl_addr;	/* local interface address           */
     struct in_addr	v_rmt_addr;	/* remote address (tunnels only)     */
     struct ifnet       *v_ifp;		/* pointer to interface              */
@@ -263,16 +263,13 @@ struct vif {
     u_long		v_bytes_in;	/* # bytes in on interface	     */
     u_long		v_bytes_out;	/* # bytes out on interface	     */
     struct route	v_route;	/* cached route */
-    u_int		v_rsvp_on;	/* RSVP listening on this vif */
-    struct socket      *v_rsvpd;	/* RSVP daemon socket */
 };
 
 /*
  * The kernel's multicast forwarding cache entry structure
- * (A field for the type of service (mfc_tos) is to be added
- * at a future point)
  */
 struct mfc {
+	LIST_ENTRY(mfc)	mfc_hash;
 	struct in_addr	mfc_origin;		/* IP origin of mcasts	     */
 	struct in_addr  mfc_mcastgrp;		/* multicast group associated*/
 	vifi_t		mfc_parent;		/* incoming vif              */
@@ -282,11 +279,11 @@ struct mfc {
 	u_long		mfc_wrong_if;		/* wrong if for src-grp	     */
 	int		mfc_expire;		/* time to clean entry up    */
 	struct timeval	mfc_last_assert;	/* last time I sent an assert*/
-	struct rtdetq	*mfc_stall;		/* q of packets awaiting mfc */
-	struct mfc	*mfc_next;		/* next mfc entry            */
 	uint8_t		mfc_flags[MAXVIFS];	/* the MRT_MFC_FLAGS_* flags */
 	struct in_addr	mfc_rp;			/* the RP address	     */
 	struct bw_meter	*mfc_bw_meter;		/* list of bandwidth meters  */
+	u_long		mfc_nstall;		/* # of packets awaiting mfc */
+	TAILQ_HEAD(, rtdetq) mfc_stall;		/* q of packets awaiting mfc */
 };
 
 /*
@@ -311,19 +308,11 @@ struct igmpmsg {
  * Argument structure used for pkt info. while upcall is made
  */
 struct rtdetq {
+    TAILQ_ENTRY(rtdetq)	rte_link;
     struct mbuf		*m;		/* A copy of the packet		    */
     struct ifnet	*ifp;		/* Interface pkt came in on	    */
     vifi_t		xmt_vif;	/* Saved copy of imo_multicast_vif  */
-    struct rtdetq	*next;		/* Next in list of packets          */
 };
-
-#define MFCTBLSIZ	256
-#if (MFCTBLSIZ & (MFCTBLSIZ - 1)) == 0	  /* from sys:route.h */
-#define MFCHASHMOD(h)	((h) & (MFCTBLSIZ - 1))
-#else
-#define MFCHASHMOD(h)	((h) % MFCTBLSIZ)
-#endif
-
 #define MAX_UPQ	4		/* max. no of pkts in upcall Q */
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904140449.n3E4ngwR094577>