forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/drivers/net/ethernet/chelsio/cxgb4/sched.h
....@@ -52,10 +52,12 @@
5252
5353 enum sched_fw_ops {
5454 SCHED_FW_OP_ADD,
55
+ SCHED_FW_OP_DEL,
5556 };
5657
5758 enum sched_bind_type {
5859 SCHED_QUEUE,
60
+ SCHED_FLOWC,
5961 };
6062
6163 struct sched_queue_entry {
....@@ -64,19 +66,23 @@
6466 struct ch_sched_queue param;
6567 };
6668
69
+struct sched_flowc_entry {
70
+ struct list_head list;
71
+ struct ch_sched_flowc param;
72
+};
73
+
6774 struct sched_class {
6875 u8 state;
6976 u8 idx;
7077 struct ch_sched_params info;
71
- struct list_head queue_list;
72
- spinlock_t lock; /* Per class lock */
78
+ enum sched_bind_type bind_type;
79
+ struct list_head entry_list;
7380 atomic_t refcnt;
7481 };
7582
7683 struct sched_table { /* per port scheduling table */
7784 u8 sched_size;
78
- rwlock_t rw_lock; /* Table lock */
79
- struct sched_class tab[0];
85
+ struct sched_class tab[];
8086 };
8187
8288 static inline bool can_sched(struct net_device *dev)
....@@ -97,6 +103,8 @@
97103 return true;
98104 }
99105
106
+struct sched_class *cxgb4_sched_queue_lookup(struct net_device *dev,
107
+ struct ch_sched_queue *p);
100108 int cxgb4_sched_class_bind(struct net_device *dev, void *arg,
101109 enum sched_bind_type type);
102110 int cxgb4_sched_class_unbind(struct net_device *dev, void *arg,
....@@ -104,6 +112,7 @@
104112
105113 struct sched_class *cxgb4_sched_class_alloc(struct net_device *dev,
106114 struct ch_sched_params *p);
115
+void cxgb4_sched_class_free(struct net_device *dev, u8 classid);
107116
108117 struct sched_table *t4_init_sched(unsigned int size);
109118 void t4_cleanup_sched(struct adapter *adap);