Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Is hw_filters_container_ misnamed? #1

Open
thirtytwobits opened this issue Sep 19, 2018 · 3 comments
Open

Is hw_filters_container_ misnamed? #1

thirtytwobits opened this issue Sep 19, 2018 · 3 comments

Comments

@thirtytwobits
Copy link

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

Okay. Feel free to rename it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants