diff options
author | Ophir Munk <ophirmu@mellanox.com> | 2019-12-08 14:29:14 +0000 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2019-12-08 15:48:23 +0100 |
commit | 1061dc7c85e780269697f7f8980f3b25cd3b1278 (patch) | |
tree | fbdd1cf1202a8dec8dda4890cf68e838ee1e3998 /datapath-windows | |
parent | 164413156cf94d0f4dd1971cf0cc820f8b86055b (diff) | |
download | openvswitch-1061dc7c85e780269697f7f8980f3b25cd3b1278.tar.gz |
dpif-netdev: Retrieve dpif_class from struct dp_netdev.
In case a pmd pointer (struct dp_netdev_pmd_thread *) needs to retrieve
the dpif_class it points at - it can access it as: pmd->dp->class. A
second option is to access it as: pmd->dp->dpif->dpif_class. The first
option is safe since there is one dp netdev with a constant pointer to
the dpif class. The second option is not safe since the pointer
pmd->dp->dpif may be changed under the hood, for example, in case there
is a call to dpif_open(). One such scenario is when a netdev bridge is
running while dumping flows statistics with dpctl in parallel:
ovs-appctl dpctl/dump-flows. This commit makes usage of the first
safe option instead of the second option.
Fixes: 30115809da2e ("dpif-netdev: Use netdev-offload API for port lookup while offloading")
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'datapath-windows')
0 files changed, 0 insertions, 0 deletions