Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0
0002  *
0003  * Copyright (c) 2019 Facebook
0004  *
0005  * This program is free software; you can redistribute it and/or
0006  * modify it under the terms of version 2 of the GNU General Public
0007  * License as published by the Free Software Foundation.
0008  *
0009  * Include file for Host Bandwidth Management (HBM) programs
0010  */
0011 struct hbm_vqueue {
0012     struct bpf_spin_lock lock;
0013     /* 4 byte hole */
0014     unsigned long long lasttime;    /* In ns */
0015     int credit;         /* In bytes */
0016     unsigned int rate;      /* In bytes per NS << 20 */
0017 };
0018 
0019 struct hbm_queue_stats {
0020     unsigned long rate;     /* in Mbps*/
0021     unsigned long stats:1,      /* get HBM stats (marked, dropped,..) */
0022         loopback:1,     /* also limit flows using loopback */
0023         no_cn:1;        /* do not use cn flags */
0024     unsigned long long pkts_marked;
0025     unsigned long long bytes_marked;
0026     unsigned long long pkts_dropped;
0027     unsigned long long bytes_dropped;
0028     unsigned long long pkts_total;
0029     unsigned long long bytes_total;
0030     unsigned long long firstPacketTime;
0031     unsigned long long lastPacketTime;
0032     unsigned long long pkts_ecn_ce;
0033     unsigned long long returnValCount[4];
0034     unsigned long long sum_cwnd;
0035     unsigned long long sum_rtt;
0036     unsigned long long sum_cwnd_cnt;
0037     long long sum_credit;
0038 };