Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does sja1105-tool send the configuration directly to the sja1105 chip? #58

Open
liu-jeff opened this issue Nov 28, 2019 · 10 comments
Open

Comments

@liu-jeff
Copy link

liu-jeff commented Nov 28, 2019

Hello, I want to know that sja1105-tool sends configuration through Ioctl function. Is there a receiving function in kernel ?

@vladimiroltean
Copy link
Contributor

sja1105-tool uses the generic SPI driver (spidev), which is both its best feature and its worst weakness.
There also exists a native kernel driver which makes the switch look much more similar to Felix from LS1028A (net devices for switch ports, PHY management, VLAN and FDB manipulation with standard iproute2 tools, etc etc).
Why ask?

@liu-jeff
Copy link
Author

Hello, I want to know that sja1105-tool sends configuration through Ioctl function. Is there a receiving function in kernel mode?

sja1105-tool uses the generic SPI driver (spidev), which is both its best feature and its worst weakness.
There also exists a native kernel driver which makes the switch look much more similar to Felix from LS1028A (net devices for switch ports, PHY management, VLAN and FDB manipulation with standard iproute2 tools, etc etc).
Why ask?
I was reading the code of openil, and only found the interface of Netlink in the kernel, but not the interface of ioctl.

@vladimiroltean
Copy link
Contributor

This is the kernel driver used by sja1105-tool:
https://github.com/openil/linux/blob/master/drivers/spi/spidev.c

@liu-jeff
Copy link
Author

This is the kernel driver used by sja1105-tool:
https://github.com/openil/linux/blob/master/drivers/spi/spidev.c

Thank you very much, so is the qbv function in LS1021ATSN implemented in the kernel or sja1105?

@vladimiroltean
Copy link
Contributor

It is implemented in hardware.
The configuration is done from sja1105-tool.
In the native kernel driver I was mentioning, it is done through the standard tc-taprio offload command (still not tsntool).

@liu-jeff
Copy link
Author

In the native kernel driver I was mentioning, it is done through the standard tc-taprio offload command (still not tsntool).
So for LS1021ATSN, if it forwards the data packet, will it not go to the kernel? Is this packet not extracted in the kernel?

@liu-jeff
Copy link
Author

It is implemented in hardware.
The configuration is done from sja1105-tool.
In the native kernel driver I was mentioning, it is done through the standard tc-taprio offload command (still not tsntool).

In fact, I just want to extract the data packets forwarded by the switch in the kernel and perform some operations on them.

@liu-jeff
Copy link
Author

It is implemented in hardware.
The configuration is done from sja1105-tool.
In the native kernel driver I was mentioning, it is done through the standard tc-taprio offload command (still not tsntool).
the standard tc-taprio offload command can achieve qbv?

@vladimiroltean
Copy link
Contributor

Yes, see the documentation for it.

@liu-jeff
Copy link
Author

Yes, see the documentation for it.

But can your native kernel code be ported to openil?

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

No branches or pull requests

2 participants