.. | .. |
---|
35 | 35 | #define LIO_IFSTATE_RX_TIMESTAMP_ENABLED 0x08 |
---|
36 | 36 | #define LIO_IFSTATE_RESETTING 0x10 |
---|
37 | 37 | |
---|
38 | | -struct liquidio_if_cfg_context { |
---|
39 | | - u32 octeon_id; |
---|
40 | | - wait_queue_head_t wc; |
---|
41 | | - int cond; |
---|
42 | | -}; |
---|
43 | | - |
---|
44 | 38 | struct liquidio_if_cfg_resp { |
---|
45 | 39 | u64 rh; |
---|
46 | 40 | struct liquidio_if_cfg_info cfg_info; |
---|
.. | .. |
---|
48 | 42 | }; |
---|
49 | 43 | |
---|
50 | 44 | #define LIO_IFCFG_WAIT_TIME 3000 /* In milli seconds */ |
---|
| 45 | +#define LIQUIDIO_NDEV_STATS_POLL_TIME_MS 200 |
---|
51 | 46 | |
---|
52 | 47 | /* Structure of a node in list of gather components maintained by |
---|
53 | 48 | * NIC driver for each network device. |
---|
.. | .. |
---|
76 | 71 | u64 status; |
---|
77 | 72 | }; |
---|
78 | 73 | |
---|
| 74 | +struct oct_nic_vf_stats_resp { |
---|
| 75 | + u64 rh; |
---|
| 76 | + u64 spoofmac_cnt; |
---|
| 77 | + u64 status; |
---|
| 78 | +}; |
---|
| 79 | + |
---|
79 | 80 | struct oct_nic_stats_ctrl { |
---|
80 | 81 | struct completion complete; |
---|
81 | 82 | struct net_device *netdev; |
---|
.. | .. |
---|
83 | 84 | |
---|
84 | 85 | struct oct_nic_seapi_resp { |
---|
85 | 86 | u64 rh; |
---|
86 | | - u32 speed; |
---|
| 87 | + union { |
---|
| 88 | + u32 fec_setting; |
---|
| 89 | + u32 speed; |
---|
| 90 | + }; |
---|
87 | 91 | u64 status; |
---|
88 | | -}; |
---|
89 | | - |
---|
90 | | -struct liquidio_nic_seapi_ctl_context { |
---|
91 | | - int octeon_id; |
---|
92 | | - u32 status; |
---|
93 | | - struct completion complete; |
---|
94 | 92 | }; |
---|
95 | 93 | |
---|
96 | 94 | /** LiquidIO per-interface network private data */ |
---|
.. | .. |
---|
178 | 176 | struct cavium_wq txq_status_wq; |
---|
179 | 177 | |
---|
180 | 178 | /* work queue for rxq oom status */ |
---|
181 | | - struct cavium_wq rxq_status_wq; |
---|
| 179 | + struct cavium_wq rxq_status_wq[MAX_POSSIBLE_OCTEON_OUTPUT_QUEUES]; |
---|
182 | 180 | |
---|
183 | 181 | /* work queue for link status */ |
---|
184 | 182 | struct cavium_wq link_status_wq; |
---|
.. | .. |
---|
187 | 185 | struct cavium_wq sync_octeon_time_wq; |
---|
188 | 186 | |
---|
189 | 187 | int netdev_uc_count; |
---|
| 188 | + struct cavium_wk stats_wk; |
---|
190 | 189 | }; |
---|
191 | 190 | |
---|
192 | 191 | #define LIO_SIZE (sizeof(struct lio)) |
---|
.. | .. |
---|
225 | 224 | |
---|
226 | 225 | int octeon_setup_interrupt(struct octeon_device *oct, u32 num_ioqs); |
---|
227 | 226 | |
---|
228 | | -int octnet_get_link_stats(struct net_device *netdev); |
---|
| 227 | +void lio_fetch_stats(struct work_struct *work); |
---|
229 | 228 | |
---|
230 | 229 | int lio_wait_for_clean_oq(struct octeon_device *oct); |
---|
231 | 230 | /** |
---|
.. | .. |
---|
234 | 233 | */ |
---|
235 | 234 | void liquidio_set_ethtool_ops(struct net_device *netdev); |
---|
236 | 235 | |
---|
237 | | -void lio_if_cfg_callback(struct octeon_device *oct, |
---|
238 | | - u32 status __attribute__((unused)), |
---|
239 | | - void *buf); |
---|
240 | | - |
---|
241 | 236 | void lio_delete_glists(struct lio *lio); |
---|
242 | 237 | |
---|
243 | 238 | int lio_setup_glists(struct octeon_device *oct, struct lio *lio, int num_qs); |
---|
244 | 239 | |
---|
245 | 240 | int liquidio_get_speed(struct lio *lio); |
---|
246 | 241 | int liquidio_set_speed(struct lio *lio, int speed); |
---|
| 242 | +int liquidio_get_fec(struct lio *lio); |
---|
| 243 | +int liquidio_set_fec(struct lio *lio, int on_off); |
---|
247 | 244 | |
---|
248 | 245 | /** |
---|
249 | 246 | * \brief Net device change_mtu |
---|
.. | .. |
---|
615 | 612 | { |
---|
616 | 613 | struct list_head *node; |
---|
617 | 614 | |
---|
618 | | - if (root->prev == root && root->next == root) |
---|
| 615 | + if (list_empty_careful(root)) |
---|
619 | 616 | node = NULL; |
---|
620 | 617 | else |
---|
621 | 618 | node = root->next; |
---|