Check if interface supports Device Polling

Jeremy Chadwick koitsu at FreeBSD.org
Wed Oct 22 08:35:59 PDT 2008


On Wed, Oct 22, 2008 at 01:30:57PM -0200, Eduardo Meyer wrote:
> On Wed, Oct 22, 2008 at 1:24 PM, Jeremy Chadwick <koitsu at freebsd.org> wrote:
> > On Wed, Oct 22, 2008 at 08:12:28AM -0700, Jeremy Chadwick wrote:
> >> > # ifconfig -v rl0 caps
> >> > Capabilities: 48
> >>
> >> The above patch is completely unnecessary.  The -m flag in ifconfig
> >> will do what you want.
> >>
> >> However, the existing ifconfig code does not print POLLING as a
> >> capability, which is where the bug truly lies.
> >>
> >> I'll provide a patch that extends the capability list properly, and will
> >> allow you to determine a full capability list.
> >
> > I'm both correct and incorrect.
> >
> > Correct: ifconfig -m will show you want.  No need for the patch.
> >
> > Incorrect: I missed the "POLLING" part of #define IFCAPBITS in
> > ifconfig.c -- it is in fact listed there.
> >
> > Maybe the polling bit is only made available if you've built a kernel
> > with "option DEVICE_POLLING"?  For example, I can do "ifconfig em1
> > polling", which returns no error, but "ifconfig -m em1" does not show
> > POLLING.  (My kernel does NOT have DEVICE_POLLING defined.)
> >
> > In your above output, capabilities is 0x48, which means POLLING is
> > available, and VLAN_MTU is available.  You did not provide us output of
> > "ifconfig -m rl0", but I'd be inclined to believe "POLLING" is shown
> > there... I hope.  :-)
> >
> > Also, it appears ifconfig does not print TOE4 or TOE6 capability bits;
> > that's probably a missing feature.
> >
> > --
> > | Jeremy Chadwick                                jdc at parodius.com |
> > | Parodius Networking                       http://www.parodius.com/ |
> > | UNIX Systems Administrator                  Mountain View, CA, USA |
> > | Making life hard for others since 1977.              PGP: 4BD6C0CB |
> >
> >
> 
> You are right. My mistake, its there, in the "capabilities" line when
> -m is issued.
> 
> Thank you Jeremy.

You're welcome.  :-)

Also, FWIW, PR 128295 has been filed to address the missing TOE4/TOE6
bits.

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |



More information about the freebsd-stable mailing list