Page MenuHomeFreeBSD

net.link.generic.ifdata.<ifindex>.linkspecific: rework handler
ClosedPublic

Authored by kaktus on Jun 18 2020, 9:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 9:02 PM
Unknown Object (File)
Sat, Apr 13, 5:08 AM
Unknown Object (File)
Fri, Apr 12, 7:21 PM
Unknown Object (File)
Fri, Apr 12, 2:10 PM
Unknown Object (File)
Wed, Apr 10, 5:45 PM
Unknown Object (File)
Mar 7 2024, 11:48 PM
Unknown Object (File)
Jan 16 2024, 1:03 AM
Unknown Object (File)
Jan 10 2024, 7:09 PM
Subscribers

Details

Summary

This OID was added in rS17352 but the write path of IFDATA_LINKSPECIFIC seems unused as there are no in-base writers, and as far as I can tell we had issues with this code before, see PR 219472.
Drop the write path to make the handler read-only as described in comments and man-pages. It can be marked as MPSAFE now.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

if_mibdata seems to be not used at all. I can only find the reference in dev/ffec, and even there it is under #ifdef 0.
Might be it should be removed ?

This revision is now accepted and ready to land.Jun 20 2020, 7:32 PM

I was thinking about that too as there is no in-tree driver that support that call anyway, but bsnmpd have an option to query it if the driver supports it, so it'd have to be removed too. Anyway, it's probably task for another patch.

If I can remember the theory I had way back when, the purpose of allowing writes to this data was simply to allow a client or administrator to clear the counters. Given the lack of use I think this is a reasonable simplification.

In D25348#559846, @kib wrote:

if_mibdata seems to be not used at all. I can only find the reference in dev/ffec, and even there it is under #ifdef 0.
Might be it should be removed ?

It's rather unfortunate that each driver has implemented these counters as its own device-specific MIB. The purpose for having the generic interface MIB mechanism was for all Ethernet drivers, for example, to export a single standard Ethernet MIB, as defined in the standard, and then SNMP agents (or netstat or other management tools) could implement fully generic code to examine those variables.