From 17eea3202a2c0f3d5549fe1459149e79be35c5ca Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Wed, 6 Dec 2017 23:03:34 +0000 Subject: [PATCH] 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. --- share/man/man9/ifnet.9 | 7 ++----- sys/dev/firewire/if_fwe.c | 2 -- sys/dev/firewire/if_fwip.c | 4 +--- sys/dev/lmc/if_lmc.c | 1 - sys/dev/smc/if_smc.c | 2 -- sys/net/if.h | 2 +- 6 files changed, 4 insertions(+), 14 deletions(-) diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 20e34d5d7bbf..9592c2a58213 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -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 diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index 3541d199c0b2..cf9996475415 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -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); } } diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index bc72709a3915..ed2c0cfffab6 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -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); } } diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c index 11388d695436..03b2918606e3 100644 --- a/sys/dev/lmc/if_lmc.c +++ b/sys/dev/lmc/if_lmc.c @@ -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)); diff --git a/sys/dev/smc/if_smc.c b/sys/dev/smc/if_smc.c index ae59cfcda642..39969b9f5baa 100644 --- a/sys/dev/smc/if_smc.c +++ b/sys/dev/smc/if_smc.c @@ -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 } diff --git a/sys/net/if.h b/sys/net/if.h index 3a6725437e5c..564dfd375b16 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -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 */