OpenCyphal-Garage / libuavcan_linux

MOVED https://github.com/UAVCAN/platform_specific_components/tree/legacy-v0
https://github.com/UAVCAN/platform_specific_components/tree/legacy-v0
MIT License
7 stars 5 forks source link

Is hw_filters_container_ misnamed? #1

Open thirtytwobits opened 5 years ago

thirtytwobits commented 5 years ago

I'm getting up-to-speed on the linux driver and came across this code:

https://github.com/UAVCAN/libuavcan_linux/blob/4ee477b54007da03ebb585c0437c8a1ca1ce5119/include/uavcan_linux/socketcan.hpp#L451

Is this misnamed? Should this not be called "software filters"?

pavel-kirienko commented 5 years ago

Maybe. The library expects the filters to be implemented in hardware. The SocketCAN driver doesn't bother itself with these pesky ioctls (why though? can't recall, should have documented that better) and emulates them in software. So both software and hardware can be correct depending on how you squint at the question. If you believe that "software" is correct, let's change that.

thirtytwobits commented 5 years ago

socketcan doesn't implement hardware filtering leaving this as an exercise for "deeply embedded" system designers. I do think calling it software will reduce the confusion of people like me who see this method, look at the implementation, and are confused by the lack of system calls.

pavel-kirienko commented 5 years ago

Okay. Feel free to rename it.