| Server IP : 54.94.228.101 / Your IP : 172.28.20.13 Web Server : Apache System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/modules/6.8.0-1042-aws/build/include/net/ |
Upload File : |
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2016 Qualcomm Atheros, Inc
*
* Based on net/sched/sch_fq_codel.c
*/
#ifndef __NET_SCHED_FQ_H
#define __NET_SCHED_FQ_H
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/types.h>
struct fq_tin;
/**
* struct fq_flow - per traffic flow queue
*
* @tin: owner of this flow. Used to manage collisions, i.e. when a packet
* hashes to an index which points to a flow that is already owned by a
* different tin the packet is destined to. In such case the implementer
* must provide a fallback flow
* @flowchain: can be linked to fq_tin's new_flows or old_flows. Used for DRR++
* (deficit round robin) based round robin queuing similar to the one
* found in net/sched/sch_fq_codel.c
* @queue: sk_buff queue to hold packets
* @backlog: number of bytes pending in the queue. The number of packets can be
* found in @queue.qlen
* @deficit: used for DRR++
*/
struct fq_flow {
struct fq_tin *tin;
struct list_head flowchain;
struct sk_buff_head queue;
u32 backlog;
int deficit;
};
/**
* struct fq_tin - a logical container of fq_flows
*
* Used to group fq_flows into a logical aggregate. DRR++ scheme is used to
* pull interleaved packets out of the associated flows.
*
* @new_flows: linked list of fq_flow
* @old_flows: linked list of fq_flow
*/
struct fq_tin {
struct list_head new_flows;
struct list_head old_flows;
struct list_head tin_list;
struct fq_flow default_flow;
u32 backlog_bytes;
u32 backlog_packets;
u32 overlimit;
u32 collisions;
u32 flows;
u32 tx_bytes;
u32 tx_packets;
};
/**
* struct fq - main container for fair queuing purposes
*
* @limit: max number of packets that can be queued across all flows
* @backlog: number of packets queued across all flows
*/
struct fq {
struct fq_flow *flows;
unsigned long *flows_bitmap;
struct list_head tin_backlog;
spinlock_t lock;
u32 flows_cnt;
u32 limit;
u32 memory_limit;
u32 memory_usage;
u32 quantum;
u32 backlog;
u32 overlimit;
u32 overmemory;
u32 collisions;
};
typedef struct sk_buff *fq_tin_dequeue_t(struct fq *,
struct fq_tin *,
struct fq_flow *flow);
typedef void fq_skb_free_t(struct fq *,
struct fq_tin *,
struct fq_flow *,
struct sk_buff *);
/* Return %true to filter (drop) the frame. */
typedef bool fq_skb_filter_t(struct fq *,
struct fq_tin *,
struct fq_flow *,
struct sk_buff *,
void *);
#endif