brakmo | 187d073 | 2019-03-01 12:38:48 -0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 |
| 2 | * |
| 3 | * Copyright (c) 2019 Facebook |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of version 2 of the GNU General Public |
| 7 | * License as published by the Free Software Foundation. |
| 8 | * |
| 9 | * Include file for Host Bandwidth Management (HBM) programs |
| 10 | */ |
| 11 | struct hbm_vqueue { |
| 12 | struct bpf_spin_lock lock; |
| 13 | /* 4 byte hole */ |
| 14 | unsigned long long lasttime; /* In ns */ |
| 15 | int credit; /* In bytes */ |
| 16 | unsigned int rate; /* In bytes per NS << 20 */ |
| 17 | }; |
| 18 | |
| 19 | struct hbm_queue_stats { |
| 20 | unsigned long rate; /* in Mbps*/ |
| 21 | unsigned long stats:1, /* get HBM stats (marked, dropped,..) */ |
brakmo | ffd8155 | 2019-05-28 16:59:39 -0700 | [diff] [blame^] | 22 | loopback:1, /* also limit flows using loopback */ |
| 23 | no_cn:1; /* do not use cn flags */ |
brakmo | 187d073 | 2019-03-01 12:38:48 -0800 | [diff] [blame] | 24 | unsigned long long pkts_marked; |
| 25 | unsigned long long bytes_marked; |
| 26 | unsigned long long pkts_dropped; |
| 27 | unsigned long long bytes_dropped; |
| 28 | unsigned long long pkts_total; |
| 29 | unsigned long long bytes_total; |
| 30 | unsigned long long firstPacketTime; |
| 31 | unsigned long long lastPacketTime; |
| 32 | }; |