cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

prestera_counter.h (926B)


      1/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
      2/* Copyright (c) 2021 Marvell International Ltd. All rights reserved. */
      3
      4#ifndef _PRESTERA_COUNTER_H_
      5#define _PRESTERA_COUNTER_H_
      6
      7#include <linux/types.h>
      8
      9struct prestera_counter_stats {
     10	u64 packets;
     11	u64 bytes;
     12};
     13
     14struct prestera_switch;
     15struct prestera_counter;
     16struct prestera_counter_block;
     17
     18int prestera_counter_init(struct prestera_switch *sw);
     19void prestera_counter_fini(struct prestera_switch *sw);
     20
     21int prestera_counter_get(struct prestera_counter *counter, u32 client,
     22			 struct prestera_counter_block **block,
     23			 u32 *counter_id);
     24void prestera_counter_put(struct prestera_counter *counter,
     25			  struct prestera_counter_block *block, u32 counter_id);
     26int prestera_counter_stats_get(struct prestera_counter *counter,
     27			       struct prestera_counter_block *block,
     28			       u32 counter_id, u64 *packets, u64 *bytes);
     29
     30#endif /* _PRESTERA_COUNTER_H_ */