doc: add statistics read frequency to fm10k guide
[dpdk.git] / doc / guides / nics / fm10k.rst
1 ..  BSD LICENSE
2     Copyright(c) 2015 Intel Corporation. All rights reserved.
3     All rights reserved.
4
5     Redistribution and use in source and binary forms, with or without
6     modification, are permitted provided that the following conditions
7     are met:
8
9     * Redistributions of source code must retain the above copyright
10     notice, this list of conditions and the following disclaimer.
11     * Redistributions in binary form must reproduce the above copyright
12     notice, this list of conditions and the following disclaimer in
13     the documentation and/or other materials provided with the
14     distribution.
15     * Neither the name of Intel Corporation nor the names of its
16     contributors may be used to endorse or promote products derived
17     from this software without specific prior written permission.
18
19     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23     OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 FM10K Poll Mode Driver
32 ======================
33
34 The FM10K poll mode driver library provides support for the Intel FM10000
35 (FM10K) family of 40GbE/100GbE adapters.
36
37
38 Limitations
39 -----------
40
41
42 Switch manager
43 ~~~~~~~~~~~~~~
44
45 The Intel FM10000 family of NICs integrate a hardware switch and multiple host
46 interfaces. The FM10000 PMD driver only manages host interfaces. For the
47 switch component another switch driver has to be loaded prior to to the
48 FM10000 PMD driver.  The switch driver can be acquired for Intel support or
49 from the `Match Interface <https://github.com/match-interface>`_ project.
50 Only Testpoint is validated with DPDK, the latest version that has been
51 validated with DPDK2.2 is 4.1.6.
52
53 CRC striping
54 ~~~~~~~~~~~~
55
56 The FM10000 family of NICs strip the CRC for every packets coming into the
57 host interface.  So, CRC will be stripped even when the
58 ``rxmode.hw_strip_crc`` member is set to 0 in ``struct rte_eth_conf``.
59
60
61 Maximum packet length
62 ~~~~~~~~~~~~~~~~~~~~~
63
64 The FM10000 family of NICS support a maximum of a 15K jumbo frame. The value
65 is fixed and cannot be changed. So, even when the ``rxmode.max_rx_pkt_len``
66 member of ``struct rte_eth_conf`` is set to a value lower than 15364, frames
67 up to 15364 bytes can still reach the host interface.
68
69 Statistic Polling Frequency
70 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
71
72 The FM10000 NICs expose a set of statistics via the PCI BARs. These statistics
73 are read from the hardware registers when ``rte_eth_stats_get()`` or
74 ``rte_eth_xstats_get()`` is called. The packet counting registers are 32 bits
75 while the byte counting registers are 48 bits. As a result, the statistics must
76 be polled regularly in order to ensure the consistency of the returned reads.
77
78 Given the PCIe Gen3 x8, about 50Gbps of traffic can occur. With 64 byte packets
79 this gives almost 100 million packets/second, causing 32 bit integer overflow
80 after approx 40 seconds. To ensure these overflows are detected and accounted
81 for in the statistics, it is necessary to read statistic regularly. It is
82 suggested to read stats every 20 seconds, which will ensure the statistics
83 are accurate.