Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2002 16:54:50 +0300 (EEST)
From:      Maxim Sobolev <max@vega.com>
To:        brandt@fokus.gmd.de (Harti Brandt)
Cc:        max@vega.com (Maxim Sobolev), bde@zeta.org.au (Bruce Evans), sobomax@FreeBSD.ORG (Maxim Sobolev), hackers@FreeBSD.ORG, net@FreeBSD.ORG
Subject:   Re: Increasing size of if_flags field in the ifnet structure [patch
Message-ID:  <200208161354.g7GDsoup005697@vega.vega.com>
In-Reply-To: <20020816143437.D24938-100000@beagle.fokus.gmd.de> from "Harti Brandt" at ΑΧΗ 16, 2002 

next in thread | previous in thread | raw e-mail | index | archive | help

--%--multipart-mixed-boundary-1.5686.1029506090--%
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

> 
> On Fri, 16 Aug 2002, Maxim Sobolev wrote:
> 
> MS>BTW, I've just realised that we can easily avoid breaking application
> MS>ABI by using currently unused ifr_ifru.ifru_flags[2] (aka. ifr_prevflags)
> MS>for storing another 16 flags. What do people think?
> 
> The ifr_prevflags may be used by snmp daemons to provide the necessary
> atomic rollback.

Could you please verify? Nothing in the base system uses it. Initially,
ifr_prevflags was added with the following log message (rev.1.50):

  Since ifru_flags is a short, we can fit in a copy of the flags
  before they got changed.  This can help eliminate much of the
  gymnastics drivers do in their ioctl routines to figure this out.

but no drivers are using it so far.

Just in the case, attached is updated patch, which utilises ifr_prevflags
for extending ifr_flags.

-Maxim

--%--multipart-mixed-boundary-1.5686.1029506090--%
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Description: 'diff' output text
Content-Disposition: attachment; filename="if_flags.32bit.patch"

diff -druN src.preflags/sbin/ifconfig/ifconfig.c src/sbin/ifconfig/ifconfig.c
--- src.preflags/sbin/ifconfig/ifconfig.c	Thu Aug 15 09:47:46 2002
+++ src/sbin/ifconfig/ifconfig.c	Fri Aug 16 16:12:09 2002
@@ -999,14 +999,15 @@
  		exit(1);
  	}
 	strncpy(my_ifr.ifr_name, name, sizeof (my_ifr.ifr_name));
- 	flags = my_ifr.ifr_flags;
+ 	flags = my_ifr.ifr_flags | (my_ifr.ifr_flagshigh << 16);
 
 	if (value < 0) {
 		value = -value;
 		flags &= ~value;
 	} else
 		flags |= value;
-	my_ifr.ifr_flags = flags;
+	my_ifr.ifr_flags = flags & 0xffff;
+	my_ifr.ifr_flagshigh = flags >> 16;
 	if (ioctl(s, SIOCSIFFLAGS, (caddr_t)&my_ifr) < 0)
 		Perror(vname);
 }
diff -druN src.preflags/share/man/man4/netintro.4 src/share/man/man4/netintro.4
--- src.preflags/share/man/man4/netintro.4	Thu Aug 15 09:47:47 2002
+++ src/share/man/man4/netintro.4	Fri Aug 16 16:11:11 2002
@@ -197,20 +197,21 @@
         struct    sockaddr ifru_addr;
         struct    sockaddr ifru_dstaddr;
         struct    sockaddr ifru_broadaddr;
-        short     ifru_flags;
+        short     ifru_flags[2];
         int       ifru_metric;
         int       ifru_mtu;
         int       ifru_phys;
         caddr_t   ifru_data;
     } ifr_ifru;
-#define ifr_addr      ifr_ifru.ifru_addr    /* address */
-#define ifr_dstaddr   ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
+#define ifr_addr      ifr_ifru.ifru_addr      /* address */
+#define ifr_dstaddr   ifr_ifru.ifru_dstaddr   /* other end of p-to-p link */
 #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
-#define ifr_flags     ifr_ifru.ifru_flags   /* flags */
-#define ifr_metric    ifr_ifru.ifru_metric  /* metric */
-#define ifr_mtu       ifr_ifru.ifru_mtu     /* mtu */
-#define ifr_phys      ifr_ifru.ifru_phys    /* physical wire */
-#define ifr_data      ifr_ifru.ifru_data    /* for use by interface */
+#define ifr_flags     ifr_ifru.ifru_flags[0]  /* flags (low 16 bits) */
+#define ifr_flagshigh ifr_ifru.ifru_flags[1]  /* flags (high 16 bits) */
+#define ifr_metric    ifr_ifru.ifru_metric    /* metric */
+#define ifr_mtu       ifr_ifru.ifru_mtu       /* mtu */
+#define ifr_phys      ifr_ifru.ifru_phys      /* physical wire */
+#define ifr_data      ifr_ifru.ifru_data      /* for use by interface */
 };
 .Ed
 .Pp
