fm10k.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. /* Intel(R) Ethernet Switch Host Interface Driver
  2. * Copyright(c) 2013 - 2017 Intel Corporation.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms and conditions of the GNU General Public License,
  6. * version 2, as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * The full GNU General Public License is included in this distribution in
  14. * the file called "COPYING".
  15. *
  16. * Contact Information:
  17. * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  18. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  19. */
  20. #ifndef _FM10K_H_
  21. #define _FM10K_H_
  22. #include <linux/types.h>
  23. #include <linux/etherdevice.h>
  24. #include <linux/cpumask.h>
  25. #include <linux/rtnetlink.h>
  26. #include <linux/if_vlan.h>
  27. #include <linux/pci.h>
  28. #include "fm10k_pf.h"
  29. #include "fm10k_vf.h"
  30. #define FM10K_MAX_JUMBO_FRAME_SIZE 15342 /* Maximum supported size 15K */
  31. #define MAX_QUEUES FM10K_MAX_QUEUES_PF
  32. #define FM10K_MIN_RXD 128
  33. #define FM10K_MAX_RXD 4096
  34. #define FM10K_DEFAULT_RXD 256
  35. #define FM10K_MIN_TXD 128
  36. #define FM10K_MAX_TXD 4096
  37. #define FM10K_DEFAULT_TXD 256
  38. #define FM10K_DEFAULT_TX_WORK 256
  39. #define FM10K_RXBUFFER_256 256
  40. #define FM10K_RX_HDR_LEN FM10K_RXBUFFER_256
  41. #define FM10K_RXBUFFER_2048 2048
  42. #define FM10K_RX_BUFSZ FM10K_RXBUFFER_2048
  43. /* How many Rx Buffers do we bundle into one write to the hardware ? */
  44. #define FM10K_RX_BUFFER_WRITE 16 /* Must be power of 2 */
  45. #define FM10K_MAX_STATIONS 63
  46. struct fm10k_l2_accel {
  47. int size;
  48. u16 count;
  49. u16 dglort;
  50. struct rcu_head rcu;
  51. struct net_device *macvlan[0];
  52. };
  53. enum fm10k_ring_state_t {
  54. __FM10K_TX_DETECT_HANG,
  55. __FM10K_HANG_CHECK_ARMED,
  56. __FM10K_TX_XPS_INIT_DONE,
  57. /* This must be last and is used to calculate BITMAP size */
  58. __FM10K_TX_STATE_SIZE__,
  59. };
  60. #define check_for_tx_hang(ring) \
  61. test_bit(__FM10K_TX_DETECT_HANG, (ring)->state)
  62. #define set_check_for_tx_hang(ring) \
  63. set_bit(__FM10K_TX_DETECT_HANG, (ring)->state)
  64. #define clear_check_for_tx_hang(ring) \
  65. clear_bit(__FM10K_TX_DETECT_HANG, (ring)->state)
  66. struct fm10k_tx_buffer {
  67. struct fm10k_tx_desc *next_to_watch;
  68. struct sk_buff *skb;
  69. unsigned int bytecount;
  70. u16 gso_segs;
  71. u16 tx_flags;
  72. DEFINE_DMA_UNMAP_ADDR(dma);
  73. DEFINE_DMA_UNMAP_LEN(len);
  74. };
  75. struct fm10k_rx_buffer {
  76. dma_addr_t dma;
  77. struct page *page;
  78. u32 page_offset;
  79. };
  80. struct fm10k_queue_stats {
  81. u64 packets;
  82. u64 bytes;
  83. };
  84. struct fm10k_tx_queue_stats {
  85. u64 restart_queue;
  86. u64 csum_err;
  87. u64 tx_busy;
  88. u64 tx_done_old;
  89. u64 csum_good;
  90. };
  91. struct fm10k_rx_queue_stats {
  92. u64 alloc_failed;
  93. u64 csum_err;
  94. u64 errors;
  95. u64 csum_good;
  96. u64 switch_errors;
  97. u64 drops;
  98. u64 pp_errors;
  99. u64 link_errors;
  100. u64 length_errors;
  101. };
  102. struct fm10k_ring {
  103. struct fm10k_q_vector *q_vector;/* backpointer to host q_vector */
  104. struct net_device *netdev; /* netdev ring belongs to */
  105. struct device *dev; /* device for DMA mapping */
  106. struct fm10k_l2_accel __rcu *l2_accel; /* L2 acceleration list */
  107. void *desc; /* descriptor ring memory */
  108. union {
  109. struct fm10k_tx_buffer *tx_buffer;
  110. struct fm10k_rx_buffer *rx_buffer;
  111. };
  112. u32 __iomem *tail;
  113. DECLARE_BITMAP(state, __FM10K_TX_STATE_SIZE__);
  114. dma_addr_t dma; /* phys. address of descriptor ring */
  115. unsigned int size; /* length in bytes */
  116. u8 queue_index; /* needed for queue management */
  117. u8 reg_idx; /* holds the special value that gets
  118. * the hardware register offset
  119. * associated with this ring, which is
  120. * different for DCB and RSS modes
  121. */
  122. u8 qos_pc; /* priority class of queue */
  123. u16 vid; /* default VLAN ID of queue */
  124. u16 count; /* amount of descriptors */
  125. u16 next_to_alloc;
  126. u16 next_to_use;
  127. u16 next_to_clean;
  128. struct fm10k_queue_stats stats;
  129. struct u64_stats_sync syncp;
  130. union {
  131. /* Tx */
  132. struct fm10k_tx_queue_stats tx_stats;
  133. /* Rx */
  134. struct {
  135. struct fm10k_rx_queue_stats rx_stats;
  136. struct sk_buff *skb;
  137. };
  138. };
  139. } ____cacheline_internodealigned_in_smp;
  140. struct fm10k_ring_container {
  141. struct fm10k_ring *ring; /* pointer to linked list of rings */
  142. unsigned int total_bytes; /* total bytes processed this int */
  143. unsigned int total_packets; /* total packets processed this int */
  144. u16 work_limit; /* total work allowed per interrupt */
  145. u16 itr; /* interrupt throttle rate value */
  146. u8 itr_scale; /* ITR adjustment based on PCI speed */
  147. u8 count; /* total number of rings in vector */
  148. };
  149. #define FM10K_ITR_MAX 0x0FFF /* maximum value for ITR */
  150. #define FM10K_ITR_10K 100 /* 100us */
  151. #define FM10K_ITR_20K 50 /* 50us */
  152. #define FM10K_ITR_40K 25 /* 25us */
  153. #define FM10K_ITR_ADAPTIVE 0x8000 /* adaptive interrupt moderation flag */
  154. #define ITR_IS_ADAPTIVE(itr) (!!(itr & FM10K_ITR_ADAPTIVE))
  155. #define FM10K_TX_ITR_DEFAULT FM10K_ITR_40K
  156. #define FM10K_RX_ITR_DEFAULT FM10K_ITR_20K
  157. #define FM10K_ITR_ENABLE (FM10K_ITR_AUTOMASK | FM10K_ITR_MASK_CLEAR)
  158. static inline struct netdev_queue *txring_txq(const struct fm10k_ring *ring)
  159. {
  160. return &ring->netdev->_tx[ring->queue_index];
  161. }
  162. /* iterator for handling rings in ring container */
  163. #define fm10k_for_each_ring(pos, head) \
  164. for (pos = &(head).ring[(head).count]; (--pos) >= (head).ring;)
  165. #define MAX_Q_VECTORS 256
  166. #define MIN_Q_VECTORS 1
  167. enum fm10k_non_q_vectors {
  168. FM10K_MBX_VECTOR,
  169. #define NON_Q_VECTORS_VF NON_Q_VECTORS_PF
  170. NON_Q_VECTORS_PF
  171. };
  172. #define NON_Q_VECTORS(hw) (((hw)->mac.type == fm10k_mac_pf) ? \
  173. NON_Q_VECTORS_PF : \
  174. NON_Q_VECTORS_VF)
  175. #define MIN_MSIX_COUNT(hw) (MIN_Q_VECTORS + NON_Q_VECTORS(hw))
  176. struct fm10k_q_vector {
  177. struct fm10k_intfc *interface;
  178. u32 __iomem *itr; /* pointer to ITR register for this vector */
  179. u16 v_idx; /* index of q_vector within interface array */
  180. struct fm10k_ring_container rx, tx;
  181. struct napi_struct napi;
  182. cpumask_t affinity_mask;
  183. char name[IFNAMSIZ + 9];
  184. #ifdef CONFIG_DEBUG_FS
  185. struct dentry *dbg_q_vector;
  186. #endif /* CONFIG_DEBUG_FS */
  187. struct rcu_head rcu; /* to avoid race with update stats on free */
  188. /* for dynamic allocation of rings associated with this q_vector */
  189. struct fm10k_ring ring[0] ____cacheline_internodealigned_in_smp;
  190. };
  191. enum fm10k_ring_f_enum {
  192. RING_F_RSS,
  193. RING_F_QOS,
  194. RING_F_ARRAY_SIZE /* must be last in enum set */
  195. };
  196. struct fm10k_ring_feature {
  197. u16 limit; /* upper limit on feature indices */
  198. u16 indices; /* current value of indices */
  199. u16 mask; /* Mask used for feature to ring mapping */
  200. u16 offset; /* offset to start of feature */
  201. };
  202. struct fm10k_iov_data {
  203. unsigned int num_vfs;
  204. unsigned int next_vf_mbx;
  205. struct rcu_head rcu;
  206. struct fm10k_vf_info vf_info[0];
  207. };
  208. struct fm10k_udp_port {
  209. struct list_head list;
  210. sa_family_t sa_family;
  211. __be16 port;
  212. };
  213. /* one work queue for entire driver */
  214. extern struct workqueue_struct *fm10k_workqueue;
  215. /* The following enumeration contains flags which indicate or enable modified
  216. * driver behaviors. To avoid race conditions, the flags are stored in
  217. * a BITMAP in the fm10k_intfc structure. The BITMAP should be accessed using
  218. * atomic *_bit() operations.
  219. */
  220. enum fm10k_flags_t {
  221. FM10K_FLAG_RESET_REQUESTED,
  222. FM10K_FLAG_RSS_FIELD_IPV4_UDP,
  223. FM10K_FLAG_RSS_FIELD_IPV6_UDP,
  224. FM10K_FLAG_SWPRI_CONFIG,
  225. /* __FM10K_FLAGS_SIZE__ is used to calculate the size of
  226. * interface->flags and must be the last value in this
  227. * enumeration.
  228. */
  229. __FM10K_FLAGS_SIZE__
  230. };
  231. enum fm10k_state_t {
  232. __FM10K_RESETTING,
  233. __FM10K_DOWN,
  234. __FM10K_SERVICE_SCHED,
  235. __FM10K_SERVICE_REQUEST,
  236. __FM10K_SERVICE_DISABLE,
  237. __FM10K_MBX_LOCK,
  238. __FM10K_LINK_DOWN,
  239. __FM10K_UPDATING_STATS,
  240. /* This value must be last and determines the BITMAP size */
  241. __FM10K_STATE_SIZE__,
  242. };
  243. struct fm10k_intfc {
  244. unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
  245. struct net_device *netdev;
  246. struct fm10k_l2_accel *l2_accel; /* pointer to L2 acceleration list */
  247. struct pci_dev *pdev;
  248. DECLARE_BITMAP(state, __FM10K_STATE_SIZE__);
  249. /* Access flag values using atomic *_bit() operations */
  250. DECLARE_BITMAP(flags, __FM10K_FLAGS_SIZE__);
  251. int xcast_mode;
  252. /* Tx fast path data */
  253. int num_tx_queues;
  254. u16 tx_itr;
  255. /* Rx fast path data */
  256. int num_rx_queues;
  257. u16 rx_itr;
  258. /* TX */
  259. struct fm10k_ring *tx_ring[MAX_QUEUES] ____cacheline_aligned_in_smp;
  260. u64 restart_queue;
  261. u64 tx_busy;
  262. u64 tx_csum_errors;
  263. u64 alloc_failed;
  264. u64 rx_csum_errors;
  265. u64 tx_bytes_nic;
  266. u64 tx_packets_nic;
  267. u64 rx_bytes_nic;
  268. u64 rx_packets_nic;
  269. u64 rx_drops_nic;
  270. u64 rx_overrun_pf;
  271. u64 rx_overrun_vf;
  272. /* Debug Statistics */
  273. u64 hw_sm_mbx_full;
  274. u64 hw_csum_tx_good;
  275. u64 hw_csum_rx_good;
  276. u64 rx_switch_errors;
  277. u64 rx_drops;
  278. u64 rx_pp_errors;
  279. u64 rx_link_errors;
  280. u64 rx_length_errors;
  281. u32 tx_timeout_count;
  282. /* RX */
  283. struct fm10k_ring *rx_ring[MAX_QUEUES];
  284. /* Queueing vectors */
  285. struct fm10k_q_vector *q_vector[MAX_Q_VECTORS];
  286. struct msix_entry *msix_entries;
  287. int num_q_vectors; /* current number of q_vectors for device */
  288. struct fm10k_ring_feature ring_feature[RING_F_ARRAY_SIZE];
  289. /* SR-IOV information management structure */
  290. struct fm10k_iov_data *iov_data;
  291. struct fm10k_hw_stats stats;
  292. struct fm10k_hw hw;
  293. u32 __iomem *uc_addr;
  294. u32 __iomem *sw_addr;
  295. u16 msg_enable;
  296. u16 tx_ring_count;
  297. u16 rx_ring_count;
  298. struct timer_list service_timer;
  299. struct work_struct service_task;
  300. unsigned long next_stats_update;
  301. unsigned long next_tx_hang_check;
  302. unsigned long last_reset;
  303. unsigned long link_down_event;
  304. bool host_ready;
  305. bool lport_map_failed;
  306. u32 reta[FM10K_RETA_SIZE];
  307. u32 rssrk[FM10K_RSSRK_SIZE];
  308. /* UDP encapsulation port tracking information */
  309. struct list_head vxlan_port;
  310. struct list_head geneve_port;
  311. #ifdef CONFIG_DEBUG_FS
  312. struct dentry *dbg_intfc;
  313. #endif /* CONFIG_DEBUG_FS */
  314. #ifdef CONFIG_DCB
  315. u8 pfc_en;
  316. #endif
  317. u8 rx_pause;
  318. /* GLORT resources in use by PF */
  319. u16 glort;
  320. u16 glort_count;
  321. /* VLAN ID for updating multicast/unicast lists */
  322. u16 vid;
  323. };
  324. static inline void fm10k_mbx_lock(struct fm10k_intfc *interface)
  325. {
  326. /* busy loop if we cannot obtain the lock as some calls
  327. * such as ndo_set_rx_mode may be made in atomic context
  328. */
  329. while (test_and_set_bit(__FM10K_MBX_LOCK, interface->state))
  330. udelay(20);
  331. }
  332. static inline void fm10k_mbx_unlock(struct fm10k_intfc *interface)
  333. {
  334. /* flush memory to make sure state is correct */
  335. smp_mb__before_atomic();
  336. clear_bit(__FM10K_MBX_LOCK, interface->state);
  337. }
  338. static inline int fm10k_mbx_trylock(struct fm10k_intfc *interface)
  339. {
  340. return !test_and_set_bit(__FM10K_MBX_LOCK, interface->state);
  341. }
  342. /* fm10k_test_staterr - test bits in Rx descriptor status and error fields */
  343. static inline __le32 fm10k_test_staterr(union fm10k_rx_desc *rx_desc,
  344. const u32 stat_err_bits)
  345. {
  346. return rx_desc->d.staterr & cpu_to_le32(stat_err_bits);
  347. }
  348. /* fm10k_desc_unused - calculate if we have unused descriptors */
  349. static inline u16 fm10k_desc_unused(struct fm10k_ring *ring)
  350. {
  351. s16 unused = ring->next_to_clean - ring->next_to_use - 1;
  352. return likely(unused < 0) ? unused + ring->count : unused;
  353. }
  354. #define FM10K_TX_DESC(R, i) \
  355. (&(((struct fm10k_tx_desc *)((R)->desc))[i]))
  356. #define FM10K_RX_DESC(R, i) \
  357. (&(((union fm10k_rx_desc *)((R)->desc))[i]))
  358. #define FM10K_MAX_TXD_PWR 14
  359. #define FM10K_MAX_DATA_PER_TXD (1u << FM10K_MAX_TXD_PWR)
  360. /* Tx Descriptors needed, worst case */
  361. #define TXD_USE_COUNT(S) DIV_ROUND_UP((S), FM10K_MAX_DATA_PER_TXD)
  362. #define DESC_NEEDED (MAX_SKB_FRAGS + 4)
  363. enum fm10k_tx_flags {
  364. /* Tx offload flags */
  365. FM10K_TX_FLAGS_CSUM = 0x01,
  366. };
  367. /* This structure is stored as little endian values as that is the native
  368. * format of the Rx descriptor. The ordering of these fields is reversed
  369. * from the actual ftag header to allow for a single bswap to take care
  370. * of placing all of the values in network order
  371. */
  372. union fm10k_ftag_info {
  373. __le64 ftag;
  374. struct {
  375. /* dglort and sglort combined into a single 32bit desc read */
  376. __le32 glort;
  377. /* upper 16 bits of VLAN are reserved 0 for swpri_type_user */
  378. __le32 vlan;
  379. } d;
  380. struct {
  381. __le16 dglort;
  382. __le16 sglort;
  383. __le16 vlan;
  384. __le16 swpri_type_user;
  385. } w;
  386. };
  387. struct fm10k_cb {
  388. union {
  389. __le64 tstamp;
  390. unsigned long ts_tx_timeout;
  391. };
  392. union fm10k_ftag_info fi;
  393. };
  394. #define FM10K_CB(skb) ((struct fm10k_cb *)(skb)->cb)
  395. /* main */
  396. extern char fm10k_driver_name[];
  397. extern const char fm10k_driver_version[];
  398. int fm10k_init_queueing_scheme(struct fm10k_intfc *interface);
  399. void fm10k_clear_queueing_scheme(struct fm10k_intfc *interface);
  400. __be16 fm10k_tx_encap_offload(struct sk_buff *skb);
  401. netdev_tx_t fm10k_xmit_frame_ring(struct sk_buff *skb,
  402. struct fm10k_ring *tx_ring);
  403. void fm10k_tx_timeout_reset(struct fm10k_intfc *interface);
  404. u64 fm10k_get_tx_pending(struct fm10k_ring *ring, bool in_sw);
  405. bool fm10k_check_tx_hang(struct fm10k_ring *tx_ring);
  406. void fm10k_alloc_rx_buffers(struct fm10k_ring *rx_ring, u16 cleaned_count);
  407. /* PCI */
  408. void fm10k_mbx_free_irq(struct fm10k_intfc *);
  409. int fm10k_mbx_request_irq(struct fm10k_intfc *);
  410. void fm10k_qv_free_irq(struct fm10k_intfc *interface);
  411. int fm10k_qv_request_irq(struct fm10k_intfc *interface);
  412. int fm10k_register_pci_driver(void);
  413. void fm10k_unregister_pci_driver(void);
  414. void fm10k_up(struct fm10k_intfc *interface);
  415. void fm10k_down(struct fm10k_intfc *interface);
  416. void fm10k_update_stats(struct fm10k_intfc *interface);
  417. void fm10k_service_event_schedule(struct fm10k_intfc *interface);
  418. void fm10k_update_rx_drop_en(struct fm10k_intfc *interface);
  419. #ifdef CONFIG_NET_POLL_CONTROLLER
  420. void fm10k_netpoll(struct net_device *netdev);
  421. #endif
  422. /* Netdev */
  423. struct net_device *fm10k_alloc_netdev(const struct fm10k_info *info);
  424. int fm10k_setup_rx_resources(struct fm10k_ring *);
  425. int fm10k_setup_tx_resources(struct fm10k_ring *);
  426. void fm10k_free_rx_resources(struct fm10k_ring *);
  427. void fm10k_free_tx_resources(struct fm10k_ring *);
  428. void fm10k_clean_all_rx_rings(struct fm10k_intfc *);
  429. void fm10k_clean_all_tx_rings(struct fm10k_intfc *);
  430. void fm10k_unmap_and_free_tx_resource(struct fm10k_ring *,
  431. struct fm10k_tx_buffer *);
  432. void fm10k_restore_rx_state(struct fm10k_intfc *);
  433. void fm10k_reset_rx_state(struct fm10k_intfc *);
  434. int fm10k_setup_tc(struct net_device *dev, u8 tc);
  435. int fm10k_open(struct net_device *netdev);
  436. int fm10k_close(struct net_device *netdev);
  437. /* Ethtool */
  438. void fm10k_set_ethtool_ops(struct net_device *dev);
  439. void fm10k_write_reta(struct fm10k_intfc *interface, const u32 *indir);
  440. /* IOV */
  441. s32 fm10k_iov_event(struct fm10k_intfc *interface);
  442. s32 fm10k_iov_mbx(struct fm10k_intfc *interface);
  443. void fm10k_iov_suspend(struct pci_dev *pdev);
  444. int fm10k_iov_resume(struct pci_dev *pdev);
  445. void fm10k_iov_disable(struct pci_dev *pdev);
  446. int fm10k_iov_configure(struct pci_dev *pdev, int num_vfs);
  447. s32 fm10k_iov_update_pvid(struct fm10k_intfc *interface, u16 glort, u16 pvid);
  448. int fm10k_ndo_set_vf_mac(struct net_device *netdev, int vf_idx, u8 *mac);
  449. int fm10k_ndo_set_vf_vlan(struct net_device *netdev,
  450. int vf_idx, u16 vid, u8 qos, __be16 vlan_proto);
  451. int fm10k_ndo_set_vf_bw(struct net_device *netdev, int vf_idx, int rate,
  452. int unused);
  453. int fm10k_ndo_get_vf_config(struct net_device *netdev,
  454. int vf_idx, struct ifla_vf_info *ivi);
  455. /* DebugFS */
  456. #ifdef CONFIG_DEBUG_FS
  457. void fm10k_dbg_q_vector_init(struct fm10k_q_vector *q_vector);
  458. void fm10k_dbg_q_vector_exit(struct fm10k_q_vector *q_vector);
  459. void fm10k_dbg_intfc_init(struct fm10k_intfc *interface);
  460. void fm10k_dbg_intfc_exit(struct fm10k_intfc *interface);
  461. void fm10k_dbg_init(void);
  462. void fm10k_dbg_exit(void);
  463. #else
  464. static inline void fm10k_dbg_q_vector_init(struct fm10k_q_vector *q_vector) {}
  465. static inline void fm10k_dbg_q_vector_exit(struct fm10k_q_vector *q_vector) {}
  466. static inline void fm10k_dbg_intfc_init(struct fm10k_intfc *interface) {}
  467. static inline void fm10k_dbg_intfc_exit(struct fm10k_intfc *interface) {}
  468. static inline void fm10k_dbg_init(void) {}
  469. static inline void fm10k_dbg_exit(void) {}
  470. #endif /* CONFIG_DEBUG_FS */
  471. /* DCB */
  472. #ifdef CONFIG_DCB
  473. void fm10k_dcbnl_set_ops(struct net_device *dev);
  474. #else
  475. static inline void fm10k_dcbnl_set_ops(struct net_device *dev) {}
  476. #endif
  477. #endif /* _FM10K_H_ */