can: Added constants containing length of CAN identifiers
Subsystems (4)
PATCH 1/2 can: Added constants containing length of CAN identifiers
The necessary information might be determined out of the CAN_*_MASK, however it is undesirable to misuse masks for such purpose.
--- include/linux/can.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/can.h +3 -0
@@ -38,6 +38,9 @@*/ typedef __u32 canid_t ; +#define CAN_SFF_ID_BITS 11 +#define CAN_EFF_ID_BITS 29 +/* * Controller Area Network Error Frame Mask structure *
Signature · 1 line
1.7.9.5
PATCH 2/2 net/sched: CAN Filter/Classifier
The CAN classifier may be used with any available qdisc on Controller Area Network (CAN) frames passed through AF_CAN networking subsystem. The classifier classifies CAN frames according to their identifiers. It can be used on CAN frames with both SFF or EFF identifiers.
The filtering rules for EFF frames are stored in an array, which is traversed during classification. A bitmap is used to store SFF rules -- one bit for each ID.
More info about the project:
http://rtime.felk.cvut.cz/can/socketcan-qdisc-final.pdf
--- net/sched/Kconfig | 10 + net/sched/Makefile | 1 + net/sched/cls_can.c | 571 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 582 insertions(+) create mode 100644 net/sched/cls_can.c
net/sched/Kconfig +10 -0
@@ -323,6 +323,16 @@ config NET_CLS_BASIC To compile this code as a module, choose M here: the module will be called cls_basic. +config NET_CLS_CAN + tristate "Controller Area Network classifier (CAN)" + select NET_CLS + ---help--- + Say Y here if you want to be able to classify CAN frames according + to their CAN identifiers (can_id). + + To compile this code as a module, choose M here: the + module will be called cls_can. + config NET_CLS_TCINDEX tristate "Traffic-Control Index (TCINDEX)" select NET_CLS
net/sched/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_NET_CLS_RSVP) += cls_rsvp.o obj-$(CONFIG_NET_CLS_TCINDEX) += cls_tcindex.o obj-$(CONFIG_NET_CLS_RSVP6) += cls_rsvp6.o obj-$(CONFIG_NET_CLS_BASIC) += cls_basic.o +obj-$(CONFIG_NET_CLS_CAN) += cls_can.o obj-$(CONFIG_NET_CLS_FLOW) += cls_flow.o obj-$(CONFIG_NET_CLS_CGROUP) += cls_cgroup.o obj-$(CONFIG_NET_EMATCH) += ematch.o
net/sched/cls_can.c new file +571 -0
571 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Re: [PATCH 2/2] net/sched: CAN Filter/Classifier
Hello Rostislav,
the merge window is closed and net-next is now open.
Please re-spin you patches based on the can-next tree
https://gitorious.org/linux-can/linux-can-next
so that Marc can include the code once it is reviewed.
As the Linux Advanced Routing & Traffic Control guys changed their mailing list and other setups e.g. to members only ML ( see http://lartc.org ) you should probably send your patch series to [email protected] and put [email protected] in CC.
Once we got feedback from the LARTC guys (or if they do not react within a week or so), it's time to post the entire series on [email protected] (with linux-can and lartc in CC).
Best regards,
Oliver
Quoted 20 lines · Rostislav Lisovy
The CAN classifier may be used with any available qdisc on Controller Area Network (CAN) frames passed through
AF_CANnetworking subsystem. The classifier classifies CAN frames according to their identifiers. It can be used on CAN frames with both SFF or EFF identifiers.The filtering rules for EFF frames are stored in an array, which is traversed during classification. A bitmap is used to store SFF rules -- one bit for each ID.
More info about the project:
http://rtime.felk.cvut.cz/can/socketcan-qdisc-final.pdfSigned-off-by Rostislav Lisovy<[email protected]>--- net/sched/Kconfig | 10 + net/sched/Makefile | 1 + net/sched/cls_can.c | 571 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 582 insertions(+)create mode 100644
net/sched/cls_can.c
Marc Kleine-Budde
maintainerRe: [PATCH 2/2] net/sched: CAN Filter/Classifier
Quoted 9 lines · Oliver Hartkopp
Hello Rostislav,
the merge window is closed and net-next is now open.
Please re-spin you patches based on the can-next tree
https://gitorious.org/linux-can/linux-can-next
so that Marc can include the code once it is reviewed.
I'm not sure, that I'm the correct gateway for net/sched patch.
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Marc Kleine-Budde
maintainerRe: [PATCH 2/2] net/sched: CAN Filter/Classifier
Quoted 9 lines · Marc Kleine-Budde
Quoted 7 lines · Oliver Hartkopp
Hello Rostislav,
the merge window is closed and net-next is now open.
Please re-spin you patches based on the can-next tree
I'm not sure, that I'm the correct gateway for net/sched patch.
...If David takes the patch, it shouldn't be based on linux-can-next
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Re: [PATCH 2/2] net/sched: CAN Filter/Classifier
Quoted 4 lines · Marc Kleine-Budde
Quoted 3 lines · Marc Kleine-Budde
Quoted 2 lines · Oliver Hartkopp
Hello Rostislav,
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
the merge window is closed and net-next is now open.
Please re-spin you patches based on the can-next tree
I'm not sure, that I'm the correct gateway for net/sched patch.
...If David takes the patch, it shouldn't be based on linux-can-next
Ok, then creating a patch based on net-next and posting them on netdev would be the better approach - thanks for the clarification.
Do you think linux-can and lartc ML for CC is still a good idea?
Regards,
Oliver
Marc Kleine-Budde
maintainerRe: [PATCH 2/2] net/sched: CAN Filter/Classifier
Quoted 12 lines · Oliver Hartkopp
Quoted 11 lines · Marc Kleine-Budde
Quoted 9 lines · Marc Kleine-Budde
Quoted 7 lines · Oliver Hartkopp
Hello Rostislav,
the merge window is closed and net-next is now open.
Please re-spin you patches based on the can-next tree
I'm not sure, that I'm the correct gateway for net/sched patch.
Quoted 7 lines
Quoted 2 lines
...If David takes the patch, it shouldn't be based on linux-can-next
Ok, then creating a patch based on net-next and posting them on netdev would be the better approach - thanks for the clarification.
Do you think linux-can and lartc ML for CC is still a good idea?
Yes, sure.
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
David Miller
maintainerIt is not appropriate to submit new features at this time, as I described in detail in:
http://marc.info/?l=netfilter-devel&m=133763475402372&w=2
I used a subject line with BIG CAPITAL LETTERS in that posting so there is really no reason you should have overlooked it.
Quoted 7 lines · David Miller
It is not appropriate to submit new features at this time, as I described in detail in:
http://marc.info/?l=netfilter-devel&m=133763475402372&w=2
I used a subject line with BIG CAPITAL LETTERS in that posting so there is really no reason you should have overlooked it.
I am very sorry for not going through the mailing list history thoroughly enough and thus overlooking your announcement. This was however meant more like a [RFC]. If anybody has any comments, please send them to me.
I will resend the patches as soon as the net-next is open.
Best regards,
Rostislav Lisovy