diff options
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/sched.h')
| -rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/sched.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sched.h b/drivers/net/ethernet/chelsio/cxgb4/sched.h index 168fb4ce3759..4d3b5a757536 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sched.h +++ b/drivers/net/ethernet/chelsio/cxgb4/sched.h @@ -52,10 +52,12 @@ enum { enum sched_fw_ops { SCHED_FW_OP_ADD, + SCHED_FW_OP_DEL, }; enum sched_bind_type { SCHED_QUEUE, + SCHED_FLOWC, }; struct sched_queue_entry { @@ -64,17 +66,23 @@ struct sched_queue_entry { struct ch_sched_queue param; }; -struct sched_class { +struct sched_flowc_entry { + struct list_head list; + struct ch_sched_flowc param; +}; + +struct ch_sched_class { u8 state; u8 idx; struct ch_sched_params info; - struct list_head queue_list; + enum sched_bind_type bind_type; + struct list_head entry_list; atomic_t refcnt; }; struct sched_table { /* per port scheduling table */ u8 sched_size; - struct sched_class tab[0]; + struct ch_sched_class tab[] __counted_by(sched_size); }; static inline bool can_sched(struct net_device *dev) @@ -95,13 +103,16 @@ static inline bool valid_class_id(struct net_device *dev, u8 class_id) return true; } +struct ch_sched_class *cxgb4_sched_queue_lookup(struct net_device *dev, + struct ch_sched_queue *p); int cxgb4_sched_class_bind(struct net_device *dev, void *arg, enum sched_bind_type type); int cxgb4_sched_class_unbind(struct net_device *dev, void *arg, enum sched_bind_type type); -struct sched_class *cxgb4_sched_class_alloc(struct net_device *dev, - struct ch_sched_params *p); +struct ch_sched_class *cxgb4_sched_class_alloc(struct net_device *dev, + struct ch_sched_params *p); +void cxgb4_sched_class_free(struct net_device *dev, u8 classid); struct sched_table *t4_init_sched(unsigned int size); void t4_cleanup_sched(struct adapter *adap); |
