| 1 | .. SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | .. _igb: |
| 3 | |
| 4 | igb |
| 5 | --- |
| 6 | |
| 7 | igb is a family of Intel's gigabit ethernet controllers. In QEMU, 82576 |
| 8 | emulation is implemented in particular. Its datasheet is available at [1]_. |
| 9 | |
| 10 | This implementation is expected to be useful to test SR-IOV networking without |
| 11 | requiring physical hardware. |
| 12 | |
| 13 | Limitations |
| 14 | =========== |
| 15 | |
| 16 | This igb implementation was tested with Linux Test Project [2]_ and Windows HLK |
| 17 | [3]_ during the initial development. Later it was also tested with DPDK Test |
| 18 | Suite [4]_. The command used when testing with LTP is: |
| 19 | |
| 20 | .. code-block:: shell |
| 21 | |
| 22 | network.sh -6mta |
| 23 | |
| 24 | Be aware that this implementation lacks many functionalities available with the |
| 25 | actual hardware, and you may experience various failures if you try to use it |
| 26 | with a different operating system other than DPDK, Linux, and Windows or if you |
| 27 | try functionalities not covered by the tests. |
| 28 | |
| 29 | Using igb |
| 30 | ========= |
| 31 | |
| 32 | Using igb should be nothing different from using another network device. See |
| 33 | :ref:`Network_emulation` in general. |
| 34 | |
| 35 | However, you may also need to perform additional steps to activate SR-IOV |
| 36 | feature on your guest. For Linux, refer to [5]_. |
| 37 | |
| 38 | Developing igb |
| 39 | ============== |
| 40 | |
| 41 | igb is the successor of e1000e, and e1000e is the successor of e1000 in turn. |
| 42 | As these devices are very similar, if you make a change for igb and the same |
| 43 | change can be applied to e1000e and e1000, please do so. |
| 44 | |
| 45 | Please do not forget to run tests before submitting a change. As tests included |
| 46 | in QEMU is very minimal, run some application which is likely to be affected by |
| 47 | the change to confirm it works in an integrated system. |
| 48 | |
| 49 | Testing igb |
| 50 | =========== |
| 51 | |
| 52 | A qtest of the basic functionality is available. Run the below at the build |
| 53 | directory: |
| 54 | |
| 55 | .. code-block:: shell |
| 56 | |
| 57 | pyvenv/bin/meson test qtest-x86_64/qos-test |
| 58 | |
| 59 | ethtool can test register accesses, interrupts, etc. It is automated as an |
| 60 | functional test and can be run from the build directory with the following |
| 61 | command: |
| 62 | |
| 63 | .. code:: shell |
| 64 | |
| 65 | pyvenv/bin/meson test --suite thorough func-x86_64-netdev_ethtool |
| 66 | |
| 67 | References |
| 68 | ========== |
| 69 | |
| 70 | .. [1] https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/82576eb-gigabit-ethernet-controller-datasheet.pdf |
| 71 | .. [2] https://github.com/linux-test-project/ltp |
| 72 | .. [3] https://learn.microsoft.com/en-us/windows-hardware/test/hlk/ |
| 73 | .. [4] https://doc.dpdk.org/dts/gsg/ |
| 74 | .. [5] https://docs.kernel.org/PCI/pci-iov-howto.html |