Garbage collect IFCAP_POLLING_NOCOUNT. It wasn't used since very

beginning of polling(4).  The module always ignored return value
from driver polling handler.
This commit is contained in:
Gleb Smirnoff 2017-12-06 23:03:34 +00:00
parent b0b2d05fd0
commit 17eea3202a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326642
6 changed files with 4 additions and 14 deletions

View File

@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd March 22, 2017
.Dd December 6, 2017
.Dt IFNET 9
.Os
.Sh NAME
@ -677,7 +677,7 @@ Userland code shall use
.Xr ioctl 2 .
.Pp
The following capabilities are currently supported by the system:
.Bl -tag -width ".Dv IFCAP_POLLING_NOCOUNT" -offset indent
.Bl -tag -width ".Dv IFCAP_VLAN_HWTAGGING" -offset indent
.It Dv IFCAP_RXCSUM
This interface can do checksum validation on receiving data.
Some interfaces do not have sufficient buffer storage to store frames
@ -752,9 +752,6 @@ A shorthand for
This interface supports frame filtering in hardware on
.Xr vlan 4
interfaces.
.It Dv IFCAP_POLLING_NOCOUNT
The return value for the number of processed packets should be
skipped for this interface.
.It Dv IFCAP_VLAN_HWTSO
This interface supports TCP Segmentation offloading on
.Xr vlan 4

View File

@ -395,7 +395,6 @@ fwe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* Disable interrupts */
fc->set_intr(fc, 0);
ifp->if_capenable |= IFCAP_POLLING;
ifp->if_capenable |= IFCAP_POLLING_NOCOUNT;
return (error);
}
if (!(ifr->ifr_reqcap & IFCAP_POLLING) &&
@ -404,7 +403,6 @@ fwe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* Enable interrupts. */
fc->set_intr(fc, 1);
ifp->if_capenable &= ~IFCAP_POLLING;
ifp->if_capenable &= ~IFCAP_POLLING_NOCOUNT;
return (error);
}
}

View File

@ -410,8 +410,7 @@ fwip_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
return (error);
/* Disable interrupts */
fc->set_intr(fc, 0);
ifp->if_capenable |= IFCAP_POLLING |
IFCAP_POLLING_NOCOUNT;
ifp->if_capenable |= IFCAP_POLLING;
return (error);
}
if (!(ifr->ifr_reqcap & IFCAP_POLLING) &&
@ -420,7 +419,6 @@ fwip_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* Enable interrupts. */
fc->set_intr(fc, 1);
ifp->if_capenable &= ~IFCAP_POLLING;
ifp->if_capenable &= ~IFCAP_POLLING_NOCOUNT;
return (error);
}
}

View File

@ -3823,7 +3823,6 @@ setup_ifnet(struct ifnet *ifp)
# if defined(DEVICE_POLLING)
ifp->if_capabilities |= IFCAP_POLLING;
ifp->if_capenable |= IFCAP_POLLING_NOCOUNT;
# endif
if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev));

View File

@ -1216,7 +1216,6 @@ smc_stop(struct smc_softc *sc)
#ifdef DEVICE_POLLING
ether_poll_deregister(sc->smc_ifp);
sc->smc_ifp->if_capenable &= ~IFCAP_POLLING;
sc->smc_ifp->if_capenable &= ~IFCAP_POLLING_NOCOUNT;
#endif
/*
@ -1276,7 +1275,6 @@ smc_init_locked(struct smc_softc *sc)
ether_poll_register(smc_poll, ifp);
SMC_LOCK(sc);
ifp->if_capenable |= IFCAP_POLLING;
ifp->if_capenable |= IFCAP_POLLING_NOCOUNT;
#endif
}

View File

@ -234,7 +234,7 @@ struct if_data {
#define IFCAP_TOE4 0x04000 /* interface can offload TCP */
#define IFCAP_TOE6 0x08000 /* interface can offload TCP6 */
#define IFCAP_VLAN_HWFILTER 0x10000 /* interface hw can filter vlan tag */
#define IFCAP_POLLING_NOCOUNT 0x20000 /* polling ticks cannot be fragmented */
/* available 0x20000 */
#define IFCAP_VLAN_HWTSO 0x40000 /* can do IFCAP_TSO on VLANs */
#define IFCAP_LINKSTATE 0x80000 /* the runtime link state is dynamic */
#define IFCAP_NETMAP 0x100000 /* netmap mode supported/enabled */