# how do you enable device polling in 8.0



## wonslung (Nov 18, 2009)

how do you enable device polling in freebsd 8.0?

i used to always use sysctl kern.polling.enable

i remember reading awhile back that they were going to change it...is it an ifconfig setting now or is it a different sysctl?


edit:

N/m it is ifconfig, just found it

```
ifconfig em1 polling
```

this does beg the question though, do you just add "polling" to any rc.conf settings?

would i change

```
ifconfig_em0="inet 192.168.1.1  netmask 255.255.255.0"
ifconfig_em1="DHCP"
```
to

```
ifconfig_em0="inet 192.168.1.1  netmask 255.255.255.0 polling"
ifconfig_em1="DHCP polling"
```


----------



## DutchDaemon (Nov 18, 2009)

I think so. At least 
	
	



```
ifconfig_xxx="DHCP polling"
```
 gave no error in a netif restart. Note: you need DEVICE_POLLING in the kernel.


----------



## wonslung (Nov 18, 2009)

cool, yah, i have it in my kernel.  I'm loving FreeBSD 8 so far.  This box used to run pfsense but i figured as much as i've learned in the past 6 months or so i could get away with setting it up the hard way.

Thanks again, as always, you're right =)


----------



## DutchDaemon (Nov 18, 2009)

Cool. The way to check:


```
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=1db<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,[B]POLLING[/B],VLAN_HWCSUM,TSO4>
```

Also, check [cmd=]sysctl kern.hz[/cmd]. A value of at least 1000 is advisable. On most recent hardware this will already be the default, I believe.


----------



## wonslung (Nov 18, 2009)

yah, i set that in my kernel config, i've been using polling for awhile on 7.x but with that version you had to set a sysctl for it to work.

the new way is better i think.


----------

