mlx4_en.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. /*
  2. * Copyright (c) 2007 Mellanox Technologies. All rights reserved.
  3. *
  4. * This software is available to you under a choice of one of two
  5. * licenses. You may choose to be licensed under the terms of the GNU
  6. * General Public License (GPL) Version 2, available from the file
  7. * COPYING in the main directory of this source tree, or the
  8. * OpenIB.org BSD license below:
  9. *
  10. * Redistribution and use in source and binary forms, with or
  11. * without modification, are permitted provided that the following
  12. * conditions are met:
  13. *
  14. * - Redistributions of source code must retain the above
  15. * copyright notice, this list of conditions and the following
  16. * disclaimer.
  17. *
  18. * - Redistributions in binary form must reproduce the above
  19. * copyright notice, this list of conditions and the following
  20. * disclaimer in the documentation and/or other materials
  21. * provided with the distribution.
  22. *
  23. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  24. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  25. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  26. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  27. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  28. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  29. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  30. * SOFTWARE.
  31. *
  32. */
  33. #ifndef _MLX4_EN_H_
  34. #define _MLX4_EN_H_
  35. #include <linux/compiler.h>
  36. #include <linux/list.h>
  37. #include <linux/mutex.h>
  38. #include <linux/netdevice.h>
  39. #include <linux/inet_lro.h>
  40. #include <linux/mlx4/device.h>
  41. #include <linux/mlx4/qp.h>
  42. #include <linux/mlx4/cq.h>
  43. #include <linux/mlx4/srq.h>
  44. #include <linux/mlx4/doorbell.h>
  45. #include "en_port.h"
  46. #define DRV_NAME "mlx4_en"
  47. #define DRV_VERSION "1.4.0"
  48. #define DRV_RELDATE "Sep 2008"
  49. #define MLX4_EN_MSG_LEVEL (NETIF_MSG_LINK | NETIF_MSG_IFDOWN)
  50. #define mlx4_dbg(mlevel, priv, format, arg...) \
  51. if (NETIF_MSG_##mlevel & priv->msg_enable) \
  52. printk(KERN_DEBUG "%s %s: " format , DRV_NAME ,\
  53. (dev_name(&priv->mdev->pdev->dev)) , ## arg)
  54. #define mlx4_err(mdev, format, arg...) \
  55. printk(KERN_ERR "%s %s: " format , DRV_NAME ,\
  56. (dev_name(&mdev->pdev->dev)) , ## arg)
  57. #define mlx4_info(mdev, format, arg...) \
  58. printk(KERN_INFO "%s %s: " format , DRV_NAME ,\
  59. (dev_name(&mdev->pdev->dev)) , ## arg)
  60. #define mlx4_warn(mdev, format, arg...) \
  61. printk(KERN_WARNING "%s %s: " format , DRV_NAME ,\
  62. (dev_name(&mdev->pdev->dev)) , ## arg)
  63. /*
  64. * Device constants
  65. */
  66. #define MLX4_EN_PAGE_SHIFT 12
  67. #define MLX4_EN_PAGE_SIZE (1 << MLX4_EN_PAGE_SHIFT)
  68. #define MAX_TX_RINGS 16
  69. #define MAX_RX_RINGS 16
  70. #define MAX_RSS_MAP_SIZE 64
  71. #define RSS_FACTOR 2
  72. #define TXBB_SIZE 64
  73. #define HEADROOM (2048 / TXBB_SIZE + 1)
  74. #define MAX_LSO_HDR_SIZE 92
  75. #define STAMP_STRIDE 64
  76. #define STAMP_DWORDS (STAMP_STRIDE / 4)
  77. #define STAMP_SHIFT 31
  78. #define STAMP_VAL 0x7fffffff
  79. #define STATS_DELAY (HZ / 4)
  80. /* Typical TSO descriptor with 16 gather entries is 352 bytes... */
  81. #define MAX_DESC_SIZE 512
  82. #define MAX_DESC_TXBBS (MAX_DESC_SIZE / TXBB_SIZE)
  83. /*
  84. * OS related constants and tunables
  85. */
  86. #define MLX4_EN_WATCHDOG_TIMEOUT (15 * HZ)
  87. #define MLX4_EN_ALLOC_ORDER 2
  88. #define MLX4_EN_ALLOC_SIZE (PAGE_SIZE << MLX4_EN_ALLOC_ORDER)
  89. #define MLX4_EN_MAX_LRO_DESCRIPTORS 32
  90. /* Receive fragment sizes; we use at most 4 fragments (for 9600 byte MTU
  91. * and 4K allocations) */
  92. enum {
  93. FRAG_SZ0 = 512 - NET_IP_ALIGN,
  94. FRAG_SZ1 = 1024,
  95. FRAG_SZ2 = 4096,
  96. FRAG_SZ3 = MLX4_EN_ALLOC_SIZE
  97. };
  98. #define MLX4_EN_MAX_RX_FRAGS 4
  99. /* Maximum ring sizes */
  100. #define MLX4_EN_MAX_TX_SIZE 8192
  101. #define MLX4_EN_MAX_RX_SIZE 8192
  102. /* Minimum ring size for our page-allocation sceme to work */
  103. #define MLX4_EN_MIN_RX_SIZE (MLX4_EN_ALLOC_SIZE / SMP_CACHE_BYTES)
  104. #define MLX4_EN_MIN_TX_SIZE (4096 / TXBB_SIZE)
  105. #define MLX4_EN_TX_RING_NUM 9
  106. #define MLX4_EN_DEF_TX_RING_SIZE 1024
  107. #define MLX4_EN_DEF_RX_RING_SIZE 1024
  108. /* Target number of bytes to coalesce with interrupt moderation */
  109. #define MLX4_EN_RX_COAL_TARGET 0x20000
  110. #define MLX4_EN_RX_COAL_TIME 0x10
  111. #define MLX4_EN_TX_COAL_PKTS 5
  112. #define MLX4_EN_TX_COAL_TIME 0x80
  113. #define MLX4_EN_RX_RATE_LOW 400000
  114. #define MLX4_EN_RX_COAL_TIME_LOW 0
  115. #define MLX4_EN_RX_RATE_HIGH 450000
  116. #define MLX4_EN_RX_COAL_TIME_HIGH 128
  117. #define MLX4_EN_RX_SIZE_THRESH 1024
  118. #define MLX4_EN_RX_RATE_THRESH (1000000 / MLX4_EN_RX_COAL_TIME_HIGH)
  119. #define MLX4_EN_SAMPLE_INTERVAL 0
  120. #define MLX4_EN_AUTO_CONF 0xffff
  121. #define MLX4_EN_DEF_RX_PAUSE 1
  122. #define MLX4_EN_DEF_TX_PAUSE 1
  123. /* Interval between sucessive polls in the Tx routine when polling is used
  124. instead of interrupts (in per-core Tx rings) - should be power of 2 */
  125. #define MLX4_EN_TX_POLL_MODER 16
  126. #define MLX4_EN_TX_POLL_TIMEOUT (HZ / 4)
  127. #define ETH_LLC_SNAP_SIZE 8
  128. #define SMALL_PACKET_SIZE (256 - NET_IP_ALIGN)
  129. #define HEADER_COPY_SIZE (128 - NET_IP_ALIGN)
  130. #define MLX4_EN_MIN_MTU 46
  131. #define ETH_BCAST 0xffffffffffffULL
  132. #ifdef MLX4_EN_PERF_STAT
  133. /* Number of samples to 'average' */
  134. #define AVG_SIZE 128
  135. #define AVG_FACTOR 1024
  136. #define NUM_PERF_STATS NUM_PERF_COUNTERS
  137. #define INC_PERF_COUNTER(cnt) (++(cnt))
  138. #define ADD_PERF_COUNTER(cnt, add) ((cnt) += (add))
  139. #define AVG_PERF_COUNTER(cnt, sample) \
  140. ((cnt) = ((cnt) * (AVG_SIZE - 1) + (sample) * AVG_FACTOR) / AVG_SIZE)
  141. #define GET_PERF_COUNTER(cnt) (cnt)
  142. #define GET_AVG_PERF_COUNTER(cnt) ((cnt) / AVG_FACTOR)
  143. #else
  144. #define NUM_PERF_STATS 0
  145. #define INC_PERF_COUNTER(cnt) do {} while (0)
  146. #define ADD_PERF_COUNTER(cnt, add) do {} while (0)
  147. #define AVG_PERF_COUNTER(cnt, sample) do {} while (0)
  148. #define GET_PERF_COUNTER(cnt) (0)
  149. #define GET_AVG_PERF_COUNTER(cnt) (0)
  150. #endif /* MLX4_EN_PERF_STAT */
  151. /*
  152. * Configurables
  153. */
  154. enum cq_type {
  155. RX = 0,
  156. TX = 1,
  157. };
  158. /*
  159. * Useful macros
  160. */
  161. #define ROUNDUP_LOG2(x) ilog2(roundup_pow_of_two(x))
  162. #define XNOR(x, y) (!(x) == !(y))
  163. #define ILLEGAL_MAC(addr) (addr == 0xffffffffffffULL || addr == 0x0)
  164. struct mlx4_en_tx_info {
  165. struct sk_buff *skb;
  166. u32 nr_txbb;
  167. u8 linear;
  168. u8 data_offset;
  169. u8 inl;
  170. };
  171. #define MLX4_EN_BIT_DESC_OWN 0x80000000
  172. #define CTRL_SIZE sizeof(struct mlx4_wqe_ctrl_seg)
  173. #define MLX4_EN_MEMTYPE_PAD 0x100
  174. #define DS_SIZE sizeof(struct mlx4_wqe_data_seg)
  175. struct mlx4_en_tx_desc {
  176. struct mlx4_wqe_ctrl_seg ctrl;
  177. union {
  178. struct mlx4_wqe_data_seg data; /* at least one data segment */
  179. struct mlx4_wqe_lso_seg lso;
  180. struct mlx4_wqe_inline_seg inl;
  181. };
  182. };
  183. #define MLX4_EN_USE_SRQ 0x01000000
  184. struct mlx4_en_rx_alloc {
  185. struct page *page;
  186. u16 offset;
  187. };
  188. struct mlx4_en_tx_ring {
  189. struct mlx4_hwq_resources wqres;
  190. u32 size ; /* number of TXBBs */
  191. u32 size_mask;
  192. u16 stride;
  193. u16 cqn; /* index of port CQ associated with this ring */
  194. u32 prod;
  195. u32 cons;
  196. u32 buf_size;
  197. u32 doorbell_qpn;
  198. void *buf;
  199. u16 poll_cnt;
  200. int blocked;
  201. struct mlx4_en_tx_info *tx_info;
  202. u8 *bounce_buf;
  203. u32 last_nr_txbb;
  204. struct mlx4_qp qp;
  205. struct mlx4_qp_context context;
  206. int qpn;
  207. enum mlx4_qp_state qp_state;
  208. struct mlx4_srq dummy;
  209. unsigned long bytes;
  210. unsigned long packets;
  211. spinlock_t comp_lock;
  212. };
  213. struct mlx4_en_rx_desc {
  214. struct mlx4_wqe_srq_next_seg next;
  215. /* actual number of entries depends on rx ring stride */
  216. struct mlx4_wqe_data_seg data[0];
  217. };
  218. struct mlx4_en_rx_ring {
  219. struct mlx4_srq srq;
  220. struct mlx4_hwq_resources wqres;
  221. struct mlx4_en_rx_alloc page_alloc[MLX4_EN_MAX_RX_FRAGS];
  222. struct net_lro_mgr lro;
  223. u32 size ; /* number of Rx descs*/
  224. u32 actual_size;
  225. u32 size_mask;
  226. u16 stride;
  227. u16 log_stride;
  228. u16 cqn; /* index of port CQ associated with this ring */
  229. u32 prod;
  230. u32 cons;
  231. u32 buf_size;
  232. int need_refill;
  233. int full;
  234. void *buf;
  235. void *rx_info;
  236. unsigned long bytes;
  237. unsigned long packets;
  238. };
  239. static inline int mlx4_en_can_lro(__be16 status)
  240. {
  241. return (status & cpu_to_be16(MLX4_CQE_STATUS_IPV4 |
  242. MLX4_CQE_STATUS_IPV4F |
  243. MLX4_CQE_STATUS_IPV6 |
  244. MLX4_CQE_STATUS_IPV4OPT |
  245. MLX4_CQE_STATUS_TCP |
  246. MLX4_CQE_STATUS_UDP |
  247. MLX4_CQE_STATUS_IPOK)) ==
  248. cpu_to_be16(MLX4_CQE_STATUS_IPV4 |
  249. MLX4_CQE_STATUS_IPOK |
  250. MLX4_CQE_STATUS_TCP);
  251. }
  252. struct mlx4_en_cq {
  253. struct mlx4_cq mcq;
  254. struct mlx4_hwq_resources wqres;
  255. int ring;
  256. spinlock_t lock;
  257. struct net_device *dev;
  258. struct napi_struct napi;
  259. /* Per-core Tx cq processing support */
  260. struct timer_list timer;
  261. int size;
  262. int buf_size;
  263. unsigned vector;
  264. enum cq_type is_tx;
  265. u16 moder_time;
  266. u16 moder_cnt;
  267. struct mlx4_cqe *buf;
  268. #define MLX4_EN_OPCODE_ERROR 0x1e
  269. };
  270. struct mlx4_en_port_profile {
  271. u32 flags;
  272. u32 tx_ring_num;
  273. u32 rx_ring_num;
  274. u32 tx_ring_size;
  275. u32 rx_ring_size;
  276. u8 rx_pause;
  277. u8 rx_ppp;
  278. u8 tx_pause;
  279. u8 tx_ppp;
  280. };
  281. struct mlx4_en_profile {
  282. int rss_xor;
  283. int num_lro;
  284. u8 rss_mask;
  285. u32 active_ports;
  286. u32 small_pkt_int;
  287. u8 no_reset;
  288. struct mlx4_en_port_profile prof[MLX4_MAX_PORTS + 1];
  289. };
  290. struct mlx4_en_dev {
  291. struct mlx4_dev *dev;
  292. struct pci_dev *pdev;
  293. struct mutex state_lock;
  294. struct net_device *pndev[MLX4_MAX_PORTS + 1];
  295. u32 port_cnt;
  296. bool device_up;
  297. struct mlx4_en_profile profile;
  298. u32 LSO_support;
  299. struct workqueue_struct *workqueue;
  300. struct device *dma_device;
  301. void __iomem *uar_map;
  302. struct mlx4_uar priv_uar;
  303. struct mlx4_mr mr;
  304. u32 priv_pdn;
  305. spinlock_t uar_lock;
  306. };
  307. struct mlx4_en_rss_map {
  308. int size;
  309. int base_qpn;
  310. u16 map[MAX_RSS_MAP_SIZE];
  311. struct mlx4_qp qps[MAX_RSS_MAP_SIZE];
  312. enum mlx4_qp_state state[MAX_RSS_MAP_SIZE];
  313. struct mlx4_qp indir_qp;
  314. enum mlx4_qp_state indir_state;
  315. };
  316. struct mlx4_en_rss_context {
  317. __be32 base_qpn;
  318. __be32 default_qpn;
  319. u16 reserved;
  320. u8 hash_fn;
  321. u8 flags;
  322. __be32 rss_key[10];
  323. };
  324. struct mlx4_en_pkt_stats {
  325. unsigned long broadcast;
  326. unsigned long rx_prio[8];
  327. unsigned long tx_prio[8];
  328. #define NUM_PKT_STATS 17
  329. };
  330. struct mlx4_en_port_stats {
  331. unsigned long lro_aggregated;
  332. unsigned long lro_flushed;
  333. unsigned long lro_no_desc;
  334. unsigned long tso_packets;
  335. unsigned long queue_stopped;
  336. unsigned long wake_queue;
  337. unsigned long tx_timeout;
  338. unsigned long rx_alloc_failed;
  339. unsigned long rx_chksum_good;
  340. unsigned long rx_chksum_none;
  341. unsigned long tx_chksum_offload;
  342. #define NUM_PORT_STATS 11
  343. };
  344. struct mlx4_en_perf_stats {
  345. u32 tx_poll;
  346. u64 tx_pktsz_avg;
  347. u32 inflight_avg;
  348. u16 tx_coal_avg;
  349. u16 rx_coal_avg;
  350. u32 napi_quota;
  351. #define NUM_PERF_COUNTERS 6
  352. };
  353. struct mlx4_en_frag_info {
  354. u16 frag_size;
  355. u16 frag_prefix_size;
  356. u16 frag_stride;
  357. u16 frag_align;
  358. u16 last_offset;
  359. };
  360. struct mlx4_en_priv {
  361. struct mlx4_en_dev *mdev;
  362. struct mlx4_en_port_profile *prof;
  363. struct net_device *dev;
  364. struct vlan_group *vlgrp;
  365. struct net_device_stats stats;
  366. struct net_device_stats ret_stats;
  367. spinlock_t stats_lock;
  368. unsigned long last_moder_packets;
  369. unsigned long last_moder_tx_packets;
  370. unsigned long last_moder_bytes;
  371. unsigned long last_moder_jiffies;
  372. int last_moder_time;
  373. u16 rx_usecs;
  374. u16 rx_frames;
  375. u16 tx_usecs;
  376. u16 tx_frames;
  377. u32 pkt_rate_low;
  378. u16 rx_usecs_low;
  379. u32 pkt_rate_high;
  380. u16 rx_usecs_high;
  381. u16 sample_interval;
  382. u16 adaptive_rx_coal;
  383. u32 msg_enable;
  384. struct mlx4_hwq_resources res;
  385. int link_state;
  386. int last_link_state;
  387. bool port_up;
  388. int port;
  389. int registered;
  390. int allocated;
  391. int stride;
  392. int rx_csum;
  393. u64 mac;
  394. int mac_index;
  395. unsigned max_mtu;
  396. int base_qpn;
  397. struct mlx4_en_rss_map rss_map;
  398. u16 tx_prio_map[8];
  399. u32 flags;
  400. #define MLX4_EN_FLAG_PROMISC 0x1
  401. u32 tx_ring_num;
  402. u32 rx_ring_num;
  403. u32 rx_skb_size;
  404. struct mlx4_en_frag_info frag_info[MLX4_EN_MAX_RX_FRAGS];
  405. u16 num_frags;
  406. u16 log_rx_info;
  407. struct mlx4_en_tx_ring tx_ring[MAX_TX_RINGS];
  408. struct mlx4_en_rx_ring rx_ring[MAX_RX_RINGS];
  409. struct mlx4_en_cq tx_cq[MAX_TX_RINGS];
  410. struct mlx4_en_cq rx_cq[MAX_RX_RINGS];
  411. struct work_struct mcast_task;
  412. struct work_struct mac_task;
  413. struct delayed_work refill_task;
  414. struct work_struct watchdog_task;
  415. struct work_struct linkstate_task;
  416. struct delayed_work stats_task;
  417. struct mlx4_en_perf_stats pstats;
  418. struct mlx4_en_pkt_stats pkstats;
  419. struct mlx4_en_port_stats port_stats;
  420. struct dev_mc_list *mc_list;
  421. struct mlx4_en_stat_out_mbox hw_stats;
  422. };
  423. void mlx4_en_destroy_netdev(struct net_device *dev);
  424. int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
  425. struct mlx4_en_port_profile *prof);
  426. int mlx4_en_start_port(struct net_device *dev);
  427. void mlx4_en_stop_port(struct net_device *dev);
  428. void mlx4_en_free_resources(struct mlx4_en_priv *priv);
  429. int mlx4_en_alloc_resources(struct mlx4_en_priv *priv);
  430. int mlx4_en_get_profile(struct mlx4_en_dev *mdev);
  431. int mlx4_en_create_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
  432. int entries, int ring, enum cq_type mode);
  433. void mlx4_en_destroy_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq);
  434. int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq);
  435. void mlx4_en_deactivate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq);
  436. int mlx4_en_set_cq_moder(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq);
  437. int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq);
  438. void mlx4_en_poll_tx_cq(unsigned long data);
  439. void mlx4_en_tx_irq(struct mlx4_cq *mcq);
  440. int mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev);
  441. int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ring,
  442. u32 size, u16 stride);
  443. void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ring);
  444. int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv,
  445. struct mlx4_en_tx_ring *ring,
  446. int cq, int srqn);
  447. void mlx4_en_deactivate_tx_ring(struct mlx4_en_priv *priv,
  448. struct mlx4_en_tx_ring *ring);
  449. int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
  450. struct mlx4_en_rx_ring *ring,
  451. u32 size, u16 stride);
  452. void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
  453. struct mlx4_en_rx_ring *ring);
  454. int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv);
  455. void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv,
  456. struct mlx4_en_rx_ring *ring);
  457. int mlx4_en_process_rx_cq(struct net_device *dev,
  458. struct mlx4_en_cq *cq,
  459. int budget);
  460. int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget);
  461. void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride,
  462. int is_tx, int rss, int qpn, int cqn, int srqn,
  463. struct mlx4_qp_context *context);
  464. int mlx4_en_map_buffer(struct mlx4_buf *buf);
  465. void mlx4_en_unmap_buffer(struct mlx4_buf *buf);
  466. void mlx4_en_calc_rx_buf(struct net_device *dev);
  467. void mlx4_en_set_default_rss_map(struct mlx4_en_priv *priv,
  468. struct mlx4_en_rss_map *rss_map,
  469. int num_entries, int num_rings);
  470. void mlx4_en_set_prio_map(struct mlx4_en_priv *priv, u16 *prio_map, u32 ring_num);
  471. int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv);
  472. void mlx4_en_release_rss_steer(struct mlx4_en_priv *priv);
  473. int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring);
  474. void mlx4_en_rx_refill(struct work_struct *work);
  475. void mlx4_en_rx_irq(struct mlx4_cq *mcq);
  476. int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode);
  477. int mlx4_SET_VLAN_FLTR(struct mlx4_dev *dev, u8 port, struct vlan_group *grp);
  478. int mlx4_SET_PORT_general(struct mlx4_dev *dev, u8 port, int mtu,
  479. u8 pptx, u8 pfctx, u8 pprx, u8 pfcrx);
  480. int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn,
  481. u8 promisc);
  482. int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset);
  483. /*
  484. * Globals
  485. */
  486. extern const struct ethtool_ops mlx4_en_ethtool_ops;
  487. #endif