summaryrefslogtreecommitdiff
path: root/doc/guides/nics/enic.rst
diff options
context:
space:
mode:
authorHyong Youb Kim <hyonkim@cisco.com>2018-03-07 18:46:58 -0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-03-30 14:08:43 +0200
commit8d782f3f89e1dcd0c8af1c3c93501d7a06159d66 (patch)
tree97fdf0ac095126047e39192153fd2cf3d962a369 /doc/guides/nics/enic.rst
parent92ca7ea444f13db1f750fc1a11225aee9fb27e28 (diff)
downloaddpdk-8d782f3f89e1dcd0c8af1c3c93501d7a06159d66.zip
dpdk-8d782f3f89e1dcd0c8af1c3c93501d7a06159d66.tar.gz
dpdk-8d782f3f89e1dcd0c8af1c3c93501d7a06159d66.tar.xz
net/enic: allocate stats DMA buffer upfront during probe
The driver provides a DMA buffer to the firmware when it requests port stats. The NIC then fills that buffer with latest stats. Currently, the driver allocates the DMA buffer the first time it requests stats and saves it for later use. This can lead to crashes when primary/secondary processes are involved. For example, the following sequence crashes the secondary process. 1. Start a primary app that does not call rte_eth_stats_get() 2. dpdk-procinfo -- --stats dpdk-procinfo crashes while trying to allocate the stats DMA buffer because the alloc function pointer (vdev.alloc_consistent) is valid only in the primary process, not in the secondary process. Overwriting the alloc function pointer in the secondary process is not an option, as it will simply make the pointer invalid in the primary process. Instead, allocate the DMA buffer during probe so that only the primary process does both allocate and free. This allows the secondary process to dump stats as well. Fixes: 9913fbb91df0 ("enic/base: common code") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
Diffstat (limited to 'doc/guides/nics/enic.rst')
0 files changed, 0 insertions, 0 deletions