diff -druN src.preflags/share/man/man9/ifnet.9 src/share/man/man9/ifnet.9
--- src.preflags/share/man/man9/ifnet.9	Thu Aug 15 09:47:48 2002
+++ src/share/man/man9/ifnet.9	Thu Aug 15 11:36:46 2002
@@ -284,7 +284,7 @@
 (Set by driver,
 decremented by generic watchdog code.)
 .It Va if_flags
-.Pq Vt short
+.Pq Vt int
 Flags describing operational parameters of this interface (see below).
 (Manipulated by both driver and generic code.)
 .It Va if_capabilities
diff -druN src.preflags/sys/compat/linux/linux_ioctl.c src/sys/compat/linux/linux_ioctl.c
--- src.preflags/sys/compat/linux/linux_ioctl.c	Thu Aug 15 09:47:48 2002
+++ src/sys/compat/linux/linux_ioctl.c	Thu Aug 15 11:48:59 2002
@@ -1963,7 +1963,7 @@
 {
 	l_short flags;
 
-	flags = ifp->if_flags;
+	flags = ifp->if_flags & 0xffff;
 	/* these flags have no Linux equivalent */
 	flags &= ~(IFF_SMART|IFF_OACTIVE|IFF_SIMPLEX|
 	    IFF_LINK0|IFF_LINK1|IFF_LINK2);
diff -druN src.preflags/sys/dev/fxp/if_fxp.c src/sys/dev/fxp/if_fxp.c
--- src.preflags/sys/dev/fxp/if_fxp.c	Thu Aug 15 09:47:50 2002
+++ src/sys/dev/fxp/if_fxp.c	Thu Aug 15 21:17:11 2002
@@ -1193,7 +1193,7 @@
 #ifdef DEVICE_POLLING
 	struct ifnet *ifp = &sc->sc_if;
 
-	if (ifp->if_ipending & IFF_POLLING)
+	if (ifp->if_flags & IFF_POLLING)
 		return;
 	if (ether_poll_register(fxp_poll, ifp)) {
 		/* disable interrupts */
@@ -1785,7 +1785,7 @@
 	 * ... but only do that if we are not polling. And because (presumably)
 	 * the default is interrupts on, we need to disable them explicitly!
 	 */
-	if ( ifp->if_ipending & IFF_POLLING )
+	if ( ifp->if_flags & IFF_POLLING )
 		CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE);
 	else
 #endif /* DEVICE_POLLING */
diff -druN src.preflags/sys/dev/vx/if_vx.c src/sys/dev/vx/if_vx.c
--- src.preflags/sys/dev/vx/if_vx.c	Thu Aug 15 09:47:57 2002
+++ src/sys/dev/vx/if_vx.c	Thu Aug 15 13:51:27 2002
@@ -285,7 +285,7 @@
     register struct ifnet *ifp = &sc->arpcom.ac_if;  
     int i, j, k;
     char *reason, *warning;
-    static short prev_flags;
+    static int prev_flags;
     static char prev_conn = -1;
 
     if (prev_conn == -1) {
diff -druN src.preflags/sys/kern/kern_poll.c src/sys/kern/kern_poll.c
--- src.preflags/sys/kern/kern_poll.c	Thu Aug 15 09:47:58 2002
+++ src/sys/kern/kern_poll.c	Thu Aug 15 21:18:02 2002
@@ -383,7 +383,7 @@
 		for (i = 0 ; i < poll_handlers ; i++) {
 			if (pr[i].handler &&
 			    pr[i].ifp->if_flags & IFF_RUNNING) {
-				pr[i].ifp->if_ipending &= ~IFF_POLLING;
+				pr[i].ifp->if_flags &= ~IFF_POLLING;
 				pr[i].handler(pr[i].ifp, POLL_DEREGISTER, 1);
 			}
 			pr[i].handler=NULL;
@@ -415,7 +415,7 @@
 		return 0;
 	if ( !(ifp->if_flags & IFF_UP) )	/* must be up		*/
 		return 0;
-	if (ifp->if_ipending & IFF_POLLING)	/* already polling	*/
+	if (ifp->if_flags & IFF_POLLING)	/* already polling	*/
 		return 0;
 
 	s = splhigh();
@@ -440,7 +440,7 @@
 	pr[poll_handlers].handler = h;
 	pr[poll_handlers].ifp = ifp;
 	poll_handlers++;
-	ifp->if_ipending |= IFF_POLLING;
+	ifp->if_flags |= IFF_POLLING;
 	splx(s);
 	if (idlepoll_sleeping)
 		wakeup(&idlepoll_sleeping);
@@ -459,14 +459,14 @@
 	int i;
 
 	mtx_lock(&Giant);
-	if ( !ifp || !(ifp->if_ipending & IFF_POLLING) ) {
+	if ( !ifp || !(ifp->if_flags & IFF_POLLING) ) {
 		mtx_unlock(&Giant);
 		return 0;
 	}
 	for (i = 0 ; i < poll_handlers ; i++)
 		if (pr[i].ifp == ifp) /* found it */
 			break;
-	ifp->if_ipending &= ~IFF_POLLING; /* found or not... */
+	ifp->if_flags &= ~IFF_POLLING; /* found or not... */
 	if (i == poll_handlers) {
 		mtx_unlock(&Giant);
 		printf("ether_poll_deregister: ifp not found!!!\n");
diff -druN src.preflags/sys/net/if.c src/sys/net/if.c
--- src.preflags/sys/net/if.c	Thu Aug 15 09:47:58 2002
+++ src/sys/net/if.c	Fri Aug 16 16:32:50 2002
@@ -1234,6 +1234,7 @@
 	struct ifreq *ifr;
 	struct ifstat *ifs;
 	int error = 0;
+	int new_flags;
 
 	ifr = (struct ifreq *)data;
 	switch (cmd) {
@@ -1242,7 +1243,8 @@
 		break;
 
 	case SIOCGIFFLAGS:
-		ifr->ifr_flags = ifp->if_flags;
+		ifr->ifr_flags = ifp->if_flags & 0xffff;
+		ifr->ifr_flagshigh = ifp->if_flags >> 16;
 		break;
 
 	case SIOCGIFCAP:
@@ -1272,22 +1274,22 @@
 		error = suser(td);
 		if (error)
 			return (error);
-		ifr->ifr_prevflags = ifp->if_flags;
+		new_flags = ifr->ifr_flags | (ifr->ifr_flagshigh << 16);
 		if (ifp->if_flags & IFF_SMART) {
 			/* Smart drivers twiddle their own routes */
 		} else if (ifp->if_flags & IFF_UP &&
-		    (ifr->ifr_flags & IFF_UP) == 0) {
+		    (new_flags & IFF_UP) == 0) {
 			int s = splimp();
 			if_down(ifp);
 			splx(s);
-		} else if (ifr->ifr_flags & IFF_UP &&
+		} else if (new_flags & IFF_UP &&
 		    (ifp->if_flags & IFF_UP) == 0) {
 			int s = splimp();
 			if_up(ifp);
 			splx(s);
 		}
 		ifp->if_flags = (ifp->if_flags & IFF_CANTCHANGE) |
-			(ifr->ifr_flags &~ IFF_CANTCHANGE);
+			(new_flags &~ IFF_CANTCHANGE);
 		if (ifp->if_ioctl)
 			(void) (*ifp->if_ioctl)(ifp, cmd, data);
 		getmicrotime(&ifp->if_lastchange);
@@ -1438,7 +1440,7 @@
 	struct ifnet *ifp;
 	struct ifreq *ifr;
 	int error;
-	short oif_flags;
+	int oif_flags;
 
 	switch (cmd) {
 	case SIOCGIFCONF:
@@ -1573,7 +1575,8 @@
 			return (0);
 		ifp->if_flags &= ~IFF_PROMISC;
 	}
-	ifr.ifr_flags = ifp->if_flags;
+	ifr.ifr_flags = ifp->if_flags & 0xffff;
+	ifr.ifr_flagshigh = ifp->if_flags >> 16;
 	error = (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
 	if (error == 0) {
 		log(LOG_INFO, "%s%d: promiscuous mode %s\n",
@@ -1695,7 +1698,8 @@
 	if (onswitch) {
 		if (ifp->if_amcount++ == 0) {
 			ifp->if_flags |= IFF_ALLMULTI;
-			ifr.ifr_flags = ifp->if_flags;
+			ifr.ifr_flags = ifp->if_flags & 0xffff;
+			ifr.ifr_flagshigh = ifp->if_flags >> 16;
 			error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
 		}
 	} else {
@@ -1704,7 +1708,8 @@
 		} else {
 			ifp->if_amcount = 0;
 			ifp->if_flags &= ~IFF_ALLMULTI;
-			ifr.ifr_flags = ifp->if_flags;
+			ifr.ifr_flags = ifp->if_flags & 0xffff;;
+			ifr.ifr_flagshigh = ifp->if_flags >> 16;
 			error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
 		}
 	}
@@ -1919,10 +1924,12 @@
 	 */
 	if ((ifp->if_flags & IFF_UP) != 0) {
 		ifp->if_flags &= ~IFF_UP;
-		ifr.ifr_flags = ifp->if_flags;
+		ifr.ifr_flags = ifp->if_flags & 0xffff;
+		ifr.ifr_flagshigh = ifp->if_flags >> 16;
 		(*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
 		ifp->if_flags |= IFF_UP;
-		ifr.ifr_flags = ifp->if_flags;
+		ifr.ifr_flags = ifp->if_flags & 0xffff;
+		ifr.ifr_flagshigh = ifp->if_flags >> 16;
 		(*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
 #ifdef INET
 		/*
diff -druN src.preflags/sys/net/if.h src/sys/net/if.h
--- src.preflags/sys/net/if.h	Thu Aug 15 09:47:58 2002
+++ src/sys/net/if.h	Fri Aug 16 16:09:01 2002
@@ -139,14 +139,6 @@
 #define	IFF_LINK2	0x4000		/* per link layer defined bit */
 #define	IFF_ALTPHYS	IFF_LINK2	/* use alternate physical connection */
 #define	IFF_MULTICAST	0x8000		/* supports multicast */
-
-/*
- * The following flag(s) ought to go in if_flags, but we cannot change
- * struct ifnet because of binary compatibility, so we store them in
- * if_ipending, which is not used so far.
- * If possible, make sure the value is not conflicting with other
- * IFF flags, so we have an easier time when we want to merge them.
- */
 #define	IFF_POLLING	0x10000		/* Interface is in polling mode. */
 
 /* flags set internally only: */
@@ -244,8 +236,8 @@
 #define	ifr_addr	ifr_ifru.ifru_addr	/* address */
 #define	ifr_dstaddr	ifr_ifru.ifru_dstaddr	/* other end of p-to-p link */
 #define	ifr_broadaddr	ifr_ifru.ifru_broadaddr	/* broadcast address */
-#define	ifr_flags	ifr_ifru.ifru_flags[0]	/* flags */
-#define	ifr_prevflags	ifr_ifru.ifru_flags[1]	/* flags */
+#define	ifr_flags	ifr_ifru.ifru_flags[0]	/* flags (low 16 bits) */
+#define	ifr_flagshigh	ifr_ifru.ifru_flags[1]	/* flags (high 16 bits) */
 #define	ifr_metric	ifr_ifru.ifru_metric	/* metric */
 #define	ifr_mtu		ifr_ifru.ifru_mtu	/* mtu */
 #define ifr_phys	ifr_ifru.ifru_phys	/* physical wire */
diff -druN src.preflags/sys/net/if_tap.c src/sys/net/if_tap.c
--- src.preflags/sys/net/if_tap.c	Thu Aug 15 09:47:58 2002
+++ src/sys/net/if_tap.c	Thu Aug 15 19:30:15 2002
@@ -654,7 +654,7 @@
 	struct ifnet		*ifp = &tp->tap_if;
  	struct tapinfo		*tapp = NULL;
 	int			 s;
-	short			 f;
+	int			 f;
 
 	switch (cmd) {
  		case TAPSIFINFO:
@@ -728,7 +728,7 @@
 			break;
 
 		case VMIO_SIOCSIFFLAGS: /* VMware/VMnet SIOCSIFFLAGS */
-			f = *(short *)data;
+			f = *(int *)data;
 			f &= 0x0fff;
 			f &= ~IFF_CANTCHANGE;
 			f |= IFF_UP;
diff -druN src.preflags/sys/net/if_var.h src/sys/net/if_var.h
--- src.preflags/sys/net/if_var.h	Thu Aug 15 09:47:58 2002
+++ src/sys/net/if_var.h	Thu Aug 15 19:30:41 2002
@@ -138,7 +138,7 @@
 	u_short	if_index;		/* numeric abbreviation for this if  */
 	short	if_unit;		/* sub-unit for lower level driver */
 	short	if_timer;		/* time 'til if_watchdog called */
-	short	if_flags;		/* up/down, broadcast, etc. */
+	int	if_flags;		/* up/down, broadcast, etc. */
 	int	if_capabilities;	/* interface capabilities */
 	int	if_capenable;		/* enabled features */
 	int	if_ipending;		/* interrupts pending */
diff -druN src.preflags/sys/net/rtsock.c src/sys/net/rtsock.c
--- src.preflags/sys/net/rtsock.c	Thu Aug 15 09:47:58 2002
+++ src/sys/net/rtsock.c	Thu Aug 15 19:36:03 2002
@@ -757,7 +757,7 @@
 		return;
 	ifm = mtod(m, struct if_msghdr *);
 	ifm->ifm_index = ifp->if_index;
-	ifm->ifm_flags = (u_short)ifp->if_flags;
+	ifm->ifm_flags = ifp->if_flags;
 	ifm->ifm_data = ifp->if_data;
 	ifm->ifm_addrs = 0;
 	route_proto.sp_protocol = 0;
@@ -958,7 +958,7 @@
 
 			ifm = (struct if_msghdr *)w->w_tmem;
 			ifm->ifm_index = ifp->if_index;
-			ifm->ifm_flags = (u_short)ifp->if_flags;
+			ifm->ifm_flags = ifp->if_flags;
 			ifm->ifm_data = ifp->if_data;
 			ifm->ifm_addrs = info.rti_addrs;
 			error = SYSCTL_OUT(w->w_req,(caddr_t)ifm, len);
diff -druN src.preflags/sys/netatm/atm_if.c src/sys/netatm/atm_if.c
--- src.preflags/sys/netatm/atm_if.c	Thu Aug 15 09:47:58 2002
+++ src/sys/netatm/atm_if.c	Thu Aug 15 21:32:44 2002
@@ -1057,7 +1057,7 @@
 		break;
 
 	case SIOCGIFFLAGS:
-		*(short *)data = ifp->if_flags;
+		*(int *)data = ifp->if_flags;
 		break;
 
 	case SIOCSIFFLAGS:
diff -druN src.preflags/sys/netinet6/in6_var.h src/sys/netinet6/in6_var.h
--- src.preflags/sys/netinet6/in6_var.h	Thu Aug 15 09:47:58 2002
+++ src/sys/netinet6/in6_var.h	Thu Aug 15 20:24:38 2002
@@ -234,7 +234,7 @@
 	union {
 		struct	sockaddr_in6 ifru_addr;
 		struct	sockaddr_in6 ifru_dstaddr;
-		short	ifru_flags;
+		int	ifru_flags;
 		int	ifru_flags6;
 		int	ifru_metric;
 		caddr_t	ifru_data;
diff -druN src.preflags/sys/nfsclient/bootp_subr.c src/sys/nfsclient/bootp_subr.c
--- src.preflags/sys/nfsclient/bootp_subr.c	Thu Aug 15 09:47:59 2002
+++ src/sys/nfsclient/bootp_subr.c	Thu Aug 15 20:38:55 2002
@@ -385,7 +385,7 @@
 	printf("%s%d flags %x, addr ",
 	       ifp->if_name,
 	       ifp->if_unit,
-	       (unsigned short) ifp->if_flags);
+	       ifp->if_flags);
 	print_sin_addr((struct sockaddr_in *) ifa->ifa_addr);
 	printf(", broadcast ");
 	print_sin_addr((struct sockaddr_in *) ifa->ifa_dstaddr);
diff -druN src.preflags/sys/pci/if_dc.c src/sys/pci/if_dc.c
--- src.preflags/sys/pci/if_dc.c	Thu Aug 15 09:47:59 2002
+++ src/sys/pci/if_dc.c	Thu Aug 15 21:18:57 2002
@@ -2483,7 +2483,7 @@
 	while(!(sc->dc_ldata->dc_rx_list[i].dc_status & DC_RXSTAT_OWN)) {
 
 #ifdef DEVICE_POLLING
-		if (ifp->if_ipending & IFF_POLLING) {
+		if (ifp->if_flags & IFF_POLLING) {
 			if (sc->rxcycles <= 0)
 				break;
 			sc->rxcycles--;
@@ -2885,7 +2885,7 @@
 	DC_LOCK(sc);
 	ifp = &sc->arpcom.ac_if;
 #ifdef DEVICE_POLLING
-	if (ifp->if_ipending & IFF_POLLING)
+	if (ifp->if_flags & IFF_POLLING)
 		goto done;
 	if (ether_poll_register(dc_poll, ifp)) { /* ok, disable interrupts */
 		CSR_WRITE_4(sc, DC_IMR, 0x00000000);
@@ -3265,7 +3265,7 @@
 	 * the case of polling. Some cards (e.g. fxp) turn interrupts on
 	 * after a reset.
 	 */
-	if (ifp->if_ipending & IFF_POLLING)
+	if (ifp->if_flags & IFF_POLLING)
 		CSR_WRITE_4(sc, DC_IMR, 0x00000000);
 	else
 #endif
diff -druN src.preflags/sys/pci/if_rl.c src/sys/pci/if_rl.c
--- src.preflags/sys/pci/if_rl.c	Thu Aug 15 09:47:59 2002
+++ src/sys/pci/if_rl.c	Thu Aug 15 21:18:25 2002
@@ -1187,7 +1187,7 @@
 
 	while((CSR_READ_1(sc, RL_COMMAND) & RL_CMD_EMPTY_RXBUF) == 0) {
 #ifdef DEVICE_POLLING
-		if (ifp->if_ipending & IFF_POLLING) {
+		if (ifp->if_flags & IFF_POLLING) {
 			if (sc->rxcycles <= 0)
 				break;
 			sc->rxcycles--;
@@ -1416,7 +1416,7 @@
 	ifp = &sc->arpcom.ac_if;
 
 #ifdef DEVICE_POLLING
-	if  (ifp->if_ipending & IFF_POLLING)
+	if  (ifp->if_flags & IFF_POLLING)
 		goto done;
 	if (ether_poll_register(rl_poll, ifp)) { /* ok, disable interrupts */
 		CSR_WRITE_2(sc, RL_IMR, 0x0000);
@@ -1654,7 +1654,7 @@
 	/*
 	 * Disable interrupts if we are polling.
 	 */
-	if (ifp->if_ipending & IFF_POLLING)
+	if (ifp->if_flags & IFF_POLLING)
 		CSR_WRITE_2(sc, RL_IMR, 0);
 	else	/* otherwise ... */
 #endif /* DEVICE_POLLING */
diff -druN src.preflags/sys/pci/if_sis.c src/sys/pci/if_sis.c
--- src.preflags/sys/pci/if_sis.c	Thu Aug 15 09:47:59 2002
+++ src/sys/pci/if_sis.c	Thu Aug 15 21:18:41 2002
@@ -1285,7 +1285,7 @@
 	while(SIS_OWNDESC(&sc->sis_ldata.sis_rx_list[i])) {
 
 #ifdef DEVICE_POLLING
-		if (ifp->if_ipending & IFF_POLLING) {
+		if (ifp->if_flags & IFF_POLLING) {
 			if (sc->rxcycles <= 0)
 				break;
 			sc->rxcycles--;
@@ -1508,7 +1508,7 @@
 
 	SIS_LOCK(sc);
 #ifdef DEVICE_POLLING
-	if (ifp->if_ipending & IFF_POLLING)
+	if (ifp->if_flags & IFF_POLLING)
 		goto done;
 	if (ether_poll_register(sis_poll, ifp)) { /* ok, disable interrupts */
 		CSR_WRITE_4(sc, SIS_IER, 0);
@@ -1810,7 +1810,7 @@
 	 * ... only enable interrupts if we are not polling, make sure
 	 * they are off otherwise.
 	 */
-	if (ifp->if_ipending & IFF_POLLING)
+	if (ifp->if_flags & IFF_POLLING)
 		CSR_WRITE_4(sc, SIS_IER, 0);
 	else
 #endif /* DEVICE_POLLING */
diff -druN src.preflags/usr.sbin/mrouted/config.c src/usr.sbin/mrouted/config.c
--- src.preflags/usr.sbin/mrouted/config.c	Thu Aug 15 09:48:00 2002
+++ src/usr.sbin/mrouted/config.c	Thu Aug 15 20:59:36 2002
@@ -32,7 +32,7 @@
     register vifi_t vifi;
     int n;
     u_int32 addr, mask, subnet;
-    short flags;
+    int flags;
     int num_ifreq = 32;
 
     ifc.ifc_len = num_ifreq * sizeof(struct ifreq);

--%--multipart-mixed-boundary-1.5686.1029506090--%--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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