6809d30ccfa1c66c8f53e80d1b01b4d34130f08d
[deb_dpdk.git] / drivers / net / e1000 / igb_pf.c
1 /*-
2  *   BSD LICENSE
3  *
4  *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
5  *   All rights reserved.
6  *
7  *   Redistribution and use in source and binary forms, with or without
8  *   modification, are permitted provided that the following conditions
9  *   are met:
10  *
11  *     * Redistributions of source code must retain the above copyright
12  *       notice, this list of conditions and the following disclaimer.
13  *     * Redistributions in binary form must reproduce the above copyright
14  *       notice, this list of conditions and the following disclaimer in
15  *       the documentation and/or other materials provided with the
16  *       distribution.
17  *     * Neither the name of Intel Corporation nor the names of its
18  *       contributors may be used to endorse or promote products derived
19  *       from this software without specific prior written permission.
20  *
21  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33
34 #include <stdio.h>
35 #include <errno.h>
36 #include <stdint.h>
37 #include <stdlib.h>
38 #include <unistd.h>
39 #include <stdarg.h>
40 #include <inttypes.h>
41
42 #include <rte_interrupts.h>
43 #include <rte_log.h>
44 #include <rte_debug.h>
45 #include <rte_eal.h>
46 #include <rte_ether.h>
47 #include <rte_ethdev.h>
48 #include <rte_memcpy.h>
49 #include <rte_malloc.h>
50 #include <rte_random.h>
51
52 #include "base/e1000_defines.h"
53 #include "base/e1000_regs.h"
54 #include "base/e1000_hw.h"
55 #include "e1000_ethdev.h"
56
57 static inline uint16_t
58 dev_num_vf(struct rte_eth_dev *eth_dev)
59 {
60         struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
61
62         return pci_dev->max_vfs;
63 }
64
65 static inline
66 int igb_vf_perm_addr_gen(struct rte_eth_dev *dev, uint16_t vf_num)
67 {
68         unsigned char vf_mac_addr[ETHER_ADDR_LEN];
69         struct e1000_vf_info *vfinfo =
70                 *E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);
71         uint16_t vfn;
72
73         for (vfn = 0; vfn < vf_num; vfn++) {
74                 eth_random_addr(vf_mac_addr);
75                 /* keep the random address as default */
76                 memcpy(vfinfo[vfn].vf_mac_addresses, vf_mac_addr,
77                                 ETHER_ADDR_LEN);
78         }
79
80         return 0;
81 }
82
83 static inline int
84 igb_mb_intr_setup(struct rte_eth_dev *dev)
85 {
86         struct e1000_interrupt *intr =
87                 E1000_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
88
89         intr->mask |= E1000_ICR_VMMB;
90
91         return 0;
92 }
93
94 void igb_pf_host_init(struct rte_eth_dev *eth_dev)
95 {
96         struct e1000_vf_info **vfinfo =
97                 E1000_DEV_PRIVATE_TO_P_VFDATA(eth_dev->data->dev_private);
98         struct e1000_hw *hw =
99                 E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
100         uint16_t vf_num;
101         uint8_t nb_queue;
102
103         RTE_ETH_DEV_SRIOV(eth_dev).active = 0;
104         if (0 == (vf_num = dev_num_vf(eth_dev)))
105                 return;
106
107         if (hw->mac.type == e1000_i350)
108                 nb_queue = 1;
109         else if(hw->mac.type == e1000_82576)
110                 /* per datasheet, it should be 2, but 1 seems correct */
111                 nb_queue = 1;
112         else
113                 return;
114
115         *vfinfo = rte_zmalloc("vf_info", sizeof(struct e1000_vf_info) * vf_num, 0);
116         if (*vfinfo == NULL)
117                 rte_panic("Cannot allocate memory for private VF data\n");
118
119         RTE_ETH_DEV_SRIOV(eth_dev).active = ETH_8_POOLS;
120         RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool = nb_queue;
121         RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx = vf_num;
122         RTE_ETH_DEV_SRIOV(eth_dev).def_pool_q_idx = (uint16_t)(vf_num * nb_queue);
123
124         igb_vf_perm_addr_gen(eth_dev, vf_num);
125
126         /* set mb interrupt mask */
127         igb_mb_intr_setup(eth_dev);
128
129         return;
130 }
131
132 void igb_pf_host_uninit(struct rte_eth_dev *dev)
133 {
134         struct e1000_vf_info **vfinfo;
135         uint16_t vf_num;
136
137         PMD_INIT_FUNC_TRACE();
138
139         vfinfo = E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);
140
141         RTE_ETH_DEV_SRIOV(dev).active = 0;
142         RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool = 0;
143         RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx = 0;
144         RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx = 0;
145
146         vf_num = dev_num_vf(dev);
147         if (vf_num == 0)
148                 return;
149
150         rte_free(*vfinfo);
151         *vfinfo = NULL;
152 }
153
154 #define E1000_RAH_POOLSEL_SHIFT    (18)
155 int igb_pf_host_configure(struct rte_eth_dev *eth_dev)
156 {
157         uint32_t vtctl;
158         uint16_t vf_num;
159         struct e1000_hw *hw =
160                 E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
161         uint32_t vlanctrl;
162         int i;
163         uint32_t rah;
164
165         if (0 == (vf_num = dev_num_vf(eth_dev)))
166                 return -1;
167
168         /* enable VMDq and set the default pool for PF */
169         vtctl = E1000_READ_REG(hw, E1000_VT_CTL);
170         vtctl &= ~E1000_VT_CTL_DEFAULT_POOL_MASK;
171         vtctl |= RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx
172                 << E1000_VT_CTL_DEFAULT_POOL_SHIFT;
173         vtctl |= E1000_VT_CTL_VM_REPL_EN;
174         E1000_WRITE_REG(hw, E1000_VT_CTL, vtctl);
175
176         /* Enable pools reserved to PF only */
177         E1000_WRITE_REG(hw, E1000_VFRE, (~0U) << vf_num);
178         E1000_WRITE_REG(hw, E1000_VFTE, (~0U) << vf_num);
179
180         /* PFDMA Tx General Switch Control Enables VMDQ loopback */
181         if (hw->mac.type == e1000_i350)
182                 E1000_WRITE_REG(hw, E1000_TXSWC, E1000_DTXSWC_VMDQ_LOOPBACK_EN);
183         else
184                 E1000_WRITE_REG(hw, E1000_DTXSWC, E1000_DTXSWC_VMDQ_LOOPBACK_EN);
185
186         /* clear VMDq map to perment rar 0 */
187         rah = E1000_READ_REG(hw, E1000_RAH(0));
188         rah &= ~ (0xFF << E1000_RAH_POOLSEL_SHIFT);
189         E1000_WRITE_REG(hw, E1000_RAH(0), rah);
190
191         /* clear VMDq map to scan rar 32 */
192         rah = E1000_READ_REG(hw, E1000_RAH(hw->mac.rar_entry_count));
193         rah &= ~ (0xFF << E1000_RAH_POOLSEL_SHIFT);
194         E1000_WRITE_REG(hw, E1000_RAH(hw->mac.rar_entry_count), rah);
195
196         /* set VMDq map to default PF pool */
197         rah = E1000_READ_REG(hw, E1000_RAH(0));
198         rah |= (0x1 << (RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx +
199                         E1000_RAH_POOLSEL_SHIFT));
200         E1000_WRITE_REG(hw, E1000_RAH(0), rah);
201
202         /*
203          * enable vlan filtering and allow all vlan tags through
204          */
205         vlanctrl = E1000_READ_REG(hw, E1000_RCTL);
206         vlanctrl |= E1000_RCTL_VFE ; /* enable vlan filters */
207         E1000_WRITE_REG(hw, E1000_RCTL, vlanctrl);
208
209         /* VFTA - enable all vlan filters */
210         for (i = 0; i < IGB_VFTA_SIZE; i++) {
211                 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, i, 0xFFFFFFFF);
212         }
213
214         /* Enable/Disable MAC Anti-Spoofing */
215         e1000_vmdq_set_anti_spoofing_pf(hw, FALSE, vf_num);
216
217         return 0;
218 }
219
220 static void
221 set_rx_mode(struct rte_eth_dev *dev)
222 {
223         struct rte_eth_dev_data *dev_data = dev->data;
224         struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
225         uint32_t fctrl, vmolr = E1000_VMOLR_BAM | E1000_VMOLR_AUPE;
226         uint16_t vfn = dev_num_vf(dev);
227
228         /* Check for Promiscuous and All Multicast modes */
229         fctrl = E1000_READ_REG(hw, E1000_RCTL);
230
231         /* set all bits that we expect to always be set */
232         fctrl &= ~E1000_RCTL_SBP; /* disable store-bad-packets */
233         fctrl |= E1000_RCTL_BAM;
234
235         /* clear the bits we are changing the status of */
236         fctrl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE);
237
238         if (dev_data->promiscuous) {
239                 fctrl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
240                 vmolr |= (E1000_VMOLR_ROPE | E1000_VMOLR_MPME);
241         } else {
242                 if (dev_data->all_multicast) {
243                         fctrl |= E1000_RCTL_MPE;
244                         vmolr |= E1000_VMOLR_MPME;
245                 } else {
246                         vmolr |= E1000_VMOLR_ROMPE;
247                 }
248         }
249
250         if ((hw->mac.type == e1000_82576) ||
251                 (hw->mac.type == e1000_i350)) {
252                 vmolr |= E1000_READ_REG(hw, E1000_VMOLR(vfn)) &
253                          ~(E1000_VMOLR_MPME | E1000_VMOLR_ROMPE |
254                            E1000_VMOLR_ROPE);
255                 E1000_WRITE_REG(hw, E1000_VMOLR(vfn), vmolr);
256         }
257
258         E1000_WRITE_REG(hw, E1000_RCTL, fctrl);
259 }
260
261 static inline void
262 igb_vf_reset_event(struct rte_eth_dev *dev, uint16_t vf)
263 {
264         struct e1000_hw *hw =
265                 E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
266         struct e1000_vf_info *vfinfo =
267                 *(E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
268         uint32_t vmolr = E1000_READ_REG(hw, E1000_VMOLR(vf));
269
270         vmolr |= (E1000_VMOLR_ROPE | E1000_VMOLR_ROMPE |
271                         E1000_VMOLR_BAM | E1000_VMOLR_AUPE);
272         E1000_WRITE_REG(hw, E1000_VMOLR(vf), vmolr);
273
274         E1000_WRITE_REG(hw, E1000_VMVIR(vf), 0);
275
276         /* reset multicast table array for vf */
277         vfinfo[vf].num_vf_mc_hashes = 0;
278
279         /* reset rx mode */
280         set_rx_mode(dev);
281 }
282
283 static inline void
284 igb_vf_reset_msg(struct rte_eth_dev *dev, uint16_t vf)
285 {
286         struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
287         uint32_t reg;
288
289         /* enable transmit and receive for vf */
290         reg = E1000_READ_REG(hw, E1000_VFTE);
291         reg |= (reg | (1 << vf));
292         E1000_WRITE_REG(hw, E1000_VFTE, reg);
293
294         reg = E1000_READ_REG(hw, E1000_VFRE);
295         reg |= (reg | (1 << vf));
296         E1000_WRITE_REG(hw, E1000_VFRE, reg);
297
298         igb_vf_reset_event(dev, vf);
299 }
300
301 static int
302 igb_vf_reset(struct rte_eth_dev *dev, uint16_t vf, uint32_t *msgbuf)
303 {
304         struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
305         struct e1000_vf_info *vfinfo =
306                 *(E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
307         unsigned char *vf_mac = vfinfo[vf].vf_mac_addresses;
308         int rar_entry = hw->mac.rar_entry_count - (vf + 1);
309         uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
310         uint32_t rah;
311
312         igb_vf_reset_msg(dev, vf);
313
314         hw->mac.ops.rar_set(hw, vf_mac, rar_entry);
315         rah = E1000_READ_REG(hw, E1000_RAH(rar_entry));
316         rah |= (0x1 << (vf + E1000_RAH_POOLSEL_SHIFT));
317         E1000_WRITE_REG(hw, E1000_RAH(rar_entry), rah);
318
319         /* reply to reset with ack and vf mac address */
320         msgbuf[0] = E1000_VF_RESET | E1000_VT_MSGTYPE_ACK;
321         rte_memcpy(new_mac, vf_mac, ETHER_ADDR_LEN);
322         e1000_write_mbx(hw, msgbuf, 3, vf);
323
324         return 0;
325 }
326
327 static int
328 igb_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
329 {
330         struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
331         struct e1000_vf_info *vfinfo =
332                 *(E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
333         int rar_entry = hw->mac.rar_entry_count - (vf + 1);
334         uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
335         int rah;
336
337         if (is_unicast_ether_addr((struct ether_addr *)new_mac)) {
338                 if (!is_zero_ether_addr((struct ether_addr *)new_mac))
339                         rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
340                                 sizeof(vfinfo[vf].vf_mac_addresses));
341                 hw->mac.ops.rar_set(hw, new_mac, rar_entry);
342                 rah = E1000_READ_REG(hw, E1000_RAH(rar_entry));
343                 rah |= (0x1 << (E1000_RAH_POOLSEL_SHIFT + vf));
344                 E1000_WRITE_REG(hw, E1000_RAH(rar_entry), rah);
345                 return 0;
346         }
347         return -1;
348 }
349
350 static int
351 igb_vf_set_multicast(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *msgbuf)
352 {
353         int i;
354         uint32_t vector_bit;
355         uint32_t vector_reg;
356         uint32_t mta_reg;
357         int entries = (msgbuf[0] & E1000_VT_MSGINFO_MASK) >>
358                 E1000_VT_MSGINFO_SHIFT;
359         uint16_t *hash_list = (uint16_t *)&msgbuf[1];
360         struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
361         struct e1000_vf_info *vfinfo =
362                 *(E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
363
364         /* only so many hash values supported */
365         entries = RTE_MIN(entries, E1000_MAX_VF_MC_ENTRIES);
366
367         /*
368          * salt away the number of multi cast addresses assigned
369          * to this VF for later use to restore when the PF multi cast
370          * list changes
371          */
372         vfinfo->num_vf_mc_hashes = (uint16_t)entries;
373
374         /*
375          * VFs are limited to using the MTA hash table for their multicast
376          * addresses
377          */
378         for (i = 0; i < entries; i++) {
379                 vfinfo->vf_mc_hashes[i] = hash_list[i];
380         }
381
382         for (i = 0; i < vfinfo->num_vf_mc_hashes; i++) {
383                 vector_reg = (vfinfo->vf_mc_hashes[i] >> 5) & 0x7F;
384                 vector_bit = vfinfo->vf_mc_hashes[i] & 0x1F;
385                 mta_reg = E1000_READ_REG_ARRAY(hw, E1000_MTA, vector_reg);
386                 mta_reg |= (1 << vector_bit);
387                 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, vector_reg, mta_reg);
388         }
389
390         return 0;
391 }
392
393 static int
394 igb_vf_set_vlan(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
395 {
396         int add, vid;
397         struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
398         struct e1000_vf_info *vfinfo =
399                 *(E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
400         uint32_t vid_idx, vid_bit, vfta;
401
402         add = (msgbuf[0] & E1000_VT_MSGINFO_MASK)
403                 >> E1000_VT_MSGINFO_SHIFT;
404         vid = (msgbuf[1] & E1000_VLVF_VLANID_MASK);
405
406         if (add)
407                 vfinfo[vf].vlan_count++;
408         else if (vfinfo[vf].vlan_count)
409                 vfinfo[vf].vlan_count--;
410
411         vid_idx = (uint32_t)((vid >> E1000_VFTA_ENTRY_SHIFT) &
412                              E1000_VFTA_ENTRY_MASK);
413         vid_bit = (uint32_t)(1 << (vid & E1000_VFTA_ENTRY_BIT_SHIFT_MASK));
414         vfta = E1000_READ_REG_ARRAY(hw, E1000_VFTA, vid_idx);
415         if (add)
416                 vfta |= vid_bit;
417         else
418                 vfta &= ~vid_bit;
419
420         E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, vid_idx, vfta);
421         E1000_WRITE_FLUSH(hw);
422
423         return 0;
424 }
425
426 static int
427 igb_vf_set_rlpml(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
428 {
429         struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
430         uint16_t rlpml = msgbuf[1] & E1000_VMOLR_RLPML_MASK;
431         uint32_t max_frame = rlpml + ETHER_HDR_LEN + ETHER_CRC_LEN;
432         uint32_t vmolr;
433
434         if ((max_frame < ETHER_MIN_LEN) || (max_frame > ETHER_MAX_JUMBO_FRAME_LEN))
435                 return -1;
436
437         vmolr = E1000_READ_REG(hw, E1000_VMOLR(vf));
438
439         vmolr &= ~E1000_VMOLR_RLPML_MASK;
440         vmolr |= rlpml;
441
442         /* Enable Long Packet support */
443         vmolr |= E1000_VMOLR_LPE;
444
445         E1000_WRITE_REG(hw, E1000_VMOLR(vf), vmolr);
446         E1000_WRITE_FLUSH(hw);
447
448         return 0;
449 }
450
451 static int
452 igb_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
453 {
454         uint16_t mbx_size = E1000_VFMAILBOX_SIZE;
455         uint32_t msgbuf[E1000_VFMAILBOX_SIZE];
456         int32_t retval;
457         struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
458
459         retval = e1000_read_mbx(hw, msgbuf, mbx_size, vf);
460         if (retval) {
461                 PMD_INIT_LOG(ERR, "Error mbx recv msg from VF %d", vf);
462                 return retval;
463         }
464
465         /* do nothing with the message already processed */
466         if (msgbuf[0] & (E1000_VT_MSGTYPE_ACK | E1000_VT_MSGTYPE_NACK))
467                 return retval;
468
469         /* flush the ack before we write any messages back */
470         E1000_WRITE_FLUSH(hw);
471
472         /* perform VF reset */
473         if (msgbuf[0] == E1000_VF_RESET) {
474                 return igb_vf_reset(dev, vf, msgbuf);
475         }
476
477         /* check & process VF to PF mailbox message */
478         switch ((msgbuf[0] & 0xFFFF)) {
479         case E1000_VF_SET_MAC_ADDR:
480                 retval = igb_vf_set_mac_addr(dev, vf, msgbuf);
481                 break;
482         case E1000_VF_SET_MULTICAST:
483                 retval = igb_vf_set_multicast(dev, vf, msgbuf);
484                 break;
485         case E1000_VF_SET_LPE:
486                 retval = igb_vf_set_rlpml(dev, vf, msgbuf);
487                 break;
488         case E1000_VF_SET_VLAN:
489                 retval = igb_vf_set_vlan(dev, vf, msgbuf);
490                 break;
491         default:
492                 PMD_INIT_LOG(DEBUG, "Unhandled Msg %8.8x",
493                              (unsigned) msgbuf[0]);
494                 retval = E1000_ERR_MBX;
495                 break;
496         }
497
498         /* response the VF according to the message process result */
499         if (retval)
500                 msgbuf[0] |= E1000_VT_MSGTYPE_NACK;
501         else
502                 msgbuf[0] |= E1000_VT_MSGTYPE_ACK;
503
504         msgbuf[0] |= E1000_VT_MSGTYPE_CTS;
505
506         e1000_write_mbx(hw, msgbuf, 1, vf);
507
508         return retval;
509 }
510
511 static inline void
512 igb_rcv_ack_from_vf(struct rte_eth_dev *dev, uint16_t vf)
513 {
514         uint32_t msg = E1000_VT_MSGTYPE_NACK;
515         struct e1000_hw *hw =
516                 E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
517
518         e1000_write_mbx(hw, &msg, 1, vf);
519 }
520
521 void igb_pf_mbx_process(struct rte_eth_dev *eth_dev)
522 {
523         uint16_t vf;
524         struct e1000_hw *hw =
525                 E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
526
527         for (vf = 0; vf < dev_num_vf(eth_dev); vf++) {
528                 /* check & process vf function level reset */
529                 if (!e1000_check_for_rst(hw, vf))
530                         igb_vf_reset_event(eth_dev, vf);
531
532                 /* check & process vf mailbox messages */
533                 if (!e1000_check_for_msg(hw, vf))
534                         igb_rcv_msg_from_vf(eth_dev, vf);
535
536                 /* check & process acks from vf */
537                 if (!e1000_check_for_ack(hw, vf))
538                         igb_rcv_ack_from_vf(eth_dev, vf);
539         }
540 }