• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/qosify/qosify-bpf.h

  1 // SPDX-License-Identifier: GPL-2.0+
  2 /*
  3  * Copyright (C) 2021 Felix Fietkau <nbd@nbd.name>
  4  */
  5 #ifndef __BPF_QOSIFY_H
  6 #define __BPF_QOSIFY_H
  7 
  8 #define QOSIFY_MAX_CLASS_ENTRIES        16
  9 #define QOSIFY_DEFAULT_CLASS_ENTRIES    2
 10 
 11 #ifndef QOSIFY_FLOW_BUCKET_SHIFT
 12 #define QOSIFY_FLOW_BUCKET_SHIFT        13
 13 #endif
 14 
 15 #define QOSIFY_FLOW_BUCKETS             (1 << QOSIFY_FLOW_BUCKET_SHIFT)
 16 
 17 /* rodata per-instance flags */
 18 #define QOSIFY_INGRESS                  (1 << 0)
 19 #define QOSIFY_IP_ONLY                  (1 << 1)
 20 
 21 #define QOSIFY_DSCP_VALUE_MASK          ((1 << 6) - 1)
 22 #define QOSIFY_DSCP_FALLBACK_FLAG       (1 << 6)
 23 #define QOSIFY_DSCP_CLASS_FLAG          (1 << 7)
 24 
 25 #define QOSIFY_CLASS_FLAG_PRESENT       (1 << 0)
 26 
 27 struct qosify_dscp_val {
 28         uint8_t ingress;
 29         uint8_t egress;
 30 };
 31 
 32 /* global config data */
 33 
 34 struct qosify_flow_config {
 35         uint8_t dscp_prio;
 36         uint8_t dscp_bulk;
 37 
 38         uint8_t bulk_trigger_timeout;
 39         uint16_t bulk_trigger_pps;
 40 
 41         uint16_t prio_max_avg_pkt_len;
 42 };
 43 
 44 struct qosify_config {
 45         uint8_t dscp_icmp;
 46 };
 47 
 48 struct qosify_ip_map_val {
 49         uint8_t dscp; /* must be first */
 50         uint8_t seen;
 51 };
 52 
 53 struct qosify_class {
 54         struct qosify_flow_config config;
 55 
 56         struct qosify_dscp_val val;
 57 
 58         uint8_t flags;
 59 
 60         uint64_t packets;
 61 };
 62 
 63 #endif
 64 

This page was automatically generated by LXR 0.3.1.  •  OpenWrt