0001
0002
0003
0004 #ifndef _PRESTERA_COUNTER_H_
0005 #define _PRESTERA_COUNTER_H_
0006
0007 #include <linux/types.h>
0008
0009 struct prestera_counter_stats {
0010 u64 packets;
0011 u64 bytes;
0012 };
0013
0014 struct prestera_switch;
0015 struct prestera_counter;
0016 struct prestera_counter_block;
0017
0018 int prestera_counter_init(struct prestera_switch *sw);
0019 void prestera_counter_fini(struct prestera_switch *sw);
0020
0021 int prestera_counter_get(struct prestera_counter *counter, u32 client,
0022 struct prestera_counter_block **block,
0023 u32 *counter_id);
0024 void prestera_counter_put(struct prestera_counter *counter,
0025 struct prestera_counter_block *block, u32 counter_id);
0026 int prestera_counter_stats_get(struct prestera_counter *counter,
0027 struct prestera_counter_block *block,
0028 u32 counter_id, u64 *packets, u64 *bytes);
0029
0030 #endif