i40evf.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*******************************************************************************
  3. *
  4. * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver
  5. * Copyright(c) 2013 - 2016 Intel Corporation.
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms and conditions of the GNU General Public License,
  9. * version 2, as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope it will be useful, but WITHOUT
  12. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  14. * more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. * The full GNU General Public License is included in this distribution in
  20. * the file called "COPYING".
  21. *
  22. * Contact Information:
  23. * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  24. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  25. *
  26. ******************************************************************************/
  27. #ifndef _I40EVF_H_
  28. #define _I40EVF_H_
  29. #include <linux/module.h>
  30. #include <linux/pci.h>
  31. #include <linux/aer.h>
  32. #include <linux/netdevice.h>
  33. #include <linux/vmalloc.h>
  34. #include <linux/interrupt.h>
  35. #include <linux/ethtool.h>
  36. #include <linux/if_vlan.h>
  37. #include <linux/ip.h>
  38. #include <linux/tcp.h>
  39. #include <linux/sctp.h>
  40. #include <linux/ipv6.h>
  41. #include <linux/kernel.h>
  42. #include <linux/bitops.h>
  43. #include <linux/timer.h>
  44. #include <linux/workqueue.h>
  45. #include <linux/wait.h>
  46. #include <linux/delay.h>
  47. #include <linux/gfp.h>
  48. #include <linux/skbuff.h>
  49. #include <linux/dma-mapping.h>
  50. #include <linux/etherdevice.h>
  51. #include <linux/socket.h>
  52. #include <linux/jiffies.h>
  53. #include <net/ip6_checksum.h>
  54. #include <net/pkt_cls.h>
  55. #include <net/udp.h>
  56. #include <net/tc_act/tc_gact.h>
  57. #include <net/tc_act/tc_mirred.h>
  58. #include "i40e_type.h"
  59. #include <linux/avf/virtchnl.h>
  60. #include "i40e_txrx.h"
  61. #define DEFAULT_DEBUG_LEVEL_SHIFT 3
  62. #define PFX "i40evf: "
  63. /* VSI state flags shared with common code */
  64. enum i40evf_vsi_state_t {
  65. __I40E_VSI_DOWN,
  66. /* This must be last as it determines the size of the BITMAP */
  67. __I40E_VSI_STATE_SIZE__,
  68. };
  69. /* dummy struct to make common code less painful */
  70. struct i40e_vsi {
  71. struct i40evf_adapter *back;
  72. struct net_device *netdev;
  73. unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
  74. u16 seid;
  75. u16 id;
  76. DECLARE_BITMAP(state, __I40E_VSI_STATE_SIZE__);
  77. int base_vector;
  78. u16 work_limit;
  79. u16 qs_handle;
  80. void *priv; /* client driver data reference. */
  81. };
  82. /* How many Rx Buffers do we bundle into one write to the hardware ? */
  83. #define I40EVF_RX_BUFFER_WRITE 16 /* Must be power of 2 */
  84. #define I40EVF_DEFAULT_TXD 512
  85. #define I40EVF_DEFAULT_RXD 512
  86. #define I40EVF_MAX_TXD 4096
  87. #define I40EVF_MIN_TXD 64
  88. #define I40EVF_MAX_RXD 4096
  89. #define I40EVF_MIN_RXD 64
  90. #define I40EVF_REQ_DESCRIPTOR_MULTIPLE 32
  91. #define I40EVF_MAX_AQ_BUF_SIZE 4096
  92. #define I40EVF_AQ_LEN 32
  93. #define I40EVF_AQ_MAX_ERR 20 /* times to try before resetting AQ */
  94. #define MAXIMUM_ETHERNET_VLAN_SIZE (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN)
  95. #define I40E_RX_DESC(R, i) (&(((union i40e_32byte_rx_desc *)((R)->desc))[i]))
  96. #define I40E_TX_DESC(R, i) (&(((struct i40e_tx_desc *)((R)->desc))[i]))
  97. #define I40E_TX_CTXTDESC(R, i) \
  98. (&(((struct i40e_tx_context_desc *)((R)->desc))[i]))
  99. #define MAX_QUEUES 16
  100. #define I40EVF_MAX_REQ_QUEUES 4
  101. #define I40EVF_HKEY_ARRAY_SIZE ((I40E_VFQF_HKEY_MAX_INDEX + 1) * 4)
  102. #define I40EVF_HLUT_ARRAY_SIZE ((I40E_VFQF_HLUT_MAX_INDEX + 1) * 4)
  103. #define I40EVF_MBPS_DIVISOR 125000 /* divisor to convert to Mbps */
  104. /* MAX_MSIX_Q_VECTORS of these are allocated,
  105. * but we only use one per queue-specific vector.
  106. */
  107. struct i40e_q_vector {
  108. struct i40evf_adapter *adapter;
  109. struct i40e_vsi *vsi;
  110. struct napi_struct napi;
  111. struct i40e_ring_container rx;
  112. struct i40e_ring_container tx;
  113. u32 ring_mask;
  114. u8 itr_countdown; /* when 0 should adjust adaptive ITR */
  115. u8 num_ringpairs; /* total number of ring pairs in vector */
  116. u16 v_idx; /* index in the vsi->q_vector array. */
  117. u16 reg_idx; /* register index of the interrupt */
  118. char name[IFNAMSIZ + 15];
  119. bool arm_wb_state;
  120. cpumask_t affinity_mask;
  121. struct irq_affinity_notify affinity_notify;
  122. };
  123. /* Helper macros to switch between ints/sec and what the register uses.
  124. * And yes, it's the same math going both ways. The lowest value
  125. * supported by all of the i40e hardware is 8.
  126. */
  127. #define EITR_INTS_PER_SEC_TO_REG(_eitr) \
  128. ((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8)
  129. #define EITR_REG_TO_INTS_PER_SEC EITR_INTS_PER_SEC_TO_REG
  130. #define I40EVF_DESC_UNUSED(R) \
  131. ((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \
  132. (R)->next_to_clean - (R)->next_to_use - 1)
  133. #define I40EVF_RX_DESC_ADV(R, i) \
  134. (&(((union i40e_adv_rx_desc *)((R).desc))[i]))
  135. #define I40EVF_TX_DESC_ADV(R, i) \
  136. (&(((union i40e_adv_tx_desc *)((R).desc))[i]))
  137. #define I40EVF_TX_CTXTDESC_ADV(R, i) \
  138. (&(((struct i40e_adv_tx_context_desc *)((R).desc))[i]))
  139. #define OTHER_VECTOR 1
  140. #define NONQ_VECS (OTHER_VECTOR)
  141. #define MIN_MSIX_Q_VECTORS 1
  142. #define MIN_MSIX_COUNT (MIN_MSIX_Q_VECTORS + NONQ_VECS)
  143. #define I40EVF_QUEUE_END_OF_LIST 0x7FF
  144. #define I40EVF_FREE_VECTOR 0x7FFF
  145. struct i40evf_mac_filter {
  146. struct list_head list;
  147. u8 macaddr[ETH_ALEN];
  148. bool remove; /* filter needs to be removed */
  149. bool add; /* filter needs to be added */
  150. };
  151. struct i40evf_vlan_filter {
  152. struct list_head list;
  153. u16 vlan;
  154. bool remove; /* filter needs to be removed */
  155. bool add; /* filter needs to be added */
  156. };
  157. #define I40EVF_MAX_TRAFFIC_CLASS 4
  158. /* State of traffic class creation */
  159. enum i40evf_tc_state_t {
  160. __I40EVF_TC_INVALID, /* no traffic class, default state */
  161. __I40EVF_TC_RUNNING, /* traffic classes have been created */
  162. };
  163. /* channel info */
  164. struct i40evf_channel_config {
  165. struct virtchnl_channel_info ch_info[I40EVF_MAX_TRAFFIC_CLASS];
  166. enum i40evf_tc_state_t state;
  167. u8 total_qps;
  168. };
  169. /* State of cloud filter */
  170. enum i40evf_cloud_filter_state_t {
  171. __I40EVF_CF_INVALID, /* cloud filter not added */
  172. __I40EVF_CF_ADD_PENDING, /* cloud filter pending add by the PF */
  173. __I40EVF_CF_DEL_PENDING, /* cloud filter pending del by the PF */
  174. __I40EVF_CF_ACTIVE, /* cloud filter is active */
  175. };
  176. /* Driver state. The order of these is important! */
  177. enum i40evf_state_t {
  178. __I40EVF_STARTUP, /* driver loaded, probe complete */
  179. __I40EVF_REMOVE, /* driver is being unloaded */
  180. __I40EVF_INIT_VERSION_CHECK, /* aq msg sent, awaiting reply */
  181. __I40EVF_INIT_GET_RESOURCES, /* aq msg sent, awaiting reply */
  182. __I40EVF_INIT_SW, /* got resources, setting up structs */
  183. __I40EVF_RESETTING, /* in reset */
  184. /* Below here, watchdog is running */
  185. __I40EVF_DOWN, /* ready, can be opened */
  186. __I40EVF_DOWN_PENDING, /* descending, waiting for watchdog */
  187. __I40EVF_TESTING, /* in ethtool self-test */
  188. __I40EVF_RUNNING, /* opened, working */
  189. };
  190. enum i40evf_critical_section_t {
  191. __I40EVF_IN_CRITICAL_TASK, /* cannot be interrupted */
  192. __I40EVF_IN_CLIENT_TASK,
  193. __I40EVF_IN_REMOVE_TASK, /* device being removed */
  194. };
  195. #define I40EVF_CLOUD_FIELD_OMAC 0x01
  196. #define I40EVF_CLOUD_FIELD_IMAC 0x02
  197. #define I40EVF_CLOUD_FIELD_IVLAN 0x04
  198. #define I40EVF_CLOUD_FIELD_TEN_ID 0x08
  199. #define I40EVF_CLOUD_FIELD_IIP 0x10
  200. #define I40EVF_CF_FLAGS_OMAC I40EVF_CLOUD_FIELD_OMAC
  201. #define I40EVF_CF_FLAGS_IMAC I40EVF_CLOUD_FIELD_IMAC
  202. #define I40EVF_CF_FLAGS_IMAC_IVLAN (I40EVF_CLOUD_FIELD_IMAC |\
  203. I40EVF_CLOUD_FIELD_IVLAN)
  204. #define I40EVF_CF_FLAGS_IMAC_TEN_ID (I40EVF_CLOUD_FIELD_IMAC |\
  205. I40EVF_CLOUD_FIELD_TEN_ID)
  206. #define I40EVF_CF_FLAGS_OMAC_TEN_ID_IMAC (I40EVF_CLOUD_FIELD_OMAC |\
  207. I40EVF_CLOUD_FIELD_IMAC |\
  208. I40EVF_CLOUD_FIELD_TEN_ID)
  209. #define I40EVF_CF_FLAGS_IMAC_IVLAN_TEN_ID (I40EVF_CLOUD_FIELD_IMAC |\
  210. I40EVF_CLOUD_FIELD_IVLAN |\
  211. I40EVF_CLOUD_FIELD_TEN_ID)
  212. #define I40EVF_CF_FLAGS_IIP I40E_CLOUD_FIELD_IIP
  213. /* bookkeeping of cloud filters */
  214. struct i40evf_cloud_filter {
  215. enum i40evf_cloud_filter_state_t state;
  216. struct list_head list;
  217. struct virtchnl_filter f;
  218. unsigned long cookie;
  219. bool del; /* filter needs to be deleted */
  220. bool add; /* filter needs to be added */
  221. };
  222. /* board specific private data structure */
  223. struct i40evf_adapter {
  224. struct timer_list watchdog_timer;
  225. struct work_struct reset_task;
  226. struct work_struct adminq_task;
  227. struct delayed_work client_task;
  228. struct delayed_work init_task;
  229. wait_queue_head_t down_waitqueue;
  230. struct i40e_q_vector *q_vectors;
  231. struct list_head vlan_filter_list;
  232. struct list_head mac_filter_list;
  233. /* Lock to protect accesses to MAC and VLAN lists */
  234. spinlock_t mac_vlan_list_lock;
  235. char misc_vector_name[IFNAMSIZ + 9];
  236. int num_active_queues;
  237. int num_req_queues;
  238. /* TX */
  239. struct i40e_ring *tx_rings;
  240. u32 tx_timeout_count;
  241. u32 tx_desc_count;
  242. /* RX */
  243. struct i40e_ring *rx_rings;
  244. u64 hw_csum_rx_error;
  245. u32 rx_desc_count;
  246. int num_msix_vectors;
  247. int num_iwarp_msix;
  248. int iwarp_base_vector;
  249. u32 client_pending;
  250. struct i40e_client_instance *cinst;
  251. struct msix_entry *msix_entries;
  252. u32 flags;
  253. #define I40EVF_FLAG_RX_CSUM_ENABLED BIT(0)
  254. #define I40EVF_FLAG_PF_COMMS_FAILED BIT(3)
  255. #define I40EVF_FLAG_RESET_PENDING BIT(4)
  256. #define I40EVF_FLAG_RESET_NEEDED BIT(5)
  257. #define I40EVF_FLAG_WB_ON_ITR_CAPABLE BIT(6)
  258. #define I40EVF_FLAG_ADDR_SET_BY_PF BIT(8)
  259. #define I40EVF_FLAG_SERVICE_CLIENT_REQUESTED BIT(9)
  260. #define I40EVF_FLAG_CLIENT_NEEDS_OPEN BIT(10)
  261. #define I40EVF_FLAG_CLIENT_NEEDS_CLOSE BIT(11)
  262. #define I40EVF_FLAG_CLIENT_NEEDS_L2_PARAMS BIT(12)
  263. #define I40EVF_FLAG_PROMISC_ON BIT(13)
  264. #define I40EVF_FLAG_ALLMULTI_ON BIT(14)
  265. #define I40EVF_FLAG_LEGACY_RX BIT(15)
  266. #define I40EVF_FLAG_REINIT_ITR_NEEDED BIT(16)
  267. #define I40EVF_FLAG_QUEUES_DISABLED BIT(17)
  268. /* duplicates for common code */
  269. #define I40E_FLAG_DCB_ENABLED 0
  270. #define I40E_FLAG_RX_CSUM_ENABLED I40EVF_FLAG_RX_CSUM_ENABLED
  271. #define I40E_FLAG_LEGACY_RX I40EVF_FLAG_LEGACY_RX
  272. /* flags for admin queue service task */
  273. u32 aq_required;
  274. #define I40EVF_FLAG_AQ_ENABLE_QUEUES BIT(0)
  275. #define I40EVF_FLAG_AQ_DISABLE_QUEUES BIT(1)
  276. #define I40EVF_FLAG_AQ_ADD_MAC_FILTER BIT(2)
  277. #define I40EVF_FLAG_AQ_ADD_VLAN_FILTER BIT(3)
  278. #define I40EVF_FLAG_AQ_DEL_MAC_FILTER BIT(4)
  279. #define I40EVF_FLAG_AQ_DEL_VLAN_FILTER BIT(5)
  280. #define I40EVF_FLAG_AQ_CONFIGURE_QUEUES BIT(6)
  281. #define I40EVF_FLAG_AQ_MAP_VECTORS BIT(7)
  282. #define I40EVF_FLAG_AQ_HANDLE_RESET BIT(8)
  283. #define I40EVF_FLAG_AQ_CONFIGURE_RSS BIT(9) /* direct AQ config */
  284. #define I40EVF_FLAG_AQ_GET_CONFIG BIT(10)
  285. /* Newer style, RSS done by the PF so we can ignore hardware vagaries. */
  286. #define I40EVF_FLAG_AQ_GET_HENA BIT(11)
  287. #define I40EVF_FLAG_AQ_SET_HENA BIT(12)
  288. #define I40EVF_FLAG_AQ_SET_RSS_KEY BIT(13)
  289. #define I40EVF_FLAG_AQ_SET_RSS_LUT BIT(14)
  290. #define I40EVF_FLAG_AQ_REQUEST_PROMISC BIT(15)
  291. #define I40EVF_FLAG_AQ_RELEASE_PROMISC BIT(16)
  292. #define I40EVF_FLAG_AQ_REQUEST_ALLMULTI BIT(17)
  293. #define I40EVF_FLAG_AQ_RELEASE_ALLMULTI BIT(18)
  294. #define I40EVF_FLAG_AQ_ENABLE_VLAN_STRIPPING BIT(19)
  295. #define I40EVF_FLAG_AQ_DISABLE_VLAN_STRIPPING BIT(20)
  296. #define I40EVF_FLAG_AQ_ENABLE_CHANNELS BIT(21)
  297. #define I40EVF_FLAG_AQ_DISABLE_CHANNELS BIT(22)
  298. #define I40EVF_FLAG_AQ_ADD_CLOUD_FILTER BIT(23)
  299. #define I40EVF_FLAG_AQ_DEL_CLOUD_FILTER BIT(24)
  300. /* OS defined structs */
  301. struct net_device *netdev;
  302. struct pci_dev *pdev;
  303. struct i40e_hw hw; /* defined in i40e_type.h */
  304. enum i40evf_state_t state;
  305. unsigned long crit_section;
  306. struct work_struct watchdog_task;
  307. bool netdev_registered;
  308. bool link_up;
  309. enum virtchnl_link_speed link_speed;
  310. enum virtchnl_ops current_op;
  311. #define CLIENT_ALLOWED(_a) ((_a)->vf_res ? \
  312. (_a)->vf_res->vf_cap_flags & \
  313. VIRTCHNL_VF_OFFLOAD_IWARP : \
  314. 0)
  315. #define CLIENT_ENABLED(_a) ((_a)->cinst)
  316. /* RSS by the PF should be preferred over RSS via other methods. */
  317. #define RSS_PF(_a) ((_a)->vf_res->vf_cap_flags & \
  318. VIRTCHNL_VF_OFFLOAD_RSS_PF)
  319. #define RSS_AQ(_a) ((_a)->vf_res->vf_cap_flags & \
  320. VIRTCHNL_VF_OFFLOAD_RSS_AQ)
  321. #define RSS_REG(_a) (!((_a)->vf_res->vf_cap_flags & \
  322. (VIRTCHNL_VF_OFFLOAD_RSS_AQ | \
  323. VIRTCHNL_VF_OFFLOAD_RSS_PF)))
  324. #define VLAN_ALLOWED(_a) ((_a)->vf_res->vf_cap_flags & \
  325. VIRTCHNL_VF_OFFLOAD_VLAN)
  326. struct virtchnl_vf_resource *vf_res; /* incl. all VSIs */
  327. struct virtchnl_vsi_resource *vsi_res; /* our LAN VSI */
  328. struct virtchnl_version_info pf_version;
  329. #define PF_IS_V11(_a) (((_a)->pf_version.major == 1) && \
  330. ((_a)->pf_version.minor == 1))
  331. u16 msg_enable;
  332. struct i40e_eth_stats current_stats;
  333. struct i40e_vsi vsi;
  334. u32 aq_wait_count;
  335. /* RSS stuff */
  336. u64 hena;
  337. u16 rss_key_size;
  338. u16 rss_lut_size;
  339. u8 *rss_key;
  340. u8 *rss_lut;
  341. /* ADQ related members */
  342. struct i40evf_channel_config ch_config;
  343. u8 num_tc;
  344. struct list_head cloud_filter_list;
  345. /* lock to protest access to the cloud filter list */
  346. spinlock_t cloud_filter_list_lock;
  347. u16 num_cloud_filters;
  348. };
  349. /* Ethtool Private Flags */
  350. /* lan device */
  351. struct i40e_device {
  352. struct list_head list;
  353. struct i40evf_adapter *vf;
  354. };
  355. /* needed by i40evf_ethtool.c */
  356. extern char i40evf_driver_name[];
  357. extern const char i40evf_driver_version[];
  358. int i40evf_up(struct i40evf_adapter *adapter);
  359. void i40evf_down(struct i40evf_adapter *adapter);
  360. int i40evf_process_config(struct i40evf_adapter *adapter);
  361. void i40evf_schedule_reset(struct i40evf_adapter *adapter);
  362. void i40evf_reset(struct i40evf_adapter *adapter);
  363. void i40evf_set_ethtool_ops(struct net_device *netdev);
  364. void i40evf_update_stats(struct i40evf_adapter *adapter);
  365. void i40evf_reset_interrupt_capability(struct i40evf_adapter *adapter);
  366. int i40evf_init_interrupt_scheme(struct i40evf_adapter *adapter);
  367. void i40evf_irq_enable_queues(struct i40evf_adapter *adapter, u32 mask);
  368. void i40evf_free_all_tx_resources(struct i40evf_adapter *adapter);
  369. void i40evf_free_all_rx_resources(struct i40evf_adapter *adapter);
  370. void i40e_napi_add_all(struct i40evf_adapter *adapter);
  371. void i40e_napi_del_all(struct i40evf_adapter *adapter);
  372. int i40evf_send_api_ver(struct i40evf_adapter *adapter);
  373. int i40evf_verify_api_ver(struct i40evf_adapter *adapter);
  374. int i40evf_send_vf_config_msg(struct i40evf_adapter *adapter);
  375. int i40evf_get_vf_config(struct i40evf_adapter *adapter);
  376. void i40evf_irq_enable(struct i40evf_adapter *adapter, bool flush);
  377. void i40evf_configure_queues(struct i40evf_adapter *adapter);
  378. void i40evf_deconfigure_queues(struct i40evf_adapter *adapter);
  379. void i40evf_enable_queues(struct i40evf_adapter *adapter);
  380. void i40evf_disable_queues(struct i40evf_adapter *adapter);
  381. void i40evf_map_queues(struct i40evf_adapter *adapter);
  382. int i40evf_request_queues(struct i40evf_adapter *adapter, int num);
  383. void i40evf_add_ether_addrs(struct i40evf_adapter *adapter);
  384. void i40evf_del_ether_addrs(struct i40evf_adapter *adapter);
  385. void i40evf_add_vlans(struct i40evf_adapter *adapter);
  386. void i40evf_del_vlans(struct i40evf_adapter *adapter);
  387. void i40evf_set_promiscuous(struct i40evf_adapter *adapter, int flags);
  388. void i40evf_request_stats(struct i40evf_adapter *adapter);
  389. void i40evf_request_reset(struct i40evf_adapter *adapter);
  390. void i40evf_get_hena(struct i40evf_adapter *adapter);
  391. void i40evf_set_hena(struct i40evf_adapter *adapter);
  392. void i40evf_set_rss_key(struct i40evf_adapter *adapter);
  393. void i40evf_set_rss_lut(struct i40evf_adapter *adapter);
  394. void i40evf_enable_vlan_stripping(struct i40evf_adapter *adapter);
  395. void i40evf_disable_vlan_stripping(struct i40evf_adapter *adapter);
  396. void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
  397. enum virtchnl_ops v_opcode,
  398. i40e_status v_retval, u8 *msg, u16 msglen);
  399. int i40evf_config_rss(struct i40evf_adapter *adapter);
  400. int i40evf_lan_add_device(struct i40evf_adapter *adapter);
  401. int i40evf_lan_del_device(struct i40evf_adapter *adapter);
  402. void i40evf_client_subtask(struct i40evf_adapter *adapter);
  403. void i40evf_notify_client_message(struct i40e_vsi *vsi, u8 *msg, u16 len);
  404. void i40evf_notify_client_l2_params(struct i40e_vsi *vsi);
  405. void i40evf_notify_client_open(struct i40e_vsi *vsi);
  406. void i40evf_notify_client_close(struct i40e_vsi *vsi, bool reset);
  407. void i40evf_enable_channels(struct i40evf_adapter *adapter);
  408. void i40evf_disable_channels(struct i40evf_adapter *adapter);
  409. void i40evf_add_cloud_filter(struct i40evf_adapter *adapter);
  410. void i40evf_del_cloud_filter(struct i40evf_adapter *adapter);
  411. #endif /* _I40EVF_H_ */