1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2021 Felix Fietkau <nbd@nbd.name>
8 #ifndef QOSIFY_FLOW_BUCKET_SHIFT
9 #define QOSIFY_FLOW_BUCKET_SHIFT 13
12 #define QOSIFY_FLOW_BUCKETS (1 << QOSIFY_FLOW_BUCKET_SHIFT)
14 /* rodata per-instance flags */
15 #define QOSIFY_INGRESS (1 << 0)
16 #define QOSIFY_IP_ONLY (1 << 1)
18 #define QOSIFY_DSCP_FALLBACK_FLAG (1 << 6)
20 #define QOSIFY_VAL_FLAG_PRIO_CHECK (1 << 0)
21 #define QOSIFY_VAL_FLAG_BULK_CHECK (1 << 1)
23 struct qosify_dscp_val
{
27 } __attribute__((packed
));
29 /* global config data */
31 struct qosify_flow_config
{
32 struct qosify_dscp_val dscp_prio
;
33 struct qosify_dscp_val dscp_bulk
;
35 uint8_t bulk_trigger_timeout
;
36 uint16_t bulk_trigger_pps
;
38 uint16_t prio_max_avg_pkt_len
;
41 struct qosify_config
{
42 struct qosify_dscp_val dscp_icmp
;
44 struct qosify_flow_config flow
;
47 struct qosify_ip_map_val
{
48 struct qosify_dscp_val dscp
; /* must be first */