Module Name: src
Committed By: thorpej
Date: Sun Sep 18 13:31:08 UTC 2022
Modified Files:
src/sys/arch/sparc64/dev: vnet.c
Log Message:
Eliminate use of IFF_OACTIVE.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc64/dev/vnet.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/sparc64/dev/vnet.c
diff -u src/sys/arch/sparc64/dev/vnet.c:1.6 src/sys/arch/sparc64/dev/vnet.c:1.7
--- src/sys/arch/sparc64/dev/vnet.c:1.6 Fri Feb 11 23:49:28 2022
+++ src/sys/arch/sparc64/dev/vnet.c Sun Sep 18 13:31:08 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: vnet.c,v 1.6 2022/02/11 23:49:28 riastradh Exp $ */
+/* $NetBSD: vnet.c,v 1.7 2022/09/18 13:31:08 thorpej Exp $ */
/* $OpenBSD: vnet.c,v 1.62 2020/07/10 13:26:36 patrick Exp $ */
/*
* Copyright (c) 2009, 2015 Mark Kettenis
@@ -695,7 +695,6 @@ vnet_rx_vio_rdx(struct vnet_softc *sc, s
vnet_setmulti(sc, 1);
KERNEL_LOCK(1, curlwp);
- ifp->if_flags &= ~IFF_OACTIVE;
vnet_start(ifp);
KERNEL_UNLOCK_ONE(curlwp);
}
@@ -951,8 +950,6 @@ vnet_rx_vio_dring_data(struct vnet_softc
vnet_send_dring_data(sc, cons);
KERNEL_LOCK(1, curlwp);
- if (count < (sc->sc_vd->vd_nentries - 1))
- ifp->if_flags &= ~IFF_OACTIVE;
if (count == 0)
ifp->if_timer = 0;
@@ -1138,11 +1135,6 @@ vnet_start(struct ifnet *ifp)
DPRINTF(("%s: not in RUNNING state\n", __func__));
return;
}
- if (ifp->if_flags & IFF_OACTIVE)
- {
- DPRINTF(("%s: already active\n", __func__));
- return;
- }
if (IFQ_IS_EMPTY(&ifp->if_snd))
{
@@ -1175,7 +1167,6 @@ vnet_start(struct ifnet *ifp)
tx_tail += sizeof(struct ldc_pkt);
tx_tail &= ((lc->lc_txq->lq_nentries * sizeof(struct ldc_pkt)) - 1);
if (tx_tail == tx_head) {
- ifp->if_flags |= IFF_OACTIVE;
{
DPRINTF(("%s: tail equals head\n", __func__));
return;
@@ -1194,14 +1185,12 @@ vnet_start(struct ifnet *ifp)
if (count >= (sc->sc_vd->vd_nentries - 1) ||
map->lm_count >= map->lm_nentries) {
DPRINTF(("%s: count issue\n", __func__));
- ifp->if_flags |= IFF_OACTIVE;
break;
}
buf = pool_get(&sc->sc_pool, PR_NOWAIT|PR_ZERO);
if (buf == NULL) {
DPRINTF(("%s: buff is NULL\n", __func__));
- ifp->if_flags |= IFF_OACTIVE;
break;
}
IFQ_DEQUEUE(&ifp->if_snd, m);
@@ -1275,13 +1264,11 @@ vnet_start_desc(struct ifnet *ifp)
count = sc->sc_tx_prod - sc->sc_tx_cons;
if (count >= (sc->sc_vd->vd_nentries - 1) ||
map->lm_count >= map->lm_nentries) {
- ifp->if_flags |= IFF_OACTIVE;
return;
}
buf = pool_get(&sc->sc_pool, PR_NOWAIT|PR_ZERO);
if (buf == NULL) {
- ifp->if_flags |= IFF_OACTIVE;
return;
}
@@ -1548,7 +1535,6 @@ vnet_stop(struct ifnet *ifp, int disable
struct ldc_conn *lc = &sc->sc_lc;
ifp->if_flags &= ~IFF_RUNNING;
- ifp->if_flags &= ~IFF_OACTIVE;
ifp->if_timer = 0;
cbus_intr_setenabled(sc->sc_bustag, sc->sc_tx_ino, INTR_DISABLED);