diff options
author | Oliver Hartkopp <socketcan@hartkopp.net> | 2009-12-25 01:47:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-04 00:31:03 -0500 |
commit | 20dd3850bcf860561496827b711fa10fecf6e787 (patch) | |
tree | 95ecd549717f2d654b870ffb44d342c04ab048b6 /net/can/af_can.h | |
parent | 75ed0a897208c3273fd8dc0f71e1417dba5a049b (diff) |
can: Speed up CAN frame receiption by using ml_priv
this patch removes the hlist that contains the CAN receiver filter lists.
It uses the 'midlayer private' pointer ml_priv and links the filters directly
to the CAN netdevice, which allows to omit the walk through the complete CAN
devices hlist for each received CAN frame.
This patch is tested and does not remove any locking.
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/can/af_can.h')
-rw-r--r-- | net/can/af_can.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/can/af_can.h b/net/can/af_can.h index 18f91e37cc30..34253b84e30f 100644 --- a/net/can/af_can.h +++ b/net/can/af_can.h | |||
@@ -63,10 +63,8 @@ struct receiver { | |||
63 | 63 | ||
64 | enum { RX_ERR, RX_ALL, RX_FIL, RX_INV, RX_EFF, RX_MAX }; | 64 | enum { RX_ERR, RX_ALL, RX_FIL, RX_INV, RX_EFF, RX_MAX }; |
65 | 65 | ||
66 | /* per device receive filters linked at dev->ml_priv */ | ||
66 | struct dev_rcv_lists { | 67 | struct dev_rcv_lists { |
67 | struct hlist_node list; | ||
68 | struct rcu_head rcu; | ||
69 | struct net_device *dev; | ||
70 | struct hlist_head rx[RX_MAX]; | 68 | struct hlist_head rx[RX_MAX]; |
71 | struct hlist_head rx_sff[0x800]; | 69 | struct hlist_head rx_sff[0x800]; |
72 | int remove_on_zero_entries; | 70 | int remove_on_zero_entries; |