CVS commit: src/sys/arch/usermode/dev

2022-09-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Sep 18 13:36:53 UTC 2022

Modified Files:
src/sys/arch/usermode/dev: if_veth.c

Log Message:
Eliminate use of IFF_OACTIVE.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/usermode/dev/if_veth.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/usermode/dev/if_veth.c
diff -u src/sys/arch/usermode/dev/if_veth.c:1.15 src/sys/arch/usermode/dev/if_veth.c:1.16
--- src/sys/arch/usermode/dev/if_veth.c:1.15	Wed Jun 16 00:21:18 2021
+++ src/sys/arch/usermode/dev/if_veth.c	Sun Sep 18 13:36:53 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_veth.c,v 1.15 2021/06/16 00:21:18 riastradh Exp $ */
+/* $NetBSD: if_veth.c,v 1.16 2022/09/18 13:36:53 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_veth.c,v 1.15 2021/06/16 00:21:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_veth.c,v 1.16 2022/09/18 13:36:53 thorpej Exp $");
 
 #include 
 #include 
@@ -181,7 +181,6 @@ veth_init(struct ifnet *ifp)
 	veth_stop(ifp, 0);
 
 	ifp->if_flags |= IFF_RUNNING;
-	ifp->if_flags &= ~IFF_OACTIVE;
 
 	return 0;
 }
@@ -247,11 +246,6 @@ veth_softtx(void *priv)
 	struct ifnet *ifp = >sc_ec.ec_if;
 	int s;
 
-	if (ifp->if_flags & IFF_OACTIVE) {
-		if (thunk_pollout_tap(sc->sc_tapfd, 0) == 1)
-			ifp->if_flags &= ~IFF_OACTIVE;
-	}
-
 	s = splnet();
 	veth_start(ifp);
 	splx(s);
@@ -266,7 +260,7 @@ veth_start(struct ifnet *ifp)
 
 	vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);
 
-	if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
+	if ((ifp->if_flags & IFF_RUNNING) == 0)
 		return;
 
 	for (;;) {
@@ -276,7 +270,6 @@ veth_start(struct ifnet *ifp)
 
 		if (thunk_pollout_tap(sc->sc_tapfd, 0) != 1) {
 			printf("queue full\n");
-			ifp->if_flags |= IFF_OACTIVE;
 			break;
 		}
 
@@ -302,7 +295,7 @@ veth_stop(struct ifnet *ifp, int disable
 {
 	vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);
 	ifp->if_timer = 0;
-	ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+	ifp->if_flags &= ~IFF_RUNNING;
 }
 
 static void



CVS commit: src/sys/arch/usermode/dev

2022-09-18 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Sep 18 13:36:53 UTC 2022

Modified Files:
src/sys/arch/usermode/dev: if_veth.c

Log Message:
Eliminate use of IFF_OACTIVE.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/usermode/dev/if_veth.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/arch/usermode/dev

2018-06-01 Thread Christos Zoulas
In article <20180601072615.462e4f...@cvs.netbsd.org>,
Reinoud Zandijk  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  reinoud
>Date:  Fri Jun  1 07:26:15 UTC 2018
>
>Modified Files:
>   src/sys/arch/usermode/dev: cpu.c
>
>Log Message:
>Pass the address of the array, this fixes issues with i386 compilation

If you remove & from both is probably better (if they are both arrays) :-)

christos